{
  "version": 3,
  "sources": ["../../../../node_modules/base-x/src/index.js", "../../../../node_modules/base64-js/index.js", "../../../../node_modules/ieee754/index.js", "../../../../node_modules/buffer/index.js", "../../../lib.shared.utils/to_string.ts", "../../../lib.shared.utils/index.ts"],
  "sourcesContent": ["'use strict'\n// base-x encoding / decoding\n// Copyright (c) 2018 base-x contributors\n// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)\n// Distributed under the MIT software license, see the accompanying\n// file LICENSE or http://www.opensource.org/licenses/mit-license.php.\nfunction base (ALPHABET) {\n  if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }\n  var BASE_MAP = new Uint8Array(256)\n  for (var j = 0; j < BASE_MAP.length; j++) {\n    BASE_MAP[j] = 255\n  }\n  for (var i = 0; i < ALPHABET.length; i++) {\n    var x = ALPHABET.charAt(i)\n    var xc = x.charCodeAt(0)\n    if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }\n    BASE_MAP[xc] = i\n  }\n  var BASE = ALPHABET.length\n  var LEADER = ALPHABET.charAt(0)\n  var FACTOR = Math.log(BASE) / Math.log(256) // log(BASE) / log(256), rounded up\n  var iFACTOR = Math.log(256) / Math.log(BASE) // log(256) / log(BASE), rounded up\n  function encode (source) {\n    if (source instanceof Uint8Array) {\n    } else if (ArrayBuffer.isView(source)) {\n      source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength)\n    } else if (Array.isArray(source)) {\n      source = Uint8Array.from(source)\n    }\n    if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }\n    if (source.length === 0) { return '' }\n        // Skip & count leading zeroes.\n    var zeroes = 0\n    var length = 0\n    var pbegin = 0\n    var pend = source.length\n    while (pbegin !== pend && source[pbegin] === 0) {\n      pbegin++\n      zeroes++\n    }\n        // Allocate enough space in big-endian base58 representation.\n    var size = ((pend - pbegin) * iFACTOR + 1) >>> 0\n    var b58 = new Uint8Array(size)\n        // Process the bytes.\n    while (pbegin !== pend) {\n      var carry = source[pbegin]\n            // Apply \"b58 = b58 * 256 + ch\".\n      var i = 0\n      for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {\n        carry += (256 * b58[it1]) >>> 0\n        b58[it1] = (carry % BASE) >>> 0\n        carry = (carry / BASE) >>> 0\n      }\n      if (carry !== 0) { throw new Error('Non-zero carry') }\n      length = i\n      pbegin++\n    }\n        // Skip leading zeroes in base58 result.\n    var it2 = size - length\n    while (it2 !== size && b58[it2] === 0) {\n      it2++\n    }\n        // Translate the result into a string.\n    var str = LEADER.repeat(zeroes)\n    for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]) }\n    return str\n  }\n  function decodeUnsafe (source) {\n    if (typeof source !== 'string') { throw new TypeError('Expected String') }\n    if (source.length === 0) { return new Uint8Array() }\n    var psz = 0\n        // Skip and count leading '1's.\n    var zeroes = 0\n    var length = 0\n    while (source[psz] === LEADER) {\n      zeroes++\n      psz++\n    }\n        // Allocate enough space in big-endian base256 representation.\n    var size = (((source.length - psz) * FACTOR) + 1) >>> 0 // log(58) / log(256), rounded up.\n    var b256 = new Uint8Array(size)\n        // Process the characters.\n    while (source[psz]) {\n            // Decode character\n      var carry = BASE_MAP[source.charCodeAt(psz)]\n            // Invalid character\n      if (carry === 255) { return }\n      var i = 0\n      for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {\n        carry += (BASE * b256[it3]) >>> 0\n        b256[it3] = (carry % 256) >>> 0\n        carry = (carry / 256) >>> 0\n      }\n      if (carry !== 0) { throw new Error('Non-zero carry') }\n      length = i\n      psz++\n    }\n        // Skip leading zeroes in b256.\n    var it4 = size - length\n    while (it4 !== size && b256[it4] === 0) {\n      it4++\n    }\n    var vch = new Uint8Array(zeroes + (size - it4))\n    var j = zeroes\n    while (it4 !== size) {\n      vch[j++] = b256[it4++]\n    }\n    return vch\n  }\n  function decode (string) {\n    var buffer = decodeUnsafe(string)\n    if (buffer) { return buffer }\n    throw new Error('Non-base' + BASE + ' character')\n  }\n  return {\n    encode: encode,\n    decodeUnsafe: decodeUnsafe,\n    decode: decode\n  }\n}\nmodule.exports = base\n", "'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n", "exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n", "/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <https://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar customInspectSymbol =\n  (typeof Symbol === 'function' && typeof Symbol.for === 'function')\n    ? Symbol.for('nodejs.util.inspect.custom')\n    : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nvar K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Print warning and recommend using `buffer` v4.x which has an Object\n *               implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n    typeof console.error === 'function') {\n  console.error(\n    'This browser lacks typed array (Uint8Array) support which is required by ' +\n    '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n  )\n}\n\nfunction typedArraySupport () {\n  // Can typed array instances can be augmented?\n  try {\n    var arr = new Uint8Array(1)\n    var proto = { foo: function () { return 42 } }\n    Object.setPrototypeOf(proto, Uint8Array.prototype)\n    Object.setPrototypeOf(arr, proto)\n    return arr.foo() === 42\n  } catch (e) {\n    return false\n  }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.buffer\n  }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n  enumerable: true,\n  get: function () {\n    if (!Buffer.isBuffer(this)) return undefined\n    return this.byteOffset\n  }\n})\n\nfunction createBuffer (length) {\n  if (length > K_MAX_LENGTH) {\n    throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n  }\n  // Return an augmented `Uint8Array` instance\n  var buf = new Uint8Array(length)\n  Object.setPrototypeOf(buf, Buffer.prototype)\n  return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new TypeError(\n        'The \"string\" argument must be of type string. Received type number'\n      )\n    }\n    return allocUnsafe(arg)\n  }\n  return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n  if (typeof value === 'string') {\n    return fromString(value, encodingOrOffset)\n  }\n\n  if (ArrayBuffer.isView(value)) {\n    return fromArrayLike(value)\n  }\n\n  if (value == null) {\n    throw new TypeError(\n      'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n      'or Array-like Object. Received type ' + (typeof value)\n    )\n  }\n\n  if (isInstance(value, ArrayBuffer) ||\n      (value && isInstance(value.buffer, ArrayBuffer))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof SharedArrayBuffer !== 'undefined' &&\n      (isInstance(value, SharedArrayBuffer) ||\n      (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n    return fromArrayBuffer(value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'number') {\n    throw new TypeError(\n      'The \"value\" argument must not be of type number. Received type number'\n    )\n  }\n\n  var valueOf = value.valueOf && value.valueOf()\n  if (valueOf != null && valueOf !== value) {\n    return Buffer.from(valueOf, encodingOrOffset, length)\n  }\n\n  var b = fromObject(value)\n  if (b) return b\n\n  if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n      typeof value[Symbol.toPrimitive] === 'function') {\n    return Buffer.from(\n      value[Symbol.toPrimitive]('string'), encodingOrOffset, length\n    )\n  }\n\n  throw new TypeError(\n    'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n    'or Array-like Object. Received type ' + (typeof value)\n  )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be of type number')\n  } else if (size < 0) {\n    throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n  }\n}\n\nfunction alloc (size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(size).fill(fill, encoding)\n      : createBuffer(size).fill(fill)\n  }\n  return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n  assertSize(size)\n  return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('Unknown encoding: ' + encoding)\n  }\n\n  var length = byteLength(string, encoding) | 0\n  var buf = createBuffer(length)\n\n  var actual = buf.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    buf = buf.slice(0, actual)\n  }\n\n  return buf\n}\n\nfunction fromArrayLike (array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  var buf = createBuffer(length)\n  for (var i = 0; i < length; i += 1) {\n    buf[i] = array[i] & 255\n  }\n  return buf\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\"offset\" is outside of buffer bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\"length\" is outside of buffer bounds')\n  }\n\n  var buf\n  if (byteOffset === undefined && length === undefined) {\n    buf = new Uint8Array(array)\n  } else if (length === undefined) {\n    buf = new Uint8Array(array, byteOffset)\n  } else {\n    buf = new Uint8Array(array, byteOffset, length)\n  }\n\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(buf, Buffer.prototype)\n\n  return buf\n}\n\nfunction fromObject (obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    var buf = createBuffer(len)\n\n    if (buf.length === 0) {\n      return buf\n    }\n\n    obj.copy(buf, 0, 0, len)\n    return buf\n  }\n\n  if (obj.length !== undefined) {\n    if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n      return createBuffer(0)\n    }\n    return fromArrayLike(obj)\n  }\n\n  if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n    return fromArrayLike(obj.data)\n  }\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= K_MAX_LENGTH) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return b != null && b._isBuffer === true &&\n    b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n  if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n  if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError(\n      'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n    )\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!Array.isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (isInstance(buf, Uint8Array)) {\n      buf = Buffer.from(buf)\n    }\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    throw new TypeError(\n      'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n      'Received type ' + typeof string\n    )\n  }\n\n  var len = string.length\n  var mustMatch = (arguments.length > 2 && arguments[2] === true)\n  if (!mustMatch && len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) {\n          return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n        }\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n  if (this.length > max) str += ' ... '\n  return '<Buffer ' + str + '>'\n}\nif (customInspectSymbol) {\n  Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (isInstance(target, Uint8Array)) {\n    target = Buffer.from(target, target.offset, target.byteLength)\n  }\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError(\n      'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n      'Received type ' + (typeof target)\n    )\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset // Coerce to Number.\n  if (numberIsNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  var strLen = string.length\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (numberIsNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset >>> 0\n    if (isFinite(length)) {\n      length = length >>> 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n        : (firstByte > 0xBF) ? 2\n          : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += hexSliceLookupTable[buf[i]]\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf = this.subarray(start, end)\n  // Return an augmented `Uint8Array` instance\n  Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  offset = offset >>> 0\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  byteLength = byteLength >>> 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset + 3] = (value >>> 24)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 1] = (value >>> 8)\n  this[offset] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    var limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    var limit = Math.pow(2, (8 * byteLength) - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  this[offset] = (value >>> 8)\n  this[offset + 1] = (value & 0xff)\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  this[offset] = (value & 0xff)\n  this[offset + 1] = (value >>> 8)\n  this[offset + 2] = (value >>> 16)\n  this[offset + 3] = (value >>> 24)\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  this[offset] = (value >>> 24)\n  this[offset + 1] = (value >>> 16)\n  this[offset + 2] = (value >>> 8)\n  this[offset + 3] = (value & 0xff)\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  value = +value\n  offset = offset >>> 0\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n\n  if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n    // Use built-in when available, missing from IE11\n    this.copyWithin(targetStart, start, end)\n  } else if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (var i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, end),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if ((encoding === 'utf8' && code < 128) ||\n          encoding === 'latin1') {\n        // Fast path: If `val` fits into a single byte, use that numeric value.\n        val = code\n      }\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  } else if (typeof val === 'boolean') {\n    val = Number(val)\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : Buffer.from(val, encoding)\n    var len = bytes.length\n    if (len === 0) {\n      throw new TypeError('The value \"' + val +\n        '\" is invalid for argument \"value\"')\n    }\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node takes equal signs as end of the Base64 encoding\n  str = str.split('=')[0]\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = str.trim().replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n  return obj instanceof type ||\n    (obj != null && obj.constructor != null && obj.constructor.name != null &&\n      obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n  // For IE11 support\n  return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nvar hexSliceLookupTable = (function () {\n  var alphabet = '0123456789abcdef'\n  var table = new Array(256)\n  for (var i = 0; i < 16; ++i) {\n    var i16 = i * 16\n    for (var j = 0; j < 16; ++j) {\n      table[i16 + j] = alphabet[i] + alphabet[j]\n    }\n  }\n  return table\n})()\n", "declare const window: any\n\nexport function class_name(obj: any): string {\n    let result: string = typeof obj\n    if (result === \"function\") {\n        return obj.name\n    }\n    if (result === \"object\") {\n        if (obj === null) {\n            result = \"null\"\n        } else {\n            const c = obj.constructor as any\n            if (c) {\n                result = c.displayName || c.name\n                if (!result) {\n                    // Special handling for protobuf messages ...\n                    if (obj.$type) {\n                        result = obj.$type.name\n                    }\n                }\n                if (!result) {\n                    try {\n                        // Workaround for IE -- see https://goo.gl/IUuSNO ...\n                        const a = /function\\s+([^\\s(]+)/.exec(c.toString())\n                        result = a![1]\n                    } catch {\n                        result = \"???\"\n                    }\n                }\n            } else {\n                result = \"???\"\n            }\n        }\n    }\n    return result\n}\n\n/**\n * Converts `obj` to JSON just like ``JSON.stringify` does,\n * but handles circular values and errors.\n *\n * Adapted from https://github.com/moll/json-stringify-safe/blob/master/stringify.js\n */\nexport function safe_JSON_stringify(obj: any, replacer?: any, spaces?: number): string {\n    function to_JSON(x: any) {\n        const stack: any = []\n        const keys: any = []\n\n        function cycle_replacer(key: string, value: any) {\n            if (stack[0] === value) {\n                return \"<circular ref: ~>\"\n            }\n            return \"<circular ref: ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \">\"\n        }\n\n        function serializer(this: any, key: string, value: any) {\n            if (process.env.RUNNING_IN_BROWSER) {\n                if (value === window) {\n                    return \"<window>\"\n                }\n            }\n            if (stack.length > 0) {\n                const pos = stack.indexOf(this)\n                if (pos !== -1) {\n                    stack.splice(pos + 1)\n                    keys.splice(pos, Infinity, key)\n                } else {\n                    stack.push(this)\n                    keys.push(key)\n                }\n                // Handle circular references.\n                if (stack.indexOf(value) !== -1) {\n                    value = cycle_replacer.call(this, key, value)\n                }\n            } else {\n                stack.push(value)\n            }\n            return replacer ? replacer.call(this, key, value) : value\n        }\n        return JSON.stringify(x, serializer, spaces)\n    }\n\n    try {\n        return to_JSON(obj)\n    } catch {\n        try {\n            if (typeof obj === \"object\") {\n                const o: any = {}\n                for (const [k, v] of Object.entries(obj)) {\n                    if (typeof v !== \"function\") {\n                        try {\n                            to_JSON(v)\n                        } catch {\n                            o[k] = \"<Could not be converted to JSON>\"\n                            continue\n                        }\n                        o[k] = v\n                    }\n                }\n                return to_JSON(o)\n            }\n        } catch {\n            /* Ignored. */\n        }\n        return \"<Could not be converted to JSON>\"\n    }\n}\n\nfunction element_to_string(elm: {tagName: string; className: string; id: string}) {\n    const tag_name = elm.tagName.toLowerCase()\n    let s = \"<\" + tag_name\n    if (elm.id) {\n        s += ' id=\"' + elm.id + '\"'\n    }\n    if (elm.className) {\n        s += ' class=\"' + elm.className + '\"'\n    }\n    if ((elm as any).src) {\n        s += ' src=\"' + (elm as any).src + '\"'\n    }\n    if ((elm as any).href) {\n        s += ' href=\"' + (elm as any).href + '\"'\n    }\n    s += \">\"\n    return s\n}\n\nexport function safe_to_string(x: any) {\n    try {\n        if (x.tagName) {\n            return element_to_string(x)\n        } else if (typeof x === \"number\") {\n            return x.toString()\n        } else if (x instanceof Error) {\n            return error_to_string(x)\n        } else {\n            return safe_JSON_stringify(x)\n        }\n    } catch {\n        try {\n            return \"\" + x\n        } catch (error2) {\n            try {\n                return \"??? -- \" + error2\n            } catch {\n                return \"???\"\n            }\n        }\n    }\n}\n\nexport function error_to_string(error: any) {\n    let s = \"\" + error\n    try {\n        let stack: string = (error as any).stacktrace || error.stack\n        if (stack) {\n            stack = \"\" + stack\n            if (error.message && stack.indexOf(error.message) >= 0) {\n                s = stack\n            } else {\n                s = s + \"\\n\" + stack\n            }\n        }\n    } catch {\n        // Ignored\n    }\n    if (s.startsWith(\"[object\")) {\n        // No error? What do we have here? Assemble a string with all properties ...\n        const a = []\n        for (const k in error) {\n            // Note: We want *all* properties of the error (except functions),\n            // therefore we don't filter with hasOwnProperty ...\n            const v: any = (error as any)[k]\n            if (typeof v === \"function\") {\n                continue\n            }\n            a.push(`${k}: ${safe_to_string(v)}`)\n        }\n        s = a.join(\"\\n\\t\")\n    }\n    return s\n}\n", "import BaseX from \"base-x\"\nimport {Buffer} from \"buffer\"\nimport {class_name, error_to_string, safe_JSON_stringify, safe_to_string} from \"./to_string\"\n\nexport {class_name, error_to_string, safe_JSON_stringify, safe_to_string}\n\n/**\n * Because we are in a `shared` module, we cannot use neither of the types `node` nor `dom`.\n * That's why we use this minimal declaration here.\n */\ndeclare type URL = {\n    hostname: string\n    protocol: string\n}\n\n/**\n * Because we are in a `shared` module, we cannot use neither of the types `node` nor `dom`.\n * That's why we use this minimal declaration here.\n */\ndeclare const URL: {\n    prototype: URL\n    new (url: string, base?: string | URL): URL\n}\n\nexport type CancelablePromise<T> = Promise<T> & {cancel: () => void}\n\nexport function is_UID(uid: any, prefix?: string): boolean {\n    return !!(\n        uid &&\n        typeof uid === \"string\" &&\n        uid.length >= 17 &&\n        (!prefix || uid.startsWith(prefix))\n    )\n}\n\nexport const as_UID = (x: any) => {\n    if (is_UID(x)) {\n        return x\n    }\n    throw new Error(\"Not an UID: \" + safe_to_string(x))\n}\n\nexport function CancelablePromise_resolve<T>(value: T): CancelablePromise<T> {\n    const p = Promise.resolve(value) as CancelablePromise<T>\n    p.cancel = nop\n    return p\n}\n\nexport function CancelablePromise_reject<T extends Error>(value: T): CancelablePromise<T> {\n    const p = Promise.reject(value) as CancelablePromise<T>\n    p.cancel = nop\n    return p\n}\n\nexport function full_name(account: {given_name?: string; family_name?: string} | undefined) {\n    if (!account) {\n        return \"...\"\n    }\n    const {given_name, family_name} = account\n    let s = given_name || \"\"\n    if (family_name) {\n        if (s) {\n            s += \" \"\n        }\n        s += family_name\n    }\n    return s.trim()\n}\n\nconst base62 = BaseX(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\")\n\n/**\n * See https://www.wikidata.org/wiki/Q809817\n */\nexport function encode_b62(buf: Buffer | Uint8Array): string {\n    assert(\n        buf.byteLength < 256,\n        \"Buffer too large - only up to 255 bytes allowed for performance reasons\",\n    )\n    return base62.encode(buf)\n}\n\n/**\n * See https://www.wikidata.org/wiki/Q809817\n */\nexport function decode_b62(s: string): Buffer {\n    assert(\n        s.length < 344, // 343 == len(encode_b64(255 * [0xff]))\n        \"String too large - only up to 343 characters allowed for performance reasons\",\n    )\n    return Buffer.from(base62.decode(s))\n}\n\n/**\n * See https://en.wikipedia.org/wiki/Base64#RFC_4648\n */\nexport function encode_b64url(buf: Buffer) {\n    return buf.toString(\"base64\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\")\n}\n\n/**\n * See https://en.wikipedia.org/wiki/Base64#RFC_4648\n */\nexport function decode_b64url(s: string) {\n    if (s.length % 4 !== 0) {\n        s += \"===\".slice(0, 4 - (s.length % 4))\n    }\n    s = s.replace(/-/g, \"+\").replace(/_/g, \"/\")\n    return Buffer.from(s, \"base64\")\n}\n\nexport function assert_never(x: never): any {\n    const class_name_ = class_name(x)\n    if (x && typeof x === \"object\" && class_name_ !== \"Object\") {\n        throw new Error(\n            `assert_never(...) called with ${class_name_} instance: ${safe_to_string(x)}`,\n        )\n    } else {\n        throw new Error(`assert_never(${safe_to_string(x)})`)\n    }\n}\n\nexport function is_never_compile_time_check(arg: never) {\n    return arg\n}\n\n/**\n * Throws an ``Error`` if the first parameter is falsy.\n * See https://developer.mozilla.org/de/docs/Glossary/Falsy\n */\nexport function assert<T>(\n    should_be_true: T,\n    msg_or_function?: string | (() => string),\n): asserts should_be_true {\n    if (!should_be_true) {\n        if (typeof msg_or_function === \"string\") {\n            throw new Error(msg_or_function)\n        } else {\n            let msg: string\n            try {\n                msg = msg_or_function ? msg_or_function() : \"assertion error\"\n            } catch (error) {\n                msg = \"Failed to produce error message: \" + error.message\n            }\n            throw new Error(msg)\n        }\n    }\n}\n\n/**\n * Make sure the given value is never null.\n */\nexport function not_null<T>(o: T, error_msg?: string): NonNullable<T> {\n    if (o === null) {\n        throw new Error(`Unexpected call: not_null(null)${error_msg ? \": \" + error_msg : \"\"}`)\n    } else if (typeof o === \"undefined\") {\n        throw new Error(`Unexpected call: not_null(undefined)${error_msg ? \": \" + error_msg : \"\"}`)\n    }\n    return o!\n}\n\n/**\n * Helper function to be used in ``Array.sort`` for sorting in ascending order.\n */\nexport function compare(a: any, b: any): number {\n    if (a < b) {\n        return -1\n    }\n    if (a > b) {\n        return 1\n    }\n    return 0\n}\n\n/**\n * Convert `MyCamelCase` to `my_camel_case`.\n */\nexport function camel_case_to_underscore(s: string): string {\n    // First replace MyURLResponse with MyURL_Response.\n    s = s.replace(/([A-Z]+)([A-Z])/g, (_, m1, m2) => `_${m1}_${m2}`.toLowerCase())\n    return s.replace(/(?!^)([A-Z]+)/g, \"_$1\").toLowerCase()\n}\n\n/**\n * Convert `my_camel_case` to `MyCamelCase`.\n */\nexport function underscore_to_camelcase(s: string): string {\n    s = s[0].toUpperCase() + s.slice(1)\n    return s.replace(/_[a-z]/g, function (g) {\n        return g[1].toUpperCase()\n    })\n}\n\nexport function truncate(s: string, max_length: number, filler = \"...\") {\n    if (s.length <= max_length) {\n        return s\n    }\n    return s.substring(0, max_length - filler.length) + \"...\"\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function nop(..._: any[]): any {\n    // Nothing to do.\n}\n\nexport async function ignore_errors<T>(f: () => (T | undefined) | Promise<T | undefined>) {\n    try {\n        return await f()\n    } catch {\n        // Ignored\n    }\n}\n\nexport async function sleep(ms: number) {\n    return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\n/**\n * Returns a new Set containing all items of `set1` and `set2`.\n */\nexport function Set_union<T>(set1: Set<T>, set2: Set<T>): Set<T> {\n    return new Set([...set1, ...set2])\n}\n\n/**\n * Returns a new Set containing all items which are both in `set1` and in `set2`.\n */\nexport function Set_intersection<T>(set1: Set<T>, set2: Set<T>): Set<T> {\n    return new Set(Array.from(set1).filter((item) => set2.has(item)))\n}\n\n/**\n * Returns a new Set containing all items of `set1`, which are not in `set2`.\n */\nexport function Set_difference<T>(set1: Set<T>, set2: Set<T>): Set<T> {\n    return new Set(Array.from(set1).filter((item) => !set2.has(item)))\n}\n\n/**\n * Returns a new Set containing all items of `set1`, which are not in `set2` and vice versa.\n */\nexport function Set_symmetric_difference<T>(set1: Set<T>, set2: Set<T>): Set<T> {\n    return new Set(\n        Array.from(set1)\n            .filter((x) => !set2.has(x))\n            .concat(Array.from(set2).filter((x) => !set1.has(x))),\n    )\n}\n\nexport function Set_equal<T>(set1: Set<T>, set2: Set<T>): boolean {\n    if (set1.size !== set2.size) {\n        return false\n    }\n    for (const x of set1) {\n        if (!set2.has(x)) {\n            return false\n        }\n    }\n    return true\n}\n\nexport class TimeoutError extends Error {\n    constructor(message: string) {\n        super(message)\n        // This is needed according to https://goo.gl/N2zvkR\n        Object.setPrototypeOf(this, TimeoutError.prototype)\n    }\n}\n\n/**\n * Decorate the given `promise` so that it automatically rejects after the given\n * timeout if it was not resolved or rejected before. (Will not decorate the given\n * `promise` if the given `timeout` is less than or equals 0.)\n */\nexport function with_timeout<T, P extends Promise<T>>(\n    millis: number,\n    promise: P,\n    opts: {description?: string} = {},\n): P {\n    if (millis <= 0) {\n        return promise\n    }\n    // Note: We construct the `Error` here, so that it has a meaningful stack trace.\n    const timeout_error = new TimeoutError(\n        `Timeout after ${millis} ms${opts.description ? \" - \" + opts.description : \"\"}`,\n    )\n    let promise_pending = true\n    let cancel_timeout: any\n    const result: any = Promise.race([\n        promise.then(\n            (value: T) => {\n                promise_pending = false\n                clearTimeout(cancel_timeout)\n                return value\n            },\n            (error: Error) => {\n                promise_pending = false\n                clearTimeout(cancel_timeout)\n                throw error\n            },\n        ),\n        new Promise(\n            (_, reject) =>\n                (cancel_timeout = setTimeout(() => {\n                    reject(timeout_error)\n                    if (promise_pending && (promise as any).cancel) {\n                        ;(promise as any).cancel()\n                    }\n                }, millis)),\n        ),\n    ])\n    if ((promise as any).cancel) {\n        result.cancel = (promise as any).cancel.bind(promise)\n    }\n    return result\n}\n\nexport type ControllablePromise<T> = Promise<T> & {\n    resolve: (value: T) => void\n    reject: (error: Error) => void\n}\n\nexport function new_ControllablePromise<T>(): ControllablePromise<T> {\n    let resolve_: (value: T) => void\n    let reject_: (error: Error) => void\n    const promise = new Promise((resolve, reject) => {\n        resolve_ = resolve\n        reject_ = reject\n    })\n    promise.catch(nop) // Make sure a promise rejection is never unhandled.\n    return Object.assign(promise, {\n        resolve: resolve_!,\n        reject: reject_!,\n    }) as any\n}\n\ntype ControllableCancelablePromise<T> = ControllablePromise<T> & CancelablePromise<T>\n\nexport function new_ControllableCancelablePromise<T>(): ControllableCancelablePromise<T> {\n    const p = new_ControllablePromise<T>() as ControllablePromise<T> & CancelablePromise<T>\n    p.cancel = () => p.reject(new Error(\"Canceled\"))\n    return p\n}\n\nexport function flatten<T>(a: Array<Array<T>>): Array<T> {\n    return Array.prototype.concat.apply(\n        [],\n        a.map((x: any) => (x.toJS ? x.toJS() : x)),\n    )\n}\n\n/**\n * Apply batches asynchronously.\n */\nexport class AsyncBatch<Key, Value extends ControllablePromise<any>> {\n    private pending = new Map<Key, Value>()\n    private schedule_timeout_id: any\n    private closed = false\n\n    constructor(\n        private apply_batch: (batch: Map<Key, Value>) => void | Promise<void>,\n        private opts: {\n            schedule_interval_ms: number\n            batch_size: number\n        },\n    ) {}\n\n    get(key: Key): Value | undefined {\n        return this.pending.get(key)\n    }\n\n    schedule(key: Key, promise: Value) {\n        this.pending.set(key, promise)\n        this.schedule_next_run()\n    }\n\n    async close() {\n        clearTimeout(this.schedule_timeout_id)\n        this.closed = true\n        for (const promise of this.pending.values()) {\n            promise.catch(nop)\n            promise.reject(new Error(\"AsyncBatch is closed\"))\n        }\n    }\n\n    private schedule_next_run() {\n        if (this.closed) {\n            throw new Error(\"AsyncBatch is closed\")\n        }\n        // Wrapping the actual scheduling in an `async` block makes sure we do not miss a scheduled\n        // entry and do not run `this.apply_batch` twice on entries.\n        ;(async () => {\n            if (!this.schedule_timeout_id && this.pending.size) {\n                this.schedule_timeout_id = setTimeout(this.run, this.opts.schedule_interval_ms)\n            }\n        })().catch(nop)\n    }\n\n    private run = async () => {\n        const batch = [...this.pending.entries()].slice(0, this.opts.batch_size)\n        if (!batch.length) {\n            return\n        }\n        batch.forEach((x) => this.pending.delete(x[0]))\n        try {\n            await this.apply_batch(new Map(batch))\n        } catch (error) {\n            // eslint-disable-next-line no-console\n            console.error(\"Failed to apply patch, batch will not be retried again\", error)\n        } finally {\n            this.schedule_timeout_id = 0\n            if (this.pending.size && !this.closed) {\n                this.schedule_next_run()\n            }\n        }\n    }\n}\n\n/**\n * Extract the domain part of an URL.\n */\nexport function extract_domain(url: string, remove_prefixes = [\"www\", \"ftp\"]): string | undefined {\n    try {\n        const domain = new URL(url.includes(\"://\") ? url : `https://${url}`).hostname\n        const parts = domain.split(\".\")\n        if (remove_prefixes.includes(parts[0])) {\n            return parts.slice(1).join(\".\")\n        }\n        return domain.toLowerCase() || undefined\n    } catch {\n        return undefined\n    }\n}\n\n/**\n * Extract the pathname part of an URL.\n */\nexport function extract_path(url?: string) {\n    if (!url) {\n        return \"\"\n    }\n    let i = url.indexOf(\"//\")\n    if (i >= 0) {\n        const j = url.indexOf(\"/\", i + 2)\n        if (j < 0) {\n            return \"\"\n        }\n        url = url.substr(j)\n    } else {\n        i = url.indexOf(\"/\")\n        if (i > 0) {\n            const s = url.substr(0, i)\n            // We don't know if `s` is a hostname or a dirname, therefore we use a heuristic.\n            if (s.indexOf(\".\") > 0) {\n                url = url.substr(i)\n            }\n        }\n    }\n    i = url.indexOf(\"?\")\n    if (i >= 0) {\n        url = url.substr(0, i)\n    }\n    i = url.indexOf(\"#\")\n    if (i >= 0) {\n        url = url.substr(0, i)\n    }\n    return url\n}\n\n/**\n * Test whether the given string is a valid URL with protocols http or https and not longer than\n * `max_len`.\n */\nexport function is_valid_HTTP_URL(s: string, max_len: number): boolean {\n    if (s.includes(\" \")) {\n        return false\n    }\n    try {\n        const url = new URL(s)\n        const {protocol, hostname} = url\n        if (\n            !is_valid_IP_format(hostname, {remove_enclosing_IPv6_URL_brackets: true}) &&\n            ((hostname.indexOf(\".\") < 0 && hostname !== \"localhost\") ||\n                hostname.lastIndexOf(\".\") > hostname.length - 3)\n        ) {\n            return false\n        }\n        return [\"http:\", \"https:\"].includes(protocol) && s.length <= max_len\n    } catch {\n        return false\n    }\n}\n\n/**\n * This is by no means a valid IP check. We just want to make sure that the basic\n * syntax seems correct.\n */\nexport function is_valid_IP_format(\n    s: string,\n    opts: {remove_enclosing_IPv6_URL_brackets?: boolean} = {},\n) {\n    if (s.includes(\".\")) {\n        const parts = s.split(\".\")\n        return parts.length === 4 && parts.map((x) => parseInt(x)).every((x) => x >= 0 && x <= 255)\n    }\n    if (!s.includes(\":\")) {\n        return false\n    }\n    if (opts.remove_enclosing_IPv6_URL_brackets) {\n        if (s.startsWith(\"[\")) {\n            s = s.substr(1)\n        }\n        if (s.endsWith(\"]\")) {\n            s = s.substr(0, s.length - 1)\n        }\n    }\n    const parts = s.split(\":\")\n    return (\n        parts.length > 2 &&\n        parts.map((x) => (!x ? 0 : parseInt(x, 16))).every((x) => x >= 0 && x <= 65535)\n    )\n}\n\nexport function is_IP_URL(s: string) {\n    try {\n        return is_valid_IP_format(new URL(s).hostname, {remove_enclosing_IPv6_URL_brackets: true})\n    } catch {\n        return false\n    }\n}\n\nconst UNDEFINED = {\n    toString: () => \"undefined\",\n}\n\nexport function memoize<T>(fn: () => T): () => T {\n    const memoize_wrapper = () => {\n        let v = (memoize_wrapper as any).__memoized_value__\n        if (v === undefined) {\n            v = fn()\n            if (v === undefined) {\n                v = UNDEFINED\n            }\n            ;(memoize_wrapper as any).__memoized_value__ = v\n        }\n        if (v === UNDEFINED) {\n            return undefined\n        }\n        return v\n    }\n    return memoize_wrapper\n}\n\n/**\n * Note: This function consumes the given array.\n */\nexport function split_into_batches<T>(\n    a: Array<T>,\n    {max_batch_size: m}: {max_batch_size: number},\n): Array<Array<T>> {\n    const batches: Array<Array<T>> = []\n    const m2 = 2 * m\n    while (a.length >= m2) {\n        batches.push(a.splice(0, m))\n    }\n    if (a.length) {\n        if (a.length <= m) {\n            batches.push(a)\n        } else {\n            // Make the last two batches about the same size.\n            const n = Math.ceil(a.length / 2)\n            batches.push(a.splice(0, n))\n            if (a.length) {\n                batches.push(a)\n            }\n        }\n    }\n    return batches\n}\n\n/**\n * Returns `min` if `x < min`,\n * returns `max` if `x > max`,\n * returns x otherwise.\n */\nexport function clamp(x: number, [min, max]: [number, number]) {\n    if (x < min) {\n        return min\n    }\n    if (x > max) {\n        return max\n    }\n    return x\n}\n\nexport function common_prefix(s1: string, s2: string): string {\n    const n = Math.min(s1.length, s2.length)\n    let i = 0\n    while (i < n && s1.charAt(i) === s2.charAt(i)) {\n        ++i\n    }\n    return s1.slice(0, i)\n}\n\n/**\n * We just lowercase the email, that's all. But still, use this function!\n */\nexport function normalize_email(email: string) {\n    return email ? email.toLowerCase() : email\n}\n\n/**\n * Return all values of an enum of type `string -> number`.\n */\nexport function enum_values<T extends Record<keyof T, number>>(e: T): number[] {\n    return Object.keys(e)\n        .map((x) => parseInt(x))\n        .filter((x) => !isNaN(x)) as any as number[]\n}\n\n/**\n * Return all entries of an enum of type `string -> number`.\n */\nexport function enum_entries<T extends Record<keyof T, number>>(e: T): [string, number][] {\n    return Object.keys(e)\n        .map((x) => parseInt(x))\n        .filter((x) => !isNaN(x))\n        .map((x) => [(e as any)[x], x]) as [string, number][]\n}\n\nexport function escape_html(s: string): string {\n    return s.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\")\n}\n\n/**\n * Copied from https://github.com/darkskyapp/string-hash/blob/v1.1.3/index.js\n */\nexport function fast_string_hash(s: string) {\n    let hash = 5381,\n        i = s.length\n    while (i) {\n        hash = (hash * 33) ^ s.charCodeAt(--i)\n    }\n    /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n     * integers. Since we want the results to be always positive, convert the\n     * signed int to an unsigned by doing an unsigned bitshift. */\n    return hash >>> 0\n}\n\nexport function are_arrays_equal<T>(a1: ArrayLike<T>, a2: ArrayLike<T>): boolean {\n    if (a1 === a2) {\n        return true\n    }\n    if (a1.length != a2.length) {\n        return false\n    }\n    for (let i = 0; i < a1.length; i++) {\n        if (a1[i] !== a2[i]) {\n            return false\n        }\n    }\n    return true\n}\n\n/**\n * Only call `f` once when the number of calls reaches `threshold` and then every `every` calls\n * if given.\n */\nexport function run_on_threshold(threshold: number, every?: number) {\n    let n = 0\n    return function (f: (num_calls: number) => void) {\n        n += 1\n        if (\n            n === threshold ||\n            (n > threshold && typeof every === \"number\" && (n - threshold) % every === 0)\n        ) {\n            f(n)\n        }\n    }\n}\n\nexport function anonymize_ip(ip: string) {\n    // Anonymize the IP according to https://support.google.com/analytics/answer/2763052\n    // IPv4: Only use the first 3 groups\n    // IPv6: Ignore the last 80 bits (5 groups) - so basically keep the first 3 groups\n    return (\n        ip\n            .replace(/::ffff:(.*)/i, \"$1\") // Mapped IPv4.\n            // eslint-disable-next-line sonarjs/existing-groups\n            .replace(/(\\d+\\.\\d+\\.\\d+\\.)\\d+/, \"$10\")\n            .replace(/(.+?:.+?:.+?:).+/, \"$1:\")\n    )\n}\n\nexport function as_array<T>(x: Iterable<T>): Array<T> {\n    if (Array.isArray(x)) {\n        return x\n    }\n    return Array.from(x)\n}\n\nexport function as_uint8array(x: Iterable<number> | Buffer | Uint8Array): Uint8Array {\n    // Note: We cannot use `x instanceof Uint8Array` here, because that would\n    //       be true for `Buffer` instances (`Buffer` extends `Uint8Array`).\n    return x.constructor.name === \"Uint8Array\" ? (x as Uint8Array) : new Uint8Array(x)\n}\n\n/**\n * This is a mix between `Promise.all()` and `Promise.allSettled()` as it will return all values\n * if all promise resolve or throw an error if at least one promise gets rejected.\n */\nexport async function all_finished<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(\n    values: readonly [\n        T1 | PromiseLike<T1>,\n        T2 | PromiseLike<T2>,\n        T3 | PromiseLike<T3>,\n        T4 | PromiseLike<T4>,\n        T5 | PromiseLike<T5>,\n        T6 | PromiseLike<T6>,\n        T7 | PromiseLike<T7>,\n        T8 | PromiseLike<T8>,\n        T9 | PromiseLike<T9>,\n        T10 | PromiseLike<T10>,\n    ],\n): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>\nexport async function all_finished<T1, T2, T3, T4, T5, T6, T7, T8, T9>(\n    values: readonly [\n        T1 | PromiseLike<T1>,\n        T2 | PromiseLike<T2>,\n        T3 | PromiseLike<T3>,\n        T4 | PromiseLike<T4>,\n        T5 | PromiseLike<T5>,\n        T6 | PromiseLike<T6>,\n        T7 | PromiseLike<T7>,\n        T8 | PromiseLike<T8>,\n        T9 | PromiseLike<T9>,\n    ],\n): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>\nexport async function all_finished<T1, T2, T3, T4, T5, T6, T7, T8>(\n    values: readonly [\n        T1 | PromiseLike<T1>,\n        T2 | PromiseLike<T2>,\n        T3 | PromiseLike<T3>,\n        T4 | PromiseLike<T4>,\n        T5 | PromiseLike<T5>,\n        T6 | PromiseLike<T6>,\n        T7 | PromiseLike<T7>,\n        T8 | PromiseLike<T8>,\n    ],\n): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>\nexport async function all_finished<T1, T2, T3, T4, T5, T6, T7>(\n    values: readonly [\n        T1 | PromiseLike<T1>,\n        T2 | PromiseLike<T2>,\n        T3 | PromiseLike<T3>,\n        T4 | PromiseLike<T4>,\n        T5 | PromiseLike<T5>,\n        T6 | PromiseLike<T6>,\n        T7 | PromiseLike<T7>,\n    ],\n): Promise<[T1, T2, T3, T4, T5, T6, T7]>\nexport async function all_finished<T1, T2, T3, T4, T5, T6>(\n    values: readonly [\n        T1 | PromiseLike<T1>,\n        T2 | PromiseLike<T2>,\n        T3 | PromiseLike<T3>,\n        T4 | PromiseLike<T4>,\n        T5 | PromiseLike<T5>,\n        T6 | PromiseLike<T6>,\n    ],\n): Promise<[T1, T2, T3, T4, T5, T6]>\nexport async function all_finished<T1, T2, T3, T4, T5>(\n    values: readonly [\n        T1 | PromiseLike<T1>,\n        T2 | PromiseLike<T2>,\n        T3 | PromiseLike<T3>,\n        T4 | PromiseLike<T4>,\n        T5 | PromiseLike<T5>,\n    ],\n): Promise<[T1, T2, T3, T4, T5]>\nexport async function all_finished<T1, T2, T3, T4>(\n    values: readonly [\n        T1 | PromiseLike<T1>,\n        T2 | PromiseLike<T2>,\n        T3 | PromiseLike<T3>,\n        T4 | PromiseLike<T4>,\n    ],\n): Promise<[T1, T2, T3, T4]>\nexport async function all_finished<T1, T2, T3>(\n    values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>],\n): Promise<[T1, T2, T3]>\nexport async function all_finished<T1, T2>(\n    values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>],\n): Promise<[T1, T2]>\nexport async function all_finished<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T[]>\nexport async function all_finished<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T[]> {\n    let error: any\n    const res: any = await Promise.all(\n        values.map((x) =>\n            (x as any).catch?.((e: any) => {\n                if (!error) {\n                    error = e\n                }\n            }),\n        ),\n    )\n    if (error) {\n        throw error\n    }\n    return res\n}\n\nexport function shorten_string(s: string, max_length: number) {\n    if (s.length <= max_length) {\n        return s\n    }\n    return s.substring(0, max_length - 3) + \"...\"\n}\n"],
  "mappings": "sDAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cAMA,SAASC,GAAMC,EAAU,CACvB,GA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H,EAAE,WAAW,EAAEI,CAAC,EAKzC,OAAOD,IAAS,CACpB,CAVgBF,EAAAC,GAAA,oBAYT,SAASG,GAAoBC,EAAkBC,EAA2B,CAC7E,GAAID,IAAOC,EACP,MAAO,GAEX,GAAID,EAAG,QAAUC,EAAG,OAChB,MAAO,GAEX,QAASH,EAAI,EAAGA,EAAIE,EAAG,OAAQF,IAC3B,GAAIE,EAAGF,CAAC,IAAMG,EAAGH,CAAC,EACd,MAAO,GAGf,MAAO,EACX,CAbgBH,EAAAI,GAAA,oBAoDT,SAASG,GAAcC,EAAuD,CAGjF,OAAOA,EAAE,YAAY,OAAS,aAAgBA,EAAmB,IAAI,WAAWA,CAAC,CACrF,CAJgBC,EAAAF,GAAA,iBA8FhB,eAAsBG,GAAgBC,EAAuD,CACzF,IAAIC,EACEC,EAAW,MAAM,QAAQ,IAC3BF,EAAO,IAAKH,GACPA,EAAU,QAASM,GAAW,CACtBF,IACDA,EAAQE,EAEhB,CAAC,CACL,CACJ,EACA,GAAIF,EACA,MAAMA,EAEV,OAAOC,CACX,CAfsBJ,EAAAC,GAAA",
  "names": ["require_src", "__commonJSMin", "exports", "module", "base", "ALPHABET", "BASE_MAP", "j", "i", "x", "xc", "BASE", "LEADER", "FACTOR", "iFACTOR", "encode", "source", "zeroes", "length", "pbegin", "pend", "size", "b58", "carry", "it1", "it2", "str", "__name", "decodeUnsafe", "psz", "b256", "it3", "it4", "vch", "decode", "string", "buffer", "require_base64_js", "__commonJSMin", "exports", "byteLength", "toByteArray", "fromByteArray", "lookup", "revLookup", "Arr", "code", "i", "len", "getLens", "b64", "validLen", "placeHoldersLen", "__name", "lens", "_byteLength", "tmp", "arr", "curByte", "tripletToBase64", "num", "encodeChunk", "uint8", "start", "end", "output", "extraBytes", "parts", "maxChunkLength", "len2", "require_ieee754", "__commonJSMin", "exports", "buffer", "offset", "isLE", "mLen", "nBytes", "e", "m", "eLen", "eMax", "eBias", "nBits", "i", "d", "s", "value", "rt", "require_buffer", "__commonJSMin", "exports", "base64", "ieee754", "customInspectSymbol", "Buffer", "SlowBuffer", "K_MAX_LENGTH", "typedArraySupport", "arr", "proto", "__name", "createBuffer", "length", "buf", "arg", "encodingOrOffset", "allocUnsafe", "from", "value", "fromString", "fromArrayLike", "isInstance", "fromArrayBuffer", "valueOf", "b", "fromObject", "assertSize", "size", "alloc", "fill", "encoding", "checked", "string", "byteLength", "actual", "array", "i", "byteOffset", "obj", "len", "numberIsNaN", "a", "x", "y", "list", "buffer", "pos", "mustMatch", "loweredCase", "utf8ToBytes", "base64ToBytes", "slowToString", "start", "end", "hexSlice", "utf8Slice", "asciiSlice", "latin1Slice", "base64Slice", "utf16leSlice", "swap", "n", "m", "str", "max", "target", "thisStart", "thisEnd", "thisCopy", "targetCopy", "bidirectionalIndexOf", "val", "dir", "arrayIndexOf", "indexSize", "arrLength", "valLength", "read", "foundIndex", "found", "j", "hexWrite", "offset", "remaining", "strLen", "parsed", "utf8Write", "blitBuffer", "asciiWrite", "asciiToBytes", "latin1Write", "base64Write", "ucs2Write", "utf16leToBytes", "res", "firstByte", "codePoint", "bytesPerSequence", "secondByte", "thirdByte", "fourthByte", "tempCodePoint", "decodeCodePointsArray", "MAX_ARGUMENTS_LENGTH", "codePoints", "ret", "out", "hexSliceLookupTable", "bytes", "newBuf", "checkOffset", "ext", "noAssert", "mul", "checkInt", "min", "maxBytes", "limit", "sub", "checkIEEE754", "writeFloat", "littleEndian", "writeDouble", "targetStart", "code", "INVALID_BASE64_RE", "base64clean", "units", "leadSurrogate", "byteArray", "c", "hi", "lo", "src", "dst", "type", "alphabet", "table", "i16", "class_name", "obj", "result", "c", "__name", "safe_JSON_stringify", "replacer", "spaces", "to_JSON", "x", "stack", "keys", "cycle_replacer", "key", "value", "serializer", "pos", "o", "k", "v", "element_to_string", "elm", "s", "safe_to_string", "error_to_string", "error2", "error", "a", "import_base_x", "import_buffer", "is_UID", "uid", "prefix", "__name", "full_name", "account", "given_name", "family_name", "s", "__name", "base62", "BaseX", "encode_b62", "buf", "assert", "encode_b64url", "buf", "__name", "decode_b64url", "s", "assert_never", "x", "class_name_", "class_name", "safe_to_string", "assert", "should_be_true", "msg_or_function", "msg", "error", "__name", "not_null", "o", "error_msg", "camel_case_to_underscore", "s", "_", "m1", "m2", "__name", "truncate", "s", "max_length", "filler", "__name", "nop", "_", "sleep", "ms", "resolve", "__name", "Set_equal", "set1", "set2", "x", "__name", "_TimeoutError", "message", "TimeoutError", "with_timeout", "millis", "promise", "opts", "timeout_error", "promise_pending", "cancel_timeout", "result", "value", "error", "_", "reject", "new_ControllablePromise", "resolve_", "reject_", "resolve", "nop", "flatten", "a", "x", "__name", "extract_domain", "url", "remove_prefixes", "domain", "parts", "__name", "extract_path", "i", "j", "is_valid_HTTP_URL", "s", "max_len", "protocol", "hostname", "is_valid_IP_format", "opts", "x", "UNDEFINED", "__name", "memoize", "fn", "memoize_wrapper", "v", "normalize_email", "email", "__name", "enum_values", "e", "x", "escape_html", "s", "__name", "fast_string_hash", "hash", "i", "are_arrays_equal", "a1", "a2", "as_uint8array", "x", "__name", "all_finished", "values", "error", "res", "e"]
}