/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";
/******/
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = "./browser.js");
/******/ })
/************************************************************************/
/******/ ({

/***/ "./browser.js":
/*!********************!*\
  !*** ./browser.js ***!
  \********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const browser = typeof window !== 'undefined';\nconst webpack = !!\"true\";\n\nconst Discord = __webpack_require__(/*! ./ */ \"./src/index.js\");\n\nmodule.exports = Discord;\nif (browser && webpack) window.Discord = Discord; // eslint-disable-line no-undef\n// eslint-disable-next-line no-console\nelse if (!browser) console.warn('Warning: Attempting to use browser version of Discord.js in a non-browser environment!');\n\n\n//# sourceURL=webpack:///./browser.js?");

/***/ }),

/***/ "./node_modules/base64-js/index.js":
/*!*****************************************!*\
  !*** ./node_modules/base64-js/index.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\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  for (var 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(\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n    ))\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\n\n//# sourceURL=webpack:///./node_modules/base64-js/index.js?");

/***/ }),

/***/ "./node_modules/buffer/index.js":
/*!**************************************!*\
  !*** ./node_modules/buffer/index.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("/* WEBPACK VAR INJECTION */(function(global) {/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n\n\nvar base64 = __webpack_require__(/*! base64-js */ \"./node_modules/base64-js/index.js\")\nvar ieee754 = __webpack_require__(/*! ieee754 */ \"./node_modules/ieee754/index.js\")\nvar isArray = __webpack_require__(/*! isarray */ \"./node_modules/isarray/index.js\")\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object 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 * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\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  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\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(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, 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(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, 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(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\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(null, 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(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.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    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().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)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\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 (!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 (!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 (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (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      case undefined:\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) return utf8ToBytes(string).length // assume utf8\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// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\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 | 0\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.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  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\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 (isNaN(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 (Buffer.TYPED_ARRAY_SUPPORT &&\n        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  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\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 (isNaN(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  // legacy write(string, encoding, offset, length) - remove in v0.13\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 += toHex(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\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\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  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\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  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  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  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  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  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  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  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  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  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  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  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  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  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\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  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\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  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\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  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\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  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\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 (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\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  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\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  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\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  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\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  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\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  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  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 (!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('sourceStart out of bounds')\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  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\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 (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\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  } else if (typeof val === 'number') {\n    val = val & 255\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      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\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 strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).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 stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\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\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/buffer/index.js?");

/***/ }),

/***/ "./node_modules/events/events.js":
/*!***************************************!*\
  !*** ./node_modules/events/events.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n  ? R.apply\n  : function ReflectApply(target, receiver, args) {\n    return Function.prototype.apply.call(target, receiver, args);\n  }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n  ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\n    return Object.getOwnPropertyNames(target)\n      .concat(Object.getOwnPropertySymbols(target));\n  };\n} else {\n  ReflectOwnKeys = function ReflectOwnKeys(target) {\n    return Object.getOwnPropertyNames(target);\n  };\n}\n\nfunction ProcessEmitWarning(warning) {\n  if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n  return value !== value;\n}\n\nfunction EventEmitter() {\n  EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n  enumerable: true,\n  get: function() {\n    return defaultMaxListeners;\n  },\n  set: function(arg) {\n    if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n      throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n    }\n    defaultMaxListeners = arg;\n  }\n});\n\nEventEmitter.init = function() {\n\n  if (this._events === undefined ||\n      this._events === Object.getPrototypeOf(this)._events) {\n    this._events = Object.create(null);\n    this._eventsCount = 0;\n  }\n\n  this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n  if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n    throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n  }\n  this._maxListeners = n;\n  return this;\n};\n\nfunction $getMaxListeners(that) {\n  if (that._maxListeners === undefined)\n    return EventEmitter.defaultMaxListeners;\n  return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n  return $getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n  var args = [];\n  for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n  var doError = (type === 'error');\n\n  var events = this._events;\n  if (events !== undefined)\n    doError = (doError && events.error === undefined);\n  else if (!doError)\n    return false;\n\n  // If there is no 'error' event listener then throw.\n  if (doError) {\n    var er;\n    if (args.length > 0)\n      er = args[0];\n    if (er instanceof Error) {\n      // Note: The comments on the `throw` lines are intentional, they show\n      // up in Node's output if this results in an unhandled exception.\n      throw er; // Unhandled 'error' event\n    }\n    // At least give some kind of context to the user\n    var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n    err.context = er;\n    throw err; // Unhandled 'error' event\n  }\n\n  var handler = events[type];\n\n  if (handler === undefined)\n    return false;\n\n  if (typeof handler === 'function') {\n    ReflectApply(handler, this, args);\n  } else {\n    var len = handler.length;\n    var listeners = arrayClone(handler, len);\n    for (var i = 0; i < len; ++i)\n      ReflectApply(listeners[i], this, args);\n  }\n\n  return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n  var m;\n  var events;\n  var existing;\n\n  if (typeof listener !== 'function') {\n    throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n  }\n\n  events = target._events;\n  if (events === undefined) {\n    events = target._events = Object.create(null);\n    target._eventsCount = 0;\n  } else {\n    // To avoid recursion in the case that type === \"newListener\"! Before\n    // adding it to the listeners, first emit \"newListener\".\n    if (events.newListener !== undefined) {\n      target.emit('newListener', type,\n                  listener.listener ? listener.listener : listener);\n\n      // Re-assign `events` because a newListener handler could have caused the\n      // this._events to be assigned to a new object\n      events = target._events;\n    }\n    existing = events[type];\n  }\n\n  if (existing === undefined) {\n    // Optimize the case of one listener. Don't need the extra array object.\n    existing = events[type] = listener;\n    ++target._eventsCount;\n  } else {\n    if (typeof existing === 'function') {\n      // Adding the second element, need to change to array.\n      existing = events[type] =\n        prepend ? [listener, existing] : [existing, listener];\n      // If we've already got an array, just append.\n    } else if (prepend) {\n      existing.unshift(listener);\n    } else {\n      existing.push(listener);\n    }\n\n    // Check for listener leak\n    m = $getMaxListeners(target);\n    if (m > 0 && existing.length > m && !existing.warned) {\n      existing.warned = true;\n      // No error code for this since it is a Warning\n      // eslint-disable-next-line no-restricted-syntax\n      var w = new Error('Possible EventEmitter memory leak detected. ' +\n                          existing.length + ' ' + String(type) + ' listeners ' +\n                          'added. Use emitter.setMaxListeners() to ' +\n                          'increase limit');\n      w.name = 'MaxListenersExceededWarning';\n      w.emitter = target;\n      w.type = type;\n      w.count = existing.length;\n      ProcessEmitWarning(w);\n    }\n  }\n\n  return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n  return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n    function prependListener(type, listener) {\n      return _addListener(this, type, listener, true);\n    };\n\nfunction onceWrapper() {\n  var args = [];\n  for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);\n  if (!this.fired) {\n    this.target.removeListener(this.type, this.wrapFn);\n    this.fired = true;\n    ReflectApply(this.listener, this.target, args);\n  }\n}\n\nfunction _onceWrap(target, type, listener) {\n  var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n  var wrapped = onceWrapper.bind(state);\n  wrapped.listener = listener;\n  state.wrapFn = wrapped;\n  return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n  if (typeof listener !== 'function') {\n    throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n  }\n  this.on(type, _onceWrap(this, type, listener));\n  return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n    function prependOnceListener(type, listener) {\n      if (typeof listener !== 'function') {\n        throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n      }\n      this.prependListener(type, _onceWrap(this, type, listener));\n      return this;\n    };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n    function removeListener(type, listener) {\n      var list, events, position, i, originalListener;\n\n      if (typeof listener !== 'function') {\n        throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n      }\n\n      events = this._events;\n      if (events === undefined)\n        return this;\n\n      list = events[type];\n      if (list === undefined)\n        return this;\n\n      if (list === listener || list.listener === listener) {\n        if (--this._eventsCount === 0)\n          this._events = Object.create(null);\n        else {\n          delete events[type];\n          if (events.removeListener)\n            this.emit('removeListener', type, list.listener || listener);\n        }\n      } else if (typeof list !== 'function') {\n        position = -1;\n\n        for (i = list.length - 1; i >= 0; i--) {\n          if (list[i] === listener || list[i].listener === listener) {\n            originalListener = list[i].listener;\n            position = i;\n            break;\n          }\n        }\n\n        if (position < 0)\n          return this;\n\n        if (position === 0)\n          list.shift();\n        else {\n          spliceOne(list, position);\n        }\n\n        if (list.length === 1)\n          events[type] = list[0];\n\n        if (events.removeListener !== undefined)\n          this.emit('removeListener', type, originalListener || listener);\n      }\n\n      return this;\n    };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n    function removeAllListeners(type) {\n      var listeners, events, i;\n\n      events = this._events;\n      if (events === undefined)\n        return this;\n\n      // not listening for removeListener, no need to emit\n      if (events.removeListener === undefined) {\n        if (arguments.length === 0) {\n          this._events = Object.create(null);\n          this._eventsCount = 0;\n        } else if (events[type] !== undefined) {\n          if (--this._eventsCount === 0)\n            this._events = Object.create(null);\n          else\n            delete events[type];\n        }\n        return this;\n      }\n\n      // emit removeListener for all listeners on all events\n      if (arguments.length === 0) {\n        var keys = Object.keys(events);\n        var key;\n        for (i = 0; i < keys.length; ++i) {\n          key = keys[i];\n          if (key === 'removeListener') continue;\n          this.removeAllListeners(key);\n        }\n        this.removeAllListeners('removeListener');\n        this._events = Object.create(null);\n        this._eventsCount = 0;\n        return this;\n      }\n\n      listeners = events[type];\n\n      if (typeof listeners === 'function') {\n        this.removeListener(type, listeners);\n      } else if (listeners !== undefined) {\n        // LIFO order\n        for (i = listeners.length - 1; i >= 0; i--) {\n          this.removeListener(type, listeners[i]);\n        }\n      }\n\n      return this;\n    };\n\nfunction _listeners(target, type, unwrap) {\n  var events = target._events;\n\n  if (events === undefined)\n    return [];\n\n  var evlistener = events[type];\n  if (evlistener === undefined)\n    return [];\n\n  if (typeof evlistener === 'function')\n    return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n  return unwrap ?\n    unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n  return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n  return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n  if (typeof emitter.listenerCount === 'function') {\n    return emitter.listenerCount(type);\n  } else {\n    return listenerCount.call(emitter, type);\n  }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n  var events = this._events;\n\n  if (events !== undefined) {\n    var evlistener = events[type];\n\n    if (typeof evlistener === 'function') {\n      return 1;\n    } else if (evlistener !== undefined) {\n      return evlistener.length;\n    }\n  }\n\n  return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n  return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n  var copy = new Array(n);\n  for (var i = 0; i < n; ++i)\n    copy[i] = arr[i];\n  return copy;\n}\n\nfunction spliceOne(list, index) {\n  for (; index + 1 < list.length; index++)\n    list[index] = list[index + 1];\n  list.pop();\n}\n\nfunction unwrapListeners(arr) {\n  var ret = new Array(arr.length);\n  for (var i = 0; i < ret.length; ++i) {\n    ret[i] = arr[i].listener || arr[i];\n  }\n  return ret;\n}\n\n\n//# sourceURL=webpack:///./node_modules/events/events.js?");

/***/ }),

/***/ "./node_modules/ieee754/index.js":
/*!***************************************!*\
  !*** ./node_modules/ieee754/index.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("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\n//# sourceURL=webpack:///./node_modules/ieee754/index.js?");

/***/ }),

/***/ "./node_modules/inherits/inherits_browser.js":
/*!***************************************************!*\
  !*** ./node_modules/inherits/inherits_browser.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("if (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n\n\n//# sourceURL=webpack:///./node_modules/inherits/inherits_browser.js?");

/***/ }),

/***/ "./node_modules/isarray/index.js":
/*!***************************************!*\
  !*** ./node_modules/isarray/index.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n\n\n//# sourceURL=webpack:///./node_modules/isarray/index.js?");

/***/ }),

/***/ "./node_modules/long/src/long.js":
/*!***************************************!*\
  !*** ./node_modules/long/src/long.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = Long;\r\n\r\n/**\r\n * wasm optimizations, to do native i64 multiplication and divide\r\n */\r\nvar wasm = null;\r\n\r\ntry {\r\n  wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([\r\n    0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1, 1, 1, 1, 6, 6, 1, 127, 1, 65, 0, 11, 7, 50, 6, 3, 109, 117, 108, 0, 1, 5, 100, 105, 118, 95, 115, 0, 2, 5, 100, 105, 118, 95, 117, 0, 3, 5, 114, 101, 109, 95, 115, 0, 4, 5, 114, 101, 109, 95, 117, 0, 5, 8, 103, 101, 116, 95, 104, 105, 103, 104, 0, 0, 10, 191, 1, 6, 4, 0, 35, 0, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 126, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 127, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 128, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 129, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11, 36, 1, 1, 126, 32, 0, 173, 32, 1, 173, 66, 32, 134, 132, 32, 2, 173, 32, 3, 173, 66, 32, 134, 132, 130, 34, 4, 66, 32, 135, 167, 36, 0, 32, 4, 167, 11\r\n  ])), {}).exports;\r\n} catch (e) {\r\n  // no wasm support :(\r\n}\r\n\r\n/**\r\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\r\n *  See the from* functions below for more convenient ways of constructing Longs.\r\n * @exports Long\r\n * @class A Long class for representing a 64 bit two's-complement integer value.\r\n * @param {number} low The low (signed) 32 bits of the long\r\n * @param {number} high The high (signed) 32 bits of the long\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @constructor\r\n */\r\nfunction Long(low, high, unsigned) {\r\n\r\n    /**\r\n     * The low 32 bits as a signed value.\r\n     * @type {number}\r\n     */\r\n    this.low = low | 0;\r\n\r\n    /**\r\n     * The high 32 bits as a signed value.\r\n     * @type {number}\r\n     */\r\n    this.high = high | 0;\r\n\r\n    /**\r\n     * Whether unsigned or not.\r\n     * @type {boolean}\r\n     */\r\n    this.unsigned = !!unsigned;\r\n}\r\n\r\n// The internal representation of a long is the two given signed, 32-bit values.\r\n// We use 32-bit pieces because these are the size of integers on which\r\n// Javascript performs bit-operations.  For operations like addition and\r\n// multiplication, we split each number into 16 bit pieces, which can easily be\r\n// multiplied within Javascript's floating-point representation without overflow\r\n// or change in sign.\r\n//\r\n// In the algorithms below, we frequently reduce the negative case to the\r\n// positive case by negating the input(s) and then post-processing the result.\r\n// Note that we must ALWAYS check specially whether those values are MIN_VALUE\r\n// (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\r\n// a positive number, it overflows back into a negative).  Not handling this\r\n// case would often result in infinite recursion.\r\n//\r\n// Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\r\n// methods on which they depend.\r\n\r\n/**\r\n * An indicator used to reliably determine if an object is a Long or not.\r\n * @type {boolean}\r\n * @const\r\n * @private\r\n */\r\nLong.prototype.__isLong__;\r\n\r\nObject.defineProperty(Long.prototype, \"__isLong__\", { value: true });\r\n\r\n/**\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n * @inner\r\n */\r\nfunction isLong(obj) {\r\n    return (obj && obj[\"__isLong__\"]) === true;\r\n}\r\n\r\n/**\r\n * Tests if the specified object is a Long.\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n */\r\nLong.isLong = isLong;\r\n\r\n/**\r\n * A cache of the Long representations of small integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\nvar INT_CACHE = {};\r\n\r\n/**\r\n * A cache of the Long representations of small unsigned integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\nvar UINT_CACHE = {};\r\n\r\n/**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromInt(value, unsigned) {\r\n    var obj, cachedObj, cache;\r\n    if (unsigned) {\r\n        value >>>= 0;\r\n        if (cache = (0 <= value && value < 256)) {\r\n            cachedObj = UINT_CACHE[value];\r\n            if (cachedObj)\r\n                return cachedObj;\r\n        }\r\n        obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\r\n        if (cache)\r\n            UINT_CACHE[value] = obj;\r\n        return obj;\r\n    } else {\r\n        value |= 0;\r\n        if (cache = (-128 <= value && value < 128)) {\r\n            cachedObj = INT_CACHE[value];\r\n            if (cachedObj)\r\n                return cachedObj;\r\n        }\r\n        obj = fromBits(value, value < 0 ? -1 : 0, false);\r\n        if (cache)\r\n            INT_CACHE[value] = obj;\r\n        return obj;\r\n    }\r\n}\r\n\r\n/**\r\n * Returns a Long representing the given 32 bit integer value.\r\n * @function\r\n * @param {number} value The 32 bit integer in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromInt = fromInt;\r\n\r\n/**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromNumber(value, unsigned) {\r\n    if (isNaN(value))\r\n        return unsigned ? UZERO : ZERO;\r\n    if (unsigned) {\r\n        if (value < 0)\r\n            return UZERO;\r\n        if (value >= TWO_PWR_64_DBL)\r\n            return MAX_UNSIGNED_VALUE;\r\n    } else {\r\n        if (value <= -TWO_PWR_63_DBL)\r\n            return MIN_VALUE;\r\n        if (value + 1 >= TWO_PWR_63_DBL)\r\n            return MAX_VALUE;\r\n    }\r\n    if (value < 0)\r\n        return fromNumber(-value, unsigned).neg();\r\n    return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\r\n}\r\n\r\n/**\r\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\r\n * @function\r\n * @param {number} value The number in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromNumber = fromNumber;\r\n\r\n/**\r\n * @param {number} lowBits\r\n * @param {number} highBits\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromBits(lowBits, highBits, unsigned) {\r\n    return new Long(lowBits, highBits, unsigned);\r\n}\r\n\r\n/**\r\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\r\n *  assumed to use 32 bits.\r\n * @function\r\n * @param {number} lowBits The low 32 bits\r\n * @param {number} highBits The high 32 bits\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromBits = fromBits;\r\n\r\n/**\r\n * @function\r\n * @param {number} base\r\n * @param {number} exponent\r\n * @returns {number}\r\n * @inner\r\n */\r\nvar pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\r\n\r\n/**\r\n * @param {string} str\r\n * @param {(boolean|number)=} unsigned\r\n * @param {number=} radix\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromString(str, unsigned, radix) {\r\n    if (str.length === 0)\r\n        throw Error('empty string');\r\n    if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\r\n        return ZERO;\r\n    if (typeof unsigned === 'number') {\r\n        // For goog.math.long compatibility\r\n        radix = unsigned,\r\n        unsigned = false;\r\n    } else {\r\n        unsigned = !! unsigned;\r\n    }\r\n    radix = radix || 10;\r\n    if (radix < 2 || 36 < radix)\r\n        throw RangeError('radix');\r\n\r\n    var p;\r\n    if ((p = str.indexOf('-')) > 0)\r\n        throw Error('interior hyphen');\r\n    else if (p === 0) {\r\n        return fromString(str.substring(1), unsigned, radix).neg();\r\n    }\r\n\r\n    // Do several (8) digits each time through the loop, so as to\r\n    // minimize the calls to the very expensive emulated div.\r\n    var radixToPower = fromNumber(pow_dbl(radix, 8));\r\n\r\n    var result = ZERO;\r\n    for (var i = 0; i < str.length; i += 8) {\r\n        var size = Math.min(8, str.length - i),\r\n            value = parseInt(str.substring(i, i + size), radix);\r\n        if (size < 8) {\r\n            var power = fromNumber(pow_dbl(radix, size));\r\n            result = result.mul(power).add(fromNumber(value));\r\n        } else {\r\n            result = result.mul(radixToPower);\r\n            result = result.add(fromNumber(value));\r\n        }\r\n    }\r\n    result.unsigned = unsigned;\r\n    return result;\r\n}\r\n\r\n/**\r\n * Returns a Long representation of the given string, written using the specified radix.\r\n * @function\r\n * @param {string} str The textual representation of the Long\r\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to signed\r\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\r\n * @returns {!Long} The corresponding Long value\r\n */\r\nLong.fromString = fromString;\r\n\r\n/**\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\nfunction fromValue(val, unsigned) {\r\n    if (typeof val === 'number')\r\n        return fromNumber(val, unsigned);\r\n    if (typeof val === 'string')\r\n        return fromString(val, unsigned);\r\n    // Throws for non-objects, converts non-instanceof Long:\r\n    return fromBits(val.low, val.high, typeof unsigned === 'boolean' ? unsigned : val.unsigned);\r\n}\r\n\r\n/**\r\n * Converts the specified value to a Long using the appropriate from* function for its type.\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {!Long}\r\n */\r\nLong.fromValue = fromValue;\r\n\r\n// NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\r\n// no runtime penalty for these.\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_16_DBL = 1 << 16;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_24_DBL = 1 << 24;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\r\n\r\n/**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\r\n\r\n/**\r\n * @type {!Long}\r\n * @const\r\n * @inner\r\n */\r\nvar TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar ZERO = fromInt(0);\r\n\r\n/**\r\n * Signed zero.\r\n * @type {!Long}\r\n */\r\nLong.ZERO = ZERO;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar UZERO = fromInt(0, true);\r\n\r\n/**\r\n * Unsigned zero.\r\n * @type {!Long}\r\n */\r\nLong.UZERO = UZERO;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar ONE = fromInt(1);\r\n\r\n/**\r\n * Signed one.\r\n * @type {!Long}\r\n */\r\nLong.ONE = ONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar UONE = fromInt(1, true);\r\n\r\n/**\r\n * Unsigned one.\r\n * @type {!Long}\r\n */\r\nLong.UONE = UONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar NEG_ONE = fromInt(-1);\r\n\r\n/**\r\n * Signed negative one.\r\n * @type {!Long}\r\n */\r\nLong.NEG_ONE = NEG_ONE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false);\r\n\r\n/**\r\n * Maximum signed value.\r\n * @type {!Long}\r\n */\r\nLong.MAX_VALUE = MAX_VALUE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true);\r\n\r\n/**\r\n * Maximum unsigned value.\r\n * @type {!Long}\r\n */\r\nLong.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\r\n\r\n/**\r\n * @type {!Long}\r\n * @inner\r\n */\r\nvar MIN_VALUE = fromBits(0, 0x80000000|0, false);\r\n\r\n/**\r\n * Minimum signed value.\r\n * @type {!Long}\r\n */\r\nLong.MIN_VALUE = MIN_VALUE;\r\n\r\n/**\r\n * @alias Long.prototype\r\n * @inner\r\n */\r\nvar LongPrototype = Long.prototype;\r\n\r\n/**\r\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\r\n * @returns {number}\r\n */\r\nLongPrototype.toInt = function toInt() {\r\n    return this.unsigned ? this.low >>> 0 : this.low;\r\n};\r\n\r\n/**\r\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\r\n * @returns {number}\r\n */\r\nLongPrototype.toNumber = function toNumber() {\r\n    if (this.unsigned)\r\n        return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\r\n    return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\r\n};\r\n\r\n/**\r\n * Converts the Long to a string written in the specified radix.\r\n * @param {number=} radix Radix (2-36), defaults to 10\r\n * @returns {string}\r\n * @override\r\n * @throws {RangeError} If `radix` is out of range\r\n */\r\nLongPrototype.toString = function toString(radix) {\r\n    radix = radix || 10;\r\n    if (radix < 2 || 36 < radix)\r\n        throw RangeError('radix');\r\n    if (this.isZero())\r\n        return '0';\r\n    if (this.isNegative()) { // Unsigned Longs are never negative\r\n        if (this.eq(MIN_VALUE)) {\r\n            // We need to change the Long value before it can be negated, so we remove\r\n            // the bottom-most digit in this base and then recurse to do the rest.\r\n            var radixLong = fromNumber(radix),\r\n                div = this.div(radixLong),\r\n                rem1 = div.mul(radixLong).sub(this);\r\n            return div.toString(radix) + rem1.toInt().toString(radix);\r\n        } else\r\n            return '-' + this.neg().toString(radix);\r\n    }\r\n\r\n    // Do several (6) digits each time through the loop, so as to\r\n    // minimize the calls to the very expensive emulated div.\r\n    var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\r\n        rem = this;\r\n    var result = '';\r\n    while (true) {\r\n        var remDiv = rem.div(radixToPower),\r\n            intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\r\n            digits = intval.toString(radix);\r\n        rem = remDiv;\r\n        if (rem.isZero())\r\n            return digits + result;\r\n        else {\r\n            while (digits.length < 6)\r\n                digits = '0' + digits;\r\n            result = '' + digits + result;\r\n        }\r\n    }\r\n};\r\n\r\n/**\r\n * Gets the high 32 bits as a signed integer.\r\n * @returns {number} Signed high bits\r\n */\r\nLongPrototype.getHighBits = function getHighBits() {\r\n    return this.high;\r\n};\r\n\r\n/**\r\n * Gets the high 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned high bits\r\n */\r\nLongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\r\n    return this.high >>> 0;\r\n};\r\n\r\n/**\r\n * Gets the low 32 bits as a signed integer.\r\n * @returns {number} Signed low bits\r\n */\r\nLongPrototype.getLowBits = function getLowBits() {\r\n    return this.low;\r\n};\r\n\r\n/**\r\n * Gets the low 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned low bits\r\n */\r\nLongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\r\n    return this.low >>> 0;\r\n};\r\n\r\n/**\r\n * Gets the number of bits needed to represent the absolute value of this Long.\r\n * @returns {number}\r\n */\r\nLongPrototype.getNumBitsAbs = function getNumBitsAbs() {\r\n    if (this.isNegative()) // Unsigned Longs are never negative\r\n        return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\r\n    var val = this.high != 0 ? this.high : this.low;\r\n    for (var bit = 31; bit > 0; bit--)\r\n        if ((val & (1 << bit)) != 0)\r\n            break;\r\n    return this.high != 0 ? bit + 33 : bit + 1;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals zero.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isZero = function isZero() {\r\n    return this.high === 0 && this.low === 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals zero. This is an alias of {@link Long#isZero}.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.eqz = LongPrototype.isZero;\r\n\r\n/**\r\n * Tests if this Long's value is negative.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isNegative = function isNegative() {\r\n    return !this.unsigned && this.high < 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is positive.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isPositive = function isPositive() {\r\n    return this.unsigned || this.high >= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is odd.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isOdd = function isOdd() {\r\n    return (this.low & 1) === 1;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is even.\r\n * @returns {boolean}\r\n */\r\nLongPrototype.isEven = function isEven() {\r\n    return (this.low & 1) === 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.equals = function equals(other) {\r\n    if (!isLong(other))\r\n        other = fromValue(other);\r\n    if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\r\n        return false;\r\n    return this.high === other.high && this.low === other.low;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.eq = LongPrototype.equals;\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.notEquals = function notEquals(other) {\r\n    return !this.eq(/* validates */ other);\r\n};\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.neq = LongPrototype.notEquals;\r\n\r\n/**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.ne = LongPrototype.notEquals;\r\n\r\n/**\r\n * Tests if this Long's value is less than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lessThan = function lessThan(other) {\r\n    return this.comp(/* validates */ other) < 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lt = LongPrototype.lessThan;\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\r\n    return this.comp(/* validates */ other) <= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.lte = LongPrototype.lessThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.le = LongPrototype.lessThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is greater than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.greaterThan = function greaterThan(other) {\r\n    return this.comp(/* validates */ other) > 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.gt = LongPrototype.greaterThan;\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\r\n    return this.comp(/* validates */ other) >= 0;\r\n};\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.gte = LongPrototype.greaterThanOrEqual;\r\n\r\n/**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\nLongPrototype.ge = LongPrototype.greaterThanOrEqual;\r\n\r\n/**\r\n * Compares this Long's value with the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n *  if the given one is greater\r\n */\r\nLongPrototype.compare = function compare(other) {\r\n    if (!isLong(other))\r\n        other = fromValue(other);\r\n    if (this.eq(other))\r\n        return 0;\r\n    var thisNeg = this.isNegative(),\r\n        otherNeg = other.isNegative();\r\n    if (thisNeg && !otherNeg)\r\n        return -1;\r\n    if (!thisNeg && otherNeg)\r\n        return 1;\r\n    // At this point the sign bits are the same\r\n    if (!this.unsigned)\r\n        return this.sub(other).isNegative() ? -1 : 1;\r\n    // Both are positive if at least one is unsigned\r\n    return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\r\n};\r\n\r\n/**\r\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n *  if the given one is greater\r\n */\r\nLongPrototype.comp = LongPrototype.compare;\r\n\r\n/**\r\n * Negates this Long's value.\r\n * @returns {!Long} Negated Long\r\n */\r\nLongPrototype.negate = function negate() {\r\n    if (!this.unsigned && this.eq(MIN_VALUE))\r\n        return MIN_VALUE;\r\n    return this.not().add(ONE);\r\n};\r\n\r\n/**\r\n * Negates this Long's value. This is an alias of {@link Long#negate}.\r\n * @function\r\n * @returns {!Long} Negated Long\r\n */\r\nLongPrototype.neg = LongPrototype.negate;\r\n\r\n/**\r\n * Returns the sum of this and the specified Long.\r\n * @param {!Long|number|string} addend Addend\r\n * @returns {!Long} Sum\r\n */\r\nLongPrototype.add = function add(addend) {\r\n    if (!isLong(addend))\r\n        addend = fromValue(addend);\r\n\r\n    // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\r\n\r\n    var a48 = this.high >>> 16;\r\n    var a32 = this.high & 0xFFFF;\r\n    var a16 = this.low >>> 16;\r\n    var a00 = this.low & 0xFFFF;\r\n\r\n    var b48 = addend.high >>> 16;\r\n    var b32 = addend.high & 0xFFFF;\r\n    var b16 = addend.low >>> 16;\r\n    var b00 = addend.low & 0xFFFF;\r\n\r\n    var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n    c00 += a00 + b00;\r\n    c16 += c00 >>> 16;\r\n    c00 &= 0xFFFF;\r\n    c16 += a16 + b16;\r\n    c32 += c16 >>> 16;\r\n    c16 &= 0xFFFF;\r\n    c32 += a32 + b32;\r\n    c48 += c32 >>> 16;\r\n    c32 &= 0xFFFF;\r\n    c48 += a48 + b48;\r\n    c48 &= 0xFFFF;\r\n    return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the difference of this and the specified Long.\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\nLongPrototype.subtract = function subtract(subtrahend) {\r\n    if (!isLong(subtrahend))\r\n        subtrahend = fromValue(subtrahend);\r\n    return this.add(subtrahend.neg());\r\n};\r\n\r\n/**\r\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\r\n * @function\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\nLongPrototype.sub = LongPrototype.subtract;\r\n\r\n/**\r\n * Returns the product of this and the specified Long.\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\nLongPrototype.multiply = function multiply(multiplier) {\r\n    if (this.isZero())\r\n        return ZERO;\r\n    if (!isLong(multiplier))\r\n        multiplier = fromValue(multiplier);\r\n\r\n    // use wasm support if present\r\n    if (wasm) {\r\n        var low = wasm.mul(this.low,\r\n                           this.high,\r\n                           multiplier.low,\r\n                           multiplier.high);\r\n        return fromBits(low, wasm.get_high(), this.unsigned);\r\n    }\r\n\r\n    if (multiplier.isZero())\r\n        return ZERO;\r\n    if (this.eq(MIN_VALUE))\r\n        return multiplier.isOdd() ? MIN_VALUE : ZERO;\r\n    if (multiplier.eq(MIN_VALUE))\r\n        return this.isOdd() ? MIN_VALUE : ZERO;\r\n\r\n    if (this.isNegative()) {\r\n        if (multiplier.isNegative())\r\n            return this.neg().mul(multiplier.neg());\r\n        else\r\n            return this.neg().mul(multiplier).neg();\r\n    } else if (multiplier.isNegative())\r\n        return this.mul(multiplier.neg()).neg();\r\n\r\n    // If both longs are small, use float multiplication\r\n    if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\r\n        return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\r\n\r\n    // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\r\n    // We can skip products that would overflow.\r\n\r\n    var a48 = this.high >>> 16;\r\n    var a32 = this.high & 0xFFFF;\r\n    var a16 = this.low >>> 16;\r\n    var a00 = this.low & 0xFFFF;\r\n\r\n    var b48 = multiplier.high >>> 16;\r\n    var b32 = multiplier.high & 0xFFFF;\r\n    var b16 = multiplier.low >>> 16;\r\n    var b00 = multiplier.low & 0xFFFF;\r\n\r\n    var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n    c00 += a00 * b00;\r\n    c16 += c00 >>> 16;\r\n    c00 &= 0xFFFF;\r\n    c16 += a16 * b00;\r\n    c32 += c16 >>> 16;\r\n    c16 &= 0xFFFF;\r\n    c16 += a00 * b16;\r\n    c32 += c16 >>> 16;\r\n    c16 &= 0xFFFF;\r\n    c32 += a32 * b00;\r\n    c48 += c32 >>> 16;\r\n    c32 &= 0xFFFF;\r\n    c32 += a16 * b16;\r\n    c48 += c32 >>> 16;\r\n    c32 &= 0xFFFF;\r\n    c32 += a00 * b32;\r\n    c48 += c32 >>> 16;\r\n    c32 &= 0xFFFF;\r\n    c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\r\n    c48 &= 0xFFFF;\r\n    return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\r\n * @function\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\nLongPrototype.mul = LongPrototype.multiply;\r\n\r\n/**\r\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\r\n *  unsigned if this Long is unsigned.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\nLongPrototype.divide = function divide(divisor) {\r\n    if (!isLong(divisor))\r\n        divisor = fromValue(divisor);\r\n    if (divisor.isZero())\r\n        throw Error('division by zero');\r\n\r\n    // use wasm support if present\r\n    if (wasm) {\r\n        // guard against signed division overflow: the largest\r\n        // negative number / -1 would be 1 larger than the largest\r\n        // positive number, due to two's complement.\r\n        if (!this.unsigned &&\r\n            this.high === -0x80000000 &&\r\n            divisor.low === -1 && divisor.high === -1) {\r\n            // be consistent with non-wasm code path\r\n            return this;\r\n        }\r\n        var low = (this.unsigned ? wasm.div_u : wasm.div_s)(\r\n            this.low,\r\n            this.high,\r\n            divisor.low,\r\n            divisor.high\r\n        );\r\n        return fromBits(low, wasm.get_high(), this.unsigned);\r\n    }\r\n\r\n    if (this.isZero())\r\n        return this.unsigned ? UZERO : ZERO;\r\n    var approx, rem, res;\r\n    if (!this.unsigned) {\r\n        // This section is only relevant for signed longs and is derived from the\r\n        // closure library as a whole.\r\n        if (this.eq(MIN_VALUE)) {\r\n            if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\r\n                return MIN_VALUE;  // recall that -MIN_VALUE == MIN_VALUE\r\n            else if (divisor.eq(MIN_VALUE))\r\n                return ONE;\r\n            else {\r\n                // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\r\n                var halfThis = this.shr(1);\r\n                approx = halfThis.div(divisor).shl(1);\r\n                if (approx.eq(ZERO)) {\r\n                    return divisor.isNegative() ? ONE : NEG_ONE;\r\n                } else {\r\n                    rem = this.sub(divisor.mul(approx));\r\n                    res = approx.add(rem.div(divisor));\r\n                    return res;\r\n                }\r\n            }\r\n        } else if (divisor.eq(MIN_VALUE))\r\n            return this.unsigned ? UZERO : ZERO;\r\n        if (this.isNegative()) {\r\n            if (divisor.isNegative())\r\n                return this.neg().div(divisor.neg());\r\n            return this.neg().div(divisor).neg();\r\n        } else if (divisor.isNegative())\r\n            return this.div(divisor.neg()).neg();\r\n        res = ZERO;\r\n    } else {\r\n        // The algorithm below has not been made for unsigned longs. It's therefore\r\n        // required to take special care of the MSB prior to running it.\r\n        if (!divisor.unsigned)\r\n            divisor = divisor.toUnsigned();\r\n        if (divisor.gt(this))\r\n            return UZERO;\r\n        if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\r\n            return UONE;\r\n        res = UZERO;\r\n    }\r\n\r\n    // Repeat the following until the remainder is less than other:  find a\r\n    // floating-point that approximates remainder / other *from below*, add this\r\n    // into the result, and subtract it from the remainder.  It is critical that\r\n    // the approximate value is less than or equal to the real value so that the\r\n    // remainder never becomes negative.\r\n    rem = this;\r\n    while (rem.gte(divisor)) {\r\n        // Approximate the result of division. This may be a little greater or\r\n        // smaller than the actual value.\r\n        approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\r\n\r\n        // We will tweak the approximate result by changing it in the 48-th digit or\r\n        // the smallest non-fractional digit, whichever is larger.\r\n        var log2 = Math.ceil(Math.log(approx) / Math.LN2),\r\n            delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\r\n\r\n        // Decrease the approximation until it is smaller than the remainder.  Note\r\n        // that if it is too large, the product overflows and is negative.\r\n            approxRes = fromNumber(approx),\r\n            approxRem = approxRes.mul(divisor);\r\n        while (approxRem.isNegative() || approxRem.gt(rem)) {\r\n            approx -= delta;\r\n            approxRes = fromNumber(approx, this.unsigned);\r\n            approxRem = approxRes.mul(divisor);\r\n        }\r\n\r\n        // We know the answer can't be zero... and actually, zero would cause\r\n        // infinite recursion since we would make no progress.\r\n        if (approxRes.isZero())\r\n            approxRes = ONE;\r\n\r\n        res = res.add(approxRes);\r\n        rem = rem.sub(approxRem);\r\n    }\r\n    return res;\r\n};\r\n\r\n/**\r\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\nLongPrototype.div = LongPrototype.divide;\r\n\r\n/**\r\n * Returns this Long modulo the specified.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.modulo = function modulo(divisor) {\r\n    if (!isLong(divisor))\r\n        divisor = fromValue(divisor);\r\n\r\n    // use wasm support if present\r\n    if (wasm) {\r\n        var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(\r\n            this.low,\r\n            this.high,\r\n            divisor.low,\r\n            divisor.high\r\n        );\r\n        return fromBits(low, wasm.get_high(), this.unsigned);\r\n    }\r\n\r\n    return this.sub(this.div(divisor).mul(divisor));\r\n};\r\n\r\n/**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.mod = LongPrototype.modulo;\r\n\r\n/**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\nLongPrototype.rem = LongPrototype.modulo;\r\n\r\n/**\r\n * Returns the bitwise NOT of this Long.\r\n * @returns {!Long}\r\n */\r\nLongPrototype.not = function not() {\r\n    return fromBits(~this.low, ~this.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise AND of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.and = function and(other) {\r\n    if (!isLong(other))\r\n        other = fromValue(other);\r\n    return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise OR of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.or = function or(other) {\r\n    if (!isLong(other))\r\n        other = fromValue(other);\r\n    return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns the bitwise XOR of this Long and the given one.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\nLongPrototype.xor = function xor(other) {\r\n    if (!isLong(other))\r\n        other = fromValue(other);\r\n    return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits shifted to the left by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftLeft = function shiftLeft(numBits) {\r\n    if (isLong(numBits))\r\n        numBits = numBits.toInt();\r\n    if ((numBits &= 63) === 0)\r\n        return this;\r\n    else if (numBits < 32)\r\n        return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\r\n    else\r\n        return fromBits(0, this.low << (numBits - 32), this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shl = LongPrototype.shiftLeft;\r\n\r\n/**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftRight = function shiftRight(numBits) {\r\n    if (isLong(numBits))\r\n        numBits = numBits.toInt();\r\n    if ((numBits &= 63) === 0)\r\n        return this;\r\n    else if (numBits < 32)\r\n        return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\r\n    else\r\n        return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\r\n};\r\n\r\n/**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shr = LongPrototype.shiftRight;\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\r\n    if (isLong(numBits))\r\n        numBits = numBits.toInt();\r\n    numBits &= 63;\r\n    if (numBits === 0)\r\n        return this;\r\n    else {\r\n        var high = this.high;\r\n        if (numBits < 32) {\r\n            var low = this.low;\r\n            return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);\r\n        } else if (numBits === 32)\r\n            return fromBits(high, 0, this.unsigned);\r\n        else\r\n            return fromBits(high >>> (numBits - 32), 0, this.unsigned);\r\n    }\r\n};\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shru = LongPrototype.shiftRightUnsigned;\r\n\r\n/**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\nLongPrototype.shr_u = LongPrototype.shiftRightUnsigned;\r\n\r\n/**\r\n * Converts this Long to signed.\r\n * @returns {!Long} Signed long\r\n */\r\nLongPrototype.toSigned = function toSigned() {\r\n    if (!this.unsigned)\r\n        return this;\r\n    return fromBits(this.low, this.high, false);\r\n};\r\n\r\n/**\r\n * Converts this Long to unsigned.\r\n * @returns {!Long} Unsigned long\r\n */\r\nLongPrototype.toUnsigned = function toUnsigned() {\r\n    if (this.unsigned)\r\n        return this;\r\n    return fromBits(this.low, this.high, true);\r\n};\r\n\r\n/**\r\n * Converts this Long to its byte representation.\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {!Array.<number>} Byte representation\r\n */\r\nLongPrototype.toBytes = function toBytes(le) {\r\n    return le ? this.toBytesLE() : this.toBytesBE();\r\n};\r\n\r\n/**\r\n * Converts this Long to its little endian byte representation.\r\n * @returns {!Array.<number>} Little endian byte representation\r\n */\r\nLongPrototype.toBytesLE = function toBytesLE() {\r\n    var hi = this.high,\r\n        lo = this.low;\r\n    return [\r\n        lo        & 0xff,\r\n        lo >>>  8 & 0xff,\r\n        lo >>> 16 & 0xff,\r\n        lo >>> 24       ,\r\n        hi        & 0xff,\r\n        hi >>>  8 & 0xff,\r\n        hi >>> 16 & 0xff,\r\n        hi >>> 24\r\n    ];\r\n};\r\n\r\n/**\r\n * Converts this Long to its big endian byte representation.\r\n * @returns {!Array.<number>} Big endian byte representation\r\n */\r\nLongPrototype.toBytesBE = function toBytesBE() {\r\n    var hi = this.high,\r\n        lo = this.low;\r\n    return [\r\n        hi >>> 24       ,\r\n        hi >>> 16 & 0xff,\r\n        hi >>>  8 & 0xff,\r\n        hi        & 0xff,\r\n        lo >>> 24       ,\r\n        lo >>> 16 & 0xff,\r\n        lo >>>  8 & 0xff,\r\n        lo        & 0xff\r\n    ];\r\n};\r\n\r\n/**\r\n * Creates a Long from its byte representation.\r\n * @param {!Array.<number>} bytes Byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytes = function fromBytes(bytes, unsigned, le) {\r\n    return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);\r\n};\r\n\r\n/**\r\n * Creates a Long from its little endian byte representation.\r\n * @param {!Array.<number>} bytes Little endian byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytesLE = function fromBytesLE(bytes, unsigned) {\r\n    return new Long(\r\n        bytes[0]       |\r\n        bytes[1] <<  8 |\r\n        bytes[2] << 16 |\r\n        bytes[3] << 24,\r\n        bytes[4]       |\r\n        bytes[5] <<  8 |\r\n        bytes[6] << 16 |\r\n        bytes[7] << 24,\r\n        unsigned\r\n    );\r\n};\r\n\r\n/**\r\n * Creates a Long from its big endian byte representation.\r\n * @param {!Array.<number>} bytes Big endian byte representation\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to signed\r\n * @returns {Long} The corresponding Long value\r\n */\r\nLong.fromBytesBE = function fromBytesBE(bytes, unsigned) {\r\n    return new Long(\r\n        bytes[4] << 24 |\r\n        bytes[5] << 16 |\r\n        bytes[6] <<  8 |\r\n        bytes[7],\r\n        bytes[0] << 24 |\r\n        bytes[1] << 16 |\r\n        bytes[2] <<  8 |\r\n        bytes[3],\r\n        unsigned\r\n    );\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/long/src/long.js?");

/***/ }),

/***/ "./node_modules/node-libs-browser/mock/empty.js":
/*!******************************************************!*\
  !*** ./node_modules/node-libs-browser/mock/empty.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("\n\n//# sourceURL=webpack:///./node_modules/node-libs-browser/mock/empty.js?");

/***/ }),

/***/ "./node_modules/os-browserify/browser.js":
/*!***********************************************!*\
  !*** ./node_modules/os-browserify/browser.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("exports.endianness = function () { return 'LE' };\n\nexports.hostname = function () {\n    if (typeof location !== 'undefined') {\n        return location.hostname\n    }\n    else return '';\n};\n\nexports.loadavg = function () { return [] };\n\nexports.uptime = function () { return 0 };\n\nexports.freemem = function () {\n    return Number.MAX_VALUE;\n};\n\nexports.totalmem = function () {\n    return Number.MAX_VALUE;\n};\n\nexports.cpus = function () { return [] };\n\nexports.type = function () { return 'Browser' };\n\nexports.release = function () {\n    if (typeof navigator !== 'undefined') {\n        return navigator.appVersion;\n    }\n    return '';\n};\n\nexports.networkInterfaces\n= exports.getNetworkInterfaces\n= function () { return {} };\n\nexports.arch = function () { return 'javascript' };\n\nexports.platform = function () { return 'browser' };\n\nexports.tmpdir = exports.tmpDir = function () {\n    return '/tmp';\n};\n\nexports.EOL = '\\n';\n\nexports.homedir = function () {\n\treturn '/'\n};\n\n\n//# sourceURL=webpack:///./node_modules/os-browserify/browser.js?");

/***/ }),

/***/ "./node_modules/path-browserify/index.js":
/*!***********************************************!*\
  !*** ./node_modules/path-browserify/index.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = parts.length - 1; i >= 0; i--) {\n    var last = parts[i];\n    if (last === '.') {\n      parts.splice(i, 1);\n    } else if (last === '..') {\n      parts.splice(i, 1);\n      up++;\n    } else if (up) {\n      parts.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (allowAboveRoot) {\n    for (; up--; up) {\n      parts.unshift('..');\n    }\n  }\n\n  return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n    /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;\nvar splitPath = function(filename) {\n  return splitPathRe.exec(filename).slice(1);\n};\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n  var resolvedPath = '',\n      resolvedAbsolute = false;\n\n  for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n    var path = (i >= 0) ? arguments[i] : process.cwd();\n\n    // Skip empty and invalid entries\n    if (typeof path !== 'string') {\n      throw new TypeError('Arguments to path.resolve must be strings');\n    } else if (!path) {\n      continue;\n    }\n\n    resolvedPath = path + '/' + resolvedPath;\n    resolvedAbsolute = path.charAt(0) === '/';\n  }\n\n  // At this point the path should be resolved to a full absolute path, but\n  // handle relative paths to be safe (might happen when process.cwd() fails)\n\n  // Normalize the path\n  resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n    return !!p;\n  }), !resolvedAbsolute).join('/');\n\n  return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n  var isAbsolute = exports.isAbsolute(path),\n      trailingSlash = substr(path, -1) === '/';\n\n  // Normalize the path\n  path = normalizeArray(filter(path.split('/'), function(p) {\n    return !!p;\n  }), !isAbsolute).join('/');\n\n  if (!path && !isAbsolute) {\n    path = '.';\n  }\n  if (path && trailingSlash) {\n    path += '/';\n  }\n\n  return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n  return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n  var paths = Array.prototype.slice.call(arguments, 0);\n  return exports.normalize(filter(paths, function(p, index) {\n    if (typeof p !== 'string') {\n      throw new TypeError('Arguments to path.join must be strings');\n    }\n    return p;\n  }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n  from = exports.resolve(from).substr(1);\n  to = exports.resolve(to).substr(1);\n\n  function trim(arr) {\n    var start = 0;\n    for (; start < arr.length; start++) {\n      if (arr[start] !== '') break;\n    }\n\n    var end = arr.length - 1;\n    for (; end >= 0; end--) {\n      if (arr[end] !== '') break;\n    }\n\n    if (start > end) return [];\n    return arr.slice(start, end - start + 1);\n  }\n\n  var fromParts = trim(from.split('/'));\n  var toParts = trim(to.split('/'));\n\n  var length = Math.min(fromParts.length, toParts.length);\n  var samePartsLength = length;\n  for (var i = 0; i < length; i++) {\n    if (fromParts[i] !== toParts[i]) {\n      samePartsLength = i;\n      break;\n    }\n  }\n\n  var outputParts = [];\n  for (var i = samePartsLength; i < fromParts.length; i++) {\n    outputParts.push('..');\n  }\n\n  outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n  return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function(path) {\n  var result = splitPath(path),\n      root = result[0],\n      dir = result[1];\n\n  if (!root && !dir) {\n    // No dirname whatsoever\n    return '.';\n  }\n\n  if (dir) {\n    // It has a dirname, strip trailing slash\n    dir = dir.substr(0, dir.length - 1);\n  }\n\n  return root + dir;\n};\n\n\nexports.basename = function(path, ext) {\n  var f = splitPath(path)[2];\n  // TODO: make this comparison case-insensitive on windows?\n  if (ext && f.substr(-1 * ext.length) === ext) {\n    f = f.substr(0, f.length - ext.length);\n  }\n  return f;\n};\n\n\nexports.extname = function(path) {\n  return splitPath(path)[3];\n};\n\nfunction filter (xs, f) {\n    if (xs.filter) return xs.filter(f);\n    var res = [];\n    for (var i = 0; i < xs.length; i++) {\n        if (f(xs[i], i, xs)) res.push(xs[i]);\n    }\n    return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n    ? function (str, start, len) { return str.substr(start, len) }\n    : function (str, start, len) {\n        if (start < 0) start = str.length + start;\n        return str.substr(start, len);\n    }\n;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/path-browserify/index.js?");

/***/ }),

/***/ "./node_modules/process/browser.js":
/*!*****************************************!*\
  !*** ./node_modules/process/browser.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things.  But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals.  It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n    throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n    throw new Error('clearTimeout has not been defined');\n}\n(function () {\n    try {\n        if (typeof setTimeout === 'function') {\n            cachedSetTimeout = setTimeout;\n        } else {\n            cachedSetTimeout = defaultSetTimout;\n        }\n    } catch (e) {\n        cachedSetTimeout = defaultSetTimout;\n    }\n    try {\n        if (typeof clearTimeout === 'function') {\n            cachedClearTimeout = clearTimeout;\n        } else {\n            cachedClearTimeout = defaultClearTimeout;\n        }\n    } catch (e) {\n        cachedClearTimeout = defaultClearTimeout;\n    }\n} ())\nfunction runTimeout(fun) {\n    if (cachedSetTimeout === setTimeout) {\n        //normal enviroments in sane situations\n        return setTimeout(fun, 0);\n    }\n    // if setTimeout wasn't available but was latter defined\n    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n        cachedSetTimeout = setTimeout;\n        return setTimeout(fun, 0);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedSetTimeout(fun, 0);\n    } catch(e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n            return cachedSetTimeout.call(null, fun, 0);\n        } catch(e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n            return cachedSetTimeout.call(this, fun, 0);\n        }\n    }\n\n\n}\nfunction runClearTimeout(marker) {\n    if (cachedClearTimeout === clearTimeout) {\n        //normal enviroments in sane situations\n        return clearTimeout(marker);\n    }\n    // if clearTimeout wasn't available but was latter defined\n    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n        cachedClearTimeout = clearTimeout;\n        return clearTimeout(marker);\n    }\n    try {\n        // when when somebody has screwed with setTimeout but no I.E. maddness\n        return cachedClearTimeout(marker);\n    } catch (e){\n        try {\n            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally\n            return cachedClearTimeout.call(null, marker);\n        } catch (e){\n            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n            // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n            return cachedClearTimeout.call(this, marker);\n        }\n    }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n    if (!draining || !currentQueue) {\n        return;\n    }\n    draining = false;\n    if (currentQueue.length) {\n        queue = currentQueue.concat(queue);\n    } else {\n        queueIndex = -1;\n    }\n    if (queue.length) {\n        drainQueue();\n    }\n}\n\nfunction drainQueue() {\n    if (draining) {\n        return;\n    }\n    var timeout = runTimeout(cleanUpNextTick);\n    draining = true;\n\n    var len = queue.length;\n    while(len) {\n        currentQueue = queue;\n        queue = [];\n        while (++queueIndex < len) {\n            if (currentQueue) {\n                currentQueue[queueIndex].run();\n            }\n        }\n        queueIndex = -1;\n        len = queue.length;\n    }\n    currentQueue = null;\n    draining = false;\n    runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n    var args = new Array(arguments.length - 1);\n    if (arguments.length > 1) {\n        for (var i = 1; i < arguments.length; i++) {\n            args[i - 1] = arguments[i];\n        }\n    }\n    queue.push(new Item(fun, args));\n    if (queue.length === 1 && !draining) {\n        runTimeout(drainQueue);\n    }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n    this.fun = fun;\n    this.array = array;\n}\nItem.prototype.run = function () {\n    this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n    throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n    throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack:///./node_modules/process/browser.js?");

/***/ }),

/***/ "./node_modules/querystring-es3/decode.js":
/*!************************************************!*\
  !*** ./node_modules/querystring-es3/decode.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/decode.js?");

/***/ }),

/***/ "./node_modules/querystring-es3/encode.js":
/*!************************************************!*\
  !*** ./node_modules/querystring-es3/encode.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return map(objectKeys(obj), function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (isArray(obj[k])) {\n        return map(obj[k], function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n  return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n  if (xs.map) return xs.map(f);\n  var res = [];\n  for (var i = 0; i < xs.length; i++) {\n    res.push(f(xs[i], i));\n  }\n  return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n  var res = [];\n  for (var key in obj) {\n    if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n  }\n  return res;\n};\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/encode.js?");

/***/ }),

/***/ "./node_modules/querystring-es3/index.js":
/*!***********************************************!*\
  !*** ./node_modules/querystring-es3/index.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nexports.decode = exports.parse = __webpack_require__(/*! ./decode */ \"./node_modules/querystring-es3/decode.js\");\nexports.encode = exports.stringify = __webpack_require__(/*! ./encode */ \"./node_modules/querystring-es3/encode.js\");\n\n\n//# sourceURL=webpack:///./node_modules/querystring-es3/index.js?");

/***/ }),

/***/ "./node_modules/snekfetch/esm.mjs":
/*!****************************************!*\
  !*** ./node_modules/snekfetch/esm.mjs ***!
  \****************************************/
/*! exports provided: default, version, METHODS, acl, bind, checkout, connect, copy, delete, get, head, link, lock, merge, mkactivity, mkcalendar, mkcol, move, notify, options, patch, post, propfind, proppatch, purge, put, rebind, report, search, subscribe, trace, unbind, unlink, unlock, unsubscribe, brew */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/client/ClientDataResolver.js (referenced with cjs require), ./src/client/rest/APIRequest.js (referenced with cjs require), ./src/util/Util.js (referenced with cjs require) */
/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"version\", function() { return version; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"METHODS\", function() { return METHODS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"acl\", function() { return acl; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bind\", function() { return bind; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"checkout\", function() { return checkout; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"connect\", function() { return connect; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"copy\", function() { return copy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"delete\", function() { return _delete; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"get\", function() { return get; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"head\", function() { return head; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"link\", function() { return link; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lock\", function() { return lock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"merge\", function() { return merge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mkactivity\", function() { return mkactivity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mkcalendar\", function() { return mkcalendar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"mkcol\", function() { return mkcol; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"move\", function() { return move; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"notify\", function() { return notify; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"options\", function() { return options; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"patch\", function() { return patch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"post\", function() { return post; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"propfind\", function() { return propfind; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"proppatch\", function() { return proppatch; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"purge\", function() { return purge; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"put\", function() { return put; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rebind\", function() { return rebind; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"report\", function() { return report; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"search\", function() { return search; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"subscribe\", function() { return subscribe; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"trace\", function() { return trace; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unbind\", function() { return unbind; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unlink\", function() { return unlink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unlock\", function() { return unlock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unsubscribe\", function() { return unsubscribe; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"brew\", function() { return brew; });\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ \"./node_modules/snekfetch/index.js\");\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_index_js__WEBPACK_IMPORTED_MODULE_0__);\n\nconst version = _index_js__WEBPACK_IMPORTED_MODULE_0__.version;\nconst METHODS = _index_js__WEBPACK_IMPORTED_MODULE_0__.METHODS;\n\nconst acl = _index_js__WEBPACK_IMPORTED_MODULE_0__.acl;\nconst bind = _index_js__WEBPACK_IMPORTED_MODULE_0__.bind;\nconst checkout = _index_js__WEBPACK_IMPORTED_MODULE_0__.checkout;\nconst connect = _index_js__WEBPACK_IMPORTED_MODULE_0__.connect;\nconst copy = _index_js__WEBPACK_IMPORTED_MODULE_0__.copy;\nconst _delete = _index_js__WEBPACK_IMPORTED_MODULE_0__.delete;\n\nconst get = _index_js__WEBPACK_IMPORTED_MODULE_0__.get;\nconst head = _index_js__WEBPACK_IMPORTED_MODULE_0__.head;\nconst link = _index_js__WEBPACK_IMPORTED_MODULE_0__.link;\nconst lock = _index_js__WEBPACK_IMPORTED_MODULE_0__.lock;\nconst merge = _index_js__WEBPACK_IMPORTED_MODULE_0__.merge;\nconst mkactivity = _index_js__WEBPACK_IMPORTED_MODULE_0__.mkactivity;\nconst mkcalendar = _index_js__WEBPACK_IMPORTED_MODULE_0__.mkcalendar;\nconst mkcol = _index_js__WEBPACK_IMPORTED_MODULE_0__.mkcol;\nconst move = _index_js__WEBPACK_IMPORTED_MODULE_0__.move;\nconst notify = _index_js__WEBPACK_IMPORTED_MODULE_0__.notify;\nconst options = _index_js__WEBPACK_IMPORTED_MODULE_0__.options;\nconst patch = _index_js__WEBPACK_IMPORTED_MODULE_0__.patch;\nconst post = _index_js__WEBPACK_IMPORTED_MODULE_0__.post;\nconst propfind = _index_js__WEBPACK_IMPORTED_MODULE_0__.propfind;\nconst proppatch = _index_js__WEBPACK_IMPORTED_MODULE_0__.proppatch;\nconst purge = _index_js__WEBPACK_IMPORTED_MODULE_0__.purge;\nconst put = _index_js__WEBPACK_IMPORTED_MODULE_0__.put;\nconst rebind = _index_js__WEBPACK_IMPORTED_MODULE_0__.rebind;\nconst report = _index_js__WEBPACK_IMPORTED_MODULE_0__.report;\nconst search = _index_js__WEBPACK_IMPORTED_MODULE_0__.search;\nconst subscribe = _index_js__WEBPACK_IMPORTED_MODULE_0__.subscribe;\nconst trace = _index_js__WEBPACK_IMPORTED_MODULE_0__.trace;\nconst unbind = _index_js__WEBPACK_IMPORTED_MODULE_0__.unbind;\nconst unlink = _index_js__WEBPACK_IMPORTED_MODULE_0__.unlink;\nconst unlock = _index_js__WEBPACK_IMPORTED_MODULE_0__.unlock;\nconst unsubscribe = _index_js__WEBPACK_IMPORTED_MODULE_0__.unsubscribe;\nconst brew = _index_js__WEBPACK_IMPORTED_MODULE_0__.brew;\n\n\n//# sourceURL=webpack:///./node_modules/snekfetch/esm.mjs?");

/***/ }),

/***/ "./node_modules/snekfetch/index.js":
/*!*****************************************!*\
  !*** ./node_modules/snekfetch/index.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("module.exports = __webpack_require__(/*! ./src */ \"./node_modules/snekfetch/src/index.js\");\n\n\n//# sourceURL=webpack:///./node_modules/snekfetch/index.js?");

/***/ }),

/***/ "./node_modules/snekfetch/src/browser.js":
/*!***********************************************!*\
  !*** ./node_modules/snekfetch/src/browser.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("function buildRequest(method, url) {\n  return {\n    method,\n    path: url,\n    redirect: this.options.followRedirects ? 'follow' : 'manual',\n    headers: {},\n    setHeader(name, value) {\n      this.headers[name.toLowerCase()] = value;\n    },\n    getHeader(name) {\n      return this.headers[name.toLowerCase()];\n    },\n  };\n}\n\nfunction finalizeRequest() {\n  this._finalizeRequest();\n  if (this.data)\n    this.request.body = this.data;\n  return window.fetch(this.request.path, this.request)\n    .then((r) => r.text().then((t) => {\n      const headers = {};\n      for (const [k, v] of r.headers.entries())\n        headers[k.toLowerCase()] = v;\n      return { response: r, raw: t, headers };\n    }));\n}\n\nmodule.exports = {\n  buildRequest, finalizeRequest,\n  shouldSendRaw: () => false,\n  METHODS: ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'PATCH'],\n  STATUS_CODES: {},\n  Extension: Object,\n  FormData: window.FormData,\n};\n\n\n//# sourceURL=webpack:///./node_modules/snekfetch/src/browser.js?");

/***/ }),

/***/ "./node_modules/snekfetch/src/index.js":
/*!*********************************************!*\
  !*** ./node_modules/snekfetch/src/index.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const browser = typeof window !== 'undefined';\nconst querystring = __webpack_require__(/*! querystring */ \"./node_modules/querystring-es3/index.js\");\nconst transport = browser ? __webpack_require__(/*! ./browser */ \"./node_modules/snekfetch/src/browser.js\") : __webpack_require__(/*! ./node */ 0);\n\n/**\n * Snekfetch\n * @extends Stream.Readable\n * @extends Promise\n */\nclass Snekfetch extends transport.Extension {\n  /**\n   * Options to pass to the Snekfetch constructor\n   * @typedef {object} SnekfetchOptions\n   * @memberof Snekfetch\n   * @property {object} [headers] Headers to initialize the request with\n   * @property {object|string|Buffer} [data] Data to initialize the request with\n   * @property {string|Object} [query] Query to intialize the request with\n   * @property {boolean} [followRedirects=true] If the request should follow redirects\n   * @property {object} [qs=querystring] Querystring module to use, any object providing\n   * `stringify` and `parse` for querystrings\n   * @property {number} [version = 1] The http version to use [1 or 2]\n   * @property {external:Agent} [agent] Whether to use an http agent\n   */\n\n  /**\n   * Create a request.\n   * Usually you'll want to do `Snekfetch#method(url [, options])` instead of\n   * `new Snekfetch(method, url [, options])`\n   * @param {string} method HTTP method\n   * @param {string} url URL\n   * @param {SnekfetchOptions} [opts] Options\n   */\n  constructor(method, url, opts = {}) {\n    super();\n    this.options = Object.assign({ version: 1, qs: querystring, followRedirects: true }, opts);\n    this.request = transport.buildRequest.call(this, method, url, opts);\n    if (opts.headers)\n      this.set(opts.headers);\n    if (opts.query)\n      this.query(opts.query);\n    if (opts.data)\n      this.send(opts.data);\n  }\n\n  /**\n   * Add a query param to the request\n   * @param {string|Object} name Name of query param or object to add to query\n   * @param {string} [value] If name is a string value, this will be the value of the query param\n   * @returns {Snekfetch} This request\n   */\n  query(name, value) {\n    if (!this.request.query)\n      this.request.query = {};\n    if (name !== null && typeof name === 'object') {\n      for (const [k, v] of Object.entries(name))\n        this.query(k, v);\n    } else {\n      this.request.query[name] = value;\n    }\n\n    return this;\n  }\n\n  /**\n   * Add a header to the request\n   * @param {string|Object} name Name of query param or object to add to headers\n   * @param {string} [value] If name is a string value, this will be the value of the header\n   * @returns {Snekfetch} This request\n   */\n  set(name, value) {\n    if (name !== null && typeof name === 'object') {\n      for (const key of Object.keys(name))\n        this.set(key, name[key]);\n    } else {\n      this.request.setHeader(name, value);\n    }\n\n    return this;\n  }\n\n  /**\n   * Attach a form data object\n   * @param {string} name Name of the form attachment\n   * @param {string|Object|Buffer} data Data for the attachment\n   * @param {string} [filename] Optional filename if form attachment name needs to be overridden\n   * @returns {Snekfetch} This request\n   */\n  attach(...args) {\n    const form = this.data instanceof transport.FormData ? this.data : this.data = new transport.FormData();\n    if (typeof args[0] === 'object') {\n      for (const [k, v] of Object.entries(args[0]))\n        this.attach(k, v);\n    } else {\n      form.append(...args);\n    }\n\n    return this;\n  }\n\n  /**\n   * Send data with the request\n   * @param {string|Buffer|Object} data Data to send\n   * @returns {Snekfetch} This request\n   */\n  send(data) {\n    if (data instanceof transport.FormData || transport.shouldSendRaw(data)) {\n      this.data = data;\n    } else if (data !== null && typeof data === 'object') {\n      const header = this.request.getHeader('content-type');\n      let serialize;\n      if (header) {\n        if (header.includes('json'))\n          serialize = JSON.stringify;\n        else if (header.includes('urlencoded'))\n          serialize = this.options.qs.stringify;\n      } else {\n        this.set('Content-Type', 'application/json');\n        serialize = JSON.stringify;\n      }\n      this.data = serialize(data);\n    } else {\n      this.data = data;\n    }\n    return this;\n  }\n\n  then(resolver, rejector) {\n    if (this._response)\n      return this._response.then(resolver, rejector);\n    // eslint-disable-next-line no-return-assign\n    return this._response = transport.finalizeRequest.call(this)\n      .then(({ response, raw, redirect, headers }) => {\n        if (redirect) {\n          let method = this.request.method;\n          if ([301, 302].includes(response.statusCode)) {\n            if (method !== 'HEAD')\n              method = 'GET';\n            this.data = null;\n          } else if (response.statusCode === 303) {\n            method = 'GET';\n          }\n\n          const redirectHeaders = this.request.getHeaders();\n          delete redirectHeaders.host;\n          return new Snekfetch(method, redirect, {\n            data: this.data,\n            headers: redirectHeaders,\n            version: this.options.version,\n          });\n        }\n\n        const statusCode = response.statusCode || response.status;\n        // forgive me :(\n        const self = this; // eslint-disable-line consistent-this\n        /**\n         * Response from Snekfetch\n         * @typedef {Object} SnekfetchResponse\n         * @memberof Snekfetch\n         * @prop {HTTP.Request} request\n         * @prop {?string|object|Buffer} body Processed response body\n         * @prop {string} text Raw response body\n         * @prop {boolean} ok If the response code is >= 200 and < 300\n         * @prop {number} status HTTP status code\n         * @prop {string} statusText Human readable HTTP status\n         */\n        const res = {\n          request: this.request,\n          get body() {\n            delete res.body;\n            const type = this.headers['content-type'];\n            if (type && type.includes('application/json')) {\n              try {\n                res.body = JSON.parse(res.text);\n              } catch (err) {\n                res.body = res.text;\n              }\n            } else if (type && type.includes('application/x-www-form-urlencoded')) {\n              res.body = self.options.qs.parse(res.text);\n            } else {\n              res.body = raw;\n            }\n\n            return res.body;\n          },\n          text: raw.toString(),\n          ok: statusCode >= 200 && statusCode < 400,\n          headers: headers || response.headers,\n          status: statusCode,\n          statusText: response.statusText || transport.STATUS_CODES[response.statusCode],\n        };\n\n        if (res.ok) {\n          return res;\n        } else {\n          const err = new Error(`${res.status} ${res.statusText}`.trim());\n          Object.assign(err, res);\n          return Promise.reject(err);\n        }\n      })\n      .then(resolver, rejector);\n  }\n\n  catch(rejector) {\n    return this.then(null, rejector);\n  }\n\n  /**\n   * End the request\n   * @param {Function} [cb] Optional callback to handle the response\n   * @returns {Promise} This request\n   */\n  end(cb) {\n    return this.then(\n      (res) => cb ? cb(null, res) : res,\n      (err) => cb ? cb(err, err.status ? err : null) : Promise.reject(err)\n    );\n  }\n\n  _finalizeRequest() {\n    if (!this.request)\n      return;\n\n    if (this.request.method !== 'HEAD')\n      this.set('Accept-Encoding', 'gzip, deflate');\n    if (this.data && this.data.getBoundary)\n      this.set('Content-Type', `multipart/form-data; boundary=${this.data.getBoundary()}`);\n\n    if (this.request.query) {\n      const [path, query] = this.request.path.split('?');\n      this.request.path = `${path}?${this.options.qs.stringify(this.request.query)}${query ? `&${query}` : ''}`;\n    }\n  }\n}\n\n/**\n * Create a ((THIS)) request\n * @dynamic this.METHODS\n * @method Snekfetch.((THIS)lowerCase)\n * @param {string} url The url to request\n * @param {Snekfetch.snekfetchOptions} [opts] Options\n * @returns {Snekfetch}\n */\nSnekfetch.METHODS = transport.METHODS.concat('BREW').filter((m) => m !== 'M-SEARCH');\nfor (const method of Snekfetch.METHODS) {\n  Snekfetch[method.toLowerCase()] = function runMethod(url, opts) {\n    const Constructor = this.prototype instanceof Snekfetch ? this : Snekfetch;\n    return new Constructor(method, url, opts);\n  };\n}\n\nmodule.exports = Snekfetch;\n\n/**\n * @external Agent\n * @see {@link https://nodejs.org/api/http.html#http_class_http_agent}\n */\n\n\n//# sourceURL=webpack:///./node_modules/snekfetch/src/index.js?");

/***/ }),

/***/ "./node_modules/util/support/isBufferBrowser.js":
/*!******************************************************!*\
  !*** ./node_modules/util/support/isBufferBrowser.js ***!
  \******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("module.exports = function isBuffer(arg) {\n  return arg && typeof arg === 'object'\n    && typeof arg.copy === 'function'\n    && typeof arg.fill === 'function'\n    && typeof arg.readUInt8 === 'function';\n}\n\n//# sourceURL=webpack:///./node_modules/util/support/isBufferBrowser.js?");

/***/ }),

/***/ "./node_modules/util/util.js":
/*!***********************************!*\
  !*** ./node_modules/util/util.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n  function getOwnPropertyDescriptors(obj) {\n    var keys = Object.keys(obj);\n    var descriptors = {};\n    for (var i = 0; i < keys.length; i++) {\n      descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n    }\n    return descriptors;\n  };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n  if (!isString(f)) {\n    var objects = [];\n    for (var i = 0; i < arguments.length; i++) {\n      objects.push(inspect(arguments[i]));\n    }\n    return objects.join(' ');\n  }\n\n  var i = 1;\n  var args = arguments;\n  var len = args.length;\n  var str = String(f).replace(formatRegExp, function(x) {\n    if (x === '%%') return '%';\n    if (i >= len) return x;\n    switch (x) {\n      case '%s': return String(args[i++]);\n      case '%d': return Number(args[i++]);\n      case '%j':\n        try {\n          return JSON.stringify(args[i++]);\n        } catch (_) {\n          return '[Circular]';\n        }\n      default:\n        return x;\n    }\n  });\n  for (var x = args[i]; i < len; x = args[++i]) {\n    if (isNull(x) || !isObject(x)) {\n      str += ' ' + x;\n    } else {\n      str += ' ' + inspect(x);\n    }\n  }\n  return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n  if (typeof process !== 'undefined' && process.noDeprecation === true) {\n    return fn;\n  }\n\n  // Allow for deprecating things in the process of starting up.\n  if (typeof process === 'undefined') {\n    return function() {\n      return exports.deprecate(fn, msg).apply(this, arguments);\n    };\n  }\n\n  var warned = false;\n  function deprecated() {\n    if (!warned) {\n      if (process.throwDeprecation) {\n        throw new Error(msg);\n      } else if (process.traceDeprecation) {\n        console.trace(msg);\n      } else {\n        console.error(msg);\n      }\n      warned = true;\n    }\n    return fn.apply(this, arguments);\n  }\n\n  return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n  if (isUndefined(debugEnviron))\n    debugEnviron = Object({\"__DISCORD_WEBPACK__\":\"true\"}).NODE_DEBUG || '';\n  set = set.toUpperCase();\n  if (!debugs[set]) {\n    if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n      var pid = process.pid;\n      debugs[set] = function() {\n        var msg = exports.format.apply(exports, arguments);\n        console.error('%s %d: %s', set, pid, msg);\n      };\n    } else {\n      debugs[set] = function() {};\n    }\n  }\n  return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n  // default options\n  var ctx = {\n    seen: [],\n    stylize: stylizeNoColor\n  };\n  // legacy...\n  if (arguments.length >= 3) ctx.depth = arguments[2];\n  if (arguments.length >= 4) ctx.colors = arguments[3];\n  if (isBoolean(opts)) {\n    // legacy...\n    ctx.showHidden = opts;\n  } else if (opts) {\n    // got an \"options\" object\n    exports._extend(ctx, opts);\n  }\n  // set default options\n  if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n  if (isUndefined(ctx.depth)) ctx.depth = 2;\n  if (isUndefined(ctx.colors)) ctx.colors = false;\n  if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n  if (ctx.colors) ctx.stylize = stylizeWithColor;\n  return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n  'bold' : [1, 22],\n  'italic' : [3, 23],\n  'underline' : [4, 24],\n  'inverse' : [7, 27],\n  'white' : [37, 39],\n  'grey' : [90, 39],\n  'black' : [30, 39],\n  'blue' : [34, 39],\n  'cyan' : [36, 39],\n  'green' : [32, 39],\n  'magenta' : [35, 39],\n  'red' : [31, 39],\n  'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n  'special': 'cyan',\n  'number': 'yellow',\n  'boolean': 'yellow',\n  'undefined': 'grey',\n  'null': 'bold',\n  'string': 'green',\n  'date': 'magenta',\n  // \"name\": intentionally not styling\n  'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n  var style = inspect.styles[styleType];\n\n  if (style) {\n    return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n           '\\u001b[' + inspect.colors[style][1] + 'm';\n  } else {\n    return str;\n  }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n  return str;\n}\n\n\nfunction arrayToHash(array) {\n  var hash = {};\n\n  array.forEach(function(val, idx) {\n    hash[val] = true;\n  });\n\n  return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n  // Provide a hook for user-specified inspect functions.\n  // Check that value is an object with an inspect function on it\n  if (ctx.customInspect &&\n      value &&\n      isFunction(value.inspect) &&\n      // Filter out the util module, it's inspect function is special\n      value.inspect !== exports.inspect &&\n      // Also filter out any prototype objects using the circular check.\n      !(value.constructor && value.constructor.prototype === value)) {\n    var ret = value.inspect(recurseTimes, ctx);\n    if (!isString(ret)) {\n      ret = formatValue(ctx, ret, recurseTimes);\n    }\n    return ret;\n  }\n\n  // Primitive types cannot have properties\n  var primitive = formatPrimitive(ctx, value);\n  if (primitive) {\n    return primitive;\n  }\n\n  // Look up the keys of the object.\n  var keys = Object.keys(value);\n  var visibleKeys = arrayToHash(keys);\n\n  if (ctx.showHidden) {\n    keys = Object.getOwnPropertyNames(value);\n  }\n\n  // IE doesn't make error fields non-enumerable\n  // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n  if (isError(value)\n      && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n    return formatError(value);\n  }\n\n  // Some type of object without properties can be shortcutted.\n  if (keys.length === 0) {\n    if (isFunction(value)) {\n      var name = value.name ? ': ' + value.name : '';\n      return ctx.stylize('[Function' + name + ']', 'special');\n    }\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    }\n    if (isDate(value)) {\n      return ctx.stylize(Date.prototype.toString.call(value), 'date');\n    }\n    if (isError(value)) {\n      return formatError(value);\n    }\n  }\n\n  var base = '', array = false, braces = ['{', '}'];\n\n  // Make Array say that they are Array\n  if (isArray(value)) {\n    array = true;\n    braces = ['[', ']'];\n  }\n\n  // Make functions say that they are functions\n  if (isFunction(value)) {\n    var n = value.name ? ': ' + value.name : '';\n    base = ' [Function' + n + ']';\n  }\n\n  // Make RegExps say that they are RegExps\n  if (isRegExp(value)) {\n    base = ' ' + RegExp.prototype.toString.call(value);\n  }\n\n  // Make dates with properties first say the date\n  if (isDate(value)) {\n    base = ' ' + Date.prototype.toUTCString.call(value);\n  }\n\n  // Make error with message first say the error\n  if (isError(value)) {\n    base = ' ' + formatError(value);\n  }\n\n  if (keys.length === 0 && (!array || value.length == 0)) {\n    return braces[0] + base + braces[1];\n  }\n\n  if (recurseTimes < 0) {\n    if (isRegExp(value)) {\n      return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n    } else {\n      return ctx.stylize('[Object]', 'special');\n    }\n  }\n\n  ctx.seen.push(value);\n\n  var output;\n  if (array) {\n    output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n  } else {\n    output = keys.map(function(key) {\n      return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n    });\n  }\n\n  ctx.seen.pop();\n\n  return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n  if (isUndefined(value))\n    return ctx.stylize('undefined', 'undefined');\n  if (isString(value)) {\n    var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n                                             .replace(/'/g, \"\\\\'\")\n                                             .replace(/\\\\\"/g, '\"') + '\\'';\n    return ctx.stylize(simple, 'string');\n  }\n  if (isNumber(value))\n    return ctx.stylize('' + value, 'number');\n  if (isBoolean(value))\n    return ctx.stylize('' + value, 'boolean');\n  // For some reason typeof null is \"object\", so special case here.\n  if (isNull(value))\n    return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n  return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n  var output = [];\n  for (var i = 0, l = value.length; i < l; ++i) {\n    if (hasOwnProperty(value, String(i))) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          String(i), true));\n    } else {\n      output.push('');\n    }\n  }\n  keys.forEach(function(key) {\n    if (!key.match(/^\\d+$/)) {\n      output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n          key, true));\n    }\n  });\n  return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n  var name, str, desc;\n  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n  if (desc.get) {\n    if (desc.set) {\n      str = ctx.stylize('[Getter/Setter]', 'special');\n    } else {\n      str = ctx.stylize('[Getter]', 'special');\n    }\n  } else {\n    if (desc.set) {\n      str = ctx.stylize('[Setter]', 'special');\n    }\n  }\n  if (!hasOwnProperty(visibleKeys, key)) {\n    name = '[' + key + ']';\n  }\n  if (!str) {\n    if (ctx.seen.indexOf(desc.value) < 0) {\n      if (isNull(recurseTimes)) {\n        str = formatValue(ctx, desc.value, null);\n      } else {\n        str = formatValue(ctx, desc.value, recurseTimes - 1);\n      }\n      if (str.indexOf('\\n') > -1) {\n        if (array) {\n          str = str.split('\\n').map(function(line) {\n            return '  ' + line;\n          }).join('\\n').substr(2);\n        } else {\n          str = '\\n' + str.split('\\n').map(function(line) {\n            return '   ' + line;\n          }).join('\\n');\n        }\n      }\n    } else {\n      str = ctx.stylize('[Circular]', 'special');\n    }\n  }\n  if (isUndefined(name)) {\n    if (array && key.match(/^\\d+$/)) {\n      return str;\n    }\n    name = JSON.stringify('' + key);\n    if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n      name = name.substr(1, name.length - 2);\n      name = ctx.stylize(name, 'name');\n    } else {\n      name = name.replace(/'/g, \"\\\\'\")\n                 .replace(/\\\\\"/g, '\"')\n                 .replace(/(^\"|\"$)/g, \"'\");\n      name = ctx.stylize(name, 'string');\n    }\n  }\n\n  return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n  var numLinesEst = 0;\n  var length = output.reduce(function(prev, cur) {\n    numLinesEst++;\n    if (cur.indexOf('\\n') >= 0) numLinesEst++;\n    return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n  }, 0);\n\n  if (length > 60) {\n    return braces[0] +\n           (base === '' ? '' : base + '\\n ') +\n           ' ' +\n           output.join(',\\n  ') +\n           ' ' +\n           braces[1];\n  }\n\n  return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n  return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n  return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n  return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n  return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n  return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n  return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n  return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n  return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n  return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n  return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n  return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n  return isObject(e) &&\n      (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n  return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n  return arg === null ||\n         typeof arg === 'boolean' ||\n         typeof arg === 'number' ||\n         typeof arg === 'string' ||\n         typeof arg === 'symbol' ||  // ES6 symbol\n         typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ \"./node_modules/util/support/isBufferBrowser.js\");\n\nfunction objectToString(o) {\n  return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n  return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n              'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n  var d = new Date();\n  var time = [pad(d.getHours()),\n              pad(d.getMinutes()),\n              pad(d.getSeconds())].join(':');\n  return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n  console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n *     prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\n\nexports._extend = function(origin, add) {\n  // Don't do anything if add isn't an object\n  if (!add || !isObject(add)) return origin;\n\n  var keys = Object.keys(add);\n  var i = keys.length;\n  while (i--) {\n    origin[keys[i]] = add[keys[i]];\n  }\n  return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n  if (typeof original !== 'function')\n    throw new TypeError('The \"original\" argument must be of type Function');\n\n  if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n    var fn = original[kCustomPromisifiedSymbol];\n    if (typeof fn !== 'function') {\n      throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n    }\n    Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n      value: fn, enumerable: false, writable: false, configurable: true\n    });\n    return fn;\n  }\n\n  function fn() {\n    var promiseResolve, promiseReject;\n    var promise = new Promise(function (resolve, reject) {\n      promiseResolve = resolve;\n      promiseReject = reject;\n    });\n\n    var args = [];\n    for (var i = 0; i < arguments.length; i++) {\n      args.push(arguments[i]);\n    }\n    args.push(function (err, value) {\n      if (err) {\n        promiseReject(err);\n      } else {\n        promiseResolve(value);\n      }\n    });\n\n    try {\n      original.apply(this, args);\n    } catch (err) {\n      promiseReject(err);\n    }\n\n    return promise;\n  }\n\n  Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n  if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n    value: fn, enumerable: false, writable: false, configurable: true\n  });\n  return Object.defineProperties(\n    fn,\n    getOwnPropertyDescriptors(original)\n  );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n  // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n  // Because `null` is a special error value in callbacks which means \"no error\n  // occurred\", we error-wrap so the callback consumer can distinguish between\n  // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n  if (!reason) {\n    var newReason = new Error('Promise was rejected with a falsy value');\n    newReason.reason = reason;\n    reason = newReason;\n  }\n  return cb(reason);\n}\n\nfunction callbackify(original) {\n  if (typeof original !== 'function') {\n    throw new TypeError('The \"original\" argument must be of type Function');\n  }\n\n  // We DO NOT return the promise as it gives the user a false sense that\n  // the promise is actually somehow related to the callback's execution\n  // and that the callback throwing will reject the promise.\n  function callbackified() {\n    var args = [];\n    for (var i = 0; i < arguments.length; i++) {\n      args.push(arguments[i]);\n    }\n\n    var maybeCb = args.pop();\n    if (typeof maybeCb !== 'function') {\n      throw new TypeError('The last argument must be of type Function');\n    }\n    var self = this;\n    var cb = function() {\n      return maybeCb.apply(self, arguments);\n    };\n    // In true node style we process the callback on `nextTick` with all the\n    // implications (stack, `uncaughtException`, `async_hooks`)\n    original.apply(this, args)\n      .then(function(ret) { process.nextTick(cb, null, ret) },\n            function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });\n  }\n\n  Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n  Object.defineProperties(callbackified,\n                          getOwnPropertyDescriptors(original));\n  return callbackified;\n}\nexports.callbackify = callbackify;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/util/util.js?");

/***/ }),

/***/ "./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?");

/***/ }),

/***/ "./package.json":
/*!**********************!*\
  !*** ./package.json ***!
  \**********************/
/*! exports provided: name, version, description, main, types, scripts, repository, keywords, author, license, bugs, homepage, runkitExampleFilename, dependencies, peerDependencies, peerDependenciesMeta, devDependencies, engines, browser, default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module) {

eval("module.exports = {\"name\":\"discord.js\",\"version\":\"11.4.2\",\"description\":\"A powerful library for interacting with the Discord API\",\"main\":\"./src/index\",\"types\":\"./typings/index.d.ts\",\"scripts\":{\"test\":\"npm run lint && npm run docs:test\",\"docs\":\"docgen --source src --custom docs/index.yml --output docs/docs.json\",\"docs:test\":\"docgen --source src --custom docs/index.yml\",\"lint\":\"eslint src\",\"lint:fix\":\"eslint --fix src\",\"lint:typings\":\"tslint typings/index.d.ts typings/discord.js-test.ts\",\"webpack\":\"parallel-webpack\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/discordjs/discord.js.git\"},\"keywords\":[\"discord\",\"api\",\"bot\",\"client\",\"node\",\"discordapp\"],\"author\":\"Amish Shah <amishshah.2k@gmail.com>\",\"license\":\"Apache-2.0\",\"bugs\":{\"url\":\"https://github.com/discordjs/discord.js/issues\"},\"homepage\":\"https://github.com/discordjs/discord.js#readme\",\"runkitExampleFilename\":\"./docs/examples/ping.js\",\"dependencies\":{\"long\":\"^4.0.0\",\"prism-media\":\"^0.0.3\",\"snekfetch\":\"^3.6.4\",\"tweetnacl\":\"^1.0.0\",\"ws\":\"^6.0.0\"},\"peerDependencies\":{\"bufferutil\":\"^4.0.0\",\"erlpack\":\"discordapp/erlpack\",\"libsodium-wrappers\":\"^0.7.3\",\"node-opus\":\"^0.2.7\",\"opusscript\":\"^0.0.6\",\"sodium\":\"^2.0.3\",\"@discordjs/uws\":\"^10.149.0\"},\"peerDependenciesMeta\":{\"bufferutil\":{\"optional\":true},\"erlpack\":{\"optional\":true},\"node-opus\":{\"optional\":true},\"opusscript\":{\"optional\":true},\"sodium\":{\"optional\":true},\"libsodium-wrappers\":{\"optional\":true},\"uws\":{\"optional\":true}},\"devDependencies\":{\"@types/node\":\"^9.4.6\",\"discord.js-docgen\":\"discordjs/docgen\",\"eslint\":\"^5.4.0\",\"parallel-webpack\":\"^2.3.0\",\"tslint\":\"^3.15.1\",\"tslint-config-typings\":\"^0.2.4\",\"typescript\":\"^3.0.1\",\"uglifyjs-webpack-plugin\":\"^1.3.0\",\"webpack\":\"^4.17.0\"},\"engines\":{\"node\":\">=6.0.0\"},\"browser\":{\"ws\":false,\"uws\":false,\"@discordjs/uws\":false,\"erlpack\":false,\"prism-media\":false,\"opusscript\":false,\"node-opus\":false,\"tweetnacl\":false,\"sodium\":false,\"src/sharding/Shard.js\":false,\"src/sharding/ShardClientUtil.js\":false,\"src/sharding/ShardingManager.js\":false,\"src/client/voice/dispatcher/StreamDispatcher.js\":false,\"src/client/voice/opus/BaseOpusEngine.js\":false,\"src/client/voice/opus/NodeOpusEngine.js\":false,\"src/client/voice/opus/OpusEngineList.js\":false,\"src/client/voice/opus/OpusScriptEngine.js\":false,\"src/client/voice/pcm/ConverterEngine.js\":false,\"src/client/voice/pcm/ConverterEngineList.js\":false,\"src/client/voice/pcm/FfmpegConverterEngine.js\":false,\"src/client/voice/player/AudioPlayer.js\":false,\"src/client/voice/receiver/VoiceReadable.js\":false,\"src/client/voice/receiver/VoiceReceiver.js\":false,\"src/client/voice/util/Secretbox.js\":false,\"src/client/voice/util/SecretKey.js\":false,\"src/client/voice/util/VolumeInterface.js\":false,\"src/client/voice/ClientVoiceManager.js\":false,\"src/client/voice/VoiceBroadcast.js\":false,\"src/client/voice/VoiceConnection.js\":false,\"src/client/voice/VoiceUDPClient.js\":false,\"src/client/voice/VoiceWebSocket.js\":false}};\n\n//# sourceURL=webpack:///./package.json?");

/***/ }),

/***/ "./src/client/Client.js":
/*!******************************!*\
  !*** ./src/client/Client.js ***!
  \******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {const EventEmitter = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Permissions = __webpack_require__(/*! ../util/Permissions */ \"./src/util/Permissions.js\");\nconst Util = __webpack_require__(/*! ../util/Util */ \"./src/util/Util.js\");\nconst RESTManager = __webpack_require__(/*! ./rest/RESTManager */ \"./src/client/rest/RESTManager.js\");\nconst ClientDataManager = __webpack_require__(/*! ./ClientDataManager */ \"./src/client/ClientDataManager.js\");\nconst ClientManager = __webpack_require__(/*! ./ClientManager */ \"./src/client/ClientManager.js\");\nconst ClientDataResolver = __webpack_require__(/*! ./ClientDataResolver */ \"./src/client/ClientDataResolver.js\");\nconst ClientVoiceManager = __webpack_require__(/*! ./voice/ClientVoiceManager */ 4);\nconst WebSocketManager = __webpack_require__(/*! ./websocket/WebSocketManager */ \"./src/client/websocket/WebSocketManager.js\");\nconst ActionsManager = __webpack_require__(/*! ./actions/ActionsManager */ \"./src/client/actions/ActionsManager.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Presence = __webpack_require__(/*! ../structures/Presence */ \"./src/structures/Presence.js\").Presence;\nconst ShardClientUtil = __webpack_require__(/*! ../sharding/ShardClientUtil */ 5);\nconst VoiceBroadcast = __webpack_require__(/*! ./voice/VoiceBroadcast */ 6);\n\n/**\n * The main hub for interacting with the Discord API, and the starting point for any bot.\n * @extends {EventEmitter}\n */\nclass Client extends EventEmitter {\n  /**\n   * @param {ClientOptions} [options] Options for the client\n   */\n  constructor(options = {}) {\n    super();\n\n    // Obtain shard details from environment\n    if (!options.shardId && 'SHARD_ID' in Object({\"__DISCORD_WEBPACK__\":\"true\"})) options.shardId = Number(Object({\"__DISCORD_WEBPACK__\":\"true\"}).SHARD_ID);\n    if (!options.shardCount && 'SHARD_COUNT' in Object({\"__DISCORD_WEBPACK__\":\"true\"})) options.shardCount = Number(Object({\"__DISCORD_WEBPACK__\":\"true\"}).SHARD_COUNT);\n\n    /**\n     * The options the client was instantiated with\n     * @type {ClientOptions}\n     */\n    this.options = Util.mergeDefault(Constants.DefaultOptions, options);\n    this._validateOptions();\n\n    /**\n     * The REST manager of the client\n     * @type {RESTManager}\n     * @private\n     */\n    this.rest = new RESTManager(this);\n\n    /**\n     * The data manager of the client\n     * @type {ClientDataManager}\n     * @private\n     */\n    this.dataManager = new ClientDataManager(this);\n\n    /**\n     * The manager of the client\n     * @type {ClientManager}\n     * @private\n     */\n    this.manager = new ClientManager(this);\n\n    /**\n     * The WebSocket manager of the client\n     * @type {WebSocketManager}\n     * @private\n     */\n    this.ws = new WebSocketManager(this);\n\n    /**\n     * The data resolver of the client\n     * @type {ClientDataResolver}\n     * @private\n     */\n    this.resolver = new ClientDataResolver(this);\n\n    /**\n     * The action manager of the client\n     * @type {ActionsManager}\n     * @private\n     */\n    this.actions = new ActionsManager(this);\n\n    /**\n     * The voice manager of the client (`null` in browsers)\n     * @type {?ClientVoiceManager}\n     * @private\n     */\n    this.voice = !this.browser ? new ClientVoiceManager(this) : null;\n\n    /**\n     * The shard helpers for the client\n     * (only if the process was spawned as a child, such as from a {@link ShardingManager})\n     * @type {?ShardClientUtil}\n     */\n    this.shard = process.send ? ShardClientUtil.singleton(this) : null;\n\n    /**\n     * All of the {@link User} objects that have been cached at any point, mapped by their IDs\n     * @type {Collection<Snowflake, User>}\n     */\n    this.users = new Collection();\n\n    /**\n     * All of the guilds the client is currently handling, mapped by their IDs -\n     * as long as sharding isn't being used, this will be *every* guild the bot is a member of\n     * @type {Collection<Snowflake, Guild>}\n     */\n    this.guilds = new Collection();\n\n    /**\n     * All of the {@link Channel}s that the client is currently handling, mapped by their IDs -\n     * as long as sharding isn't being used, this will be *every* channel in *every* guild, and all DM channels\n     * @type {Collection<Snowflake, Channel>}\n     */\n    this.channels = new Collection();\n\n    /**\n     * Presences that have been received for the client user's friends, mapped by user IDs\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {Collection<Snowflake, Presence>}\n     */\n    this.presences = new Collection();\n\n    Object.defineProperty(this, 'token', { writable: true });\n    if (!this.token && 'CLIENT_TOKEN' in Object({\"__DISCORD_WEBPACK__\":\"true\"})) {\n      /**\n       * Authorization token for the logged in user/bot\n       * <warn>This should be kept private at all times.</warn>\n       * @type {?string}\n       */\n      this.token = Object({\"__DISCORD_WEBPACK__\":\"true\"}).CLIENT_TOKEN;\n    } else {\n      this.token = null;\n    }\n\n    /**\n     * User that the client is logged in as\n     * @type {?ClientUser}\n     */\n    this.user = null;\n\n    /**\n     * Time at which the client was last regarded as being in the `READY` state\n     * (each time the client disconnects and successfully reconnects, this will be overwritten)\n     * @type {?Date}\n     */\n    this.readyAt = null;\n\n    /**\n     * Active voice broadcasts that have been created\n     * @type {VoiceBroadcast[]}\n     */\n    this.broadcasts = [];\n\n    /**\n     * Previous heartbeat pings of the websocket (most recent first, limited to three elements)\n     * @type {number[]}\n     */\n    this.pings = [];\n\n    /**\n     * Timeouts set by {@link Client#setTimeout} that are still active\n     * @type {Set<Timeout>}\n     * @private\n     */\n    this._timeouts = new Set();\n\n    /**\n     * Intervals set by {@link Client#setInterval} that are still active\n     * @type {Set<Timeout>}\n     * @private\n     */\n    this._intervals = new Set();\n\n    if (this.options.messageSweepInterval > 0) {\n      this.setInterval(this.sweepMessages.bind(this), this.options.messageSweepInterval * 1000);\n    }\n  }\n\n  /**\n   * Timestamp of the latest ping's start time\n   * @type {number}\n   * @private\n   */\n  get _pingTimestamp() {\n    return this.ws.connection ? this.ws.connection.lastPingTimestamp : 0;\n  }\n\n  /**\n   * Current status of the client's connection to Discord\n   * @type {?number}\n   * @readonly\n   */\n  get status() {\n    return this.ws.connection.status;\n  }\n\n  /**\n   * How long it has been since the client last entered the `READY` state in milliseconds\n   * @type {?number}\n   * @readonly\n   */\n  get uptime() {\n    return this.readyAt ? Date.now() - this.readyAt : null;\n  }\n\n  /**\n   * Average heartbeat ping of the websocket, obtained by averaging the {@link Client#pings} property\n   * @type {number}\n   * @readonly\n   */\n  get ping() {\n    return this.pings.reduce((prev, p) => prev + p, 0) / this.pings.length;\n  }\n\n  /**\n   * All active voice connections that have been established, mapped by guild ID\n   * @type {Collection<Snowflake, VoiceConnection>}\n   * @readonly\n   */\n  get voiceConnections() {\n    if (this.browser) return new Collection();\n    return this.voice.connections;\n  }\n\n  /**\n   * All custom emojis that the client has access to, mapped by their IDs\n   * @type {Collection<Snowflake, Emoji>}\n   * @readonly\n   */\n  get emojis() {\n    const emojis = new Collection();\n    for (const guild of this.guilds.values()) {\n      for (const emoji of guild.emojis.values()) emojis.set(emoji.id, emoji);\n    }\n    return emojis;\n  }\n\n  /**\n   * Timestamp of the time the client was last `READY` at\n   * @type {?number}\n   * @readonly\n   */\n  get readyTimestamp() {\n    return this.readyAt ? this.readyAt.getTime() : null;\n  }\n\n  /**\n   * Whether the client is in a browser environment\n   * @type {boolean}\n   * @readonly\n   */\n  get browser() {\n    return typeof window !== 'undefined';\n  }\n\n  /**\n   * Creates a voice broadcast.\n   * @returns {VoiceBroadcast}\n   */\n  createVoiceBroadcast() {\n    const broadcast = new VoiceBroadcast(this);\n    this.broadcasts.push(broadcast);\n    return broadcast;\n  }\n\n  /**\n   * Logs the client in, establishing a websocket connection to Discord.\n   * <info>Both bot and regular user accounts are supported, but it is highly recommended to use a bot account whenever\n   * possible. User accounts are subject to harsher ratelimits and other restrictions that don't apply to bot accounts.\n   * Bot accounts also have access to many features that user accounts cannot utilise. Automating a user account is\n   * considered a violation of the ToS.</info>\n   * @param {string} token Token of the account to log in with\n   * @returns {Promise<string>} Token of the account used\n   * @example\n   * client.login('my token')\n   *  .then(console.log)\n   *  .catch(console.error);\n   */\n  login(token = this.token) {\n    return this.rest.methods.login(token);\n  }\n\n  /**\n   * Logs out, terminates the connection to Discord, and destroys the client.\n   * @returns {Promise}\n   */\n  destroy() {\n    for (const t of this._timeouts) clearTimeout(t);\n    for (const i of this._intervals) clearInterval(i);\n    this._timeouts.clear();\n    this._intervals.clear();\n    return this.manager.destroy();\n  }\n\n  /**\n   * Requests a sync of guild data with Discord.\n   * <info>This can be done automatically every 30 seconds by enabling {@link ClientOptions#sync}.</info>\n   * <warn>This is only available when using a user account.</warn>\n   * @param {Guild[]|Collection<Snowflake, Guild>} [guilds=this.guilds] An array or collection of guilds to sync\n   */\n  syncGuilds(guilds = this.guilds) {\n    if (this.user.bot) return;\n    this.ws.send({\n      op: 12,\n      d: guilds instanceof Collection ? guilds.keyArray() : guilds.map(g => g.id),\n    });\n  }\n\n  /**\n   * Obtains a user from Discord, or the user cache if it's already available.\n   * <warn>This is only available when using a bot account.</warn>\n   * @param {Snowflake} id ID of the user\n   * @param {boolean} [cache=true] Whether to cache the new user object if it isn't already\n   * @returns {Promise<User>}\n   */\n  fetchUser(id, cache = true) {\n    if (this.users.has(id)) return Promise.resolve(this.users.get(id));\n    return this.rest.methods.getUser(id, cache);\n  }\n\n  /**\n   * Obtains an invite from Discord.\n   * @param {InviteResolvable} invite Invite code or URL\n   * @returns {Promise<Invite>}\n   * @example\n   * client.fetchInvite('https://discord.gg/bRCvFy9')\n   *   .then(invite => console.log(`Obtained invite with code: ${invite.code}`))\n   *   .catch(console.error);\n   */\n  fetchInvite(invite) {\n    const code = this.resolver.resolveInviteCode(invite);\n    return this.rest.methods.getInvite(code);\n  }\n\n  /**\n   * Obtains a webhook from Discord.\n   * @param {Snowflake} id ID of the webhook\n   * @param {string} [token] Token for the webhook\n   * @returns {Promise<Webhook>}\n   * @example\n   * client.fetchWebhook('id', 'token')\n   *   .then(webhook => console.log(`Obtained webhook with name: ${webhook.name}`))\n   *   .catch(console.error);\n   */\n  fetchWebhook(id, token) {\n    return this.rest.methods.getWebhook(id, token);\n  }\n\n  /**\n   * Obtains the available voice regions from Discord.\n   * @returns {Collection<string, VoiceRegion>}\n   * @example\n   * client.fetchVoiceRegions()\n   *   .then(regions => console.log(`Available regions are: ${regions.map(region => region.name).join(', ')}`))\n   *   .catch(console.error);\n   */\n  fetchVoiceRegions() {\n    return this.rest.methods.fetchVoiceRegions();\n  }\n\n  /**\n   * Sweeps all text-based channels' messages and removes the ones older than the max message lifetime.\n   * If the message has been edited, the time of the edit is used rather than the time of the original message.\n   * @param {number} [lifetime=this.options.messageCacheLifetime] Messages that are older than this (in seconds)\n   * will be removed from the caches. The default is based on {@link ClientOptions#messageCacheLifetime}\n   * @returns {number} Amount of messages that were removed from the caches,\n   * or -1 if the message cache lifetime is unlimited\n   */\n  sweepMessages(lifetime = this.options.messageCacheLifetime) {\n    if (typeof lifetime !== 'number' || isNaN(lifetime)) throw new TypeError('The lifetime must be a number.');\n    if (lifetime <= 0) {\n      this.emit('debug', 'Didn\\'t sweep messages - lifetime is unlimited');\n      return -1;\n    }\n\n    const lifetimeMs = lifetime * 1000;\n    const now = Date.now();\n    let channels = 0;\n    let messages = 0;\n\n    for (const channel of this.channels.values()) {\n      if (!channel.messages) continue;\n      channels++;\n\n      messages += channel.messages.sweep(\n        message => now - (message.editedTimestamp || message.createdTimestamp) > lifetimeMs\n      );\n    }\n\n    this.emit('debug', `Swept ${messages} messages older than ${lifetime} seconds in ${channels} text-based channels`);\n    return messages;\n  }\n\n  /**\n   * Obtains the OAuth Application of the bot from Discord.\n   * <warn>Bots can only fetch their own profile.</warn>\n   * @param {Snowflake} [id='@me'] ID of application to fetch\n   * @returns {Promise<OAuth2Application>}\n   * @example\n   * client.fetchApplication()\n   *   .then(application => console.log(`Obtained application with name: ${application.name}`))\n   *   .catch(console.error);\n   */\n  fetchApplication(id = '@me') {\n    if (id !== '@me') ((any, ...more) => console.warn(any, more))('fetchApplication: use \"@me\" as an argument', 'DeprecationWarning');\n    return this.rest.methods.getApplication(id);\n  }\n\n  /**\n   * Generates a link that can be used to invite the bot to a guild.\n   * <warn>This is only available when using a bot account.</warn>\n   * @param {PermissionResolvable} [permissions] Permissions to request\n   * @returns {Promise<string>}\n   * @example\n   * client.generateInvite(['SEND_MESSAGES', 'MANAGE_GUILD', 'MENTION_EVERYONE'])\n   *   .then(link => console.log(`Generated bot invite link: ${link}`))\n   *   .catch(console.error);\n   */\n  generateInvite(permissions) {\n    permissions = typeof permissions === 'undefined' ? 0 : Permissions.resolve(permissions);\n    return this.fetchApplication().then(application =>\n      `https://discordapp.com/oauth2/authorize?client_id=${application.id}&permissions=${permissions}&scope=bot`\n    );\n  }\n\n  /**\n   * Sets a timeout that will be automatically cancelled if the client is destroyed.\n   * @param {Function} fn Function to execute\n   * @param {number} delay Time to wait before executing (in milliseconds)\n   * @param {...*} args Arguments for the function\n   * @returns {Timeout}\n   */\n  setTimeout(fn, delay, ...args) {\n    const timeout = setTimeout(() => {\n      fn(...args);\n      this._timeouts.delete(timeout);\n    }, delay);\n    this._timeouts.add(timeout);\n    return timeout;\n  }\n\n  /**\n   * Clears a timeout.\n   * @param {Timeout} timeout Timeout to cancel\n   */\n  clearTimeout(timeout) {\n    clearTimeout(timeout);\n    this._timeouts.delete(timeout);\n  }\n\n  /**\n   * Sets an interval that will be automatically cancelled if the client is destroyed.\n   * @param {Function} fn Function to execute\n   * @param {number} delay Time to wait before executing (in milliseconds)\n   * @param {...*} args Arguments for the function\n   * @returns {Timeout}\n   */\n  setInterval(fn, delay, ...args) {\n    const interval = setInterval(fn, delay, ...args);\n    this._intervals.add(interval);\n    return interval;\n  }\n\n  /**\n   * Clears an interval.\n   * @param {Timeout} interval Interval to cancel\n   */\n  clearInterval(interval) {\n    clearInterval(interval);\n    this._intervals.delete(interval);\n  }\n\n  /**\n   * Adds a ping to {@link Client#pings}.\n   * @param {number} startTime Starting time of the ping\n   * @private\n   */\n  _pong(startTime) {\n    this.pings.unshift(Date.now() - startTime);\n    if (this.pings.length > 3) this.pings.length = 3;\n    this.ws.lastHeartbeatAck = true;\n  }\n\n  /**\n   * Adds/updates a friend's presence in {@link Client#presences}.\n   * @param {Snowflake} id ID of the user\n   * @param {Object} presence Raw presence object from Discord\n   * @private\n   */\n  _setPresence(id, presence) {\n    if (this.presences.has(id)) {\n      this.presences.get(id).update(presence);\n      return;\n    }\n    this.presences.set(id, new Presence(presence, this));\n  }\n\n  /**\n   * Calls {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval} on a script\n   * with the client as `this`.\n   * @param {string} script Script to eval\n   * @returns {*}\n   * @private\n   */\n  _eval(script) {\n    return eval(script);\n  }\n\n  /**\n   * Validates the client options.\n   * @param {ClientOptions} [options=this.options] Options to validate\n   * @private\n   */\n  _validateOptions(options = this.options) { // eslint-disable-line complexity\n    if (typeof options.shardCount !== 'number' || isNaN(options.shardCount)) {\n      throw new TypeError('The shardCount option must be a number.');\n    }\n    if (typeof options.shardId !== 'number' || isNaN(options.shardId)) {\n      throw new TypeError('The shardId option must be a number.');\n    }\n    if (options.shardCount < 0) throw new RangeError('The shardCount option must be at least 0.');\n    if (options.shardId < 0) throw new RangeError('The shardId option must be at least 0.');\n    if (options.shardId !== 0 && options.shardId >= options.shardCount) {\n      throw new RangeError('The shardId option must be less than shardCount.');\n    }\n    if (typeof options.messageCacheMaxSize !== 'number' || isNaN(options.messageCacheMaxSize)) {\n      throw new TypeError('The messageCacheMaxSize option must be a number.');\n    }\n    if (typeof options.messageCacheLifetime !== 'number' || isNaN(options.messageCacheLifetime)) {\n      throw new TypeError('The messageCacheLifetime option must be a number.');\n    }\n    if (typeof options.messageSweepInterval !== 'number' || isNaN(options.messageSweepInterval)) {\n      throw new TypeError('The messageSweepInterval option must be a number.');\n    }\n    if (typeof options.fetchAllMembers !== 'boolean') {\n      throw new TypeError('The fetchAllMembers option must be a boolean.');\n    }\n    if (typeof options.disableEveryone !== 'boolean') {\n      throw new TypeError('The disableEveryone option must be a boolean.');\n    }\n    if (typeof options.restWsBridgeTimeout !== 'number' || isNaN(options.restWsBridgeTimeout)) {\n      throw new TypeError('The restWsBridgeTimeout option must be a number.');\n    }\n    if (!(options.disabledEvents instanceof Array)) throw new TypeError('The disabledEvents option must be an Array.');\n    if (typeof options.retryLimit !== 'number' || isNaN(options.retryLimit)) {\n      throw new TypeError('The retryLimit  options must be a number.');\n    }\n  }\n}\n\nmodule.exports = Client;\n\n/**\n * Emitted for general warnings.\n * @event Client#warn\n * @param {string} info The warning\n */\n\n/**\n * Emitted for general debugging information.\n * @event Client#debug\n * @param {string} info The debug information\n */\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./src/client/Client.js?");

/***/ }),

/***/ "./src/client/ClientDataManager.js":
/*!*****************************************!*\
  !*** ./src/client/ClientDataManager.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../util/Util */ \"./src/util/Util.js\");\nconst Guild = __webpack_require__(/*! ../structures/Guild */ \"./src/structures/Guild.js\");\nconst User = __webpack_require__(/*! ../structures/User */ \"./src/structures/User.js\");\nconst CategoryChannel = __webpack_require__(/*! ../structures/CategoryChannel */ \"./src/structures/CategoryChannel.js\");\nconst DMChannel = __webpack_require__(/*! ../structures/DMChannel */ \"./src/structures/DMChannel.js\");\nconst Emoji = __webpack_require__(/*! ../structures/Emoji */ \"./src/structures/Emoji.js\");\nconst TextChannel = __webpack_require__(/*! ../structures/TextChannel */ \"./src/structures/TextChannel.js\");\nconst VoiceChannel = __webpack_require__(/*! ../structures/VoiceChannel */ \"./src/structures/VoiceChannel.js\");\nconst GuildChannel = __webpack_require__(/*! ../structures/GuildChannel */ \"./src/structures/GuildChannel.js\");\nconst GroupDMChannel = __webpack_require__(/*! ../structures/GroupDMChannel */ \"./src/structures/GroupDMChannel.js\");\n\nclass ClientDataManager {\n  constructor(client) {\n    this.client = client;\n  }\n\n  get pastReady() {\n    return this.client.ws.connection.status === Constants.Status.READY;\n  }\n\n  newGuild(data) {\n    const already = this.client.guilds.has(data.id);\n    const guild = new Guild(this.client, data);\n    this.client.guilds.set(guild.id, guild);\n    if (this.pastReady && !already) {\n      /**\n       * Emitted whenever the client joins a guild.\n       * @event Client#guildCreate\n       * @param {Guild} guild The created guild\n       */\n      if (this.client.options.fetchAllMembers) {\n        guild.fetchMembers().then(() => { this.client.emit(Constants.Events.GUILD_CREATE, guild); });\n      } else {\n        this.client.emit(Constants.Events.GUILD_CREATE, guild);\n      }\n    }\n\n    return guild;\n  }\n\n  newUser(data, cache = true) {\n    if (this.client.users.has(data.id)) return this.client.users.get(data.id);\n    const user = new User(this.client, data);\n    if (cache) this.client.users.set(user.id, user);\n    return user;\n  }\n\n  newChannel(data, guild) {\n    const already = this.client.channels.has(data.id);\n    let channel;\n    if (data.type === Constants.ChannelTypes.DM) {\n      channel = new DMChannel(this.client, data);\n    } else if (data.type === Constants.ChannelTypes.GROUP_DM) {\n      channel = new GroupDMChannel(this.client, data);\n    } else {\n      guild = guild || this.client.guilds.get(data.guild_id);\n      if (already) {\n        channel = this.client.channels.get(data.id);\n      } else if (guild) {\n        if (data.type === Constants.ChannelTypes.TEXT) {\n          channel = new TextChannel(guild, data);\n          guild.channels.set(channel.id, channel);\n        } else if (data.type === Constants.ChannelTypes.VOICE) {\n          channel = new VoiceChannel(guild, data);\n          guild.channels.set(channel.id, channel);\n        } else if (data.type === Constants.ChannelTypes.CATEGORY) {\n          channel = new CategoryChannel(guild, data);\n          guild.channels.set(channel.id, channel);\n        }\n      }\n    }\n\n    if (channel && !already) {\n      if (this.pastReady) this.client.emit(Constants.Events.CHANNEL_CREATE, channel);\n      this.client.channels.set(channel.id, channel);\n      return channel;\n    } else if (already) {\n      return channel;\n    }\n\n    return null;\n  }\n\n  newEmoji(data, guild) {\n    const already = guild.emojis.has(data.id);\n    if (data && !already) {\n      let emoji = new Emoji(guild, data);\n      this.client.emit(Constants.Events.GUILD_EMOJI_CREATE, emoji);\n      guild.emojis.set(emoji.id, emoji);\n      return emoji;\n    } else if (already) {\n      return guild.emojis.get(data.id);\n    }\n\n    return null;\n  }\n\n  killEmoji(emoji) {\n    if (!(emoji instanceof Emoji && emoji.guild)) return;\n    this.client.emit(Constants.Events.GUILD_EMOJI_DELETE, emoji);\n    emoji.guild.emojis.delete(emoji.id);\n  }\n\n  killGuild(guild) {\n    const already = this.client.guilds.has(guild.id);\n    this.client.guilds.delete(guild.id);\n    if (already && this.pastReady) this.client.emit(Constants.Events.GUILD_DELETE, guild);\n  }\n\n  killUser(user) {\n    this.client.users.delete(user.id);\n  }\n\n  killChannel(channel) {\n    this.client.channels.delete(channel.id);\n    if (channel instanceof GuildChannel) channel.guild.channels.delete(channel.id);\n  }\n\n  updateGuild(currentGuild, newData) {\n    const oldGuild = Util.cloneObject(currentGuild);\n    currentGuild.setup(newData);\n    if (this.pastReady) this.client.emit(Constants.Events.GUILD_UPDATE, oldGuild, currentGuild);\n  }\n\n  updateChannel(currentChannel, newData) {\n    currentChannel.setup(newData);\n  }\n\n  updateEmoji(currentEmoji, newData) {\n    const oldEmoji = Util.cloneObject(currentEmoji);\n    currentEmoji.setup(newData);\n    this.client.emit(Constants.Events.GUILD_EMOJI_UPDATE, oldEmoji, currentEmoji);\n    return currentEmoji;\n  }\n}\n\nmodule.exports = ClientDataManager;\n\n\n//# sourceURL=webpack:///./src/client/ClientDataManager.js?");

/***/ }),

/***/ "./src/client/ClientDataResolver.js":
/*!******************************************!*\
  !*** ./src/client/ClientDataResolver.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(Buffer) {const path = __webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\");\nconst fs = __webpack_require__(/*! fs */ \"./node_modules/node-libs-browser/mock/empty.js\");\nconst snekfetch = __webpack_require__(/*! snekfetch */ \"./node_modules/snekfetch/esm.mjs\");\n\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst convertToBuffer = __webpack_require__(/*! ../util/Util */ \"./src/util/Util.js\").convertToBuffer;\nconst User = __webpack_require__(/*! ../structures/User */ \"./src/structures/User.js\");\nconst Message = __webpack_require__(/*! ../structures/Message */ \"./src/structures/Message.js\");\nconst Guild = __webpack_require__(/*! ../structures/Guild */ \"./src/structures/Guild.js\");\nconst Channel = __webpack_require__(/*! ../structures/Channel */ \"./src/structures/Channel.js\");\nconst GuildMember = __webpack_require__(/*! ../structures/GuildMember */ \"./src/structures/GuildMember.js\");\nconst Emoji = __webpack_require__(/*! ../structures/Emoji */ \"./src/structures/Emoji.js\");\nconst ReactionEmoji = __webpack_require__(/*! ../structures/ReactionEmoji */ \"./src/structures/ReactionEmoji.js\");\nconst Role = __webpack_require__(/*! ../structures/Role */ \"./src/structures/Role.js\");\n\n/**\n * The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\n * extracting a User from a Message object.\n * @private\n */\nclass ClientDataResolver {\n  /**\n   * @param {Client} client The client the resolver is for\n   */\n  constructor(client) {\n    this.client = client;\n  }\n\n  /**\n   * Data that resolves to give a User object. This can be:\n   * * A User object\n   * * A Snowflake\n   * * A Message object (resolves to the message author)\n   * * A Guild object (owner of the guild)\n   * * A GuildMember object\n   * @typedef {User|Snowflake|Message|Guild|GuildMember} UserResolvable\n   */\n\n  /**\n   * Resolves a UserResolvable to a User object.\n   * @param {UserResolvable} user The UserResolvable to identify\n   * @returns {?User}\n   */\n  resolveUser(user) {\n    if (user instanceof User) return user;\n    if (typeof user === 'string') return this.client.users.get(user) || null;\n    if (user instanceof GuildMember) return user.user;\n    if (user instanceof Message) return user.author;\n    if (user instanceof Guild) return user.owner;\n    return null;\n  }\n\n  /**\n   * Resolves a UserResolvable to a user ID string.\n   * @param {UserResolvable} user The UserResolvable to identify\n   * @returns {?Snowflake}\n   */\n  resolveUserID(user) {\n    if (user instanceof User || user instanceof GuildMember) return user.id;\n    if (typeof user === 'string') return user || null;\n    if (user instanceof Message) return user.author.id;\n    if (user instanceof Guild) return user.ownerID;\n    return null;\n  }\n\n  /**\n   * Data that resolves to give a Guild object. This can be:\n   * * A Guild object\n   * * A Snowflake\n   * @typedef {Guild|Snowflake} GuildResolvable\n   */\n\n  /**\n   * Resolves a GuildResolvable to a Guild object.\n   * @param {GuildResolvable} guild The GuildResolvable to identify\n   * @returns {?Guild}\n   */\n  resolveGuild(guild) {\n    if (guild instanceof Guild) return guild;\n    if (typeof guild === 'string') return this.client.guilds.get(guild) || null;\n    return null;\n  }\n\n  /**\n   * Data that resolves to give a GuildMember object. This can be:\n   * * A GuildMember object\n   * * A User object\n   * @typedef {GuildMember|User} GuildMemberResolvable\n   */\n\n  /**\n   * Resolves a GuildMemberResolvable to a GuildMember object.\n   * @param {GuildResolvable} guild The guild that the member is part of\n   * @param {UserResolvable} user The user that is part of the guild\n   * @returns {?GuildMember}\n   */\n  resolveGuildMember(guild, user) {\n    if (user instanceof GuildMember) return user;\n    guild = this.resolveGuild(guild);\n    user = this.resolveUser(user);\n    if (!guild || !user) return null;\n    return guild.members.get(user.id) || null;\n  }\n\n  /**\n   * Data that can be resolved to a Role object. This can be:\n   * * A Role\n   * * A Snowflake\n   * @typedef {Role|Snowflake} RoleResolvable\n   */\n\n  /**\n    * Resolves a RoleResolvable to a Role object.\n    * @param {GuildResolvable} guild The guild that this role is part of\n    * @param {RoleResolvable} role The role resolvable to resolve\n    * @returns {?Role}\n    */\n  resolveRole(guild, role) {\n    if (role instanceof Role) return role;\n    guild = this.resolveGuild(guild);\n    if (!guild) return null;\n    if (typeof role === 'string') return guild.roles.get(role);\n    return null;\n  }\n\n  /**\n   * Data that can be resolved to give a Channel object. This can be:\n   * * A Channel object\n   * * A Message object (the channel the message was sent in)\n   * * A Guild object (the #general channel)\n   * * A Snowflake\n   * @typedef {Channel|Guild|Message|Snowflake} ChannelResolvable\n   */\n\n  /**\n   * Resolves a ChannelResolvable to a Channel object.\n   * @param {ChannelResolvable} channel The channel resolvable to resolve\n   * @returns {?Channel}\n   */\n  resolveChannel(channel) {\n    if (channel instanceof Channel) return channel;\n    if (typeof channel === 'string') return this.client.channels.get(channel) || null;\n    if (channel instanceof Message) return channel.channel;\n    if (channel instanceof Guild) return channel.channels.get(channel.id) || null;\n    return null;\n  }\n\n  /**\n   * Resolves a ChannelResolvable to a channel ID.\n   * @param {ChannelResolvable} channel The channel resolvable to resolve\n   * @returns {?Snowflake}\n   */\n  resolveChannelID(channel) {\n    if (channel instanceof Channel) return channel.id;\n    if (typeof channel === 'string') return channel;\n    if (channel instanceof Message) return channel.channel.id;\n    if (channel instanceof Guild) return channel.defaultChannel.id;\n    return null;\n  }\n\n  /**\n   * Data that can be resolved to give an invite code. This can be:\n   * * An invite code\n   * * An invite URL\n   * @typedef {string} InviteResolvable\n   */\n\n  /**\n   * Resolves InviteResolvable to an invite code.\n   * @param {InviteResolvable} data The invite resolvable to resolve\n   * @returns {string}\n   */\n  resolveInviteCode(data) {\n    const inviteRegex = /discord(?:app\\.com\\/invite|\\.gg(?:\\/invite)?)\\/([\\w-]{2,255})/i;\n    const match = inviteRegex.exec(data);\n    if (match && match[1]) return match[1];\n    return data;\n  }\n\n  /**\n   * Data that can be resolved to give a string. This can be:\n   * * A string\n   * * An array (joined with a new line delimiter to give a string)\n   * * Any value\n   * @typedef {string|Array|*} StringResolvable\n   */\n\n  /**\n   * Resolves a StringResolvable to a string.\n   * @param {StringResolvable} data The string resolvable to resolve\n   * @returns {string}\n   */\n  resolveString(data) {\n    if (typeof data === 'string') return data;\n    if (data instanceof Array) return data.join('\\n');\n    return String(data);\n  }\n\n\n  /**\n   * Resolves a Base64Resolvable, a string, or a BufferResolvable to a Base 64 image.\n   * @param {BufferResolvable|Base64Resolvable} image The image to be resolved\n   * @returns {Promise<?string>}\n   */\n  resolveImage(image) {\n    if (!image) return Promise.resolve(null);\n    if (typeof image === 'string' && image.startsWith('data:')) {\n      return Promise.resolve(image);\n    }\n    return this.resolveFile(image).then(this.resolveBase64);\n  }\n\n  /**\n   * Data that resolves to give a Base64 string, typically for image uploading. This can be:\n   * * A Buffer\n   * * A base64 string\n   * @typedef {Buffer|string} Base64Resolvable\n   */\n\n  /**\n   * Resolves a Base64Resolvable to a Base 64 image.\n   * @param {Base64Resolvable} data The base 64 resolvable you want to resolve\n   * @returns {?string}\n   */\n  resolveBase64(data) {\n    if (data instanceof Buffer) return `data:image/jpg;base64,${data.toString('base64')}`;\n    return data;\n  }\n\n  /**\n    * Data that can be resolved to give a Buffer. This can be:\n    * * A Buffer\n    * * The path to a local file\n    * * A URL\n    * * A Stream\n    * @typedef {string|Buffer} BufferResolvable\n    */\n\n  /**\n    * @external Stream\n    * @see {@link https://nodejs.org/api/stream.html}\n    */\n\n  /**\n    * Resolves a BufferResolvable to a Buffer.\n    * @param {BufferResolvable|Stream} resource The buffer or stream resolvable to resolve\n    * @returns {Promise<Buffer>}\n    */\n  resolveFile(resource) {\n    if (resource instanceof Buffer) return Promise.resolve(resource);\n    if (this.client.browser && resource instanceof ArrayBuffer) return Promise.resolve(convertToBuffer(resource));\n\n    if (typeof resource === 'string') {\n      if (/^https?:\\/\\//.test(resource)) {\n        return snekfetch.get(resource).then(res => res.body instanceof Buffer ? res.body : Buffer.from(res.text));\n      }\n      return new Promise((resolve, reject) => {\n        const file = path.resolve(resource);\n        fs.stat(file, (err, stats) => {\n          if (err) return reject(err);\n          if (!stats || !stats.isFile()) return reject(new Error(`The file could not be found: ${file}`));\n          fs.readFile(file, (err2, data) => {\n            if (err2) reject(err2);\n            else resolve(data);\n          });\n          return null;\n        });\n      });\n    } else if (resource && resource.pipe && typeof resource.pipe === 'function') {\n      return new Promise((resolve, reject) => {\n        const buffers = [];\n        resource.once('error', reject);\n        resource.on('data', data => buffers.push(data));\n        resource.once('end', () => resolve(Buffer.concat(buffers)));\n      });\n    }\n\n    return Promise.reject(new TypeError('The resource must be a string or Buffer.'));\n  }\n\n  /**\n   * Data that can be resolved to give an emoji identifier. This can be:\n   * * The unicode representation of an emoji\n   * * A custom emoji ID\n   * * An Emoji object\n   * * A ReactionEmoji object\n   * @typedef {string|Emoji|ReactionEmoji} EmojiIdentifierResolvable\n   */\n\n  /**\n   * Resolves an EmojiResolvable to an emoji identifier.\n   * @param {EmojiIdentifierResolvable} emoji The emoji resolvable to resolve\n   * @returns {?string}\n   */\n  resolveEmojiIdentifier(emoji) {\n    if (emoji instanceof Emoji || emoji instanceof ReactionEmoji) return emoji.identifier;\n    if (typeof emoji === 'string') {\n      if (this.client.emojis.has(emoji)) return this.client.emojis.get(emoji).identifier;\n      else if (!emoji.includes('%')) return encodeURIComponent(emoji);\n      else return emoji;\n    }\n    return null;\n  }\n\n  /**\n   * Can be a Hex Literal, Hex String, Number, RGB Array, or one of the following\n   * ```\n   * [\n   *   'DEFAULT',\n   *   'WHITE',\n   *   'AQUA',\n   *   'GREEN',\n   *   'BLUE',\n   *   'PURPLE',\n   *   'LUMINOUS_VIVID_PINK',\n   *   'GOLD',\n   *   'ORANGE',\n   *   'RED',\n   *   'GREY',\n   *   'DARKER_GREY',\n   *   'NAVY',\n   *   'DARK_AQUA',\n   *   'DARK_GREEN',\n   *   'DARK_BLUE',\n   *   'DARK_PURPLE',\n   *   'DARK_VIVID_PINK',\n   *   'DARK_GOLD',\n   *   'DARK_ORANGE',\n   *   'DARK_RED',\n   *   'DARK_GREY',\n   *   'LIGHT_GREY',\n   *   'DARK_NAVY',\n   *   'RANDOM',\n   * ]\n   * ```\n   * or something like\n   * ```\n   * [255, 0, 255]\n   * ```\n   * for purple\n   * @typedef {string|number|Array} ColorResolvable\n   */\n\n  /**\n   * Resolves a ColorResolvable into a color number.\n   * @param {ColorResolvable} color Color to resolve\n   * @returns {number} A color\n   */\n  static resolveColor(color) {\n    if (typeof color === 'string') {\n      if (color === 'RANDOM') return Math.floor(Math.random() * (0xFFFFFF + 1));\n      if (color === 'DEFAULT') return 0;\n      color = Constants.Colors[color] || parseInt(color.replace('#', ''), 16);\n    } else if (color instanceof Array) {\n      color = (color[0] << 16) + (color[1] << 8) + color[2];\n    }\n\n    if (color < 0 || color > 0xFFFFFF) {\n      throw new RangeError('Color must be within the range 0 - 16777215 (0xFFFFFF).');\n    } else if (color && isNaN(color)) {\n      throw new TypeError('Unable to convert color to a number.');\n    }\n\n    return color;\n  }\n\n  /**\n   * @param {ColorResolvable} color Color to resolve\n   * @returns {number} A color\n   */\n  resolveColor(color) {\n    return this.constructor.resolveColor(color);\n  }\n}\n\nmodule.exports = ClientDataResolver;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/client/ClientDataResolver.js?");

/***/ }),

/***/ "./src/client/ClientManager.js":
/*!*************************************!*\
  !*** ./src/client/ClientManager.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst WebSocketConnection = __webpack_require__(/*! ./websocket/WebSocketConnection */ \"./src/client/websocket/WebSocketConnection.js\");\n\n/**\n * Manages the state and background tasks of the client.\n * @private\n */\nclass ClientManager {\n  constructor(client) {\n    /**\n     * The client that instantiated this Manager\n     * @type {Client}\n     */\n    this.client = client;\n\n    /**\n     * The heartbeat interval\n     * @type {?number}\n     */\n    this.heartbeatInterval = null;\n  }\n\n  /**\n   * The status of the client\n   * @type {number}\n   */\n  get status() {\n    return this.connection ? this.connection.status : Constants.Status.IDLE;\n  }\n\n  /**\n   * Connects the client to the WebSocket.\n   * @param {string} token The authorization token\n   * @param {Function} resolve Function to run when connection is successful\n   * @param {Function} reject Function to run when connection fails\n   */\n  connectToWebSocket(token, resolve, reject) {\n    this.client.emit(Constants.Events.DEBUG, `Authenticated using token ${token}`);\n    this.client.token = token;\n    const timeout = this.client.setTimeout(() => reject(new Error(Constants.Errors.TOOK_TOO_LONG)), 1000 * 300);\n    this.client.rest.methods.getGateway().then(res => {\n      const protocolVersion = Constants.DefaultOptions.ws.version;\n      const gateway = `${res.url}/?v=${protocolVersion}&encoding=${WebSocketConnection.ENCODING}`;\n      this.client.emit(Constants.Events.DEBUG, `Using gateway ${gateway}`);\n      this.client.ws.connect(gateway);\n      this.client.ws.connection.once('error', reject);\n      this.client.ws.connection.once('close', event => {\n        if (event.code === 4004) reject(new Error(Constants.Errors.BAD_LOGIN));\n        if (event.code === 4010) reject(new Error(Constants.Errors.INVALID_SHARD));\n        if (event.code === 4011) reject(new Error(Constants.Errors.SHARDING_REQUIRED));\n      });\n      this.client.once(Constants.Events.READY, () => {\n        resolve(token);\n        this.client.clearTimeout(timeout);\n      });\n    }, reject);\n  }\n\n  destroy() {\n    this.client.ws.destroy();\n    this.client.rest.destroy();\n    if (!this.client.user) return Promise.resolve();\n    if (this.client.user.bot) {\n      this.client.token = null;\n      return Promise.resolve();\n    } else {\n      return this.client.rest.methods.logout().then(() => {\n        this.client.token = null;\n      });\n    }\n  }\n}\n\nmodule.exports = ClientManager;\n\n\n//# sourceURL=webpack:///./src/client/ClientManager.js?");

/***/ }),

/***/ "./src/client/WebhookClient.js":
/*!*************************************!*\
  !*** ./src/client/WebhookClient.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Webhook = __webpack_require__(/*! ../structures/Webhook */ \"./src/structures/Webhook.js\");\nconst RESTManager = __webpack_require__(/*! ./rest/RESTManager */ \"./src/client/rest/RESTManager.js\");\nconst ClientDataResolver = __webpack_require__(/*! ./ClientDataResolver */ \"./src/client/ClientDataResolver.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../util/Util */ \"./src/util/Util.js\");\n\n/**\n * The webhook client.\n * @extends {Webhook}\n */\nclass WebhookClient extends Webhook {\n  /**\n   * @param {Snowflake} id ID of the webhook\n   * @param {string} token Token of the webhook\n   * @param {ClientOptions} [options] Options for the client\n   * @example\n   * // Create a new webhook and send a message\n   * const hook = new Discord.WebhookClient('1234', 'abcdef');\n   * hook.sendMessage('This will send a message').catch(console.error);\n   */\n  constructor(id, token, options) {\n    super(null, id, token);\n\n    /**\n     * The options the client was instantiated with\n     * @type {ClientOptions}\n     */\n    this.options = Util.mergeDefault(Constants.DefaultOptions, options);\n\n    /**\n     * The REST manager of the client\n     * @type {RESTManager}\n     * @private\n     */\n    this.rest = new RESTManager(this);\n\n    /**\n     * The data resolver of the client\n     * @type {ClientDataResolver}\n     * @private\n     */\n    this.resolver = new ClientDataResolver(this);\n\n    /**\n     * Timeouts set by {@link WebhookClient#setTimeout} that are still active\n     * @type {Set<Timeout>}\n     * @private\n     */\n    this._timeouts = new Set();\n\n    /**\n     * Intervals set by {@link WebhookClient#setInterval} that are still active\n     * @type {Set<Timeout>}\n     * @private\n     */\n    this._intervals = new Set();\n  }\n\n  /**\n   * Sets a timeout that will be automatically cancelled if the client is destroyed.\n   * @param {Function} fn Function to execute\n   * @param {number} delay Time to wait before executing (in milliseconds)\n   * @param {...*} args Arguments for the function\n   * @returns {Timeout}\n   */\n  setTimeout(fn, delay, ...args) {\n    const timeout = setTimeout(() => {\n      fn(...args);\n      this._timeouts.delete(timeout);\n    }, delay);\n    this._timeouts.add(timeout);\n    return timeout;\n  }\n\n  /**\n   * Clears a timeout.\n   * @param {Timeout} timeout Timeout to cancel\n   */\n  clearTimeout(timeout) {\n    clearTimeout(timeout);\n    this._timeouts.delete(timeout);\n  }\n\n  /**\n   * Sets an interval that will be automatically cancelled if the client is destroyed.\n   * @param {Function} fn Function to execute\n   * @param {number} delay Time to wait before executing (in milliseconds)\n   * @param {...*} args Arguments for the function\n   * @returns {Timeout}\n   */\n  setInterval(fn, delay, ...args) {\n    const interval = setInterval(fn, delay, ...args);\n    this._intervals.add(interval);\n    return interval;\n  }\n\n  /**\n   * Clears an interval.\n   * @param {Timeout} interval Interval to cancel\n   */\n  clearInterval(interval) {\n    clearInterval(interval);\n    this._intervals.delete(interval);\n  }\n\n\n  /**\n   * Destroys the client.\n   */\n  destroy() {\n    for (const t of this._timeouts) clearTimeout(t);\n    for (const i of this._intervals) clearInterval(i);\n    this._timeouts.clear();\n    this._intervals.clear();\n  }\n}\n\nmodule.exports = WebhookClient;\n\n\n//# sourceURL=webpack:///./src/client/WebhookClient.js?");

/***/ }),

/***/ "./src/client/actions/Action.js":
/*!**************************************!*\
  !*** ./src/client/actions/Action.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*\n\nABOUT ACTIONS\n\nActions are similar to WebSocket Packet Handlers, but since introducing\nthe REST API methods, in order to prevent rewriting code to handle data,\n\"actions\" have been introduced. They're basically what Packet Handlers\nused to be but they're strictly for manipulating data and making sure\nthat WebSocket events don't clash with REST methods.\n\n*/\n\nclass GenericAction {\n  constructor(client) {\n    this.client = client;\n  }\n\n  handle(data) {\n    return data;\n  }\n}\n\nmodule.exports = GenericAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/Action.js?");

/***/ }),

/***/ "./src/client/actions/ActionsManager.js":
/*!**********************************************!*\
  !*** ./src/client/actions/ActionsManager.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("class ActionsManager {\n  constructor(client) {\n    this.client = client;\n\n    this.register(__webpack_require__(/*! ./MessageCreate */ \"./src/client/actions/MessageCreate.js\"));\n    this.register(__webpack_require__(/*! ./MessageDelete */ \"./src/client/actions/MessageDelete.js\"));\n    this.register(__webpack_require__(/*! ./MessageDeleteBulk */ \"./src/client/actions/MessageDeleteBulk.js\"));\n    this.register(__webpack_require__(/*! ./MessageUpdate */ \"./src/client/actions/MessageUpdate.js\"));\n    this.register(__webpack_require__(/*! ./MessageReactionAdd */ \"./src/client/actions/MessageReactionAdd.js\"));\n    this.register(__webpack_require__(/*! ./MessageReactionRemove */ \"./src/client/actions/MessageReactionRemove.js\"));\n    this.register(__webpack_require__(/*! ./MessageReactionRemoveAll */ \"./src/client/actions/MessageReactionRemoveAll.js\"));\n    this.register(__webpack_require__(/*! ./ChannelCreate */ \"./src/client/actions/ChannelCreate.js\"));\n    this.register(__webpack_require__(/*! ./ChannelDelete */ \"./src/client/actions/ChannelDelete.js\"));\n    this.register(__webpack_require__(/*! ./ChannelUpdate */ \"./src/client/actions/ChannelUpdate.js\"));\n    this.register(__webpack_require__(/*! ./GuildDelete */ \"./src/client/actions/GuildDelete.js\"));\n    this.register(__webpack_require__(/*! ./GuildUpdate */ \"./src/client/actions/GuildUpdate.js\"));\n    this.register(__webpack_require__(/*! ./GuildMemberGet */ \"./src/client/actions/GuildMemberGet.js\"));\n    this.register(__webpack_require__(/*! ./GuildMemberRemove */ \"./src/client/actions/GuildMemberRemove.js\"));\n    this.register(__webpack_require__(/*! ./GuildBanRemove */ \"./src/client/actions/GuildBanRemove.js\"));\n    this.register(__webpack_require__(/*! ./GuildRoleCreate */ \"./src/client/actions/GuildRoleCreate.js\"));\n    this.register(__webpack_require__(/*! ./GuildRoleDelete */ \"./src/client/actions/GuildRoleDelete.js\"));\n    this.register(__webpack_require__(/*! ./GuildRoleUpdate */ \"./src/client/actions/GuildRoleUpdate.js\"));\n    this.register(__webpack_require__(/*! ./UserGet */ \"./src/client/actions/UserGet.js\"));\n    this.register(__webpack_require__(/*! ./UserUpdate */ \"./src/client/actions/UserUpdate.js\"));\n    this.register(__webpack_require__(/*! ./UserNoteUpdate */ \"./src/client/actions/UserNoteUpdate.js\"));\n    this.register(__webpack_require__(/*! ./GuildSync */ \"./src/client/actions/GuildSync.js\"));\n    this.register(__webpack_require__(/*! ./GuildEmojiCreate */ \"./src/client/actions/GuildEmojiCreate.js\"));\n    this.register(__webpack_require__(/*! ./GuildEmojiDelete */ \"./src/client/actions/GuildEmojiDelete.js\"));\n    this.register(__webpack_require__(/*! ./GuildEmojiUpdate */ \"./src/client/actions/GuildEmojiUpdate.js\"));\n    this.register(__webpack_require__(/*! ./GuildEmojisUpdate */ \"./src/client/actions/GuildEmojisUpdate.js\"));\n    this.register(__webpack_require__(/*! ./GuildRolesPositionUpdate */ \"./src/client/actions/GuildRolesPositionUpdate.js\"));\n    this.register(__webpack_require__(/*! ./GuildChannelsPositionUpdate */ \"./src/client/actions/GuildChannelsPositionUpdate.js\"));\n  }\n\n  register(Action) {\n    this[Action.name.replace(/Action$/, '')] = new Action(this.client);\n  }\n}\n\nmodule.exports = ActionsManager;\n\n\n//# sourceURL=webpack:///./src/client/actions/ActionsManager.js?");

/***/ }),

/***/ "./src/client/actions/ChannelCreate.js":
/*!*********************************************!*\
  !*** ./src/client/actions/ChannelCreate.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass ChannelCreateAction extends Action {\n  handle(data) {\n    const client = this.client;\n    const channel = client.dataManager.newChannel(data);\n    return { channel };\n  }\n}\n\nmodule.exports = ChannelCreateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/ChannelCreate.js?");

/***/ }),

/***/ "./src/client/actions/ChannelDelete.js":
/*!*********************************************!*\
  !*** ./src/client/actions/ChannelDelete.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass ChannelDeleteAction extends Action {\n  constructor(client) {\n    super(client);\n    this.deleted = new Map();\n  }\n\n  handle(data) {\n    const client = this.client;\n\n    let channel = client.channels.get(data.id);\n    if (channel) {\n      client.dataManager.killChannel(channel);\n      this.deleted.set(channel.id, channel);\n      this.scheduleForDeletion(channel.id);\n    } else {\n      channel = this.deleted.get(data.id) || null;\n    }\n    if (channel) channel.deleted = true;\n\n    return { channel };\n  }\n\n  scheduleForDeletion(id) {\n    this.client.setTimeout(() => this.deleted.delete(id), this.client.options.restWsBridgeTimeout);\n  }\n}\n\nmodule.exports = ChannelDeleteAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/ChannelDelete.js?");

/***/ }),

/***/ "./src/client/actions/ChannelUpdate.js":
/*!*********************************************!*\
  !*** ./src/client/actions/ChannelUpdate.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../../util/Util */ \"./src/util/Util.js\");\n\nclass ChannelUpdateAction extends Action {\n  handle(data) {\n    const client = this.client;\n\n    const channel = client.channels.get(data.id);\n    if (channel) {\n      const oldChannel = Util.cloneObject(channel);\n      channel.setup(data);\n      client.emit(Constants.Events.CHANNEL_UPDATE, oldChannel, channel);\n      return {\n        old: oldChannel,\n        updated: channel,\n      };\n    }\n\n    return {\n      old: null,\n      updated: null,\n    };\n  }\n}\n\n/**\n * Emitted whenever a channel is updated - e.g. name change, topic change.\n * @event Client#channelUpdate\n * @param {Channel} oldChannel The channel before the update\n * @param {Channel} newChannel The channel after the update\n */\n\nmodule.exports = ChannelUpdateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/ChannelUpdate.js?");

/***/ }),

/***/ "./src/client/actions/GuildBanRemove.js":
/*!**********************************************!*\
  !*** ./src/client/actions/GuildBanRemove.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass GuildBanRemove extends Action {\n  handle(data) {\n    const client = this.client;\n    const guild = client.guilds.get(data.guild_id);\n    const user = client.dataManager.newUser(data.user);\n    if (guild && user) client.emit(Constants.Events.GUILD_BAN_REMOVE, guild, user);\n  }\n}\n\nmodule.exports = GuildBanRemove;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildBanRemove.js?");

/***/ }),

/***/ "./src/client/actions/GuildChannelsPositionUpdate.js":
/*!***********************************************************!*\
  !*** ./src/client/actions/GuildChannelsPositionUpdate.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass GuildChannelsPositionUpdate extends Action {\n  handle(data) {\n    const client = this.client;\n\n    const guild = client.guilds.get(data.guild_id);\n    if (guild) {\n      for (const partialChannel of data.channels) {\n        const channel = guild.channels.get(partialChannel.id);\n        if (channel) channel.position = partialChannel.position;\n      }\n    }\n\n    return { guild };\n  }\n}\n\nmodule.exports = GuildChannelsPositionUpdate;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildChannelsPositionUpdate.js?");

/***/ }),

/***/ "./src/client/actions/GuildDelete.js":
/*!*******************************************!*\
  !*** ./src/client/actions/GuildDelete.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass GuildDeleteAction extends Action {\n  constructor(client) {\n    super(client);\n    this.deleted = new Map();\n  }\n\n  handle(data) {\n    const client = this.client;\n\n    let guild = client.guilds.get(data.id);\n    if (guild) {\n      for (const channel of guild.channels.values()) {\n        if (channel.type === 'text') channel.stopTyping(true);\n      }\n\n      if (guild.available && data.unavailable) {\n        // Guild is unavailable\n        guild.available = false;\n        client.emit(Constants.Events.GUILD_UNAVAILABLE, guild);\n\n        // Stops the GuildDelete packet thinking a guild was actually deleted,\n        // handles emitting of event itself\n        return {\n          guild: null,\n        };\n      }\n\n      for (const channel of guild.channels.values()) this.client.channels.delete(channel.id);\n      if (guild.voiceConnection) guild.voiceConnection.disconnect();\n\n      // Delete guild\n      client.guilds.delete(guild.id);\n      this.deleted.set(guild.id, guild);\n      this.scheduleForDeletion(guild.id);\n    } else {\n      guild = this.deleted.get(data.id) || null;\n    }\n    if (guild) guild.deleted = true;\n\n    return { guild };\n  }\n\n  scheduleForDeletion(id) {\n    this.client.setTimeout(() => this.deleted.delete(id), this.client.options.restWsBridgeTimeout);\n  }\n}\n\n/**\n * Emitted whenever a guild becomes unavailable, likely due to a server outage.\n * @event Client#guildUnavailable\n * @param {Guild} guild The guild that has become unavailable\n */\n\nmodule.exports = GuildDeleteAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildDelete.js?");

/***/ }),

/***/ "./src/client/actions/GuildEmojiCreate.js":
/*!************************************************!*\
  !*** ./src/client/actions/GuildEmojiCreate.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass GuildEmojiCreateAction extends Action {\n  handle(guild, createdEmoji) {\n    const client = this.client;\n    const emoji = client.dataManager.newEmoji(createdEmoji, guild);\n    return { emoji };\n  }\n}\n\n/**\n * Emitted whenever a custom emoji is created in a guild.\n * @event Client#emojiCreate\n * @param {Emoji} emoji The emoji that was created\n */\n\nmodule.exports = GuildEmojiCreateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildEmojiCreate.js?");

/***/ }),

/***/ "./src/client/actions/GuildEmojiDelete.js":
/*!************************************************!*\
  !*** ./src/client/actions/GuildEmojiDelete.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass GuildEmojiDeleteAction extends Action {\n  handle(emoji) {\n    const client = this.client;\n    client.dataManager.killEmoji(emoji);\n    emoji.deleted = true;\n    return { emoji };\n  }\n}\n\n/**\n * Emitted whenever a custom guild emoji is deleted.\n * @event Client#emojiDelete\n * @param {Emoji} emoji The emoji that was deleted\n */\n\nmodule.exports = GuildEmojiDeleteAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildEmojiDelete.js?");

/***/ }),

/***/ "./src/client/actions/GuildEmojiUpdate.js":
/*!************************************************!*\
  !*** ./src/client/actions/GuildEmojiUpdate.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass GuildEmojiUpdateAction extends Action {\n  handle(oldEmoji, newEmoji) {\n    const emoji = this.client.dataManager.updateEmoji(oldEmoji, newEmoji);\n    return { emoji };\n  }\n}\n\n/**\n * Emitted whenever a custom guild emoji is updated.\n * @event Client#emojiUpdate\n * @param {Emoji} oldEmoji The old emoji\n * @param {Emoji} newEmoji The new emoji\n */\n\nmodule.exports = GuildEmojiUpdateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildEmojiUpdate.js?");

/***/ }),

/***/ "./src/client/actions/GuildEmojisUpdate.js":
/*!*************************************************!*\
  !*** ./src/client/actions/GuildEmojisUpdate.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nfunction mappify(iterable) {\n  const map = new Map();\n  for (const x of iterable) map.set(...x);\n  return map;\n}\n\nclass GuildEmojisUpdateAction extends Action {\n  handle(data) {\n    const guild = this.client.guilds.get(data.guild_id);\n    if (!guild || !guild.emojis) return;\n\n    const deletions = mappify(guild.emojis.entries());\n\n    for (const emoji of data.emojis) {\n      // Determine type of emoji event\n      const cachedEmoji = guild.emojis.get(emoji.id);\n      if (cachedEmoji) {\n        deletions.delete(emoji.id);\n        if (!cachedEmoji.equals(emoji, true)) {\n          // Emoji updated\n          this.client.actions.GuildEmojiUpdate.handle(cachedEmoji, emoji);\n        }\n      } else {\n        // Emoji added\n        this.client.actions.GuildEmojiCreate.handle(guild, emoji);\n      }\n    }\n\n    for (const emoji of deletions.values()) {\n      // Emoji deleted\n      this.client.actions.GuildEmojiDelete.handle(emoji);\n    }\n  }\n}\n\nmodule.exports = GuildEmojisUpdateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildEmojisUpdate.js?");

/***/ }),

/***/ "./src/client/actions/GuildMemberGet.js":
/*!**********************************************!*\
  !*** ./src/client/actions/GuildMemberGet.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass GuildMemberGetAction extends Action {\n  handle(guild, data) {\n    const member = guild._addMember(data, false);\n    return { member };\n  }\n}\n\nmodule.exports = GuildMemberGetAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildMemberGet.js?");

/***/ }),

/***/ "./src/client/actions/GuildMemberRemove.js":
/*!*************************************************!*\
  !*** ./src/client/actions/GuildMemberRemove.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass GuildMemberRemoveAction extends Action {\n  constructor(client) {\n    super(client);\n    this.deleted = new Map();\n  }\n\n  handle(data) {\n    const client = this.client;\n    const guild = client.guilds.get(data.guild_id);\n    let member = null;\n    if (guild) {\n      member = guild.members.get(data.user.id);\n      guild.memberCount--;\n      if (member) {\n        guild._removeMember(member);\n        this.deleted.set(guild.id + data.user.id, member);\n        if (client.status === Constants.Status.READY) client.emit(Constants.Events.GUILD_MEMBER_REMOVE, member);\n        this.scheduleForDeletion(guild.id, data.user.id);\n      } else {\n        member = this.deleted.get(guild.id + data.user.id) || null;\n      }\n      if (member) member.deleted = true;\n    }\n    return { guild, member };\n  }\n\n  scheduleForDeletion(guildID, userID) {\n    this.client.setTimeout(() => this.deleted.delete(guildID + userID), this.client.options.restWsBridgeTimeout);\n  }\n}\n\n/**\n * Emitted whenever a member leaves a guild, or is kicked.\n * @event Client#guildMemberRemove\n * @param {GuildMember} member The member that has left/been kicked from the guild\n */\n\nmodule.exports = GuildMemberRemoveAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildMemberRemove.js?");

/***/ }),

/***/ "./src/client/actions/GuildRoleCreate.js":
/*!***********************************************!*\
  !*** ./src/client/actions/GuildRoleCreate.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\nconst Role = __webpack_require__(/*! ../../structures/Role */ \"./src/structures/Role.js\");\n\nclass GuildRoleCreate extends Action {\n  handle(data) {\n    const client = this.client;\n    const guild = client.guilds.get(data.guild_id);\n    let role;\n    if (guild) {\n      const already = guild.roles.has(data.role.id);\n      role = new Role(guild, data.role);\n      guild.roles.set(role.id, role);\n      if (!already) client.emit(Constants.Events.GUILD_ROLE_CREATE, role);\n    }\n    return { role };\n  }\n}\n\n/**\n * Emitted whenever a role is created.\n * @event Client#roleCreate\n * @param {Role} role The role that was created\n */\n\nmodule.exports = GuildRoleCreate;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildRoleCreate.js?");

/***/ }),

/***/ "./src/client/actions/GuildRoleDelete.js":
/*!***********************************************!*\
  !*** ./src/client/actions/GuildRoleDelete.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass GuildRoleDeleteAction extends Action {\n  constructor(client) {\n    super(client);\n    this.deleted = new Map();\n  }\n\n  handle(data) {\n    const client = this.client;\n    const guild = client.guilds.get(data.guild_id);\n    let role;\n\n    if (guild) {\n      role = guild.roles.get(data.role_id);\n      if (role) {\n        guild.roles.delete(data.role_id);\n        this.deleted.set(guild.id + data.role_id, role);\n        this.scheduleForDeletion(guild.id, data.role_id);\n        client.emit(Constants.Events.GUILD_ROLE_DELETE, role);\n      } else {\n        role = this.deleted.get(guild.id + data.role_id) || null;\n      }\n      if (role) role.deleted = true;\n    }\n\n    return { role };\n  }\n\n  scheduleForDeletion(guildID, roleID) {\n    this.client.setTimeout(() => this.deleted.delete(guildID + roleID), this.client.options.restWsBridgeTimeout);\n  }\n}\n\n/**\n * Emitted whenever a guild role is deleted.\n * @event Client#roleDelete\n * @param {Role} role The role that was deleted\n */\n\nmodule.exports = GuildRoleDeleteAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildRoleDelete.js?");

/***/ }),

/***/ "./src/client/actions/GuildRoleUpdate.js":
/*!***********************************************!*\
  !*** ./src/client/actions/GuildRoleUpdate.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../../util/Util */ \"./src/util/Util.js\");\n\nclass GuildRoleUpdateAction extends Action {\n  handle(data) {\n    const client = this.client;\n    const guild = client.guilds.get(data.guild_id);\n\n    if (guild) {\n      const roleData = data.role;\n      let oldRole = null;\n\n      const role = guild.roles.get(roleData.id);\n      if (role) {\n        oldRole = Util.cloneObject(role);\n        role.setup(data.role);\n        client.emit(Constants.Events.GUILD_ROLE_UPDATE, oldRole, role);\n      }\n\n      return {\n        old: oldRole,\n        updated: role,\n      };\n    }\n\n    return {\n      old: null,\n      updated: null,\n    };\n  }\n}\n\n/**\n * Emitted whenever a guild role is updated.\n * @event Client#roleUpdate\n * @param {Role} oldRole The role before the update\n * @param {Role} newRole The role after the update\n */\n\nmodule.exports = GuildRoleUpdateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildRoleUpdate.js?");

/***/ }),

/***/ "./src/client/actions/GuildRolesPositionUpdate.js":
/*!********************************************************!*\
  !*** ./src/client/actions/GuildRolesPositionUpdate.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass GuildRolesPositionUpdate extends Action {\n  handle(data) {\n    const client = this.client;\n\n    const guild = client.guilds.get(data.guild_id);\n    if (guild) {\n      for (const partialRole of data.roles) {\n        const role = guild.roles.get(partialRole.id);\n        if (role) role.position = partialRole.position;\n      }\n    }\n\n    return { guild };\n  }\n}\n\nmodule.exports = GuildRolesPositionUpdate;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildRolesPositionUpdate.js?");

/***/ }),

/***/ "./src/client/actions/GuildSync.js":
/*!*****************************************!*\
  !*** ./src/client/actions/GuildSync.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass GuildSync extends Action {\n  handle(data) {\n    const client = this.client;\n\n    const guild = client.guilds.get(data.id);\n    if (guild) {\n      if (data.presences) {\n        for (const presence of data.presences) guild._setPresence(presence.user.id, presence);\n      }\n\n      if (data.members) {\n        for (const syncMember of data.members) {\n          const member = guild.members.get(syncMember.user.id);\n          if (member) {\n            guild._updateMember(member, syncMember);\n          } else {\n            guild._addMember(syncMember, false);\n          }\n        }\n      }\n\n      if ('large' in data) guild.large = data.large;\n    }\n  }\n}\n\nmodule.exports = GuildSync;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildSync.js?");

/***/ }),

/***/ "./src/client/actions/GuildUpdate.js":
/*!*******************************************!*\
  !*** ./src/client/actions/GuildUpdate.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../../util/Util */ \"./src/util/Util.js\");\n\nclass GuildUpdateAction extends Action {\n  handle(data) {\n    const client = this.client;\n\n    const guild = client.guilds.get(data.id);\n    if (guild) {\n      const oldGuild = Util.cloneObject(guild);\n      guild.setup(data);\n      client.emit(Constants.Events.GUILD_UPDATE, oldGuild, guild);\n      return {\n        old: oldGuild,\n        updated: guild,\n      };\n    }\n\n    return {\n      old: null,\n      updated: null,\n    };\n  }\n}\n\n/**\n * Emitted whenever a guild is updated - e.g. name change.\n * @event Client#guildUpdate\n * @param {Guild} oldGuild The guild before the update\n * @param {Guild} newGuild The guild after the update\n */\n\nmodule.exports = GuildUpdateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/GuildUpdate.js?");

/***/ }),

/***/ "./src/client/actions/MessageCreate.js":
/*!*********************************************!*\
  !*** ./src/client/actions/MessageCreate.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Message = __webpack_require__(/*! ../../structures/Message */ \"./src/structures/Message.js\");\n\nclass MessageCreateAction extends Action {\n  handle(data) {\n    const client = this.client;\n\n    const channel = client.channels.get((data instanceof Array ? data[0] : data).channel_id);\n    const user = client.users.get((data instanceof Array ? data[0] : data).author.id);\n    if (channel) {\n      const member = channel.guild ? channel.guild.member(user) : null;\n      if (data instanceof Array) {\n        const messages = new Array(data.length);\n        for (let i = 0; i < data.length; i++) {\n          messages[i] = channel._cacheMessage(new Message(channel, data[i], client));\n        }\n        const lastMessage = messages[messages.length - 1];\n        channel.lastMessageID = lastMessage.id;\n        if (user) {\n          user.lastMessageID = lastMessage.id;\n          user.lastMessage = lastMessage;\n        }\n        if (member) {\n          member.lastMessageID = lastMessage.id;\n          member.lastMessage = lastMessage;\n        }\n        return {\n          messages,\n        };\n      } else {\n        const message = channel._cacheMessage(new Message(channel, data, client));\n        channel.lastMessageID = data.id;\n        if (user) {\n          user.lastMessageID = data.id;\n          user.lastMessage = message;\n        }\n        if (member) {\n          member.lastMessageID = data.id;\n          member.lastMessage = message;\n        }\n        return {\n          message,\n        };\n      }\n    }\n\n    return {\n      message: null,\n    };\n  }\n}\n\nmodule.exports = MessageCreateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/MessageCreate.js?");

/***/ }),

/***/ "./src/client/actions/MessageDelete.js":
/*!*********************************************!*\
  !*** ./src/client/actions/MessageDelete.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass MessageDeleteAction extends Action {\n  constructor(client) {\n    super(client);\n    this.deleted = new Map();\n  }\n\n  handle(data) {\n    const client = this.client;\n    const channel = client.channels.get(data.channel_id);\n    let message;\n\n    if (channel) {\n      message = channel.messages.get(data.id);\n      if (message) {\n        channel.messages.delete(message.id);\n        this.deleted.set(channel.id + message.id, message);\n        this.scheduleForDeletion(channel.id, message.id);\n      } else {\n        message = this.deleted.get(channel.id + data.id) || null;\n      }\n      if (message) message.deleted = true;\n    }\n\n    return { message };\n  }\n\n  scheduleForDeletion(channelID, messageID) {\n    this.client.setTimeout(() => this.deleted.delete(channelID + messageID),\n      this.client.options.restWsBridgeTimeout);\n  }\n}\n\nmodule.exports = MessageDeleteAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/MessageDelete.js?");

/***/ }),

/***/ "./src/client/actions/MessageDeleteBulk.js":
/*!*************************************************!*\
  !*** ./src/client/actions/MessageDeleteBulk.js ***!
  \*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Collection = __webpack_require__(/*! ../../util/Collection */ \"./src/util/Collection.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass MessageDeleteBulkAction extends Action {\n  handle(data) {\n    const messages = new Collection();\n    const channel = this.client.channels.get(data.channel_id);\n\n    if (channel) {\n      for (const id of data.ids) {\n        const message = channel.messages.get(id);\n        if (message) {\n          message.deleted = true;\n          messages.set(message.id, message);\n          channel.messages.delete(id);\n        }\n      }\n    }\n\n    if (messages.size > 0) this.client.emit(Constants.Events.MESSAGE_BULK_DELETE, messages);\n    return { messages };\n  }\n}\n\nmodule.exports = MessageDeleteBulkAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/MessageDeleteBulk.js?");

/***/ }),

/***/ "./src/client/actions/MessageReactionAdd.js":
/*!**************************************************!*\
  !*** ./src/client/actions/MessageReactionAdd.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\n/*\n{ user_id: 'id',\n     message_id: 'id',\n     emoji: { name: '�', id: null },\n     channel_id: 'id' } }\n*/\n\nclass MessageReactionAdd extends Action {\n  handle(data) {\n    const user = this.client.users.get(data.user_id);\n    if (!user) return false;\n    // Verify channel\n    const channel = this.client.channels.get(data.channel_id);\n    if (!channel || channel.type === 'voice') return false;\n    // Verify message\n    const message = channel.messages.get(data.message_id);\n    if (!message) return false;\n    if (!data.emoji) return false;\n    // Verify reaction\n    const reaction = message._addReaction(data.emoji, user);\n    if (reaction) this.client.emit(Constants.Events.MESSAGE_REACTION_ADD, reaction, user);\n\n    return { message, reaction, user };\n  }\n}\n\n/**\n * Emitted whenever a reaction is added to a cached message.\n * @event Client#messageReactionAdd\n * @param {MessageReaction} messageReaction The reaction object\n * @param {User} user The user that applied the emoji or reaction emoji\n */\n\nmodule.exports = MessageReactionAdd;\n\n\n//# sourceURL=webpack:///./src/client/actions/MessageReactionAdd.js?");

/***/ }),

/***/ "./src/client/actions/MessageReactionRemove.js":
/*!*****************************************************!*\
  !*** ./src/client/actions/MessageReactionRemove.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\n/*\n{ user_id: 'id',\n     message_id: 'id',\n     emoji: { name: '�', id: null },\n     channel_id: 'id' } }\n*/\n\nclass MessageReactionRemove extends Action {\n  handle(data) {\n    const user = this.client.users.get(data.user_id);\n    if (!user) return false;\n    // Verify channel\n    const channel = this.client.channels.get(data.channel_id);\n    if (!channel || channel.type === 'voice') return false;\n    // Verify message\n    const message = channel.messages.get(data.message_id);\n    if (!message) return false;\n    if (!data.emoji) return false;\n    // Verify reaction\n    const reaction = message._removeReaction(data.emoji, user);\n    if (reaction) this.client.emit(Constants.Events.MESSAGE_REACTION_REMOVE, reaction, user);\n\n    return { message, reaction, user };\n  }\n}\n\n/**\n * Emitted whenever a reaction is removed from a cached message.\n * @event Client#messageReactionRemove\n * @param {MessageReaction} messageReaction The reaction object\n * @param {User} user The user whose emoji or reaction emoji was removed\n */\n\nmodule.exports = MessageReactionRemove;\n\n\n//# sourceURL=webpack:///./src/client/actions/MessageReactionRemove.js?");

/***/ }),

/***/ "./src/client/actions/MessageReactionRemoveAll.js":
/*!********************************************************!*\
  !*** ./src/client/actions/MessageReactionRemoveAll.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass MessageReactionRemoveAll extends Action {\n  handle(data) {\n    const channel = this.client.channels.get(data.channel_id);\n    if (!channel || channel.type === 'voice') return false;\n\n    const message = channel.messages.get(data.message_id);\n    if (!message) return false;\n\n    message._clearReactions();\n    this.client.emit(Constants.Events.MESSAGE_REACTION_REMOVE_ALL, message);\n\n    return { message };\n  }\n}\n\n/**\n * Emitted whenever all reactions are removed from a cached message.\n * @event Client#messageReactionRemoveAll\n * @param {Message} message The message the reactions were removed from\n */\n\nmodule.exports = MessageReactionRemoveAll;\n\n\n//# sourceURL=webpack:///./src/client/actions/MessageReactionRemoveAll.js?");

/***/ }),

/***/ "./src/client/actions/MessageUpdate.js":
/*!*********************************************!*\
  !*** ./src/client/actions/MessageUpdate.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass MessageUpdateAction extends Action {\n  handle(data) {\n    const client = this.client;\n\n    const channel = client.channels.get(data.channel_id);\n    if (channel) {\n      const message = channel.messages.get(data.id);\n      if (message) {\n        message.patch(data);\n        client.emit(Constants.Events.MESSAGE_UPDATE, message._edits[0], message);\n        return {\n          old: message._edits[0],\n          updated: message,\n        };\n      }\n\n      return {\n        old: message,\n        updated: message,\n      };\n    }\n\n    return {\n      old: null,\n      updated: null,\n    };\n  }\n}\n\n/**\n * Emitted whenever a message is updated - e.g. embed or content change.\n * @event Client#messageUpdate\n * @param {Message} oldMessage The message before the update\n * @param {Message} newMessage The message after the update\n */\n\nmodule.exports = MessageUpdateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/MessageUpdate.js?");

/***/ }),

/***/ "./src/client/actions/UserGet.js":
/*!***************************************!*\
  !*** ./src/client/actions/UserGet.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\n\nclass UserGetAction extends Action {\n  handle(data) {\n    const client = this.client;\n    const user = client.dataManager.newUser(data);\n    return { user };\n  }\n}\n\nmodule.exports = UserGetAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/UserGet.js?");

/***/ }),

/***/ "./src/client/actions/UserNoteUpdate.js":
/*!**********************************************!*\
  !*** ./src/client/actions/UserNoteUpdate.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass UserNoteUpdateAction extends Action {\n  handle(data) {\n    const client = this.client;\n\n    const oldNote = client.user.notes.get(data.id);\n    const note = data.note.length ? data.note : null;\n\n    client.user.notes.set(data.id, note);\n\n    client.emit(Constants.Events.USER_NOTE_UPDATE, data.id, oldNote, note);\n\n    return {\n      old: oldNote,\n      updated: note,\n    };\n  }\n}\n\n/**\n * Emitted whenever a note is updated.\n * @event Client#userNoteUpdate\n * @param {User} user The user the note belongs to\n * @param {string} oldNote The note content before the update\n * @param {string} newNote The note content after the update\n */\n\nmodule.exports = UserNoteUpdateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/UserNoteUpdate.js?");

/***/ }),

/***/ "./src/client/actions/UserUpdate.js":
/*!******************************************!*\
  !*** ./src/client/actions/UserUpdate.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Action = __webpack_require__(/*! ./Action */ \"./src/client/actions/Action.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../../util/Util */ \"./src/util/Util.js\");\n\nclass UserUpdateAction extends Action {\n  handle(data) {\n    const client = this.client;\n\n    if (client.user) {\n      if (client.user.equals(data)) {\n        return {\n          old: client.user,\n          updated: client.user,\n        };\n      }\n\n      const oldUser = Util.cloneObject(client.user);\n      client.user.patch(data);\n      client.emit(Constants.Events.USER_UPDATE, oldUser, client.user);\n      return {\n        old: oldUser,\n        updated: client.user,\n      };\n    }\n\n    return {\n      old: null,\n      updated: null,\n    };\n  }\n}\n\nmodule.exports = UserUpdateAction;\n\n\n//# sourceURL=webpack:///./src/client/actions/UserUpdate.js?");

/***/ }),

/***/ "./src/client/rest/APIRequest.js":
/*!***************************************!*\
  !*** ./src/client/rest/APIRequest.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const snekfetch = __webpack_require__(/*! snekfetch */ \"./node_modules/snekfetch/esm.mjs\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass APIRequest {\n  constructor(rest, method, path, auth, data, files, reason) {\n    this.rest = rest;\n    this.client = rest.client;\n    this.method = method;\n    this.path = path.toString();\n    this.auth = auth;\n    this.data = data;\n    this.files = files;\n    this.route = this.getRoute(this.path);\n    this.reason = reason;\n  }\n\n  getRoute(url) {\n    let route = url.split('?')[0];\n    if (route.includes('/channels/') || route.includes('/guilds/')) {\n      const startInd = route.includes('/channels/') ? route.indexOf('/channels/') : route.indexOf('/guilds/');\n      const majorID = route.substring(startInd).split('/')[2];\n      route = route.replace(/(\\d{8,})/g, ':id').replace(':id', majorID);\n    }\n    return route;\n  }\n\n  getAuth() {\n    if (this.client.token && this.client.user && this.client.user.bot) {\n      return `Bot ${this.client.token}`;\n    } else if (this.client.token) {\n      return this.client.token;\n    }\n    throw new Error(Constants.Errors.NO_TOKEN);\n  }\n\n  gen() {\n    const API = `${this.client.options.http.host}/api/v${this.client.options.http.version}`;\n    const request = snekfetch[this.method](`${API}${this.path}`);\n    if (this.auth) request.set('Authorization', this.getAuth());\n    if (this.reason) request.set('X-Audit-Log-Reason', encodeURIComponent(this.reason));\n    if (!this.rest.client.browser) request.set('User-Agent', this.rest.userAgentManager.userAgent);\n    if (this.files) {\n      for (const file of this.files) if (file && file.file) request.attach(file.name, file.file, file.name);\n      if (typeof this.data !== 'undefined') request.attach('payload_json', JSON.stringify(this.data));\n    } else if (this.data) {\n      request.send(this.data);\n    }\n    return request;\n  }\n}\n\nmodule.exports = APIRequest;\n\n\n//# sourceURL=webpack:///./src/client/rest/APIRequest.js?");

/***/ }),

/***/ "./src/client/rest/DiscordAPIError.js":
/*!********************************************!*\
  !*** ./src/client/rest/DiscordAPIError.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Represents an error from the Discord API.\n * @extends Error\n */\nclass DiscordAPIError extends Error {\n  constructor(path, error, method) {\n    super();\n    const flattened = this.constructor.flattenErrors(error.errors || error).join('\\n');\n    this.name = 'DiscordAPIError';\n    this.message = error.message && flattened ? `${error.message}\\n${flattened}` : error.message || flattened;\n\n    /**\n     * The path of the request relative to the HTTP endpoint\n     * @type {string}\n     */\n    this.path = path;\n\n    /**\n     * HTTP error code returned by Discord\n     * @type {number}\n     */\n    this.code = error.code;\n\n    /**\n     * The HTTP method used for the request\n     * @type {string}\n     */\n    this.method = method;\n  }\n\n  /**\n   * Flattens an errors object returned from the API into an array.\n   * @param {Object} obj Discord errors object\n   * @param {string} [key] Used internally to determine key names of nested fields\n   * @returns {string[]}\n   * @private\n   */\n  static flattenErrors(obj, key = '') {\n    let messages = [];\n\n    for (const k of Object.keys(obj)) {\n      if (k === 'message') continue;\n      const newKey = key ? isNaN(k) ? `${key}.${k}` : `${key}[${k}]` : k;\n\n      if (obj[k]._errors) {\n        messages.push(`${newKey}: ${obj[k]._errors.map(e => e.message).join(' ')}`);\n      } else if (obj[k].code || obj[k].message) {\n        messages.push(`${obj[k].code ? `${obj[k].code}: ` : ''}: ${obj[k].message}`.trim());\n      } else if (typeof obj[k] === 'string') {\n        messages.push(obj[k]);\n      } else {\n        messages = messages.concat(this.flattenErrors(obj[k], newKey));\n      }\n    }\n\n    return messages;\n  }\n}\n\nmodule.exports = DiscordAPIError;\n\n\n//# sourceURL=webpack:///./src/client/rest/DiscordAPIError.js?");

/***/ }),

/***/ "./src/client/rest/RESTManager.js":
/*!****************************************!*\
  !*** ./src/client/rest/RESTManager.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const UserAgentManager = __webpack_require__(/*! ./UserAgentManager */ \"./src/client/rest/UserAgentManager.js\");\nconst RESTMethods = __webpack_require__(/*! ./RESTMethods */ \"./src/client/rest/RESTMethods.js\");\nconst SequentialRequestHandler = __webpack_require__(/*! ./RequestHandlers/Sequential */ \"./src/client/rest/RequestHandlers/Sequential.js\");\nconst BurstRequestHandler = __webpack_require__(/*! ./RequestHandlers/Burst */ \"./src/client/rest/RequestHandlers/Burst.js\");\nconst APIRequest = __webpack_require__(/*! ./APIRequest */ \"./src/client/rest/APIRequest.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass RESTManager {\n  constructor(client) {\n    this.client = client;\n    this.handlers = {};\n    this.userAgentManager = new UserAgentManager(this);\n    this.methods = new RESTMethods(this);\n    this.rateLimitedEndpoints = {};\n    this.globallyRateLimited = false;\n  }\n\n  destroy() {\n    for (const handlerKey of Object.keys(this.handlers)) {\n      const handler = this.handlers[handlerKey];\n      if (handler.destroy) handler.destroy();\n    }\n  }\n\n  push(handler, apiRequest) {\n    return new Promise((resolve, reject) => {\n      handler.push({\n        request: apiRequest,\n        resolve,\n        reject,\n        retries: 0,\n      });\n    });\n  }\n\n  getRequestHandler() {\n    switch (this.client.options.apiRequestMethod) {\n      case 'sequential':\n        return SequentialRequestHandler;\n      case 'burst':\n        return BurstRequestHandler;\n      default:\n        throw new Error(Constants.Errors.INVALID_RATE_LIMIT_METHOD);\n    }\n  }\n\n  makeRequest(method, url, auth, data, file, reason) {\n    const apiRequest = new APIRequest(this, method, url, auth, data, file, reason);\n    if (!this.handlers[apiRequest.route]) {\n      const RequestHandlerType = this.getRequestHandler();\n      this.handlers[apiRequest.route] = new RequestHandlerType(this, apiRequest.route);\n    }\n\n    return this.push(this.handlers[apiRequest.route], apiRequest);\n  }\n}\n\nmodule.exports = RESTManager;\n\n\n//# sourceURL=webpack:///./src/client/rest/RESTManager.js?");

/***/ }),

/***/ "./src/client/rest/RESTMethods.js":
/*!****************************************!*\
  !*** ./src/client/rest/RESTMethods.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const querystring = __webpack_require__(/*! querystring */ \"./node_modules/querystring-es3/index.js\");\nconst long = __webpack_require__(/*! long */ \"./node_modules/long/src/long.js\");\nconst Permissions = __webpack_require__(/*! ../../util/Permissions */ \"./src/util/Permissions.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\nconst Endpoints = Constants.Endpoints;\nconst Collection = __webpack_require__(/*! ../../util/Collection */ \"./src/util/Collection.js\");\nconst Util = __webpack_require__(/*! ../../util/Util */ \"./src/util/Util.js\");\nconst resolvePermissions = __webpack_require__(/*! ../../structures/shared/resolvePermissions */ \"./src/structures/shared/resolvePermissions.js\");\n\nconst RichEmbed = __webpack_require__(/*! ../../structures/RichEmbed */ \"./src/structures/RichEmbed.js\");\nconst User = __webpack_require__(/*! ../../structures/User */ \"./src/structures/User.js\");\nconst GuildMember = __webpack_require__(/*! ../../structures/GuildMember */ \"./src/structures/GuildMember.js\");\nconst Message = __webpack_require__(/*! ../../structures/Message */ \"./src/structures/Message.js\");\nconst Role = __webpack_require__(/*! ../../structures/Role */ \"./src/structures/Role.js\");\nconst Invite = __webpack_require__(/*! ../../structures/Invite */ \"./src/structures/Invite.js\");\nconst Webhook = __webpack_require__(/*! ../../structures/Webhook */ \"./src/structures/Webhook.js\");\nconst UserProfile = __webpack_require__(/*! ../../structures/UserProfile */ \"./src/structures/UserProfile.js\");\nconst OAuth2Application = __webpack_require__(/*! ../../structures/OAuth2Application */ \"./src/structures/OAuth2Application.js\");\nconst Channel = __webpack_require__(/*! ../../structures/Channel */ \"./src/structures/Channel.js\");\nconst GroupDMChannel = __webpack_require__(/*! ../../structures/GroupDMChannel */ \"./src/structures/GroupDMChannel.js\");\nconst Guild = __webpack_require__(/*! ../../structures/Guild */ \"./src/structures/Guild.js\");\nconst VoiceRegion = __webpack_require__(/*! ../../structures/VoiceRegion */ \"./src/structures/VoiceRegion.js\");\nconst GuildAuditLogs = __webpack_require__(/*! ../../structures/GuildAuditLogs */ \"./src/structures/GuildAuditLogs.js\");\n\nclass RESTMethods {\n  constructor(restManager) {\n    this.rest = restManager;\n    this.client = restManager.client;\n    this._ackToken = null;\n  }\n\n  login(token = this.client.token) {\n    return new Promise((resolve, reject) => {\n      if (!token || typeof token !== 'string') throw new Error(Constants.Errors.INVALID_TOKEN);\n      token = token.replace(/^Bot\\s*/i, '');\n      this.client.manager.connectToWebSocket(token, resolve, reject);\n    }).catch(e => {\n      this.client.destroy();\n      return Promise.reject(e);\n    });\n  }\n\n  logout() {\n    return this.rest.makeRequest('post', Endpoints.logout, true, {});\n  }\n\n  getGateway(bot = false) {\n    return this.rest.makeRequest('get', bot ? Endpoints.gateway.bot : Endpoints.gateway, true);\n  }\n\n  fetchVoiceRegions(guildID) {\n    let endpoint;\n    if (guildID) endpoint = Endpoints.Guild(guildID).voiceRegions;\n    else endpoint = Endpoints.voiceRegions;\n    return this.rest.makeRequest('get', endpoint, true).then(res => {\n      const regions = new Collection();\n      for (const region of res) regions.set(region.id, new VoiceRegion(region));\n      return regions;\n    });\n  }\n\n  fetchEmbed(guildID) {\n    return this.rest.makeRequest('get', Endpoints.Guild(guildID).embed, true).then(data => ({\n      enabled: data.enabled,\n      channel: data.channel_id ? this.client.channels.get(data.channel_id) : null,\n    }));\n  }\n\n  sendMessage(channel, content, { tts, nonce, embed, disableEveryone, split, code, reply } = {}, files = null) {\n    return new Promise((resolve, reject) => { // eslint-disable-line complexity\n      if (typeof content !== 'undefined') content = this.client.resolver.resolveString(content);\n\n      // The nonce has to be a uint64 :<\n      if (typeof nonce !== 'undefined') {\n        nonce = parseInt(nonce);\n        if (isNaN(nonce) || nonce < 0) throw new RangeError('Message nonce must fit in an unsigned 64-bit integer.');\n      }\n\n      if (content) {\n        if (split && typeof split !== 'object') split = {};\n\n        // Wrap everything in a code block\n        if (typeof code !== 'undefined' && (typeof code !== 'boolean' || code === true)) {\n          content = Util.escapeMarkdown(this.client.resolver.resolveString(content), true);\n          content = `\\`\\`\\`${typeof code !== 'boolean' ? code || '' : ''}\\n${content}\\n\\`\\`\\``;\n          if (split) {\n            split.prepend = `\\`\\`\\`${typeof code !== 'boolean' ? code || '' : ''}\\n`;\n            split.append = '\\n```';\n          }\n        }\n\n        // Add zero-width spaces to @everyone/@here\n        if (disableEveryone || (typeof disableEveryone === 'undefined' && this.client.options.disableEveryone)) {\n          content = content.replace(/@(everyone|here)/g, '@\\u200b$1');\n        }\n\n        // Add the reply prefix\n        if (reply && !(channel instanceof User || channel instanceof GuildMember) && channel.type !== 'dm') {\n          const id = this.client.resolver.resolveUserID(reply);\n          const mention = `<@${reply instanceof GuildMember && reply.nickname ? '!' : ''}${id}>`;\n          content = `${mention}${content ? `, ${content}` : ''}`;\n          if (split) split.prepend = `${mention}, ${split.prepend || ''}`;\n        }\n\n        // Split the content\n        if (split) content = Util.splitMessage(content, split);\n      } else if (reply && !(channel instanceof User || channel instanceof GuildMember) && channel.type !== 'dm') {\n        const id = this.client.resolver.resolveUserID(reply);\n        content = `<@${reply instanceof GuildMember && reply.nickname ? '!' : ''}${id}>`;\n      }\n\n      const send = chan => {\n        if (content instanceof Array) {\n          const messages = [];\n          (function sendChunk(list, index) {\n            const options = index === list.length - 1 ? { tts, embed, files } : { tts };\n            chan.send(list[index], options).then(message => {\n              messages.push(message);\n              if (index >= list.length - 1) return resolve(messages);\n              return sendChunk(list, ++index);\n            }).catch(reject);\n          }(content, 0));\n        } else {\n          this.rest.makeRequest('post', Endpoints.Channel(chan).messages, true, {\n            content, tts, nonce, embed,\n          }, files).then(data => resolve(this.client.actions.MessageCreate.handle(data).message), reject);\n        }\n      };\n\n      if (channel instanceof User || channel instanceof GuildMember) this.createDM(channel).then(send, reject);\n      else send(channel);\n    });\n  }\n\n  updateMessage(message, content, { embed, code, reply } = {}) {\n    if (typeof content !== 'undefined') content = this.client.resolver.resolveString(content);\n\n    // Wrap everything in a code block\n    if (typeof code !== 'undefined' && (typeof code !== 'boolean' || code === true)) {\n      content = Util.escapeMarkdown(this.client.resolver.resolveString(content), true);\n      content = `\\`\\`\\`${typeof code !== 'boolean' ? code || '' : ''}\\n${content}\\n\\`\\`\\``;\n    }\n\n    // Add the reply prefix\n    if (reply && message.channel.type !== 'dm') {\n      const id = this.client.resolver.resolveUserID(reply);\n      const mention = `<@${reply instanceof GuildMember && reply.nickname ? '!' : ''}${id}>`;\n      content = `${mention}${content ? `, ${content}` : ''}`;\n    }\n\n    if (embed instanceof RichEmbed) embed = embed._apiTransform();\n\n    return this.rest.makeRequest('patch', Endpoints.Message(message), true, {\n      content, embed,\n    }).then(data => this.client.actions.MessageUpdate.handle(data).updated);\n  }\n\n  deleteMessage(message) {\n    return this.rest.makeRequest('delete', Endpoints.Message(message), true)\n      .then(() =>\n        this.client.actions.MessageDelete.handle({\n          id: message.id,\n          channel_id: message.channel.id,\n        }).message\n      );\n  }\n\n  ackMessage(message) {\n    return this.rest.makeRequest('post', Endpoints.Message(message).ack, true, { token: this._ackToken }).then(res => {\n      if (res.token) this._ackToken = res.token;\n      return message;\n    });\n  }\n\n  ackTextChannel(channel) {\n    return this.rest.makeRequest('post', Endpoints.Channel(channel).Message(channel.lastMessageID).ack, true, {\n      token: this._ackToken,\n    }).then(res => {\n      if (res.token) this._ackToken = res.token;\n      return channel;\n    });\n  }\n\n  ackGuild(guild) {\n    return this.rest.makeRequest('post', Endpoints.Guild(guild).ack, true).then(() => guild);\n  }\n\n  bulkDeleteMessages(channel, messages) {\n    return this.rest.makeRequest('post', Endpoints.Channel(channel).messages.bulkDelete, true, {\n      messages: messages,\n    }).then(() =>\n      this.client.actions.MessageDeleteBulk.handle({\n        channel_id: channel.id,\n        ids: messages,\n      }).messages\n    );\n  }\n\n  search(target, options) {\n    if (typeof options === 'string') options = { content: options };\n    if (options.before) {\n      if (!(options.before instanceof Date)) options.before = new Date(options.before);\n      options.maxID = long.fromNumber(options.before.getTime() - 14200704e5).shiftLeft(22).toString();\n    }\n    if (options.after) {\n      if (!(options.after instanceof Date)) options.after = new Date(options.after);\n      options.minID = long.fromNumber(options.after.getTime() - 14200704e5).shiftLeft(22).toString();\n    }\n    if (options.during) {\n      if (!(options.during instanceof Date)) options.during = new Date(options.during);\n      const t = options.during.getTime() - 14200704e5;\n      options.minID = long.fromNumber(t).shiftLeft(22).toString();\n      options.maxID = long.fromNumber(t + 86400000).shiftLeft(22).toString();\n    }\n    if (options.channel) options.channel = this.client.resolver.resolveChannelID(options.channel);\n    if (options.author) options.author = this.client.resolver.resolveUserID(options.author);\n    if (options.mentions) options.mentions = this.client.resolver.resolveUserID(options.options.mentions);\n    options = {\n      content: options.content,\n      max_id: options.maxID,\n      min_id: options.minID,\n      has: options.has,\n      channel_id: options.channel,\n      author_id: options.author,\n      author_type: options.authorType,\n      context_size: options.contextSize,\n      sort_by: options.sortBy,\n      sort_order: options.sortOrder,\n      limit: options.limit,\n      offset: options.offset,\n      mentions: options.mentions,\n      mentions_everyone: options.mentionsEveryone,\n      link_hostname: options.linkHostname,\n      embed_provider: options.embedProvider,\n      embed_type: options.embedType,\n      attachment_filename: options.attachmentFilename,\n      attachment_extension: options.attachmentExtension,\n      include_nsfw: options.nsfw,\n    };\n\n    for (const key in options) if (options[key] === undefined) delete options[key];\n    const queryString = (querystring.stringify(options).match(/[^=&?]+=[^=&?]+/g) || []).join('&');\n\n    let endpoint;\n    if (target instanceof Channel) {\n      endpoint = Endpoints.Channel(target).search;\n    } else if (target instanceof Guild) {\n      endpoint = Endpoints.Guild(target).search;\n    } else {\n      throw new TypeError('Target must be a TextChannel, DMChannel, GroupDMChannel, or Guild.');\n    }\n    return this.rest.makeRequest('get', `${endpoint}?${queryString}`, true).then(body => {\n      const messages = body.messages.map(x =>\n        x.map(m => new Message(this.client.channels.get(m.channel_id), m, this.client))\n      );\n      return {\n        totalResults: body.total_results,\n        messages,\n      };\n    });\n  }\n\n  createChannel(guild, name, options) {\n    const {\n      type,\n      topic,\n      nsfw,\n      bitrate,\n      userLimit,\n      parent,\n      permissionOverwrites,\n      position,\n      rateLimitPerUser,\n      reason,\n    } = options;\n    return this.rest.makeRequest('post', Endpoints.Guild(guild).channels, true, {\n      name,\n      topic,\n      type: type ? Constants.ChannelTypes[type.toUpperCase()] : 'text',\n      nsfw,\n      bitrate,\n      user_limit: userLimit,\n      parent_id: parent instanceof Channel ? parent.id : parent,\n      permission_overwrites: resolvePermissions.call(this, permissionOverwrites, guild),\n      position,\n      rate_limit_per_user: rateLimitPerUser,\n    },\n    undefined,\n    reason).then(data => this.client.actions.ChannelCreate.handle(data).channel);\n  }\n\n  createDM(recipient) {\n    const dmChannel = this.getExistingDM(recipient);\n    if (dmChannel) return Promise.resolve(dmChannel);\n    return this.rest.makeRequest('post', Endpoints.User(this.client.user).channels, true, {\n      recipient_id: recipient.id,\n    }).then(data => this.client.actions.ChannelCreate.handle(data).channel);\n  }\n\n  createGroupDM(options) {\n    const data = this.client.user.bot ?\n      { access_tokens: options.accessTokens, nicks: options.nicks } :\n      { recipients: options.recipients };\n    return this.rest.makeRequest('post', Endpoints.User('@me').channels, true, data)\n      .then(res => new GroupDMChannel(this.client, res));\n  }\n\n  addUserToGroupDM(channel, options) {\n    const data = this.client.user.bot ?\n      { nick: options.nick, access_token: options.accessToken } :\n      { recipient: options.id };\n    return this.rest.makeRequest('put', Endpoints.Channel(channel).Recipient(options.id), true, data)\n      .then(() => channel);\n  }\n\n  removeUserFromGroupDM(channel, userId) {\n    return this.rest.makeRequest('delete', Endpoints.Channel(channel).Recipient(userId), true)\n      .then(() => channel);\n  }\n\n  updateGroupDMChannel(channel, _data) {\n    const data = {};\n    data.name = _data.name;\n    data.icon = _data.icon;\n    return this.rest.makeRequest('patch', Endpoints.Channel(channel), true, data).then(() => channel);\n  }\n\n  getExistingDM(recipient) {\n    return this.client.channels.find(channel =>\n      channel.recipient && channel.recipient.id === recipient.id\n    );\n  }\n\n  deleteChannel(channel, reason) {\n    if (channel instanceof User || channel instanceof GuildMember) channel = this.getExistingDM(channel);\n    if (!channel) return Promise.reject(new Error('No channel to delete.'));\n    return this.rest.makeRequest('delete', Endpoints.Channel(channel), true, undefined, undefined, reason)\n      .then(data => {\n        data.id = channel.id;\n        return this.client.actions.ChannelDelete.handle(data).channel;\n      });\n  }\n\n  updateChannel(channel, _data, reason) {\n    const data = {};\n    data.name = (_data.name || channel.name).trim();\n    data.topic = typeof _data.topic === 'undefined' ? channel.topic : _data.topic;\n    data.nsfw = typeof _data.nsfw === 'undefined' ? channel.nsfw : _data.nsfw;\n    data.position = _data.position || channel.position;\n    data.bitrate = _data.bitrate || (channel.bitrate ? channel.bitrate * 1000 : undefined);\n    data.user_limit = typeof _data.userLimit !== 'undefined' ? _data.userLimit : channel.userLimit;\n    data.parent_id = _data.parent instanceof Channel ? _data.parent.id : _data.parent;\n    data.permission_overwrites = _data.permissionOverwrites ?\n      resolvePermissions.call(this, _data.permissionOverwrites, channel.guild) : undefined;\n    data.rate_limit_per_user = typeof _data.rateLimitPerUser !== 'undefined' ?\n      _data.rateLimitPerUser : channel.rateLimitPerUser;\n    return this.rest.makeRequest('patch', Endpoints.Channel(channel), true, data, undefined, reason).then(newData =>\n      this.client.actions.ChannelUpdate.handle(newData).updated\n    );\n  }\n\n  leaveGuild(guild) {\n    if (guild.ownerID === this.client.user.id) return Promise.reject(new Error('Guild is owned by the client.'));\n    return this.rest.makeRequest('delete', Endpoints.User('@me').Guild(guild.id), true).then(() =>\n      this.client.actions.GuildDelete.handle({ id: guild.id }).guild\n    );\n  }\n\n  createGuild(options) {\n    options.icon = this.client.resolver.resolveBase64(options.icon) || null;\n    options.region = options.region || 'us-central';\n    return new Promise((resolve, reject) => {\n      this.rest.makeRequest('post', Endpoints.guilds, true, options).then(data => {\n        if (this.client.guilds.has(data.id)) return resolve(this.client.guilds.get(data.id));\n\n        const handleGuild = guild => {\n          if (guild.id === data.id) {\n            this.client.removeListener(Constants.Events.GUILD_CREATE, handleGuild);\n            this.client.clearTimeout(timeout);\n            resolve(guild);\n          }\n        };\n        this.client.on(Constants.Events.GUILD_CREATE, handleGuild);\n\n        const timeout = this.client.setTimeout(() => {\n          this.client.removeListener(Constants.Events.GUILD_CREATE, handleGuild);\n          reject(new Error('Took too long to receive guild data.'));\n        }, 10000);\n        return undefined;\n      }, reject);\n    });\n  }\n\n  // Untested but probably will work\n  deleteGuild(guild) {\n    return this.rest.makeRequest('delete', Endpoints.Guild(guild), true).then(() =>\n      this.client.actions.GuildDelete.handle({ id: guild.id }).guild\n    );\n  }\n\n  getUser(userID, cache) {\n    return this.rest.makeRequest('get', Endpoints.User(userID), true).then(data => {\n      if (cache) return this.client.actions.UserGet.handle(data).user;\n      else return new User(this.client, data);\n    });\n  }\n\n  updateCurrentUser(_data, password) {\n    const user = this.client.user;\n    const data = {};\n    data.username = _data.username || user.username;\n    data.avatar = typeof _data.avatar === 'undefined' ? user.avatar : this.client.resolver.resolveBase64(_data.avatar);\n    if (!user.bot) {\n      data.email = _data.email || user.email;\n      data.password = password;\n      if (_data.new_password) data.new_password = _data.newPassword;\n    }\n    return this.rest.makeRequest('patch', Endpoints.User('@me'), true, data).then(newData =>\n      this.client.actions.UserUpdate.handle(newData).updated\n    );\n  }\n\n  updateGuild(guild, data, reason) {\n    return this.rest.makeRequest('patch', Endpoints.Guild(guild), true, data, undefined, reason).then(newData =>\n      this.client.actions.GuildUpdate.handle(newData).updated\n    );\n  }\n\n  kickGuildMember(guild, member, reason) {\n    return this.rest.makeRequest(\n      'delete', Endpoints.Guild(guild).Member(member), true,\n      undefined, undefined, reason)\n      .then(() => member);\n  }\n\n  createGuildRole(guild, data, reason) {\n    if (data.color) data.color = this.client.resolver.resolveColor(data.color);\n    if (data.permissions) data.permissions = Permissions.resolve(data.permissions);\n    return this.rest.makeRequest('post', Endpoints.Guild(guild).roles, true, data, undefined, reason).then(r => {\n      const { role } = this.client.actions.GuildRoleCreate.handle({\n        guild_id: guild.id,\n        role: r,\n      });\n      if (data.position) return role.setPosition(data.position, reason);\n      return role;\n    });\n  }\n\n  deleteGuildRole(role, reason) {\n    return this.rest.makeRequest(\n      'delete', Endpoints.Guild(role.guild).Role(role.id), true,\n      undefined, undefined, reason)\n      .then(() =>\n        this.client.actions.GuildRoleDelete.handle({\n          guild_id: role.guild.id,\n          role_id: role.id,\n        }).role\n      );\n  }\n\n  setChannelOverwrite(channel, payload) {\n    return this.rest.makeRequest('put', `${Endpoints.Channel(channel).permissions}/${payload.id}`, true, payload);\n  }\n\n  deletePermissionOverwrites(overwrite, reason) {\n    return this.rest.makeRequest(\n      'delete', `${Endpoints.Channel(overwrite.channel).permissions}/${overwrite.id}`,\n      true, undefined, undefined, reason\n    ).then(() => overwrite);\n  }\n\n  getChannelMessages(channel, payload = {}) {\n    const params = [];\n    if (payload.limit) params.push(`limit=${payload.limit}`);\n    if (payload.around) params.push(`around=${payload.around}`);\n    else if (payload.before) params.push(`before=${payload.before}`);\n    else if (payload.after) params.push(`after=${payload.after}`);\n\n    let endpoint = Endpoints.Channel(channel).messages;\n    if (params.length > 0) endpoint += `?${params.join('&')}`;\n    return this.rest.makeRequest('get', endpoint, true);\n  }\n\n  getChannelMessage(channel, messageID) {\n    const msg = channel.messages.get(messageID);\n    if (msg) return Promise.resolve(msg);\n    return this.rest.makeRequest('get', Endpoints.Channel(channel).Message(messageID), true);\n  }\n\n  putGuildMember(guild, userID, options) {\n    options.access_token = options.accessToken;\n    if (options.roles) {\n      const roles = options.roles;\n      if (roles instanceof Collection || (roles instanceof Array && roles[0] instanceof Role)) {\n        options.roles = roles.map(role => role.id);\n      }\n    }\n    return this.rest.makeRequest('put', Endpoints.Guild(guild).Member(userID), true, options)\n      .then(data => this.client.actions.GuildMemberGet.handle(guild, data).member);\n  }\n\n  getGuildMember(guild, user, cache) {\n    return this.rest.makeRequest('get', Endpoints.Guild(guild).Member(user.id), true).then(data => {\n      if (cache) return this.client.actions.GuildMemberGet.handle(guild, data).member;\n      else return new GuildMember(guild, data);\n    });\n  }\n\n  updateGuildMember(member, data, reason) {\n    if (data.channel) {\n      const channel = this.client.resolver.resolveChannel(data.channel);\n      if (!channel || channel.guild.id !== member.guild.id || channel.type !== 'voice') {\n        return Promise.reject(new Error('Could not resolve channel to a guild voice channel.'));\n      }\n      data.channel_id = channel.id;\n      data.channel = null;\n    }\n    if (data.roles) data.roles = data.roles.map(role => role instanceof Role ? role.id : role);\n\n    let endpoint = Endpoints.Member(member);\n    // Fix your endpoints, discord ;-;\n    if (member.id === this.client.user.id) {\n      const keys = Object.keys(data);\n      if (keys.length === 1 && keys[0] === 'nick') {\n        endpoint = Endpoints.Member(member).nickname;\n      }\n    }\n\n    return this.rest.makeRequest('patch', endpoint, true, data, undefined, reason).then(newData =>\n      member.guild._updateMember(member, newData).mem\n    );\n  }\n\n  addMemberRole(member, role, reason) {\n    return new Promise((resolve, reject) => {\n      if (member._roles.includes(role.id)) return resolve(member);\n\n      const listener = (oldMember, newMember) => {\n        if (newMember.id === member.id && !oldMember._roles.includes(role.id) && newMember._roles.includes(role.id)) {\n          this.client.removeListener(Constants.Events.GUILD_MEMBER_UPDATE, listener);\n          resolve(newMember);\n        }\n      };\n\n      this.client.on(Constants.Events.GUILD_MEMBER_UPDATE, listener);\n      const timeout = this.client.setTimeout(() => {\n        this.client.removeListener(Constants.Events.GUILD_MEMBER_UPDATE, listener);\n        reject(new Error('Adding the role timed out.'));\n      }, 10e3);\n\n      return this.rest.makeRequest('put', Endpoints.Member(member).Role(role.id), true, undefined, undefined, reason)\n        .catch(err => {\n          this.client.removeListener(Constants.Events.GUILD_MEMBER_UPDATE, listener);\n          this.client.clearTimeout(timeout);\n          reject(err);\n        });\n    });\n  }\n\n  removeMemberRole(member, role, reason) {\n    return new Promise((resolve, reject) => {\n      if (!member._roles.includes(role.id)) return resolve(member);\n\n      const listener = (oldMember, newMember) => {\n        if (newMember.id === member.id && oldMember._roles.includes(role.id) && !newMember._roles.includes(role.id)) {\n          this.client.removeListener(Constants.Events.GUILD_MEMBER_UPDATE, listener);\n          resolve(newMember);\n        }\n      };\n\n      this.client.on(Constants.Events.GUILD_MEMBER_UPDATE, listener);\n      const timeout = this.client.setTimeout(() => {\n        this.client.removeListener(Constants.Events.GUILD_MEMBER_UPDATE, listener);\n        reject(new Error('Removing the role timed out.'));\n      }, 10e3);\n\n      return this.rest.makeRequest('delete', Endpoints.Member(member).Role(role.id), true, undefined, undefined, reason)\n        .catch(err => {\n          this.client.removeListener(Constants.Events.GUILD_MEMBER_UPDATE, listener);\n          this.client.clearTimeout(timeout);\n          reject(err);\n        });\n    });\n  }\n\n  sendTyping(channelID) {\n    return this.rest.makeRequest('post', Endpoints.Channel(channelID).typing, true);\n  }\n\n  banGuildMember(guild, member, options) {\n    const id = this.client.resolver.resolveUserID(member);\n    if (!id) return Promise.reject(new Error('Couldn\\'t resolve the user ID to ban.'));\n\n    const url = `${Endpoints.Guild(guild).bans}/${id}?${querystring.stringify(options)}`;\n    return this.rest.makeRequest('put', url, true).then(() => {\n      if (member instanceof GuildMember) return member;\n      const user = this.client.resolver.resolveUser(id);\n      if (user) {\n        member = this.client.resolver.resolveGuildMember(guild, user);\n        return member || user;\n      }\n      return id;\n    });\n  }\n\n  unbanGuildMember(guild, member, reason) {\n    return new Promise((resolve, reject) => {\n      const id = this.client.resolver.resolveUserID(member);\n      if (!id) throw new Error('Couldn\\'t resolve the user ID to unban.');\n\n      const listener = (eGuild, eUser) => {\n        if (eGuild.id === guild.id && eUser.id === id) {\n          this.client.removeListener(Constants.Events.GUILD_BAN_REMOVE, listener);\n          this.client.clearTimeout(timeout);\n          resolve(eUser);\n        }\n      };\n      this.client.on(Constants.Events.GUILD_BAN_REMOVE, listener);\n\n      const timeout = this.client.setTimeout(() => {\n        this.client.removeListener(Constants.Events.GUILD_BAN_REMOVE, listener);\n        reject(new Error('Took too long to receive the ban remove event.'));\n      }, 10000);\n\n      this.rest.makeRequest('delete', `${Endpoints.Guild(guild).bans}/${id}`, true, undefined, undefined, reason)\n        .catch(err => {\n          this.client.removeListener(Constants.Events.GUILD_BAN_REMOVE, listener);\n          this.client.clearTimeout(timeout);\n          reject(err);\n        });\n    });\n  }\n\n  getGuildBan(guild, user) {\n    const id = this.client.resolver.resolveUserID(user);\n    return this.rest.makeRequest('get', `${Endpoints.Guild(guild).bans}/${id}`, true).then(ban => ({\n      reason: ban.reason,\n      user: this.client.dataManager.newUser(ban.user),\n    }));\n  }\n\n  getGuildBans(guild) {\n    return this.rest.makeRequest('get', Endpoints.Guild(guild).bans, true).then(bans =>\n      bans.reduce((collection, ban) => {\n        collection.set(ban.user.id, {\n          reason: ban.reason,\n          user: this.client.dataManager.newUser(ban.user),\n        });\n        return collection;\n      }, new Collection())\n    );\n  }\n\n  updateGuildRole(role, _data, reason) {\n    const data = {};\n    data.name = _data.name || role.name;\n    data.position = typeof _data.position !== 'undefined' ? _data.position : role.position;\n    data.color = _data.color === null ? null : this.client.resolver.resolveColor(_data.color || role.color);\n    data.hoist = typeof _data.hoist !== 'undefined' ? _data.hoist : role.hoist;\n    data.mentionable = typeof _data.mentionable !== 'undefined' ? _data.mentionable : role.mentionable;\n\n    if (typeof _data.permissions !== 'undefined') data.permissions = Permissions.resolve(_data.permissions);\n    else data.permissions = role.permissions;\n\n    return this.rest.makeRequest('patch', Endpoints.Guild(role.guild).Role(role.id), true, data, undefined, reason)\n      .then(_role =>\n        this.client.actions.GuildRoleUpdate.handle({\n          role: _role,\n          guild_id: role.guild.id,\n        }).updated\n      );\n  }\n\n  pinMessage(message) {\n    return this.rest.makeRequest('put', Endpoints.Channel(message.channel).Pin(message.id), true)\n      .then(() => message);\n  }\n\n  unpinMessage(message) {\n    return this.rest.makeRequest('delete', Endpoints.Channel(message.channel).Pin(message.id), true)\n      .then(() => message);\n  }\n\n  getChannelPinnedMessages(channel) {\n    return this.rest.makeRequest('get', Endpoints.Channel(channel).pins, true);\n  }\n\n  createChannelInvite(channel, options, reason) {\n    const payload = {};\n    payload.temporary = options.temporary;\n    payload.max_age = options.maxAge;\n    payload.max_uses = options.maxUses;\n    payload.unique = options.unique;\n    return this.rest.makeRequest('post', Endpoints.Channel(channel).invites, true, payload, undefined, reason)\n      .then(invite => new Invite(this.client, invite));\n  }\n\n  deleteInvite(invite, reason) {\n    return this.rest.makeRequest('delete', Endpoints.Invite(invite.code), true, undefined, undefined, reason)\n      .then(() => invite);\n  }\n\n  getInvite(code) {\n    return this.rest.makeRequest('get', Endpoints.Invite(code), true).then(invite =>\n      new Invite(this.client, invite)\n    );\n  }\n\n  getGuildInvites(guild) {\n    return this.rest.makeRequest('get', Endpoints.Guild(guild).invites, true).then(inviteItems => {\n      const invites = new Collection();\n      for (const inviteItem of inviteItems) {\n        const invite = new Invite(this.client, inviteItem);\n        invites.set(invite.code, invite);\n      }\n      return invites;\n    });\n  }\n\n  getGuildVanityCode(guild) {\n    return this.rest.makeRequest('get', Endpoints.Guild(guild).vanityURL, true)\n      .then(res => res.code);\n  }\n\n  pruneGuildMembers(guild, days, dry, reason) {\n    return this.rest.makeRequest(dry ?\n      'get' :\n      'post',\n    `${Endpoints.Guild(guild).prune}?days=${days}`, true, undefined, undefined, reason)\n      .then(data => data.pruned);\n  }\n\n  createEmoji(guild, image, name, roles, reason) {\n    const data = { image, name };\n    if (roles) data.roles = roles.map(r => r.id ? r.id : r);\n    return this.rest.makeRequest('post', Endpoints.Guild(guild).emojis, true, data, undefined, reason)\n      .then(emoji => this.client.actions.GuildEmojiCreate.handle(guild, emoji).emoji);\n  }\n\n  updateEmoji(emoji, _data, reason) {\n    const data = {};\n    if (_data.name) data.name = _data.name;\n    if (_data.roles) data.roles = _data.roles.map(r => r.id ? r.id : r);\n    return this.rest.makeRequest('patch', Endpoints.Guild(emoji.guild).Emoji(emoji.id), true, data, undefined, reason)\n      .then(newEmoji => this.client.actions.GuildEmojiUpdate.handle(emoji, newEmoji).emoji);\n  }\n\n  deleteEmoji(emoji, reason) {\n    return this.rest.makeRequest('delete', Endpoints.Guild(emoji.guild).Emoji(emoji.id), true, undefined, reason)\n      .then(() => this.client.actions.GuildEmojiDelete.handle(emoji).data);\n  }\n\n  getGuildAuditLogs(guild, options = {}) {\n    if (options.before && options.before instanceof GuildAuditLogs.Entry) options.before = options.before.id;\n    if (options.after && options.after instanceof GuildAuditLogs.Entry) options.after = options.after.id;\n    if (typeof options.type === 'string') options.type = GuildAuditLogs.Actions[options.type];\n\n    const queryString = (querystring.stringify({\n      before: options.before,\n      after: options.after,\n      limit: options.limit,\n      user_id: this.client.resolver.resolveUserID(options.user),\n      action_type: options.type,\n    }).match(/[^=&?]+=[^=&?]+/g) || []).join('&');\n\n    return this.rest.makeRequest('get', `${Endpoints.Guild(guild).auditLogs}?${queryString}`, true)\n      .then(data => GuildAuditLogs.build(guild, data));\n  }\n\n  getWebhook(id, token) {\n    return this.rest.makeRequest('get', Endpoints.Webhook(id, token), !token).then(data =>\n      new Webhook(this.client, data)\n    );\n  }\n\n  getGuildWebhooks(guild) {\n    return this.rest.makeRequest('get', Endpoints.Guild(guild).webhooks, true).then(data => {\n      const hooks = new Collection();\n      for (const hook of data) hooks.set(hook.id, new Webhook(this.client, hook));\n      return hooks;\n    });\n  }\n\n  getChannelWebhooks(channel) {\n    return this.rest.makeRequest('get', Endpoints.Channel(channel).webhooks, true).then(data => {\n      const hooks = new Collection();\n      for (const hook of data) hooks.set(hook.id, new Webhook(this.client, hook));\n      return hooks;\n    });\n  }\n\n  createWebhook(channel, name, avatar, reason) {\n    return this.rest.makeRequest('post', Endpoints.Channel(channel).webhooks, true, { name, avatar }, undefined, reason)\n      .then(data => new Webhook(this.client, data));\n  }\n\n  editWebhook(webhook, name, avatar) {\n    return this.rest.makeRequest('patch', Endpoints.Webhook(webhook.id, webhook.token), false, {\n      name,\n      avatar,\n    }).then(data => {\n      webhook.name = data.name;\n      webhook.avatar = data.avatar;\n      return webhook;\n    });\n  }\n\n  deleteWebhook(webhook, reason) {\n    return this.rest.makeRequest(\n      'delete', Endpoints.Webhook(webhook.id, webhook.token),\n      false, undefined, undefined, reason);\n  }\n\n  sendWebhookMessage(webhook, content, { avatarURL, tts, embeds, username } = {}, files = null) {\n    return new Promise((resolve, reject) => {\n      username = username || webhook.name;\n\n      if (content instanceof Array) {\n        const messages = [];\n        (function sendChunk(list, index) {\n          const options = index === list.length - 1 ? { tts, embeds, files } : { tts };\n          webhook.send(list[index], options).then(message => {\n            messages.push(message);\n            if (index >= list.length - 1) return resolve(messages);\n            return sendChunk(list, ++index);\n          }).catch(reject);\n        }(content, 0));\n      } else {\n        this.rest.makeRequest('post', `${Endpoints.Webhook(webhook.id, webhook.token)}?wait=true`, false, {\n          username,\n          avatar_url: avatarURL,\n          content,\n          tts,\n          embeds,\n        }, files).then(data => {\n          if (!this.client.channels) resolve(data);\n          else resolve(this.client.actions.MessageCreate.handle(data).message);\n        }, reject);\n      }\n    });\n  }\n\n  sendSlackWebhookMessage(webhook, body) {\n    return this.rest.makeRequest(\n      'post', `${Endpoints.Webhook(webhook.id, webhook.token)}/slack?wait=true`, false, body\n    );\n  }\n\n  fetchUserProfile(user) {\n    return this.rest.makeRequest('get', Endpoints.User(user).profile, true).then(data =>\n      new UserProfile(user, data)\n    );\n  }\n\n  fetchMentions(options) {\n    if (options.guild instanceof Guild) options.guild = options.guild.id;\n    Util.mergeDefault({ limit: 25, roles: true, everyone: true, guild: null }, options);\n\n    return this.rest.makeRequest(\n      'get', Endpoints.User('@me').Mentions(options.limit, options.roles, options.everyone, options.guild), true\n    ).then(data => data.map(m => new Message(this.client.channels.get(m.channel_id), m, this.client)));\n  }\n\n  addFriend(user) {\n    return this.rest.makeRequest('post', Endpoints.User('@me'), true, {\n      username: user.username,\n      discriminator: user.discriminator,\n    }).then(() => user);\n  }\n\n  removeFriend(user) {\n    return this.rest.makeRequest('delete', Endpoints.User('@me').Relationship(user.id), true)\n      .then(() => user);\n  }\n\n  blockUser(user) {\n    return this.rest.makeRequest('put', Endpoints.User('@me').Relationship(user.id), true, { type: 2 })\n      .then(() => user);\n  }\n\n  unblockUser(user) {\n    return this.rest.makeRequest('delete', Endpoints.User('@me').Relationship(user.id), true)\n      .then(() => user);\n  }\n\n  updateChannelPositions(guildID, channels) {\n    const data = new Array(channels.length);\n    for (let i = 0; i < channels.length; i++) {\n      data[i] = {\n        id: this.client.resolver.resolveChannelID(channels[i].channel),\n        position: channels[i].position,\n      };\n    }\n\n    return this.rest.makeRequest('patch', Endpoints.Guild(guildID).channels, true, data).then(() =>\n      this.client.actions.GuildChannelsPositionUpdate.handle({\n        guild_id: guildID,\n        channels,\n      }).guild\n    );\n  }\n\n  updateEmbed(guildID, embed, reason) {\n    return this.rest.makeRequest('patch', Endpoints.Guild(guildID).embed, true, {\n      enabled: embed.enabled,\n      channel_id: this.client.resolver.resolveChannelID(embed.channel),\n    }, undefined, reason);\n  }\n\n  setRolePositions(guildID, roles) {\n    return this.rest.makeRequest('patch', Endpoints.Guild(guildID).roles, true, roles).then(() =>\n      this.client.actions.GuildRolesPositionUpdate.handle({\n        guild_id: guildID,\n        roles,\n      }).guild\n    );\n  }\n\n  setChannelPositions(guildID, channels) {\n    return this.rest.makeRequest('patch', Endpoints.Guild(guildID).channels, true, channels).then(() =>\n      this.client.actions.GuildChannelsPositionUpdate.handle({\n        guild_id: guildID,\n        channels,\n      }).guild\n    );\n  }\n\n  addMessageReaction(message, emoji) {\n    return this.rest.makeRequest(\n      'put', Endpoints.Message(message).Reaction(emoji).User('@me'), true\n    ).then(() =>\n      message._addReaction(Util.parseEmoji(emoji), message.client.user)\n    );\n  }\n\n  removeMessageReaction(message, emoji, userID) {\n    const endpoint = Endpoints.Message(message).Reaction(emoji).User(userID === this.client.user.id ? '@me' : userID);\n    return this.rest.makeRequest('delete', endpoint, true).then(() =>\n      this.client.actions.MessageReactionRemove.handle({\n        user_id: userID,\n        message_id: message.id,\n        emoji: Util.parseEmoji(emoji),\n        channel_id: message.channel.id,\n      }).reaction\n    );\n  }\n\n  removeMessageReactions(message) {\n    return this.rest.makeRequest('delete', Endpoints.Message(message).reactions, true)\n      .then(() => message);\n  }\n\n  getMessageReactionUsers(message, emoji, options) {\n    const queryString = (querystring.stringify(options).match(/[^=&?]+=[^=&?]+/g) || []).join('&');\n\n    return this.rest.makeRequest('get', `${Endpoints.Message(message).Reaction(emoji)}?${queryString}`, true);\n  }\n\n  getApplication(id) {\n    return this.rest.makeRequest('get', Endpoints.OAUTH2.Application(id), true).then(app =>\n      new OAuth2Application(this.client, app)\n    );\n  }\n\n  resetApplication(id) {\n    return this.rest.makeRequest('post', Endpoints.OAUTH2.Application(id).resetToken, true)\n      .then(() => this.rest.makeRequest('post', Endpoints.OAUTH2.Application(id).resetSecret, true))\n      .then(app => new OAuth2Application(this.client, app));\n  }\n\n  setNote(user, note) {\n    return this.rest.makeRequest('put', Endpoints.User(user).note, true, { note }).then(() => user);\n  }\n\n  acceptInvite(code) {\n    if (code.id) code = code.id;\n    return new Promise((resolve, reject) =>\n      this.rest.makeRequest('post', Endpoints.Invite(code), true).then(res => {\n        const handler = guild => {\n          if (guild.id === res.id) {\n            resolve(guild);\n            this.client.removeListener(Constants.Events.GUILD_CREATE, handler);\n          }\n        };\n        this.client.on(Constants.Events.GUILD_CREATE, handler);\n        this.client.setTimeout(() => {\n          this.client.removeListener(Constants.Events.GUILD_CREATE, handler);\n          reject(new Error('Accepting invite timed out'));\n        }, 120e3);\n      })\n    );\n  }\n\n  patchUserSettings(data) {\n    return this.rest.makeRequest('patch', Constants.Endpoints.User('@me').settings, true, data);\n  }\n\n  patchClientUserGuildSettings(guildID, data) {\n    return this.rest.makeRequest('patch', Constants.Endpoints.User('@me').Guild(guildID).settings, true, data);\n  }\n}\n\nmodule.exports = RESTMethods;\n\n\n//# sourceURL=webpack:///./src/client/rest/RESTMethods.js?");

/***/ }),

/***/ "./src/client/rest/RequestHandlers/Burst.js":
/*!**************************************************!*\
  !*** ./src/client/rest/RequestHandlers/Burst.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const RequestHandler = __webpack_require__(/*! ./RequestHandler */ \"./src/client/rest/RequestHandlers/RequestHandler.js\");\nconst DiscordAPIError = __webpack_require__(/*! ../DiscordAPIError */ \"./src/client/rest/DiscordAPIError.js\");\nconst { Events: { RATE_LIMIT } } = __webpack_require__(/*! ../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass BurstRequestHandler extends RequestHandler {\n  constructor(restManager, endpoint) {\n    super(restManager, endpoint);\n\n    this.client = restManager.client;\n\n    this.limit = Infinity;\n    this.resetTime = null;\n    this.remaining = 1;\n    this.timeDifference = 0;\n\n    this.resetTimeout = null;\n  }\n\n  push(request) {\n    super.push(request);\n    this.handle();\n  }\n\n  execute(item) {\n    if (!item) return;\n    item.request.gen().end((err, res) => {\n      if (res && res.headers) {\n        this.limit = Number(res.headers['x-ratelimit-limit']);\n        this.resetTime = Number(res.headers['x-ratelimit-reset']) * 1000;\n        this.remaining = Number(res.headers['x-ratelimit-remaining']);\n        this.timeDifference = Date.now() - new Date(res.headers.date).getTime();\n      }\n      if (err) {\n        if (err.status === 429) {\n          this.queue.unshift(item);\n          if (res.headers['x-ratelimit-global']) this.globalLimit = true;\n          if (this.resetTimeout) return;\n          this.resetTimeout = this.client.setTimeout(() => {\n            this.remaining = this.limit;\n            this.globalLimit = false;\n            this.handle();\n            this.resetTimeout = null;\n          }, Number(res.headers['retry-after']) + this.client.options.restTimeOffset);\n        } else if (err.status >= 500 && err.status < 600) {\n          if (item.retries === this.client.options.retryLimit) {\n            item.reject(err);\n            this.handle();\n          } else {\n            item.retries++;\n            this.queue.unshift(item);\n            this.resetTimeout = this.client.setTimeout(() => {\n              this.handle();\n              this.resetTimeout = null;\n            }, 1e3 + this.client.options.restTimeOffset);\n          }\n        } else {\n          item.reject(err.status >= 400 && err.status < 500 ?\n            new DiscordAPIError(res.request.path, res.body, res.request.method) : err);\n          this.handle();\n        }\n      } else {\n        if (this.remaining === 0) {\n          if (this.client.listenerCount(RATE_LIMIT)) {\n            this.client.emit(RATE_LIMIT, {\n              limit: this.limit,\n              timeDifference: this.timeDifference,\n              path: item.request.path,\n              method: item.request.method,\n            });\n          }\n        }\n        this.globalLimit = false;\n        const data = res && res.body ? res.body : {};\n        item.resolve(data);\n        this.handle();\n      }\n    });\n  }\n\n  handle() {\n    super.handle();\n    if (this.queue.length === 0) return;\n    if ((this.remaining <= 0 || this.globalLimit) && Date.now() - this.timeDifference < this.resetTime) return;\n    this.execute(this.queue.shift());\n    this.remaining--;\n    this.handle();\n  }\n}\n\nmodule.exports = BurstRequestHandler;\n\n\n//# sourceURL=webpack:///./src/client/rest/RequestHandlers/Burst.js?");

/***/ }),

/***/ "./src/client/rest/RequestHandlers/RequestHandler.js":
/*!***********************************************************!*\
  !*** ./src/client/rest/RequestHandlers/RequestHandler.js ***!
  \***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * A base class for different types of rate limiting handlers for the REST API.\n * @private\n */\nclass RequestHandler {\n  /**\n   * @param {RESTManager} restManager The REST manager to use\n   */\n  constructor(restManager) {\n    /**\n     * The RESTManager that instantiated this RequestHandler\n     * @type {RESTManager}\n     */\n    this.restManager = restManager;\n\n    /**\n     * A list of requests that have yet to be processed\n     * @type {APIRequest[]}\n     */\n    this.queue = [];\n  }\n\n  /**\n   * Whether or not the client is being rate limited on every endpoint\n   * @type {boolean}\n   * @readonly\n   */\n  get globalLimit() {\n    return this.restManager.globallyRateLimited;\n  }\n\n  set globalLimit(value) {\n    this.restManager.globallyRateLimited = value;\n  }\n\n  /**\n   * Push a new API request into this bucket.\n   * @param {APIRequest} request The new request to push into the queue\n   */\n  push(request) {\n    this.queue.push(request);\n  }\n\n  /**\n   * Attempts to get this RequestHandler to process its current queue.\n   */\n  handle() {} // eslint-disable-line no-empty-function\n\n  destroy() {\n    this.queue = [];\n  }\n}\n\nmodule.exports = RequestHandler;\n\n\n//# sourceURL=webpack:///./src/client/rest/RequestHandlers/RequestHandler.js?");

/***/ }),

/***/ "./src/client/rest/RequestHandlers/Sequential.js":
/*!*******************************************************!*\
  !*** ./src/client/rest/RequestHandlers/Sequential.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const RequestHandler = __webpack_require__(/*! ./RequestHandler */ \"./src/client/rest/RequestHandlers/RequestHandler.js\");\nconst DiscordAPIError = __webpack_require__(/*! ../DiscordAPIError */ \"./src/client/rest/DiscordAPIError.js\");\nconst { Events: { RATE_LIMIT } } = __webpack_require__(/*! ../../../util/Constants */ \"./src/util/Constants.js\");\n\n/**\n * Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\n * the next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\n * but it can be slower.\n * @extends {RequestHandler}\n * @private\n */\nclass SequentialRequestHandler extends RequestHandler {\n  /**\n   * @param {RESTManager} restManager The REST manager to use\n   * @param {string} endpoint The endpoint to handle\n   */\n  constructor(restManager, endpoint) {\n    super(restManager, endpoint);\n\n    /**\n     * The client that instantiated this handler\n     * @type {Client}\n     */\n    this.client = restManager.client;\n\n    /**\n     * The endpoint that this handler is handling\n     * @type {string}\n     */\n    this.endpoint = endpoint;\n\n    /**\n     * The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\n     * computer's time is ahead of Discord's\n     * @type {number}\n     */\n    this.timeDifference = 0;\n\n    /**\n     * Whether the queue is being processed or not\n     * @type {boolean}\n     */\n    this.busy = false;\n  }\n\n  push(request) {\n    super.push(request);\n    this.handle();\n  }\n\n  /**\n   * Performs a request then resolves a promise to indicate its readiness for a new request.\n   * @param {APIRequest} item The item to execute\n   * @returns {Promise<?Object|Error>}\n   */\n  execute(item) {\n    this.busy = true;\n    return new Promise(resolve => {\n      item.request.gen().end((err, res) => {\n        if (res && res.headers) {\n          this.requestLimit = Number(res.headers['x-ratelimit-limit']);\n          this.requestResetTime = Number(res.headers['x-ratelimit-reset']) * 1000;\n          this.requestRemaining = Number(res.headers['x-ratelimit-remaining']);\n          this.timeDifference = Date.now() - new Date(res.headers.date).getTime();\n        }\n        if (err) {\n          if (err.status === 429) {\n            this.queue.unshift(item);\n            this.client.setTimeout(() => {\n              this.globalLimit = false;\n              resolve();\n            }, Number(res.headers['retry-after']) + this.client.options.restTimeOffset);\n            if (res.headers['x-ratelimit-global']) this.globalLimit = true;\n          } else if (err.status >= 500 && err.status < 600) {\n            if (item.retries === this.client.options.retryLimit) {\n              item.reject(err);\n              resolve();\n            } else {\n              item.retries++;\n              this.queue.unshift(item);\n              this.client.setTimeout(resolve, 1e3 + this.client.options.restTimeOffset);\n            }\n          } else {\n            item.reject(err.status >= 400 && err.status < 500 ?\n              new DiscordAPIError(res.request.path, res.body, res.request.method) : err);\n            resolve(err);\n          }\n        } else {\n          this.globalLimit = false;\n          const data = res && res.body ? res.body : {};\n          item.resolve(data);\n          if (this.requestRemaining === 0) {\n            if (this.client.listenerCount(RATE_LIMIT)) {\n              /**\n               * Emitted when the client hits a rate limit while making a request\n               * @event Client#rateLimit\n               * @param {Object} rateLimitInfo Object containing the rate limit info\n               * @param {number} rateLimitInfo.limit Number of requests that can be made to this endpoint\n               * @param {number} rateLimitInfo.timeDifference Delta-T in ms between your system and Discord servers\n               * @param {string} rateLimitInfo.path Path used for request that triggered this event\n               * @param {string} rateLimitInfo.method HTTP method used for request that triggered this event\n               */\n              this.client.emit(RATE_LIMIT, {\n                limit: this.requestLimit,\n                timeDifference: this.timeDifference,\n                path: item.request.path,\n                method: item.request.method,\n              });\n            }\n            this.client.setTimeout(\n              () => resolve(data),\n              this.requestResetTime - Date.now() + this.timeDifference + this.client.options.restTimeOffset\n            );\n          } else {\n            resolve(data);\n          }\n        }\n      });\n    });\n  }\n\n  handle() {\n    super.handle();\n    if (this.busy || this.remaining === 0 || this.queue.length === 0 || this.globalLimit) return;\n    this.execute(this.queue.shift()).then(() => {\n      this.busy = false;\n      this.handle();\n    });\n  }\n}\n\nmodule.exports = SequentialRequestHandler;\n\n\n//# sourceURL=webpack:///./src/client/rest/RequestHandlers/Sequential.js?");

/***/ }),

/***/ "./src/client/rest/UserAgentManager.js":
/*!*********************************************!*\
  !*** ./src/client/rest/UserAgentManager.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {const Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\n\nclass UserAgentManager {\n  constructor() {\n    this.build(this.constructor.DEFAULT);\n  }\n\n  set({ url, version } = {}) {\n    this.build({\n      url: url || this.constructor.DFEAULT.url,\n      version: version || this.constructor.DEFAULT.version,\n    });\n  }\n\n  build(ua) {\n    this.userAgent = `DiscordBot (${ua.url}, ${ua.version}) Node.js/${process.version}`;\n  }\n}\n\nUserAgentManager.DEFAULT = {\n  url: Constants.Package.homepage.split('#')[0],\n  version: Constants.Package.version,\n};\n\nmodule.exports = UserAgentManager;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./src/client/rest/UserAgentManager.js?");

/***/ }),

/***/ "./src/client/websocket/WebSocketConnection.js":
/*!*****************************************************!*\
  !*** ./src/client/websocket/WebSocketConnection.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(Buffer) {const browser = typeof window !== 'undefined';\nconst EventEmitter = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\nconst zlib = __webpack_require__(/*! zlib */ \"./node_modules/node-libs-browser/mock/empty.js\");\nconst PacketManager = __webpack_require__(/*! ./packets/WebSocketPacketManager */ \"./src/client/websocket/packets/WebSocketPacketManager.js\");\nconst erlpack = (function findErlpack() {\n  try {\n    const e = __webpack_require__(/*! erlpack */ 1);\n    if (!e.pack) return null;\n    return e;\n  } catch (e) {\n    return null;\n  }\n}());\n\nconst WebSocket = (function findWebSocket() {\n  if (browser) return window.WebSocket; // eslint-disable-line no-undef\n  try {\n    return __webpack_require__(/*! @discordjs/uws */ 2);\n  } catch (e) {\n    return __webpack_require__(/*! ws */ 3);\n  }\n}());\n\n/**\n * Abstracts a WebSocket connection with decoding/encoding for the Discord gateway.\n * @private\n */\nclass WebSocketConnection extends EventEmitter {\n  /**\n   * @param {WebSocketManager} manager The WebSocket manager\n   * @param {string} gateway The WebSocket gateway to connect to\n   */\n  constructor(manager, gateway) {\n    super();\n    /**\n     * The WebSocket Manager of this connection\n     * @type {WebSocketManager}\n     */\n    this.manager = manager;\n\n    /**\n     * The client this belongs to\n     * @type {Client}\n     */\n    this.client = manager.client;\n\n    /**\n     * The WebSocket connection itself\n     * @type {WebSocket}\n     */\n    this.ws = null;\n\n    /**\n     * The current sequence of the WebSocket\n     * @type {number}\n     */\n    this.sequence = -1;\n\n    /**\n     * The current status of the client\n     * @type {number}\n     */\n    this.status = Constants.Status.IDLE;\n\n    /**\n     * The Packet Manager of the connection\n     * @type {WebSocketPacketManager}\n     */\n    this.packetManager = new PacketManager(this);\n\n    /**\n     * The last time a ping was sent (a timestamp)\n     * @type {number}\n     */\n    this.lastPingTimestamp = 0;\n\n    /**\n     * Contains the rate limit queue and metadata\n     * @type {Object}\n     */\n    this.ratelimit = {\n      queue: [],\n      remaining: 120,\n      total: 120,\n      time: 60e3,\n      resetTimer: null,\n    };\n    this.connect(gateway);\n\n    /**\n     * Events that are disabled (will not be processed)\n     * @type {Object}\n     */\n    this.disabledEvents = {};\n\n    /**\n     * The sequence on WebSocket close\n     * @type {number}\n     */\n    this.closeSequence = 0;\n\n    /**\n     * Whether or not the WebSocket is expecting to be closed\n     * @type {boolean}\n     */\n    this.expectingClose = false;\n    for (const event of this.client.options.disabledEvents) this.disabledEvents[event] = true;\n  }\n\n  /**\n   * Causes the client to be marked as ready and emits the ready event.\n   * @returns {void}\n   */\n  triggerReady() {\n    if (this.status === Constants.Status.READY) {\n      this.debug('Tried to mark self as ready, but already ready');\n      return;\n    }\n    /**\n     * Emitted when the client becomes ready to start working.\n     * @event Client#ready\n     */\n    this.status = Constants.Status.READY;\n    this.client.emit(Constants.Events.READY);\n    this.packetManager.handleQueue();\n  }\n\n  /**\n   * Checks whether the client is ready to be marked as ready.\n   * @returns {void}\n   */\n  checkIfReady() {\n    if (this.status === Constants.Status.READY || this.status === Constants.Status.NEARLY) return false;\n    let unavailableGuilds = 0;\n    for (const guild of this.client.guilds.values()) {\n      if (!guild.available) unavailableGuilds++;\n    }\n    if (unavailableGuilds === 0) {\n      this.status = Constants.Status.NEARLY;\n      if (!this.client.options.fetchAllMembers) return this.triggerReady();\n      // Fetch all members before marking self as ready\n      const promises = this.client.guilds.map(g => g.fetchMembers());\n      Promise.all(promises)\n        .then(() => this.triggerReady())\n        .catch(e => {\n          this.debug(`Failed to fetch all members before ready! ${e}`);\n          this.triggerReady();\n        });\n    }\n    return true;\n  }\n\n  // Util\n  /**\n   * Emits a debug message.\n   * @param {string} message Debug message\n   * @returns {void}\n   */\n  debug(message) {\n    if (message instanceof Error) message = message.stack;\n    return this.manager.debug(`[connection] ${message}`);\n  }\n\n  /**\n   * Attempts to serialise data from the WebSocket.\n   * @param {string|Object} data Data to unpack\n   * @returns {Object}\n   */\n  unpack(data) {\n    if (data instanceof ArrayBuffer) data = Buffer.from(new Uint8Array(data));\n\n    if (erlpack && typeof data !== 'string') return erlpack.unpack(data);\n    else if (data instanceof Buffer) data = zlib.inflateSync(data).toString();\n\n    return JSON.parse(data);\n  }\n\n  /**\n   * Packs an object ready to be sent.\n   * @param {Object} data Data to pack\n   * @returns {string|Buffer}\n   */\n  pack(data) {\n    return erlpack ? erlpack.pack(data) : JSON.stringify(data);\n  }\n\n  /**\n   * Processes the current WebSocket queue.\n   */\n  processQueue() {\n    if (this.ratelimit.remaining === 0) return;\n    if (this.ratelimit.queue.length === 0) return;\n    if (this.ratelimit.remaining === this.ratelimit.total) {\n      this.ratelimit.resetTimer = this.client.setTimeout(() => {\n        this.ratelimit.remaining = this.ratelimit.total;\n        this.processQueue();\n      }, this.ratelimit.time);\n    }\n    while (this.ratelimit.remaining > 0) {\n      const item = this.ratelimit.queue.shift();\n      if (!item) return;\n      this._send(item);\n      this.ratelimit.remaining--;\n    }\n  }\n\n  /**\n   * Sends data, bypassing the queue.\n   * @param {Object} data Packet to send\n   * @returns {void}\n   */\n  _send(data) {\n    if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {\n      this.debug(`Tried to send packet ${data} but no WebSocket is available!`);\n      return;\n    }\n    this.ws.send(this.pack(data));\n  }\n\n  /**\n   * Adds data to the queue to be sent.\n   * @param {Object} data Packet to send\n   * @returns {void}\n   */\n  send(data) {\n    if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {\n      this.debug(`Tried to send packet ${data} but no WebSocket is available!`);\n      return;\n    }\n    this.ratelimit.queue.push(data);\n    this.processQueue();\n  }\n\n  /**\n   * Creates a connection to a gateway.\n   * @param {string} gateway The gateway to connect to\n   * @param {number} [after=0] How long to wait before connecting\n   * @param {boolean} [force=false] Whether or not to force a new connection even if one already exists\n   * @returns {boolean}\n   */\n  connect(gateway = this.gateway, after = 0, force = false) {\n    if (after) return this.client.setTimeout(() => this.connect(gateway, 0, force), after); // eslint-disable-line\n    if (this.ws && !force) {\n      this.debug('WebSocket connection already exists');\n      return false;\n    } else if (typeof gateway !== 'string') {\n      this.debug(`Tried to connect to an invalid gateway: ${gateway}`);\n      return false;\n    }\n    this.expectingClose = false;\n    this.gateway = gateway;\n    this.debug(`Connecting to ${gateway}`);\n    const ws = this.ws = new WebSocket(gateway);\n    if (browser) ws.binaryType = 'arraybuffer';\n    ws.onmessage = this.onMessage.bind(this);\n    ws.onopen = this.onOpen.bind(this);\n    ws.onerror = this.onError.bind(this);\n    ws.onclose = this.onClose.bind(this);\n    this.status = Constants.Status.CONNECTING;\n    return true;\n  }\n\n  /**\n   * Destroys the connection.\n   * @returns {boolean}\n   */\n  destroy() {\n    const ws = this.ws;\n    if (!ws) {\n      this.debug('Attempted to destroy WebSocket but no connection exists!');\n      return false;\n    }\n    this.heartbeat(-1);\n    this.expectingClose = true;\n    ws.close(1000);\n    this.packetManager.handleQueue();\n    this.ws = null;\n    this.status = Constants.Status.DISCONNECTED;\n    this.ratelimit.remaining = this.ratelimit.total;\n    return true;\n  }\n\n  /**\n   * Called whenever a message is received.\n   * @param {Event} event Event received\n   * @returns {boolean}\n   */\n  onMessage(event) {\n    let data;\n    try {\n      data = this.unpack(event.data);\n    } catch (err) {\n      this.emit('debug', err);\n    }\n    return this.onPacket(data);\n  }\n\n  /**\n   * Sets the current sequence of the connection.\n   * @param {number} s New sequence\n   */\n  setSequence(s) {\n    this.sequence = s > this.sequence ? s : this.sequence;\n  }\n\n  /**\n   * Called whenever a packet is received.\n   * @param {Object} packet Received packet\n   * @returns {boolean}\n   */\n  onPacket(packet) {\n    if (!packet) {\n      this.debug('Received null packet');\n      return false;\n    }\n    this.client.emit('raw', packet);\n    switch (packet.op) {\n      case Constants.OPCodes.HELLO:\n        return this.heartbeat(packet.d.heartbeat_interval);\n      case Constants.OPCodes.RECONNECT:\n        return this.reconnect();\n      case Constants.OPCodes.INVALID_SESSION:\n        if (!packet.d) this.sessionID = null;\n        this.sequence = -1;\n        this.debug('Session invalidated -- will identify with a new session');\n        return this.identify(packet.d ? 2500 : 0);\n      case Constants.OPCodes.HEARTBEAT_ACK:\n        return this.ackHeartbeat();\n      case Constants.OPCodes.HEARTBEAT:\n        return this.heartbeat();\n      default:\n        return this.packetManager.handle(packet);\n    }\n  }\n\n  /**\n   * Called whenever a connection is opened to the gateway.\n   * @param {Event} event Received open event\n   */\n  onOpen(event) {\n    if (event && event.target && event.target.url) this.gateway = event.target.url;\n    this.debug(`Connected to gateway ${this.gateway}`);\n    this.identify();\n  }\n\n  /**\n   * Causes a reconnection to the gateway.\n   */\n  reconnect() {\n    this.debug('Attemping to reconnect in 5500ms...');\n    /**\n     * Emitted whenever the client tries to reconnect to the WebSocket.\n     * @event Client#reconnecting\n     */\n    this.client.emit(Constants.Events.RECONNECTING);\n    this.connect(this.gateway, 5500, true);\n  }\n\n  /**\n   * Called whenever an error occurs with the WebSocket.\n   * @param {Error} error The error that occurred\n   */\n  onError(error) {\n    if (error && error.message === 'uWs client connection error') {\n      this.reconnect();\n      return;\n    }\n    /**\n     * Emitted whenever the client's WebSocket encounters a connection error.\n     * @event Client#error\n     * @param {Error} error The encountered error\n     */\n    this.client.emit(Constants.Events.ERROR, error);\n  }\n\n  /**\n   * @external CloseEvent\n   * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}\n   */\n\n  /**\n   * Called whenever a connection to the gateway is closed.\n   * @param {CloseEvent} event Close event that was received\n   */\n  onClose(event) {\n    this.debug(`${this.expectingClose ? 'Client' : 'Server'} closed the WebSocket connection: ${event.code}`);\n    this.closeSequence = this.sequence;\n    // Reset the state before trying to fix anything\n    this.emit('close', event);\n    this.heartbeat(-1);\n    // Should we reconnect?\n    if (event.code === 1000 ? this.expectingClose : Constants.WSCodes[event.code]) {\n      this.expectingClose = false;\n      /**\n       * Emitted when the client's WebSocket disconnects and will no longer attempt to reconnect.\n       * @event Client#disconnect\n       * @param {CloseEvent} event The WebSocket close event\n       */\n      this.client.emit(Constants.Events.DISCONNECT, event);\n      this.debug(Constants.WSCodes[event.code]);\n      this.destroy();\n      return;\n    }\n    this.expectingClose = false;\n    this.reconnect();\n  }\n\n  // Heartbeat\n  /**\n   * Acknowledges a heartbeat.\n   */\n  ackHeartbeat() {\n    this.debug(`Heartbeat acknowledged, latency of ${Date.now() - this.lastPingTimestamp}ms`);\n    this.client._pong(this.lastPingTimestamp);\n  }\n\n  /**\n   * Sends a heartbeat or sets an interval for sending heartbeats.\n   * @param {number} [time] If -1, clears the interval, any other number sets an interval\n   * If no value is given, a heartbeat will be sent instantly\n   */\n  heartbeat(time) {\n    if (!isNaN(time)) {\n      if (time === -1) {\n        this.debug('Clearing heartbeat interval');\n        this.client.clearInterval(this.heartbeatInterval);\n        this.heartbeatInterval = null;\n      } else {\n        this.debug(`Setting a heartbeat interval for ${time}ms`);\n        this.heartbeatInterval = this.client.setInterval(() => this.heartbeat(), time);\n      }\n      return;\n    }\n    this.debug('Sending a heartbeat');\n    this.lastPingTimestamp = Date.now();\n    this.send({\n      op: Constants.OPCodes.HEARTBEAT,\n      d: this.sequence,\n    });\n  }\n\n  // Identification\n  /**\n   * Identifies the client on a connection.\n   * @param {number} [after] How long to wait before identifying\n   * @returns {void}\n   */\n  identify(after) {\n    if (after) return this.client.setTimeout(this.identify.bind(this), after);\n    return this.sessionID ? this.identifyResume() : this.identifyNew();\n  }\n\n  /**\n   * Identifies as a new connection on the gateway.\n   * @returns {void}\n   */\n  identifyNew() {\n    if (!this.client.token) {\n      this.debug('No token available to identify a new session with');\n      return;\n    }\n    // Clone the generic payload and assign the token\n    const d = Object.assign({ token: this.client.token }, this.client.options.ws);\n\n    // Sharding stuff\n    const { shardId, shardCount } = this.client.options;\n    if (shardCount > 0) d.shard = [Number(shardId), Number(shardCount)];\n\n    // Send the payload\n    this.debug('Identifying as a new session');\n    this.send({ op: Constants.OPCodes.IDENTIFY, d });\n  }\n\n  /**\n   * Resumes a session on the gateway.\n   * @returns {void}\n   */\n  identifyResume() {\n    if (!this.sessionID) {\n      this.debug('Warning: wanted to resume but session ID not available; identifying as a new session instead');\n      return this.identifyNew();\n    }\n    this.debug(`Attempting to resume session ${this.sessionID}`);\n\n    const d = {\n      token: this.client.token,\n      session_id: this.sessionID,\n      seq: this.sequence,\n    };\n\n    return this.send({\n      op: Constants.OPCodes.RESUME,\n      d,\n    });\n  }\n}\n\n/**\n * Encoding the WebSocket connections will use.\n * @type {string}\n */\nWebSocketConnection.ENCODING = erlpack ? 'etf' : 'json';\nWebSocketConnection.WebSocket = WebSocket;\n\nmodule.exports = WebSocketConnection;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/client/websocket/WebSocketConnection.js?");

/***/ }),

/***/ "./src/client/websocket/WebSocketManager.js":
/*!**************************************************!*\
  !*** ./src/client/websocket/WebSocketManager.js ***!
  \**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const EventEmitter = __webpack_require__(/*! events */ \"./node_modules/events/events.js\").EventEmitter;\nconst Constants = __webpack_require__(/*! ../../util/Constants */ \"./src/util/Constants.js\");\nconst WebSocketConnection = __webpack_require__(/*! ./WebSocketConnection */ \"./src/client/websocket/WebSocketConnection.js\");\n\n/**\n * WebSocket Manager of the client.\n * @private\n */\nclass WebSocketManager extends EventEmitter {\n  constructor(client) {\n    super();\n    /**\n     * The client that instantiated this WebSocketManager\n     * @type {Client}\n     */\n    this.client = client;\n\n    /**\n     * The WebSocket connection of this manager\n     * @type {?WebSocketConnection}\n     */\n    this.connection = null;\n  }\n\n  /**\n   * Sends a heartbeat on the available connection.\n   * @returns {void}\n   */\n  heartbeat() {\n    if (!this.connection) return this.debug('No connection to heartbeat');\n    return this.connection.heartbeat();\n  }\n\n  /**\n   * Emits a debug event.\n   * @param {string} message Debug message\n   * @returns {void}\n   */\n  debug(message) {\n    return this.client.emit('debug', `[ws] ${message}`);\n  }\n\n  /**\n   * Destroy the client.\n   * @returns {void} Whether or not destruction was successful\n   */\n  destroy() {\n    if (!this.connection) {\n      this.debug('Attempted to destroy WebSocket but no connection exists!');\n      return false;\n    }\n    return this.connection.destroy();\n  }\n\n  /**\n   * Send a packet on the available WebSocket.\n   * @param {Object} packet Packet to send\n   * @returns {void}\n   */\n  send(packet) {\n    if (!this.connection) {\n      this.debug('No connection to websocket');\n      return;\n    }\n    this.connection.send(packet);\n  }\n\n  /**\n   * Connects the client to a gateway.\n   * @param {string} gateway The gateway to connect to\n   * @returns {boolean}\n   */\n  connect(gateway) {\n    if (!this.connection) {\n      this.connection = new WebSocketConnection(this, gateway);\n      return true;\n    }\n    switch (this.connection.status) {\n      case Constants.Status.IDLE:\n      case Constants.Status.DISCONNECTED:\n        this.connection.connect(gateway, 5500);\n        return true;\n      default:\n        this.debug(`Couldn't connect to ${gateway} as the websocket is at state ${this.connection.status}`);\n        return false;\n    }\n  }\n}\n\nmodule.exports = WebSocketManager;\n\n\n//# sourceURL=webpack:///./src/client/websocket/WebSocketManager.js?");

/***/ }),

/***/ "./src/client/websocket/packets/WebSocketPacketManager.js":
/*!****************************************************************!*\
  !*** ./src/client/websocket/packets/WebSocketPacketManager.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../../../util/Constants */ \"./src/util/Constants.js\");\n\nconst BeforeReadyWhitelist = [\n  Constants.WSEvents.READY,\n  Constants.WSEvents.RESUMED,\n  Constants.WSEvents.GUILD_CREATE,\n  Constants.WSEvents.GUILD_DELETE,\n  Constants.WSEvents.GUILD_MEMBERS_CHUNK,\n  Constants.WSEvents.GUILD_MEMBER_ADD,\n  Constants.WSEvents.GUILD_MEMBER_REMOVE,\n];\n\nclass WebSocketPacketManager {\n  constructor(connection) {\n    this.ws = connection;\n    this.handlers = {};\n    this.queue = [];\n\n    this.register(Constants.WSEvents.READY, __webpack_require__(/*! ./handlers/Ready */ \"./src/client/websocket/packets/handlers/Ready.js\"));\n    this.register(Constants.WSEvents.RESUMED, __webpack_require__(/*! ./handlers/Resumed */ \"./src/client/websocket/packets/handlers/Resumed.js\"));\n    this.register(Constants.WSEvents.GUILD_CREATE, __webpack_require__(/*! ./handlers/GuildCreate */ \"./src/client/websocket/packets/handlers/GuildCreate.js\"));\n    this.register(Constants.WSEvents.GUILD_DELETE, __webpack_require__(/*! ./handlers/GuildDelete */ \"./src/client/websocket/packets/handlers/GuildDelete.js\"));\n    this.register(Constants.WSEvents.GUILD_UPDATE, __webpack_require__(/*! ./handlers/GuildUpdate */ \"./src/client/websocket/packets/handlers/GuildUpdate.js\"));\n    this.register(Constants.WSEvents.GUILD_BAN_ADD, __webpack_require__(/*! ./handlers/GuildBanAdd */ \"./src/client/websocket/packets/handlers/GuildBanAdd.js\"));\n    this.register(Constants.WSEvents.GUILD_BAN_REMOVE, __webpack_require__(/*! ./handlers/GuildBanRemove */ \"./src/client/websocket/packets/handlers/GuildBanRemove.js\"));\n    this.register(Constants.WSEvents.GUILD_MEMBER_ADD, __webpack_require__(/*! ./handlers/GuildMemberAdd */ \"./src/client/websocket/packets/handlers/GuildMemberAdd.js\"));\n    this.register(Constants.WSEvents.GUILD_MEMBER_REMOVE, __webpack_require__(/*! ./handlers/GuildMemberRemove */ \"./src/client/websocket/packets/handlers/GuildMemberRemove.js\"));\n    this.register(Constants.WSEvents.GUILD_MEMBER_UPDATE, __webpack_require__(/*! ./handlers/GuildMemberUpdate */ \"./src/client/websocket/packets/handlers/GuildMemberUpdate.js\"));\n    this.register(Constants.WSEvents.GUILD_ROLE_CREATE, __webpack_require__(/*! ./handlers/GuildRoleCreate */ \"./src/client/websocket/packets/handlers/GuildRoleCreate.js\"));\n    this.register(Constants.WSEvents.GUILD_ROLE_DELETE, __webpack_require__(/*! ./handlers/GuildRoleDelete */ \"./src/client/websocket/packets/handlers/GuildRoleDelete.js\"));\n    this.register(Constants.WSEvents.GUILD_ROLE_UPDATE, __webpack_require__(/*! ./handlers/GuildRoleUpdate */ \"./src/client/websocket/packets/handlers/GuildRoleUpdate.js\"));\n    this.register(Constants.WSEvents.GUILD_EMOJIS_UPDATE, __webpack_require__(/*! ./handlers/GuildEmojisUpdate */ \"./src/client/websocket/packets/handlers/GuildEmojisUpdate.js\"));\n    this.register(Constants.WSEvents.GUILD_MEMBERS_CHUNK, __webpack_require__(/*! ./handlers/GuildMembersChunk */ \"./src/client/websocket/packets/handlers/GuildMembersChunk.js\"));\n    this.register(Constants.WSEvents.GUILD_INTEGRATIONS_UPDATE, __webpack_require__(/*! ./handlers/GuildIntegrationsUpdate */ \"./src/client/websocket/packets/handlers/GuildIntegrationsUpdate.js\"));\n    this.register(Constants.WSEvents.CHANNEL_CREATE, __webpack_require__(/*! ./handlers/ChannelCreate */ \"./src/client/websocket/packets/handlers/ChannelCreate.js\"));\n    this.register(Constants.WSEvents.CHANNEL_DELETE, __webpack_require__(/*! ./handlers/ChannelDelete */ \"./src/client/websocket/packets/handlers/ChannelDelete.js\"));\n    this.register(Constants.WSEvents.CHANNEL_UPDATE, __webpack_require__(/*! ./handlers/ChannelUpdate */ \"./src/client/websocket/packets/handlers/ChannelUpdate.js\"));\n    this.register(Constants.WSEvents.CHANNEL_PINS_UPDATE, __webpack_require__(/*! ./handlers/ChannelPinsUpdate */ \"./src/client/websocket/packets/handlers/ChannelPinsUpdate.js\"));\n    this.register(Constants.WSEvents.PRESENCE_UPDATE, __webpack_require__(/*! ./handlers/PresenceUpdate */ \"./src/client/websocket/packets/handlers/PresenceUpdate.js\"));\n    this.register(Constants.WSEvents.USER_UPDATE, __webpack_require__(/*! ./handlers/UserUpdate */ \"./src/client/websocket/packets/handlers/UserUpdate.js\"));\n    this.register(Constants.WSEvents.USER_NOTE_UPDATE, __webpack_require__(/*! ./handlers/UserNoteUpdate */ \"./src/client/websocket/packets/handlers/UserNoteUpdate.js\"));\n    this.register(Constants.WSEvents.USER_SETTINGS_UPDATE, __webpack_require__(/*! ./handlers/UserSettingsUpdate */ \"./src/client/websocket/packets/handlers/UserSettingsUpdate.js\"));\n    this.register(Constants.WSEvents.USER_GUILD_SETTINGS_UPDATE, __webpack_require__(/*! ./handlers/UserGuildSettingsUpdate */ \"./src/client/websocket/packets/handlers/UserGuildSettingsUpdate.js\"));\n    this.register(Constants.WSEvents.VOICE_STATE_UPDATE, __webpack_require__(/*! ./handlers/VoiceStateUpdate */ \"./src/client/websocket/packets/handlers/VoiceStateUpdate.js\"));\n    this.register(Constants.WSEvents.TYPING_START, __webpack_require__(/*! ./handlers/TypingStart */ \"./src/client/websocket/packets/handlers/TypingStart.js\"));\n    this.register(Constants.WSEvents.MESSAGE_CREATE, __webpack_require__(/*! ./handlers/MessageCreate */ \"./src/client/websocket/packets/handlers/MessageCreate.js\"));\n    this.register(Constants.WSEvents.MESSAGE_DELETE, __webpack_require__(/*! ./handlers/MessageDelete */ \"./src/client/websocket/packets/handlers/MessageDelete.js\"));\n    this.register(Constants.WSEvents.MESSAGE_UPDATE, __webpack_require__(/*! ./handlers/MessageUpdate */ \"./src/client/websocket/packets/handlers/MessageUpdate.js\"));\n    this.register(Constants.WSEvents.MESSAGE_DELETE_BULK, __webpack_require__(/*! ./handlers/MessageDeleteBulk */ \"./src/client/websocket/packets/handlers/MessageDeleteBulk.js\"));\n    this.register(Constants.WSEvents.VOICE_SERVER_UPDATE, __webpack_require__(/*! ./handlers/VoiceServerUpdate */ \"./src/client/websocket/packets/handlers/VoiceServerUpdate.js\"));\n    this.register(Constants.WSEvents.GUILD_SYNC, __webpack_require__(/*! ./handlers/GuildSync */ \"./src/client/websocket/packets/handlers/GuildSync.js\"));\n    this.register(Constants.WSEvents.RELATIONSHIP_ADD, __webpack_require__(/*! ./handlers/RelationshipAdd */ \"./src/client/websocket/packets/handlers/RelationshipAdd.js\"));\n    this.register(Constants.WSEvents.RELATIONSHIP_REMOVE, __webpack_require__(/*! ./handlers/RelationshipRemove */ \"./src/client/websocket/packets/handlers/RelationshipRemove.js\"));\n    this.register(Constants.WSEvents.MESSAGE_REACTION_ADD, __webpack_require__(/*! ./handlers/MessageReactionAdd */ \"./src/client/websocket/packets/handlers/MessageReactionAdd.js\"));\n    this.register(Constants.WSEvents.MESSAGE_REACTION_REMOVE, __webpack_require__(/*! ./handlers/MessageReactionRemove */ \"./src/client/websocket/packets/handlers/MessageReactionRemove.js\"));\n    this.register(Constants.WSEvents.MESSAGE_REACTION_REMOVE_ALL, __webpack_require__(/*! ./handlers/MessageReactionRemoveAll */ \"./src/client/websocket/packets/handlers/MessageReactionRemoveAll.js\"));\n    this.register(Constants.WSEvents.WEBHOOKS_UPDATE, __webpack_require__(/*! ./handlers/WebhooksUpdate */ \"./src/client/websocket/packets/handlers/WebhooksUpdate.js\"));\n  }\n\n  get client() {\n    return this.ws.client;\n  }\n\n  register(event, Handler) {\n    this.handlers[event] = new Handler(this);\n  }\n\n  handleQueue() {\n    this.queue.forEach((element, index) => {\n      this.handle(this.queue[index], true);\n      this.queue.splice(index, 1);\n    });\n  }\n\n  handle(packet, queue = false) {\n    if (packet.op === Constants.OPCodes.HEARTBEAT_ACK) {\n      this.ws.client._pong(this.ws.client._pingTimestamp);\n      this.ws.lastHeartbeatAck = true;\n      this.ws.client.emit('debug', 'Heartbeat acknowledged');\n    } else if (packet.op === Constants.OPCodes.HEARTBEAT) {\n      this.client.ws.send({\n        op: Constants.OPCodes.HEARTBEAT,\n        d: this.client.ws.sequence,\n      });\n      this.ws.client.emit('debug', 'Received gateway heartbeat');\n    }\n\n    if (this.ws.status === Constants.Status.RECONNECTING) {\n      this.ws.reconnecting = false;\n      this.ws.checkIfReady();\n    }\n\n    this.ws.setSequence(packet.s);\n\n    if (this.ws.disabledEvents[packet.t] !== undefined) return false;\n\n    if (this.ws.status !== Constants.Status.READY) {\n      if (BeforeReadyWhitelist.indexOf(packet.t) === -1) {\n        this.queue.push(packet);\n        return false;\n      }\n    }\n\n    if (!queue && this.queue.length > 0) this.handleQueue();\n    if (this.handlers[packet.t]) return this.handlers[packet.t].handle(packet);\n    return false;\n  }\n}\n\nmodule.exports = WebSocketPacketManager;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/WebSocketPacketManager.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/AbstractHandler.js":
/*!******************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/AbstractHandler.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("class AbstractHandler {\n  constructor(packetManager) {\n    this.packetManager = packetManager;\n  }\n\n  handle(packet) {\n    return packet;\n  }\n}\n\nmodule.exports = AbstractHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/AbstractHandler.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/ChannelCreate.js":
/*!****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/ChannelCreate.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass ChannelCreateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.ChannelCreate.handle(data);\n  }\n}\n\n/**\n * Emitted whenever a channel is created.\n * @event Client#channelCreate\n * @param {Channel} channel The channel that was created\n */\n\nmodule.exports = ChannelCreateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/ChannelCreate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/ChannelDelete.js":
/*!****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/ChannelDelete.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass ChannelDeleteHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const response = client.actions.ChannelDelete.handle(data);\n    if (response.channel) client.emit(Constants.Events.CHANNEL_DELETE, response.channel);\n  }\n}\n\n/**\n * Emitted whenever a channel is deleted.\n * @event Client#channelDelete\n * @param {Channel} channel The channel that was deleted\n */\n\nmodule.exports = ChannelDeleteHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/ChannelDelete.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/ChannelPinsUpdate.js":
/*!********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/ChannelPinsUpdate.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\n/*\n{ t: 'CHANNEL_PINS_UPDATE',\n  s: 666,\n  op: 0,\n  d:\n   { last_pin_timestamp: '2016-08-28T17:37:13.171774+00:00',\n     channel_id: '314866471639044027' } }\n*/\n\nclass ChannelPinsUpdate extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const channel = client.channels.get(data.channel_id);\n    const time = new Date(data.last_pin_timestamp);\n    if (channel && time) {\n      // Discord sends null for last_pin_timestamp if the last pinned message was removed\n      channel.lastPinTimestamp = time.getTime() || null;\n\n      client.emit(Constants.Events.CHANNEL_PINS_UPDATE, channel, time);\n    }\n  }\n}\n\n/**\n * Emitted whenever the pins of a channel are updated. Due to the nature of the WebSocket event, not much information\n * can be provided easily here - you need to manually check the pins yourself.\n * <warn>The `time` parameter will be a Unix Epoch Date object when there are no pins left.</warn>\n * @event Client#channelPinsUpdate\n * @param {Channel} channel The channel that the pins update occured in\n * @param {Date} time The time when the last pinned message was pinned\n */\n\nmodule.exports = ChannelPinsUpdate;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/ChannelPinsUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/ChannelUpdate.js":
/*!****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/ChannelUpdate.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass ChannelUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.ChannelUpdate.handle(data);\n  }\n}\n\nmodule.exports = ChannelUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/ChannelUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildBanAdd.js":
/*!**************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildBanAdd.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// ##untested handler##\n\nconst AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass GuildBanAddHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const guild = client.guilds.get(data.guild_id);\n    const user = client.users.get(data.user.id);\n    if (guild && user) client.emit(Constants.Events.GUILD_BAN_ADD, guild, user);\n  }\n}\n\n/**\n * Emitted whenever a member is banned from a guild.\n * @event Client#guildBanAdd\n * @param {Guild} guild The guild that the ban occurred in\n * @param {User} user The user that was banned\n */\n\nmodule.exports = GuildBanAddHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildBanAdd.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildBanRemove.js":
/*!*****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildBanRemove.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// ##untested handler##\n\nconst AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildBanRemoveHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.GuildBanRemove.handle(data);\n  }\n}\n\n/**\n * Emitted whenever a member is unbanned from a guild.\n * @event Client#guildBanRemove\n * @param {Guild} guild The guild that the unban occurred in\n * @param {User} user The user that was unbanned\n */\n\nmodule.exports = GuildBanRemoveHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildBanRemove.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildCreate.js":
/*!**************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildCreate.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildCreateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n\n    const guild = client.guilds.get(data.id);\n    if (guild) {\n      if (!guild.available && !data.unavailable) {\n        // A newly available guild\n        guild.setup(data);\n        this.packetManager.ws.checkIfReady();\n      }\n    } else {\n      // A new guild\n      client.dataManager.newGuild(data);\n    }\n  }\n}\n\nmodule.exports = GuildCreateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildCreate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildDelete.js":
/*!**************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildDelete.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass GuildDeleteHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const response = client.actions.GuildDelete.handle(data);\n    if (response.guild) client.emit(Constants.Events.GUILD_DELETE, response.guild);\n  }\n}\n\n/**\n * Emitted whenever a guild is deleted/left.\n * @event Client#guildDelete\n * @param {Guild} guild The guild that was deleted\n */\n\nmodule.exports = GuildDeleteHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildDelete.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildEmojisUpdate.js":
/*!********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildEmojisUpdate.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildEmojisUpdate extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.GuildEmojisUpdate.handle(data);\n  }\n}\n\nmodule.exports = GuildEmojisUpdate;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildEmojisUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildIntegrationsUpdate.js":
/*!**************************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildIntegrationsUpdate.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst { Events } = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass GuildIntegrationsHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const guild = client.guilds.get(data.guild_id);\n    if (guild) client.emit(Events.GUILD_INTEGRATIONS_UPDATE, guild);\n  }\n}\n\nmodule.exports = GuildIntegrationsHandler;\n\n/**\n * Emitted whenever a guild integration is updated\n * @event Client#guildIntegrationsUpdate\n * @param {Guild} guild The guild whose integrations were updated\n */\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildIntegrationsUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildMemberAdd.js":
/*!*****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildMemberAdd.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// ##untested handler##\n\nconst AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildMemberAddHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const guild = client.guilds.get(data.guild_id);\n    if (guild) {\n      guild.memberCount++;\n      guild._addMember(data);\n    }\n  }\n}\n\nmodule.exports = GuildMemberAddHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildMemberAdd.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildMemberRemove.js":
/*!********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildMemberRemove.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// ##untested handler##\n\nconst AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildMemberRemoveHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.GuildMemberRemove.handle(data);\n  }\n}\n\nmodule.exports = GuildMemberRemoveHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildMemberRemove.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildMemberUpdate.js":
/*!********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildMemberUpdate.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("// ##untested handler##\n\nconst AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildMemberUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n\n    const guild = client.guilds.get(data.guild_id);\n    if (guild) {\n      const member = guild.members.get(data.user.id);\n      if (member) guild._updateMember(member, data);\n    }\n  }\n}\n\nmodule.exports = GuildMemberUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildMemberUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildMembersChunk.js":
/*!********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildMembersChunk.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n// Uncomment in v12\n// const Collection = require('../../../../util/Collection');\n\nclass GuildMembersChunkHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const guild = client.guilds.get(data.guild_id);\n    if (!guild) return;\n\n    // Uncomment in v12\n    // const members = new Collection();\n    //\n    // for (const member of data.members) members.set(member.id, guild._addMember(member, false));\n\n    const members = data.members.map(member => guild._addMember(member, false));\n\n    client.emit(Constants.Events.GUILD_MEMBERS_CHUNK, members, guild);\n\n    client.ws.lastHeartbeatAck = true;\n  }\n}\n\n/**\n * Emitted whenever a chunk of guild members is received (all members come from the same guild).\n * @event Client#guildMembersChunk\n * @param {GuildMember[]} members The members in the chunk\n * @param {Guild} guild The guild related to the member chunk\n */\n\nmodule.exports = GuildMembersChunkHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildMembersChunk.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildRoleCreate.js":
/*!******************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildRoleCreate.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildRoleCreateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.GuildRoleCreate.handle(data);\n  }\n}\n\nmodule.exports = GuildRoleCreateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildRoleCreate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildRoleDelete.js":
/*!******************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildRoleDelete.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildRoleDeleteHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.GuildRoleDelete.handle(data);\n  }\n}\n\nmodule.exports = GuildRoleDeleteHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildRoleDelete.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildRoleUpdate.js":
/*!******************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildRoleUpdate.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildRoleUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.GuildRoleUpdate.handle(data);\n  }\n}\n\nmodule.exports = GuildRoleUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildRoleUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildSync.js":
/*!************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildSync.js ***!
  \************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildSyncHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.GuildSync.handle(data);\n  }\n}\n\nmodule.exports = GuildSyncHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildSync.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/GuildUpdate.js":
/*!**************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/GuildUpdate.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass GuildUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.GuildUpdate.handle(data);\n  }\n}\n\nmodule.exports = GuildUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/GuildUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/MessageCreate.js":
/*!****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/MessageCreate.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass MessageCreateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const response = client.actions.MessageCreate.handle(data);\n    if (response.message) client.emit(Constants.Events.MESSAGE_CREATE, response.message);\n  }\n}\n\n/**\n * Emitted whenever a message is created.\n * @event Client#message\n * @param {Message} message The created message\n */\n\nmodule.exports = MessageCreateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/MessageCreate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/MessageDelete.js":
/*!****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/MessageDelete.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass MessageDeleteHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const response = client.actions.MessageDelete.handle(data);\n    if (response.message) client.emit(Constants.Events.MESSAGE_DELETE, response.message);\n  }\n}\n\n/**\n * Emitted whenever a message is deleted.\n * @event Client#messageDelete\n * @param {Message} message The deleted message\n */\n\nmodule.exports = MessageDeleteHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/MessageDelete.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/MessageDeleteBulk.js":
/*!********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/MessageDeleteBulk.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass MessageDeleteBulkHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.MessageDeleteBulk.handle(data);\n  }\n}\n\n/**\n * Emitted whenever messages are deleted in bulk.\n * @event Client#messageDeleteBulk\n * @param {Collection<Snowflake, Message>} messages The deleted messages, mapped by their ID\n */\n\nmodule.exports = MessageDeleteBulkHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/MessageDeleteBulk.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/MessageReactionAdd.js":
/*!*********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/MessageReactionAdd.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass MessageReactionAddHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.MessageReactionAdd.handle(data);\n  }\n}\n\nmodule.exports = MessageReactionAddHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/MessageReactionAdd.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/MessageReactionRemove.js":
/*!************************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/MessageReactionRemove.js ***!
  \************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass MessageReactionRemove extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.MessageReactionRemove.handle(data);\n  }\n}\n\nmodule.exports = MessageReactionRemove;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/MessageReactionRemove.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/MessageReactionRemoveAll.js":
/*!***************************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/MessageReactionRemoveAll.js ***!
  \***************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass MessageReactionRemoveAll extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.MessageReactionRemoveAll.handle(data);\n  }\n}\n\nmodule.exports = MessageReactionRemoveAll;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/MessageReactionRemoveAll.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/MessageUpdate.js":
/*!****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/MessageUpdate.js ***!
  \****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass MessageUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.MessageUpdate.handle(data);\n  }\n}\n\nmodule.exports = MessageUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/MessageUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/PresenceUpdate.js":
/*!*****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/PresenceUpdate.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../../../../util/Util */ \"./src/util/Util.js\");\n\nclass PresenceUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    let user = client.users.get(data.user.id);\n    const guild = client.guilds.get(data.guild_id);\n\n    // Step 1\n    if (!user) {\n      if (data.user.username) {\n        user = client.dataManager.newUser(data.user);\n      } else {\n        return;\n      }\n    }\n\n    const oldUser = Util.cloneObject(user);\n    user.patch(data.user);\n    if (!user.equals(oldUser)) {\n      client.emit(Constants.Events.USER_UPDATE, oldUser, user);\n    }\n\n    if (guild) {\n      let member = guild.members.get(user.id);\n      if (!member && data.status !== 'offline') {\n        member = guild._addMember({\n          user,\n          roles: data.roles,\n          deaf: false,\n          mute: false,\n        }, false);\n        client.emit(Constants.Events.GUILD_MEMBER_AVAILABLE, member);\n      }\n      if (member) {\n        if (client.listenerCount(Constants.Events.PRESENCE_UPDATE) === 0) {\n          guild._setPresence(user.id, data);\n          return;\n        }\n        const oldMember = Util.cloneObject(member);\n        if (member.presence) {\n          oldMember.frozenPresence = Util.cloneObject(member.presence);\n        }\n        guild._setPresence(user.id, data);\n        client.emit(Constants.Events.PRESENCE_UPDATE, oldMember, member);\n      } else {\n        guild._setPresence(user.id, data);\n      }\n    }\n  }\n}\n\n/**\n * Emitted whenever a guild member's presence changes, or they change one of their details.\n * @event Client#presenceUpdate\n * @param {GuildMember} oldMember The member before the presence update\n * @param {GuildMember} newMember The member after the presence update\n */\n\n/**\n * Emitted whenever a user's details (e.g. username) are changed.\n * @event Client#userUpdate\n * @param {User} oldUser The user before the update\n * @param {User} newUser The user after the update\n */\n\n/**\n * Emitted whenever a member becomes available in a large guild.\n * @event Client#guildMemberAvailable\n * @param {GuildMember} member The member that became available\n */\n\nmodule.exports = PresenceUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/PresenceUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/Ready.js":
/*!********************************************************!*\
  !*** ./src/client/websocket/packets/handlers/Ready.js ***!
  \********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nconst ClientUser = __webpack_require__(/*! ../../../../structures/ClientUser */ \"./src/structures/ClientUser.js\");\n\nclass ReadyHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n\n    client.ws.heartbeat();\n\n    data.user.user_settings = data.user_settings;\n    data.user.user_guild_settings = data.user_guild_settings;\n\n    const clientUser = new ClientUser(client, data.user);\n    client.user = clientUser;\n    client.readyAt = new Date();\n    client.users.set(clientUser.id, clientUser);\n\n    for (const guild of data.guilds) if (!client.guilds.has(guild.id)) client.dataManager.newGuild(guild);\n    for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM);\n\n    for (const relation of data.relationships) {\n      const user = client.dataManager.newUser(relation.user);\n      if (relation.type === 1) {\n        client.user.friends.set(user.id, user);\n      } else if (relation.type === 2) {\n        client.user.blocked.set(user.id, user);\n      }\n    }\n\n    data.presences = data.presences || [];\n    for (const presence of data.presences) {\n      client.dataManager.newUser(presence.user);\n      client._setPresence(presence.user.id, presence);\n    }\n\n    if (data.notes) {\n      for (const user in data.notes) {\n        let note = data.notes[user];\n        if (!note.length) note = null;\n\n        client.user.notes.set(user, note);\n      }\n    }\n\n    if (!client.user.bot && client.options.sync) client.setInterval(client.syncGuilds.bind(client), 30000);\n\n    if (!client.users.has('1')) {\n      client.dataManager.newUser({\n        id: '1',\n        username: 'Clyde',\n        discriminator: '0000',\n        avatar: 'https://discordapp.com/assets/f78426a064bc9dd24847519259bc42af.png',\n        bot: true,\n        status: 'online',\n        game: null,\n        verified: true,\n      });\n    }\n\n    const t = client.setTimeout(() => {\n      client.ws.connection.triggerReady();\n    }, 1200 * data.guilds.length);\n\n    client.setMaxListeners(data.guilds.length + 10);\n\n    client.once('ready', () => {\n      client.syncGuilds();\n      client.setMaxListeners(10);\n      client.clearTimeout(t);\n    });\n\n    const ws = this.packetManager.ws;\n\n    ws.sessionID = data.session_id;\n    ws._trace = data._trace;\n    client.emit('debug', `READY ${ws._trace.join(' -> ')} ${ws.sessionID}`);\n    ws.checkIfReady();\n  }\n}\n\nmodule.exports = ReadyHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/Ready.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/RelationshipAdd.js":
/*!******************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/RelationshipAdd.js ***!
  \******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass RelationshipAddHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    if (data.type === 1) {\n      client.fetchUser(data.id).then(user => {\n        client.user.friends.set(user.id, user);\n      });\n    } else if (data.type === 2) {\n      client.fetchUser(data.id).then(user => {\n        client.user.blocked.set(user.id, user);\n      });\n    }\n  }\n}\n\nmodule.exports = RelationshipAddHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/RelationshipAdd.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/RelationshipRemove.js":
/*!*********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/RelationshipRemove.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass RelationshipRemoveHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    if (data.type === 2) {\n      if (client.user.blocked.has(data.id)) {\n        client.user.blocked.delete(data.id);\n      }\n    } else if (data.type === 1) {\n      if (client.user.friends.has(data.id)) {\n        client.user.friends.delete(data.id);\n      }\n    }\n  }\n}\n\nmodule.exports = RelationshipRemoveHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/RelationshipRemove.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/Resumed.js":
/*!**********************************************************!*\
  !*** ./src/client/websocket/packets/handlers/Resumed.js ***!
  \**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass ResumedHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const ws = client.ws.connection;\n\n    ws._trace = packet.d._trace;\n\n    ws.status = Constants.Status.READY;\n    this.packetManager.handleQueue();\n\n    const replayed = ws.sequence - ws.closeSequence;\n\n    ws.debug(`RESUMED ${ws._trace.join(' -> ')} | replayed ${replayed} events.`);\n    client.emit(Constants.Events.RESUME, replayed);\n    ws.heartbeat();\n  }\n}\n\n/**\n * Emitted whenever a WebSocket resumes.\n * @event Client#resume\n * @param {number} replayed The number of events that were replayed\n */\n\nmodule.exports = ResumedHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/Resumed.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/TypingStart.js":
/*!**************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/TypingStart.js ***!
  \**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass TypingStartHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const channel = client.channels.get(data.channel_id);\n    const user = client.users.get(data.user_id);\n    const timestamp = new Date(data.timestamp * 1000);\n\n    if (channel && user) {\n      if (channel.type === 'voice') {\n        client.emit(Constants.Events.WARN, `Discord sent a typing packet to voice channel ${channel.id}`);\n        return;\n      }\n      if (channel._typing.has(user.id)) {\n        const typing = channel._typing.get(user.id);\n        typing.lastTimestamp = timestamp;\n        typing.resetTimeout(tooLate(channel, user));\n      } else {\n        channel._typing.set(user.id, new TypingData(client, timestamp, timestamp, tooLate(channel, user)));\n        client.emit(Constants.Events.TYPING_START, channel, user);\n      }\n    }\n  }\n}\n\nclass TypingData {\n  constructor(client, since, lastTimestamp, _timeout) {\n    this.client = client;\n    this.since = since;\n    this.lastTimestamp = lastTimestamp;\n    this._timeout = _timeout;\n  }\n\n  resetTimeout(_timeout) {\n    this.client.clearTimeout(this._timeout);\n    this._timeout = _timeout;\n  }\n\n  get elapsedTime() {\n    return Date.now() - this.since;\n  }\n}\n\nfunction tooLate(channel, user) {\n  return channel.client.setTimeout(() => {\n    channel.client.emit(Constants.Events.TYPING_STOP, channel, user, channel._typing.get(user.id));\n    channel._typing.delete(user.id);\n  }, 6000);\n}\n\n/**\n * Emitted whenever a user starts typing in a channel.\n * @event Client#typingStart\n * @param {Channel} channel The channel the user started typing in\n * @param {User} user The user that started typing\n */\n\n/**\n * Emitted whenever a user stops typing in a channel.\n * @event Client#typingStop\n * @param {Channel} channel The channel the user stopped typing in\n * @param {User} user The user that stopped typing\n */\n\nmodule.exports = TypingStartHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/TypingStart.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/UserGuildSettingsUpdate.js":
/*!**************************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/UserGuildSettingsUpdate.js ***!
  \**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\nconst ClientUserGuildSettings = __webpack_require__(/*! ../../../../structures/ClientUserGuildSettings */ \"./src/structures/ClientUserGuildSettings.js\");\n\nclass UserGuildSettingsUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const settings = client.user.guildSettings.get(packet.d.guild_id);\n    if (settings) settings.patch(packet.d);\n    else client.user.guildSettings.set(packet.d.guild_id, new ClientUserGuildSettings(packet.d, client));\n    client.emit(Constants.Events.USER_GUILD_SETTINGS_UPDATE, client.user.guildSettings.get(packet.d.guild_id));\n  }\n}\n\n/**\n * Emitted whenever the client user's settings update.\n * @event Client#clientUserGuildSettingsUpdate\n * @param {ClientUserGuildSettings} clientUserGuildSettings The new client user guild settings\n */\n\nmodule.exports = UserGuildSettingsUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/UserGuildSettingsUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/UserNoteUpdate.js":
/*!*****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/UserNoteUpdate.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass UserNoteUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n\n    client.actions.UserNoteUpdate.handle(data);\n  }\n}\n\nmodule.exports = UserNoteUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/UserNoteUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/UserSettingsUpdate.js":
/*!*********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/UserSettingsUpdate.js ***!
  \*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass UserSettingsUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    client.user.settings.patch(packet.d);\n    client.emit(Constants.Events.USER_SETTINGS_UPDATE, client.user.settings);\n  }\n}\n\n/**\n * Emitted when the client user's settings update.\n * @event Client#clientUserSettingsUpdate\n * @param {ClientUserSettings} clientUserSettings The new client user settings\n */\n\nmodule.exports = UserSettingsUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/UserSettingsUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/UserUpdate.js":
/*!*************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/UserUpdate.js ***!
  \*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nclass UserUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.actions.UserUpdate.handle(data);\n  }\n}\n\nmodule.exports = UserUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/UserUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/VoiceServerUpdate.js":
/*!********************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/VoiceServerUpdate.js ***!
  \********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\n/*\n{\n    \"token\": \"my_token\",\n    \"guild_id\": \"41771983423143937\",\n    \"endpoint\": \"smart.loyal.discord.gg\"\n}\n*/\n\nclass VoiceServerUpdate extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    client.emit('self.voiceServer', data);\n  }\n}\n\nmodule.exports = VoiceServerUpdate;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/VoiceServerUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/VoiceStateUpdate.js":
/*!*******************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/VoiceStateUpdate.js ***!
  \*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\n\nconst Constants = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../../../../util/Util */ \"./src/util/Util.js\");\n\nclass VoiceStateUpdateHandler extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n\n    const guild = client.guilds.get(data.guild_id);\n    if (guild) {\n      const member = guild.members.get(data.user_id);\n      if (member) {\n        const oldVoiceChannelMember = Util.cloneObject(member);\n        if (member.voiceChannel && member.voiceChannel.id !== data.channel_id) {\n          member.voiceChannel.members.delete(oldVoiceChannelMember.id);\n        }\n\n        // If the member left the voice channel, unset their speaking property\n        if (!data.channel_id) member.speaking = null;\n\n        if (member.user.id === client.user.id && data.channel_id) {\n          client.emit('self.voiceStateUpdate', data);\n        }\n\n        const newChannel = client.channels.get(data.channel_id);\n        if (newChannel) {\n          newChannel.members.set(member.id, member);\n          member.guild.channels.set(data.channel_id, newChannel);\n        }\n\n        member.serverMute = data.mute;\n        member.serverDeaf = data.deaf;\n        member.selfMute = data.self_mute;\n        member.selfDeaf = data.self_deaf;\n        member.voiceSessionID = data.session_id;\n        member.voiceChannelID = data.channel_id;\n        client.emit(Constants.Events.VOICE_STATE_UPDATE, oldVoiceChannelMember, member);\n      }\n    }\n  }\n}\n\n/**\n * Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.\n * @event Client#voiceStateUpdate\n * @param {GuildMember} oldMember The member before the voice state update\n * @param {GuildMember} newMember The member after the voice state update\n */\n\nmodule.exports = VoiceStateUpdateHandler;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/VoiceStateUpdate.js?");

/***/ }),

/***/ "./src/client/websocket/packets/handlers/WebhooksUpdate.js":
/*!*****************************************************************!*\
  !*** ./src/client/websocket/packets/handlers/WebhooksUpdate.js ***!
  \*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const AbstractHandler = __webpack_require__(/*! ./AbstractHandler */ \"./src/client/websocket/packets/handlers/AbstractHandler.js\");\nconst { Events } = __webpack_require__(/*! ../../../../util/Constants */ \"./src/util/Constants.js\");\n\nclass WebhooksUpdate extends AbstractHandler {\n  handle(packet) {\n    const client = this.packetManager.client;\n    const data = packet.d;\n    const channel = client.channels.get(data.channel_id);\n    if (channel) client.emit(Events.WEBHOOKS_UPDATE, channel);\n  }\n}\n\n/**\n * Emitted whenever a guild text channel has its webhooks changed.\n * @event Client#webhookUpdate\n * @param {TextChannel} channel The channel that had a webhook update\n */\n\nmodule.exports = WebhooksUpdate;\n\n\n//# sourceURL=webpack:///./src/client/websocket/packets/handlers/WebhooksUpdate.js?");

/***/ }),

/***/ "./src/index.js":
/*!**********************!*\
  !*** ./src/index.js ***!
  \**********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Util = __webpack_require__(/*! ./util/Util */ \"./src/util/Util.js\");\n\nmodule.exports = {\n  // \"Root\" classes (starting points)\n  Client: __webpack_require__(/*! ./client/Client */ \"./src/client/Client.js\"),\n  Shard: __webpack_require__(/*! ./sharding/Shard */ 7),\n  ShardClientUtil: __webpack_require__(/*! ./sharding/ShardClientUtil */ 8),\n  ShardingManager: __webpack_require__(/*! ./sharding/ShardingManager */ 9),\n  WebhookClient: __webpack_require__(/*! ./client/WebhookClient */ \"./src/client/WebhookClient.js\"),\n\n  // Utilities\n  Collection: __webpack_require__(/*! ./util/Collection */ \"./src/util/Collection.js\"),\n  Constants: __webpack_require__(/*! ./util/Constants */ \"./src/util/Constants.js\"),\n  DiscordAPIError: __webpack_require__(/*! ./client/rest/DiscordAPIError */ \"./src/client/rest/DiscordAPIError.js\"),\n  EvaluatedPermissions: __webpack_require__(/*! ./util/Permissions */ \"./src/util/Permissions.js\"),\n  Permissions: __webpack_require__(/*! ./util/Permissions */ \"./src/util/Permissions.js\"),\n  Snowflake: __webpack_require__(/*! ./util/Snowflake */ \"./src/util/Snowflake.js\"),\n  SnowflakeUtil: __webpack_require__(/*! ./util/Snowflake */ \"./src/util/Snowflake.js\"),\n  Util: Util,\n  util: Util,\n  version: __webpack_require__(/*! ../package */ \"./package.json\").version,\n\n  // Shortcuts to Util methods\n  escapeMarkdown: Util.escapeMarkdown,\n  fetchRecommendedShards: Util.fetchRecommendedShards,\n  splitMessage: Util.splitMessage,\n\n  // Structures\n  Attachment: __webpack_require__(/*! ./structures/Attachment */ \"./src/structures/Attachment.js\"),\n  CategoryChannel: __webpack_require__(/*! ./structures/CategoryChannel */ \"./src/structures/CategoryChannel.js\"),\n  Channel: __webpack_require__(/*! ./structures/Channel */ \"./src/structures/Channel.js\"),\n  ClientUser: __webpack_require__(/*! ./structures/ClientUser */ \"./src/structures/ClientUser.js\"),\n  ClientUserSettings: __webpack_require__(/*! ./structures/ClientUserSettings */ \"./src/structures/ClientUserSettings.js\"),\n  Collector: __webpack_require__(/*! ./structures/interfaces/Collector */ \"./src/structures/interfaces/Collector.js\"),\n  DMChannel: __webpack_require__(/*! ./structures/DMChannel */ \"./src/structures/DMChannel.js\"),\n  Emoji: __webpack_require__(/*! ./structures/Emoji */ \"./src/structures/Emoji.js\"),\n  Game: __webpack_require__(/*! ./structures/Presence */ \"./src/structures/Presence.js\").Game,\n  GroupDMChannel: __webpack_require__(/*! ./structures/GroupDMChannel */ \"./src/structures/GroupDMChannel.js\"),\n  Guild: __webpack_require__(/*! ./structures/Guild */ \"./src/structures/Guild.js\"),\n  GuildAuditLogs: __webpack_require__(/*! ./structures/GuildAuditLogs */ \"./src/structures/GuildAuditLogs.js\"),\n  GuildChannel: __webpack_require__(/*! ./structures/GuildChannel */ \"./src/structures/GuildChannel.js\"),\n  GuildMember: __webpack_require__(/*! ./structures/GuildMember */ \"./src/structures/GuildMember.js\"),\n  Invite: __webpack_require__(/*! ./structures/Invite */ \"./src/structures/Invite.js\"),\n  Message: __webpack_require__(/*! ./structures/Message */ \"./src/structures/Message.js\"),\n  MessageAttachment: __webpack_require__(/*! ./structures/MessageAttachment */ \"./src/structures/MessageAttachment.js\"),\n  MessageCollector: __webpack_require__(/*! ./structures/MessageCollector */ \"./src/structures/MessageCollector.js\"),\n  MessageEmbed: __webpack_require__(/*! ./structures/MessageEmbed */ \"./src/structures/MessageEmbed.js\"),\n  MessageMentions: __webpack_require__(/*! ./structures/MessageMentions */ \"./src/structures/MessageMentions.js\"),\n  MessageReaction: __webpack_require__(/*! ./structures/MessageReaction */ \"./src/structures/MessageReaction.js\"),\n  OAuth2Application: __webpack_require__(/*! ./structures/OAuth2Application */ \"./src/structures/OAuth2Application.js\"),\n  ClientOAuth2Application: __webpack_require__(/*! ./structures/OAuth2Application */ \"./src/structures/OAuth2Application.js\"),\n  PartialGuild: __webpack_require__(/*! ./structures/PartialGuild */ \"./src/structures/PartialGuild.js\"),\n  PartialGuildChannel: __webpack_require__(/*! ./structures/PartialGuildChannel */ \"./src/structures/PartialGuildChannel.js\"),\n  PermissionOverwrites: __webpack_require__(/*! ./structures/PermissionOverwrites */ \"./src/structures/PermissionOverwrites.js\"),\n  Presence: __webpack_require__(/*! ./structures/Presence */ \"./src/structures/Presence.js\").Presence,\n  ReactionEmoji: __webpack_require__(/*! ./structures/ReactionEmoji */ \"./src/structures/ReactionEmoji.js\"),\n  ReactionCollector: __webpack_require__(/*! ./structures/ReactionCollector */ \"./src/structures/ReactionCollector.js\"),\n  RichEmbed: __webpack_require__(/*! ./structures/RichEmbed */ \"./src/structures/RichEmbed.js\"),\n  Role: __webpack_require__(/*! ./structures/Role */ \"./src/structures/Role.js\"),\n  TextChannel: __webpack_require__(/*! ./structures/TextChannel */ \"./src/structures/TextChannel.js\"),\n  User: __webpack_require__(/*! ./structures/User */ \"./src/structures/User.js\"),\n  VoiceChannel: __webpack_require__(/*! ./structures/VoiceChannel */ \"./src/structures/VoiceChannel.js\"),\n  Webhook: __webpack_require__(/*! ./structures/Webhook */ \"./src/structures/Webhook.js\"),\n};\n\n\n//# sourceURL=webpack:///./src/index.js?");

/***/ }),

/***/ "./src/structures/Attachment.js":
/*!**************************************!*\
  !*** ./src/structures/Attachment.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Represents an attachment in a message.\n * @param {BufferResolvable|Stream} file The file\n * @param {string} [name] The name of the file, if any\n */\nclass Attachment {\n  constructor(file, name) {\n    this.file = null;\n    if (name) this.setAttachment(file, name);\n    else this._attach(file);\n  }\n\n  /**\n    * The name of the file\n    * @type {?string}\n    * @readonly\n    */\n  get name() {\n    return this.file.name;\n  }\n\n  /**\n    * The file\n    * @type {?BufferResolvable|Stream}\n    * @readonly\n    */\n  get attachment() {\n    return this.file.attachment;\n  }\n\n  /**\n    * Set the file of this attachment.\n    * @param {BufferResolvable|Stream} file The file\n    * @param {string} name The name of the file\n    * @returns {Attachment} This attachment\n    */\n  setAttachment(file, name) {\n    this.file = { attachment: file, name };\n    return this;\n  }\n\n  /**\n    * Set the file of this attachment.\n    * @param {BufferResolvable|Stream} attachment The file\n    * @returns {Attachment} This attachment\n    */\n  setFile(attachment) {\n    this.file = { attachment };\n    return this;\n  }\n\n  /**\n    * Set the name of this attachment.\n    * @param {string} name The name of the image\n    * @returns {Attachment} This attachment\n    */\n  setName(name) {\n    this.file.name = name;\n    return this;\n  }\n\n  /**\n    * Set the file of this attachment.\n    * @param {BufferResolvable|Stream} file The file\n    * @param {string} name The name of the file\n    * @returns {void}\n    * @private\n    */\n  _attach(file, name) {\n    if (typeof file === 'string') this.file = file;\n    else this.setAttachment(file, name);\n  }\n}\n\nmodule.exports = Attachment;\n\n\n//# sourceURL=webpack:///./src/structures/Attachment.js?");

/***/ }),

/***/ "./src/structures/CategoryChannel.js":
/*!*******************************************!*\
  !*** ./src/structures/CategoryChannel.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const GuildChannel = __webpack_require__(/*! ./GuildChannel */ \"./src/structures/GuildChannel.js\");\n\n/**\n * Represents a guild category channel on Discord.\n * @extends {GuildChannel}\n */\nclass CategoryChannel extends GuildChannel {\n  constructor(guild, data) {\n    super(guild, data);\n    this.type = 'category';\n  }\n  /**\n   * The channels that are part of this category\n   * @type {?Collection<Snowflake, GuildChannel>}\n   * @readonly\n   */\n  get children() {\n    return this.guild.channels.filter(c => c.parentID === this.id);\n  }\n}\n\nmodule.exports = CategoryChannel;\n\n\n//# sourceURL=webpack:///./src/structures/CategoryChannel.js?");

/***/ }),

/***/ "./src/structures/Channel.js":
/*!***********************************!*\
  !*** ./src/structures/Channel.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Snowflake = __webpack_require__(/*! ../util/Snowflake */ \"./src/util/Snowflake.js\");\n\n/**\n * Represents any channel on Discord.\n */\nclass Channel {\n  constructor(client, data) {\n    /**\n     * The client that instantiated the Channel\n     * @name Channel#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    /**\n     * The type of the channel, either:\n     * * `dm` - a DM channel\n     * * `group` - a Group DM channel\n     * * `text` - a guild text channel\n     * * `voice` - a guild voice channel\n     * * `category` - a guild category channel\n     * @type {string}\n     */\n    this.type = null;\n\n    /**\n     * Whether the channel has been deleted\n     * @type {boolean}\n     */\n    this.deleted = false;\n\n    if (data) this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The unique ID of the channel\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n  }\n\n  /**\n   * The timestamp the channel was created at\n   * @type {number}\n   * @readonly\n   */\n  get createdTimestamp() {\n    return Snowflake.deconstruct(this.id).timestamp;\n  }\n\n  /**\n   * The time the channel was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * Deletes the channel.\n   * @returns {Promise<Channel>}\n   * @example\n   * // Delete the channel\n   * channel.delete()\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  delete() {\n    return this.client.rest.methods.deleteChannel(this);\n  }\n}\n\nmodule.exports = Channel;\n\n\n//# sourceURL=webpack:///./src/structures/Channel.js?");

/***/ }),

/***/ "./src/structures/ClientUser.js":
/*!**************************************!*\
  !*** ./src/structures/ClientUser.js ***!
  \**************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const User = __webpack_require__(/*! ./User */ \"./src/structures/User.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst ClientUserSettings = __webpack_require__(/*! ./ClientUserSettings */ \"./src/structures/ClientUserSettings.js\");\nconst ClientUserGuildSettings = __webpack_require__(/*! ./ClientUserGuildSettings */ \"./src/structures/ClientUserGuildSettings.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Represents the logged in client's Discord user.\n * @extends {User}\n */\nclass ClientUser extends User {\n  setup(data) {\n    super.setup(data);\n\n    /**\n     * Whether or not this account has been verified\n     * @type {boolean}\n     */\n    this.verified = data.verified;\n\n    /**\n     * The email of this account\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {?string}\n     */\n    this.email = data.email;\n    this.localPresence = {};\n    this._typing = new Map();\n\n    /**\n     * A Collection of friends for the logged in user\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {Collection<Snowflake, User>}\n     */\n    this.friends = new Collection();\n\n    /**\n     * A Collection of blocked users for the logged in user\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {Collection<Snowflake, User>}\n     */\n    this.blocked = new Collection();\n\n    /**\n     * A Collection of notes for the logged in user\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {Collection<Snowflake, string>}\n     */\n    this.notes = new Collection();\n\n    /**\n     * If the user has Discord premium (nitro)\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {?boolean}\n     */\n    this.premium = typeof data.premium === 'boolean' ? data.premium : null;\n\n    /**\n     * If the user has MFA enabled on their account\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {?boolean}\n     */\n    this.mfaEnabled = typeof data.mfa_enabled === 'boolean' ? data.mfa_enabled : null;\n\n    /**\n     * If the user has ever used a mobile device on Discord\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {?boolean}\n     */\n    this.mobile = typeof data.mobile === 'boolean' ? data.mobile : null;\n\n    /**\n     * Various settings for this user\n     * <warn>This is only filled when using a user account.</warn>\n     * @type {?ClientUserSettings}\n     */\n    this.settings = data.user_settings ? new ClientUserSettings(this, data.user_settings) : null;\n\n    /**\n     * All of the user's guild settings\n     * <warn>This is only filled when using a user account</warn>\n     * @type {Collection<Snowflake, ClientUserGuildSettings>}\n     */\n    this.guildSettings = new Collection();\n    if (data.user_guild_settings) {\n      for (const settings of data.user_guild_settings) {\n        this.guildSettings.set(settings.guild_id, new ClientUserGuildSettings(settings, this.client));\n      }\n    }\n  }\n\n  edit(data) {\n    return this.client.rest.methods.updateCurrentUser(data);\n  }\n\n  /**\n   * Set the username of the logged in client.\n   * <info>Changing usernames in Discord is heavily rate limited, with only 2 requests\n   * every hour. Use this sparingly!</info>\n   * @param {string} username The new username\n   * @param {string} [password] Current password (only for user accounts)\n   * @returns {Promise<ClientUser>}\n   * @example\n   * // Set username\n   * client.user.setUsername('discordjs')\n   *   .then(user => console.log(`My new username is ${user.username}`))\n   *   .catch(console.error);\n   */\n  setUsername(username, password) {\n    return this.client.rest.methods.updateCurrentUser({ username }, password);\n  }\n\n  /**\n   * Changes the email for the client user's account.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {string} email New email to change to\n   * @param {string} password Current password\n   * @returns {Promise<ClientUser>}\n   * @example\n   * // Set email\n   * client.user.setEmail('bob@gmail.com', 'some amazing password 123')\n   *   .then(user => console.log(`My new email is ${user.email}`))\n   *   .catch(console.error);\n   */\n  setEmail(email, password) {\n    return this.client.rest.methods.updateCurrentUser({ email }, password);\n  }\n\n  /**\n   * Changes the password for the client user's account.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {string} newPassword New password to change to\n   * @param {string} oldPassword Current password\n   * @returns {Promise<ClientUser>}\n   * @example\n   * // Set password\n   * client.user.setPassword('some new amazing password 456', 'some amazing password 123')\n   *   .then(user => console.log('New password set!'))\n   *   .catch(console.error);\n   */\n  setPassword(newPassword, oldPassword) {\n    return this.client.rest.methods.updateCurrentUser({ password: newPassword }, oldPassword);\n  }\n\n  /**\n   * Set the avatar of the logged in client.\n   * @param {BufferResolvable|Base64Resolvable} avatar The new avatar\n   * @returns {Promise<ClientUser>}\n   * @example\n   * // Set avatar\n   * client.user.setAvatar('./avatar.png')\n   *   .then(user => console.log(`New avatar set!`))\n   *   .catch(console.error);\n   */\n  setAvatar(avatar) {\n    return this.client.resolver.resolveImage(avatar).then(data =>\n      this.client.rest.methods.updateCurrentUser({ avatar: data })\n    );\n  }\n\n  /**\n   * Data resembling a raw Discord presence.\n   * @typedef {Object} PresenceData\n   * @property {PresenceStatus} [status] Status of the user\n   * @property {boolean} [afk] Whether the user is AFK\n   * @property {Object} [game] Game the user is playing\n   * @property {string} [game.name] Name of the game\n   * @property {string} [game.url] Twitch stream URL\n   * @property {?ActivityType|number} [game.type] Type of the activity\n   */\n\n  /**\n   * Sets the full presence of the client user.\n   * @param {PresenceData} data Data for the presence\n   * @returns {Promise<ClientUser>}\n   * @example\n   * // Set the client user's presence\n   * client.user.setPresence({ game: { name: 'with discord.js' }, status: 'idle' })\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  setPresence(data) {\n    // {\"op\":3,\"d\":{\"status\":\"dnd\",\"since\":0,\"game\":null,\"afk\":false}}\n    return new Promise(resolve => {\n      let status = this.localPresence.status || this.presence.status;\n      let game = this.localPresence.game;\n      let afk = this.localPresence.afk || this.presence.afk;\n\n      if (!game && this.presence.game) {\n        game = {\n          name: this.presence.game.name,\n          type: this.presence.game.type,\n          url: this.presence.game.url,\n        };\n      }\n\n      if (data.status) {\n        if (typeof data.status !== 'string') throw new TypeError('Status must be a string');\n        if (this.bot) {\n          status = data.status;\n        } else {\n          this.settings.update(Constants.UserSettingsMap.status, data.status);\n          status = 'invisible';\n        }\n      }\n\n      if (data.game) {\n        game = data.game;\n        game.type = game.url && typeof game.type === 'undefined' ? 1 : game.type || 0;\n        if (typeof game.type === 'string') {\n          game.type = Constants.ActivityTypes.indexOf(game.type.toUpperCase());\n        }\n      } else if (typeof data.game !== 'undefined') {\n        game = null;\n      }\n\n      if (typeof data.afk !== 'undefined') afk = data.afk;\n      afk = Boolean(afk);\n\n      this.localPresence = { status, game, afk };\n      this.localPresence.since = 0;\n      this.localPresence.game = this.localPresence.game || null;\n\n      this.client.ws.send({\n        op: 3,\n        d: this.localPresence,\n      });\n\n      this.client._setPresence(this.id, this.localPresence);\n\n      resolve(this);\n    });\n  }\n\n  /**\n   * A user's status. Must be one of:\n   * * `online`\n   * * `idle`\n   * * `invisible`\n   * * `dnd` (do not disturb)\n   * @typedef {string} PresenceStatus\n   */\n\n  /**\n   * Sets the status of the client user.\n   * @param {PresenceStatus} status Status to change to\n   * @returns {Promise<ClientUser>}\n   * @example\n   * // Set the client user's status\n   * client.user.setStatus('idle')\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  setStatus(status) {\n    return this.setPresence({ status });\n  }\n\n  /**\n   * Sets the game the client user is playing.\n   * @param {?string} game Game being played\n   * @param {?string} [streamingURL] Twitch stream URL\n   * @returns {Promise<ClientUser>}\n   * @deprecated\n   */\n  setGame(game, streamingURL) {\n    if (!game) return this.setPresence({ game: null });\n    return this.setPresence({\n      game: {\n        name: game,\n        url: streamingURL,\n      },\n    });\n  }\n\n  /**\n   * Sets the activity the client user is playing.\n   * @param {?string} name Activity being played\n   * @param {Object} [options] Options for setting the activity\n   * @param {string} [options.url] Twitch stream URL\n   * @param {ActivityType|number} [options.type] Type of the activity\n   * @returns {Promise<Presence>}\n   * @example\n   * client.user.setActivity('YouTube', { type: 'WATCHING' })\n   *   .then(presence => console.log(`Activity set to ${presence.game ? presence.game.name : 'none'}`))\n   *   .catch(console.error);\n   */\n  setActivity(name, { url, type } = {}) {\n    if (!name) return this.setPresence({ game: null });\n    return this.setPresence({\n      game: { name, type, url },\n    }).then(clientUser => clientUser.presence);\n  }\n\n  /**\n   * Sets/removes the AFK flag for the client user.\n   * @param {boolean} afk Whether or not the user is AFK\n   * @returns {Promise<ClientUser>}\n   */\n  setAFK(afk) {\n    return this.setPresence({ afk });\n  }\n\n  /**\n   * Fetches messages that mentioned the client's user.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {Object} [options] Options for the fetch\n   * @param {number} [options.limit=25] Maximum number of mentions to retrieve\n   * @param {boolean} [options.roles=true] Whether to include role mentions\n   * @param {boolean} [options.everyone=true] Whether to include everyone/here mentions\n   * @param {GuildResolvable} [options.guild] Limit the search to a specific guild\n   * @returns {Promise<Message[]>}\n   * @example\n   * // Fetch mentions\n   * client.user.fetchMentions()\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // Fetch mentions from a guild\n   * client.user.fetchMentions({ guild: '222078108977594368' })\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  fetchMentions(options = {}) {\n    return this.client.rest.methods.fetchMentions(options);\n  }\n\n  /**\n   * Send a friend request.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {UserResolvable} user The user to send the friend request to\n   * @returns {Promise<User>} The user the friend request was sent to\n   */\n  addFriend(user) {\n    user = this.client.resolver.resolveUser(user);\n    return this.client.rest.methods.addFriend(user);\n  }\n\n  /**\n   * Remove a friend.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {UserResolvable} user The user to remove from your friends\n   * @returns {Promise<User>} The user that was removed\n   */\n  removeFriend(user) {\n    user = this.client.resolver.resolveUser(user);\n    return this.client.rest.methods.removeFriend(user);\n  }\n\n  /**\n   * Creates a guild.\n   * <warn>This is only available to bots in less than 10 guilds and user accounts.</warn>\n   * @param {string} name The name of the guild\n   * @param {string} [region] The region for the server\n   * @param {BufferResolvable|Base64Resolvable} [icon=null] The icon for the guild\n   * @returns {Promise<Guild>} The guild that was created\n   */\n  createGuild(name, region, icon = null) {\n    if (typeof icon === 'string' && icon.startsWith('data:')) {\n      return this.client.rest.methods.createGuild({ name, icon, region });\n    } else {\n      return this.client.resolver.resolveImage(icon).then(data =>\n        this.client.rest.methods.createGuild({ name, icon: data, region })\n      );\n    }\n  }\n\n  /**\n   * An object containing either a user or access token, and an optional nickname.\n   * @typedef {Object} GroupDMRecipientOptions\n   * @property {UserResolvable|Snowflake} [user] User to add to the Group DM\n   * (only available if a user is creating the DM)\n   * @property {string} [accessToken] Access token to use to add a user to the Group DM\n   * (only available if a bot is creating the DM)\n   * @property {string} [nick] Permanent nickname (only available if a bot is creating the DM)\n   */\n\n  /**\n   * Creates a Group DM.\n   * @param {GroupDMRecipientOptions[]} recipients The recipients\n   * @returns {Promise<GroupDMChannel>}\n   * @example\n   * // Create a Group DM with a token provided from OAuth\n   * client.user.createGroupDM([{\n   *   user: '66564597481480192',\n   *   accessToken: token\n   * }])\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  createGroupDM(recipients) {\n    return this.client.rest.methods.createGroupDM({\n      recipients: recipients.map(u => this.client.resolver.resolveUserID(u.user)),\n      accessTokens: recipients.map(u => u.accessToken),\n      nicks: recipients.reduce((o, r) => {\n        if (r.nick) o[r.user ? r.user.id : r.id] = r.nick;\n        return o;\n      }, {}),\n    });\n  }\n\n  /**\n   * Accepts an invite to join a guild.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {Invite|string} invite Invite or code to accept\n   * @returns {Promise<Guild>} Joined guild\n   */\n  acceptInvite(invite) {\n    return this.client.rest.methods.acceptInvite(invite);\n  }\n}\n\nClientUser.prototype.setGame =\n  util.deprecate(ClientUser.prototype.setGame, 'ClientUser#setGame: use ClientUser#setActivity instead');\n\nClientUser.prototype.addFriend =\n  util.deprecate(ClientUser.prototype.addFriend, 'ClientUser#addFriend: userbot methods will be removed');\n\nClientUser.prototype.removeFriend =\n  util.deprecate(ClientUser.prototype.removeFriend, 'ClientUser#removeFriend: userbot methods will be removed');\n\nClientUser.prototype.setPassword =\n  util.deprecate(ClientUser.prototype.setPassword, 'ClientUser#setPassword: userbot methods will be removed');\n\nClientUser.prototype.setEmail =\n  util.deprecate(ClientUser.prototype.setEmail, 'ClientUser#setEmail: userbot methods will be removed');\n\nClientUser.prototype.fetchMentions =\n  util.deprecate(ClientUser.prototype.fetchMentions, 'ClientUser#fetchMentions: userbot methods will be removed');\n\nmodule.exports = ClientUser;\n\n\n//# sourceURL=webpack:///./src/structures/ClientUser.js?");

/***/ }),

/***/ "./src/structures/ClientUserChannelOverride.js":
/*!*****************************************************!*\
  !*** ./src/structures/ClientUserChannelOverride.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\n\n/**\n * A wrapper around the ClientUser's channel overrides.\n */\nclass ClientUserChannelOverride {\n  constructor(data) {\n    this.patch(data);\n  }\n\n  /**\n   * Patch the data contained in this class with new partial data.\n   * @param {Object} data Data to patch this with\n   * @returns {void}\n   * @private\n   */\n  patch(data) {\n    for (const key of Object.keys(Constants.UserChannelOverrideMap)) {\n      const value = Constants.UserChannelOverrideMap[key];\n      if (!data.hasOwnProperty(key)) continue;\n      if (typeof value === 'function') {\n        this[value.name] = value(data[key]);\n      } else {\n        this[value] = data[key];\n      }\n    }\n  }\n}\n\nmodule.exports = ClientUserChannelOverride;\n\n\n//# sourceURL=webpack:///./src/structures/ClientUserChannelOverride.js?");

/***/ }),

/***/ "./src/structures/ClientUserGuildSettings.js":
/*!***************************************************!*\
  !*** ./src/structures/ClientUserGuildSettings.js ***!
  \***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst ClientUserChannelOverride = __webpack_require__(/*! ./ClientUserChannelOverride */ \"./src/structures/ClientUserChannelOverride.js\");\n\n/**\n * A wrapper around the ClientUser's guild settings.\n */\nclass ClientUserGuildSettings {\n  constructor(data, client) {\n    /**\n     * The client that created the instance of the ClientUserGuildSettings\n     * @name ClientUserGuildSettings#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n    /**\n     * The ID of the guild this settings are for\n     * @type {Snowflake}\n     */\n    this.guildID = data.guild_id;\n    this.channelOverrides = new Collection();\n    this.patch(data);\n  }\n\n  /**\n   * Patch the data contained in this class with new partial data.\n   * @param {Object} data Data to patch this with\n   * @returns {void}\n   * @private\n   */\n  patch(data) {\n    for (const key of Object.keys(Constants.UserGuildSettingsMap)) {\n      const value = Constants.UserGuildSettingsMap[key];\n      if (!data.hasOwnProperty(key)) continue;\n      if (key === 'channel_overrides') {\n        for (const channel of data[key]) {\n          this.channelOverrides.set(channel.channel_id,\n            new ClientUserChannelOverride(channel));\n        }\n      } else if (typeof value === 'function') {\n        this[value.name] = value(data[key]);\n      } else {\n        this[value] = data[key];\n      }\n    }\n  }\n\n  /**\n   * Update a specific property of the guild settings.\n   * @param {string} name Name of property\n   * @param {value} value Value to patch\n   * @returns {Promise<Object>}\n   */\n  update(name, value) {\n    return this.client.rest.methods.patchClientUserGuildSettings(this.guildID, { [name]: value });\n  }\n}\n\nmodule.exports = ClientUserGuildSettings;\n\n\n//# sourceURL=webpack:///./src/structures/ClientUserGuildSettings.js?");

/***/ }),

/***/ "./src/structures/ClientUserSettings.js":
/*!**********************************************!*\
  !*** ./src/structures/ClientUserSettings.js ***!
  \**********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Util = __webpack_require__(/*! ../util/Util */ \"./src/util/Util.js\");\n\n/**\n * A wrapper around the ClientUser's settings.\n */\nclass ClientUserSettings {\n  constructor(user, data) {\n    this.user = user;\n    this.patch(data);\n  }\n\n  /**\n   * Patch the data contained in this class with new partial data.\n   * @param {Object} data Data to patch this with\n   * @returns {void}\n   * @private\n   */\n  patch(data) {\n    for (const key of Object.keys(Constants.UserSettingsMap)) {\n      const value = Constants.UserSettingsMap[key];\n      if (!data.hasOwnProperty(key)) continue;\n      if (typeof value === 'function') {\n        this[value.name] = value(data[key]);\n      } else {\n        this[value] = data[key];\n      }\n    }\n  }\n\n  /**\n   * Update a specific property of of user settings.\n   * @param {string} name Name of property\n   * @param {*} value Value to patch\n   * @returns {Promise<Object>}\n   */\n  update(name, value) {\n    return this.user.client.rest.methods.patchUserSettings({ [name]: value });\n  }\n\n  /**\n   * Sets the position at which this guild will appear in the Discord client.\n   * @param {Guild} guild The guild to move\n   * @param {number} position Absolute or relative position\n   * @param {boolean} [relative=false] Whether to position relatively or absolutely\n   * @returns {Promise<Guild>}\n   */\n  setGuildPosition(guild, position, relative) {\n    const temp = Object.assign([], this.guildPositions);\n    Util.moveElementInArray(temp, guild.id, position, relative);\n    return this.update('guild_positions', temp).then(() => guild);\n  }\n\n  /**\n   * Add a guild to the list of restricted guilds.\n   * @param {Guild} guild The guild to add\n   * @returns {Promise<Guild>}\n   */\n  addRestrictedGuild(guild) {\n    const temp = Object.assign([], this.restrictedGuilds);\n    if (temp.includes(guild.id)) return Promise.reject(new Error('Guild is already restricted'));\n    temp.push(guild.id);\n    return this.update('restricted_guilds', temp).then(() => guild);\n  }\n\n  /**\n   * Remove a guild from the list of restricted guilds.\n   * @param {Guild} guild The guild to remove\n   * @returns {Promise<Guild>}\n   */\n  removeRestrictedGuild(guild) {\n    const temp = Object.assign([], this.restrictedGuilds);\n    const index = temp.indexOf(guild.id);\n    if (index < 0) return Promise.reject(new Error('Guild is not restricted'));\n    temp.splice(index, 1);\n    return this.update('restricted_guilds', temp).then(() => guild);\n  }\n}\n\nmodule.exports = ClientUserSettings;\n\n\n//# sourceURL=webpack:///./src/structures/ClientUserSettings.js?");

/***/ }),

/***/ "./src/structures/DMChannel.js":
/*!*************************************!*\
  !*** ./src/structures/DMChannel.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Channel = __webpack_require__(/*! ./Channel */ \"./src/structures/Channel.js\");\nconst TextBasedChannel = __webpack_require__(/*! ./interfaces/TextBasedChannel */ \"./src/structures/interfaces/TextBasedChannel.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\n\n/**\n * Represents a direct message channel between two users.\n * @extends {Channel}\n * @implements {TextBasedChannel}\n */\nclass DMChannel extends Channel {\n  constructor(client, data) {\n    super(client, data);\n    this.type = 'dm';\n    this.messages = new Collection();\n    this._typing = new Map();\n  }\n\n  setup(data) {\n    super.setup(data);\n\n    /**\n     * The recipient on the other end of the DM\n     * @type {User}\n     */\n    this.recipient = this.client.dataManager.newUser(data.recipients[0]);\n\n    /**\n     * The ID of the last message in the channel, if one was sent\n     * @type {?Snowflake}\n     */\n    this.lastMessageID = data.last_message_id;\n\n    /**\n     * The timestamp when the last pinned message was pinned, if there was one\n     * @type {?number}\n     */\n    this.lastPinTimestamp = data.last_pin_timestamp ? new Date(data.last_pin_timestamp).getTime() : null;\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the recipient's mention instead of the\n   * DM channel object.\n   * @returns {string}\n   */\n  toString() {\n    return this.recipient.toString();\n  }\n\n  // These are here only for documentation purposes - they are implemented by TextBasedChannel\n  /* eslint-disable no-empty-function */\n  get lastPinAt() {}\n  send() {}\n  sendMessage() {}\n  sendEmbed() {}\n  sendFile() {}\n  sendFiles() {}\n  sendCode() {}\n  fetchMessage() {}\n  fetchMessages() {}\n  fetchPinnedMessages() {}\n  search() {}\n  startTyping() {}\n  stopTyping() {}\n  get typing() {}\n  get typingCount() {}\n  createCollector() {}\n  createMessageCollector() {}\n  awaitMessages() {}\n  // Doesn't work on DM channels; bulkDelete() {}\n  acknowledge() {}\n  _cacheMessage() {}\n}\n\nTextBasedChannel.applyToClass(DMChannel, true, ['bulkDelete']);\n\nmodule.exports = DMChannel;\n\n\n//# sourceURL=webpack:///./src/structures/DMChannel.js?");

/***/ }),

/***/ "./src/structures/Emoji.js":
/*!*********************************!*\
  !*** ./src/structures/Emoji.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Permissions = __webpack_require__(/*! ../util/Permissions */ \"./src/util/Permissions.js\");\nconst Snowflake = __webpack_require__(/*! ../util/Snowflake */ \"./src/util/Snowflake.js\");\n\n/**\n * Represents a custom emoji.\n */\nclass Emoji {\n  constructor(guild, data) {\n    /**\n     * The client that instantiated this object\n     * @name Emoji#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: guild.client });\n\n    /**\n     * The guild this emoji is part of\n     * @type {Guild}\n     */\n    this.guild = guild;\n\n    /**\n     * Whether this emoji has been deleted\n     * @type {boolean}\n     */\n    this.deleted = false;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The ID of the emoji\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The name of the emoji\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * Whether or not this emoji requires colons surrounding it\n     * @type {boolean}\n     */\n    this.requiresColons = data.require_colons;\n\n    /**\n     * Whether this emoji is managed by an external service\n     * @type {boolean}\n     */\n    this.managed = data.managed;\n\n    /**\n     * Whether this emoji is animated\n     * @type {boolean}\n     */\n    this.animated = data.animated;\n\n    this._roles = data.roles;\n  }\n\n  /**\n   * The timestamp the emoji was created at\n   * @type {number}\n   * @readonly\n   */\n  get createdTimestamp() {\n    return Snowflake.deconstruct(this.id).timestamp;\n  }\n\n  /**\n   * The time the emoji was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * Whether the emoji is deletable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get deletable() {\n    return !this.managed && this.guild.me.hasPermission(Permissions.FLAGS.MANAGE_EMOJIS);\n  }\n\n  /**\n   * A collection of roles this emoji is active for (empty if all), mapped by role ID\n   * @type {Collection<Snowflake, Role>}\n   * @readonly\n   */\n  get roles() {\n    const roles = new Collection();\n    for (const role of this._roles) {\n      if (this.guild.roles.has(role)) roles.set(role, this.guild.roles.get(role));\n    }\n    return roles;\n  }\n\n  /**\n   * The URL to the emoji file\n   * @type {string}\n   * @readonly\n   */\n  get url() {\n    return Constants.Endpoints.CDN(this.client.options.http.cdn).Emoji(this.id, this.animated ? 'gif' : 'png');\n  }\n\n  /**\n   * The identifier of this emoji, used for message reactions\n   * @type {string}\n   * @readonly\n   */\n  get identifier() {\n    if (this.id) return `${this.name}:${this.id}`;\n    return encodeURIComponent(this.name);\n  }\n\n  /**\n   * Data for editing an emoji.\n   * @typedef {Object} EmojiEditData\n   * @property {string} [name] The name of the emoji\n   * @property {Collection<Snowflake, Role>|Array<Snowflake|Role>} [roles] Roles to restrict emoji to\n   */\n\n  /**\n   * Edits the emoji.\n   * @param {EmojiEditData} data The new data for the emoji\n   * @param {string} [reason] Reason for editing this emoji\n   * @returns {Promise<Emoji>}\n   * @example\n   * // Edit an emoji\n   * emoji.edit({name: 'newemoji'})\n   *   .then(e => console.log(`Edited emoji ${e}`))\n   *   .catch(console.error);\n   */\n  edit(data, reason) {\n    return this.client.rest.methods.updateEmoji(this, data, reason);\n  }\n\n  /**\n   * Set the name of the emoji.\n   * @param {string} name The new name for the emoji\n   * @param {string} [reason] The reason for changing the emoji's name\n   * @returns {Promise<Emoji>}\n   */\n  setName(name, reason) {\n    return this.edit({ name }, reason);\n  }\n\n  /**\n   * Fetches the author for this emoji\n   * @returns {Promise<User>}\n   */\n  fetchAuthor() {\n    if (this.managed) return Promise.reject(new Error('Emoji is managed and has no Author.'));\n    if (!this.guild.me.permissions.has(Permissions.FLAGS.MANAGE_EMOJIS)) {\n      return Promise.reject(\n        new Error(`Client must have Manage Emoji permission in guild ${this.guild} to see emoji authors.`)\n      );\n    }\n    return this.client.rest.makeRequest('get', Constants.Endpoints.Guild(this.guild).Emoji(this.id), true)\n      .then(emoji => this.client.dataManager.newUser(emoji.user));\n  }\n\n  /**\n   * Add a role to the list of roles that can use this emoji.\n   * @param {Role} role The role to add\n   * @returns {Promise<Emoji>}\n   */\n  addRestrictedRole(role) {\n    return this.addRestrictedRoles([role]);\n  }\n\n  /**\n   * Add multiple roles to the list of roles that can use this emoji.\n   * @param {Role[]} roles Roles to add\n   * @returns {Promise<Emoji>}\n   */\n  addRestrictedRoles(roles) {\n    const newRoles = new Collection(this.roles);\n    for (const role of roles) {\n      if (this.guild.roles.has(role.id)) newRoles.set(role.id, role);\n    }\n    return this.edit({ roles: newRoles });\n  }\n\n  /**\n   * Remove a role from the list of roles that can use this emoji.\n   * @param {Role} role The role to remove\n   * @returns {Promise<Emoji>}\n   */\n  removeRestrictedRole(role) {\n    return this.removeRestrictedRoles([role]);\n  }\n\n  /**\n   * Remove multiple roles from the list of roles that can use this emoji.\n   * @param {Role[]} roles Roles to remove\n   * @returns {Promise<Emoji>}\n   */\n  removeRestrictedRoles(roles) {\n    const newRoles = new Collection(this.roles);\n    for (const role of roles) {\n      if (newRoles.has(role.id)) newRoles.delete(role.id);\n    }\n    return this.edit({ roles: newRoles });\n  }\n\n  /**\n   * When concatenated with a string, this automatically returns the emoji mention rather than the object.\n   * @returns {string}\n   * @example\n   * // Send an emoji:\n   * const emoji = guild.emojis.first();\n   * msg.reply(`Hello! ${emoji}`);\n   */\n  toString() {\n    if (!this.id || !this.requiresColons) {\n      return this.name;\n    }\n\n    return `<${this.animated ? 'a' : ''}:${this.name}:${this.id}>`;\n  }\n\n  /**\n   * Whether this emoji is the same as another one.\n   * @param {Emoji|Object} other The emoji to compare it to\n   * @returns {boolean} Whether the emoji is equal to the given emoji or not\n   */\n  equals(other) {\n    if (other instanceof Emoji) {\n      return (\n        other.id === this.id &&\n        other.name === this.name &&\n        other.managed === this.managed &&\n        other.requiresColons === this.requiresColons\n      );\n    } else {\n      return (\n        other.id === this.id &&\n        other.name === this.name\n      );\n    }\n  }\n}\n\nmodule.exports = Emoji;\n\n\n//# sourceURL=webpack:///./src/structures/Emoji.js?");

/***/ }),

/***/ "./src/structures/GroupDMChannel.js":
/*!******************************************!*\
  !*** ./src/structures/GroupDMChannel.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Channel = __webpack_require__(/*! ./Channel */ \"./src/structures/Channel.js\");\nconst TextBasedChannel = __webpack_require__(/*! ./interfaces/TextBasedChannel */ \"./src/structures/interfaces/TextBasedChannel.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\n\n/*\n{ type: 3,\n  recipients:\n   [ { username: 'Charlie',\n       id: '123',\n       discriminator: '6631',\n       avatar: '123' },\n     { username: 'Ben',\n       id: '123',\n       discriminator: '2055',\n       avatar: '123' },\n     { username: 'Adam',\n       id: '123',\n       discriminator: '2406',\n       avatar: '123' } ],\n  owner_id: '123',\n  name: null,\n  last_message_id: '123',\n  id: '123',\n  icon: null }\n*/\n\n/**\n * Represents a Group DM on Discord.\n * @extends {Channel}\n * @implements {TextBasedChannel}\n */\nclass GroupDMChannel extends Channel {\n  constructor(client, data) {\n    super(client, data);\n    this.type = 'group';\n    this.messages = new Collection();\n    this._typing = new Map();\n  }\n\n  setup(data) {\n    super.setup(data);\n\n    /**\n     * The name of this Group DM, can be null if one isn't set\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * A hash of this Group DM icon\n     * @type {?string}\n     */\n    this.icon = data.icon;\n\n    /**\n     * The user ID of this Group DM's owner\n     * @type {string}\n     */\n    this.ownerID = data.owner_id;\n\n    /**\n     * If the DM is managed by an application\n     * @type {boolean}\n     */\n    this.managed = data.managed;\n\n    /**\n     * Application ID of the application that made this Group DM, if applicable\n     * @type {?string}\n     */\n    this.applicationID = data.application_id;\n\n    if (data.nicks) {\n      /**\n       * Nicknames for group members\n       * @type {?Collection<Snowflake, string>}\n       */\n      this.nicks = new Collection(data.nicks.map(n => [n.id, n.nick]));\n    }\n\n    if (!this.recipients) {\n      /**\n       * A collection of the recipients of this DM, mapped by their ID\n       * @type {Collection<Snowflake, User>}\n       */\n      this.recipients = new Collection();\n    }\n\n    if (data.recipients) {\n      for (const recipient of data.recipients) {\n        const user = this.client.dataManager.newUser(recipient);\n        this.recipients.set(user.id, user);\n      }\n    }\n\n    /**\n     * The ID of the last message in the channel, if one was sent\n     * @type {?Snowflake}\n     */\n    this.lastMessageID = data.last_message_id;\n\n    /**\n     * The timestamp when the last pinned message was pinned, if there was one\n     * @type {?number}\n     */\n    this.lastPinTimestamp = data.last_pin_timestamp ? new Date(data.last_pin_timestamp).getTime() : null;\n  }\n\n  /**\n   * The owner of this Group DM\n   * @type {User}\n   * @readonly\n   */\n  get owner() {\n    return this.client.users.get(this.ownerID);\n  }\n\n  /**\n   * The URL to this guild's icon\n   * @type {?string}\n   * @readonly\n   */\n  get iconURL() {\n    if (!this.icon) return null;\n    return Constants.Endpoints.Channel(this).Icon(this.client.options.http.cdn, this.icon);\n  }\n\n  edit(data) {\n    const _data = {};\n    if (data.name) _data.name = data.name;\n    if (typeof data.icon !== 'undefined') _data.icon = data.icon;\n    return this.client.rest.methods.updateGroupDMChannel(this, _data);\n  }\n\n  /**\n   * Whether this channel equals another channel. It compares all properties, so for most operations\n   * it is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\n   * what most users need.\n   * @param {GroupDMChannel} channel Channel to compare with\n   * @returns {boolean}\n   */\n  equals(channel) {\n    const equal = channel &&\n      this.id === channel.id &&\n      this.name === channel.name &&\n      this.icon === channel.icon &&\n      this.ownerID === channel.ownerID;\n\n    if (equal) {\n      return this.recipients.equals(channel.recipients);\n    }\n\n    return equal;\n  }\n\n  /**\n   * Add a user to the DM\n   * @param {UserResolvable|string} accessTokenOrID Access token or user resolvable\n   * @param {string} [nick] Permanent nickname to give the user (only available if a bot is creating the DM)\n   * @returns {Promise<GroupDMChannel>}\n   */\n\n  addUser(accessTokenOrID, nick) {\n    return this.client.rest.methods.addUserToGroupDM(this, {\n      nick,\n      id: this.client.resolver.resolveUserID(accessTokenOrID),\n      accessToken: accessTokenOrID,\n    });\n  }\n\n  /**\n   * Set a new GroupDMChannel icon.\n   * @param {Base64Resolvable|BufferResolvable} icon The new icon of the group dm\n   * @returns {Promise<GroupDMChannel>}\n   * @example\n   * // Edit the group dm icon\n   * channel.setIcon('./icon.png')\n   *  .then(updated => console.log('Updated the channel icon'))\n   *  .catch(console.error);\n   */\n  setIcon(icon) {\n    return this.client.resolver.resolveImage(icon).then(data => this.edit({ icon: data }));\n  }\n\n  /**\n   * Sets a new name for this Group DM.\n   * @param {string} name New name for this Group DM\n   * @returns {Promise<GroupDMChannel>}\n   */\n  setName(name) {\n    return this.edit({ name });\n  }\n\n  /**\n   * Removes a user from this Group DM.\n   * @param {UserResolvable} user User to remove\n   * @returns {Promise<GroupDMChannel>}\n   */\n  removeUser(user) {\n    const id = this.client.resolver.resolveUserID(user);\n    return this.client.rest.methods.removeUserFromGroupDM(this, id);\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the channel's name instead of the Channel object.\n   * @returns {string}\n   * @example\n   * // Logs: Hello from My Group DM!\n   * console.log(`Hello from ${channel}!`);\n   * @example\n   * // Logs: Hello from My Group DM!\n   * console.log(`Hello from ' + channel + '!');\n   */\n  toString() {\n    return this.name;\n  }\n\n  // These are here only for documentation purposes - they are implemented by TextBasedChannel\n  /* eslint-disable no-empty-function */\n  get lastPinAt() {}\n  send() {}\n  sendMessage() {}\n  sendEmbed() {}\n  sendFile() {}\n  sendFiles() {}\n  sendCode() {}\n  fetchMessage() {}\n  fetchMessages() {}\n  fetchPinnedMessages() {}\n  search() {}\n  startTyping() {}\n  stopTyping() {}\n  get typing() {}\n  get typingCount() {}\n  createCollector() {}\n  createMessageCollector() {}\n  awaitMessages() {}\n  // Doesn't work on Group DMs; bulkDelete() {}\n  acknowledge() {}\n  _cacheMessage() {}\n}\n\nTextBasedChannel.applyToClass(GroupDMChannel, true, ['bulkDelete']);\n\nmodule.exports = GroupDMChannel;\n\n\n//# sourceURL=webpack:///./src/structures/GroupDMChannel.js?");

/***/ }),

/***/ "./src/structures/Guild.js":
/*!*********************************!*\
  !*** ./src/structures/Guild.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\nconst Long = __webpack_require__(/*! long */ \"./node_modules/long/src/long.js\");\nconst User = __webpack_require__(/*! ./User */ \"./src/structures/User.js\");\nconst Role = __webpack_require__(/*! ./Role */ \"./src/structures/Role.js\");\nconst Emoji = __webpack_require__(/*! ./Emoji */ \"./src/structures/Emoji.js\");\nconst Presence = __webpack_require__(/*! ./Presence */ \"./src/structures/Presence.js\").Presence;\nconst GuildMember = __webpack_require__(/*! ./GuildMember */ \"./src/structures/GuildMember.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Util = __webpack_require__(/*! ../util/Util */ \"./src/util/Util.js\");\nconst Snowflake = __webpack_require__(/*! ../util/Snowflake */ \"./src/util/Snowflake.js\");\n\n/**\n * Represents a guild (or a server) on Discord.\n * <info>It's recommended to see if a guild is available before performing operations or reading data from it. You can\n * check this with `guild.available`.</info>\n */\nclass Guild {\n  constructor(client, data) {\n    /**\n     * The client that created the instance of the guild\n     * @name Guild#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    /**\n     * A collection of members that are in this guild. The key is the member's ID, the value is the member\n     * @type {Collection<Snowflake, GuildMember>}\n     */\n    this.members = new Collection();\n\n    /**\n     * A collection of channels that are in this guild. The key is the channel's ID, the value is the channel\n     * @type {Collection<Snowflake, GuildChannel>}\n     */\n    this.channels = new Collection();\n\n    /**\n     * A collection of roles that are in this guild. The key is the role's ID, the value is the role\n     * @type {Collection<Snowflake, Role>}\n     */\n    this.roles = new Collection();\n\n    /**\n     * A collection of presences in this guild\n     * @type {Collection<Snowflake, Presence>}\n     */\n    this.presences = new Collection();\n\n    /**\n     * Whether the bot has been removed from the guild\n     * @type {boolean}\n     */\n    this.deleted = false;\n\n    if (!data) return;\n    if (data.unavailable) {\n      /**\n       * Whether the guild is available to access. If it is not available, it indicates a server outage\n       * @type {boolean}\n       */\n      this.available = false;\n\n      /**\n       * The Unique ID of the guild, useful for comparisons\n       * @type {Snowflake}\n       */\n      this.id = data.id;\n    } else {\n      this.setup(data);\n      if (!data.channels) this.available = false;\n    }\n  }\n\n  /* eslint-disable complexity */\n  /**\n   * Sets up the guild.\n   * @param {*} data The raw data of the guild\n   * @private\n   */\n  setup(data) {\n    /**\n     * The name of the guild\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The hash of the guild icon\n     * @type {?string}\n     */\n    this.icon = data.icon;\n\n    /**\n     * The hash of the guild splash image (VIP only)\n     * @type {?string}\n     */\n    this.splash = data.splash;\n\n    /**\n     * The region the guild is located in\n     * @type {string}\n     */\n    this.region = data.region;\n\n    /**\n     * The full amount of members in this guild\n     * @type {number}\n     */\n    this.memberCount = data.member_count || this.memberCount;\n\n    /**\n     * Whether the guild is \"large\" (has more than 250 members)\n     * @type {boolean}\n     */\n    this.large = Boolean('large' in data ? data.large : this.large);\n\n    /**\n     * An array of guild features\n     * @type {Object[]}\n     */\n    this.features = data.features;\n\n    /**\n     * The ID of the application that created this guild (if applicable)\n     * @type {?Snowflake}\n     */\n    this.applicationID = data.application_id;\n\n    /**\n     * The time in seconds before a user is counted as \"away from keyboard\"\n     * @type {?number}\n     */\n    this.afkTimeout = data.afk_timeout;\n\n    /**\n     * The ID of the voice channel where AFK members are moved\n     * @type {?string}\n     */\n    this.afkChannelID = data.afk_channel_id;\n\n    /**\n     * The ID of the system channel\n     * @type {?Snowflake}\n     */\n    this.systemChannelID = data.system_channel_id;\n\n    /**\n     * Whether embedded images are enabled on this guild\n     * @type {boolean}\n     */\n    this.embedEnabled = data.embed_enabled;\n\n    /**\n     * The verification level of the guild\n     * @type {number}\n     */\n    this.verificationLevel = data.verification_level;\n\n    /**\n     * The explicit content filter level of the guild\n     * @type {number}\n     */\n    this.explicitContentFilter = data.explicit_content_filter;\n\n    /**\n     * The required MFA level for the guild\n     * @type {number}\n     */\n    this.mfaLevel = data.mfa_level;\n\n    /**\n     * The timestamp the client user joined the guild at\n     * @type {number}\n     */\n    this.joinedTimestamp = data.joined_at ? new Date(data.joined_at).getTime() : this.joinedTimestamp;\n\n    /**\n     * The value set for a guild's default message notifications\n     * @type {DefaultMessageNotifications|number}\n     */\n    this.defaultMessageNotifications = Constants.DefaultMessageNotifications[data.default_message_notifications] ||\n      data.default_message_notifications;\n\n    this.id = data.id;\n    this.available = !data.unavailable;\n    this.features = data.features || this.features || [];\n\n    if (data.members) {\n      this.members.clear();\n      for (const guildUser of data.members) this._addMember(guildUser, false);\n    }\n\n    if (data.owner_id) {\n      /**\n       * The user ID of this guild's owner\n       * @type {Snowflake}\n       */\n      this.ownerID = data.owner_id;\n    }\n\n    if (data.channels) {\n      this.channels.clear();\n      for (const channel of data.channels) this.client.dataManager.newChannel(channel, this);\n    }\n\n    if (data.roles) {\n      this.roles.clear();\n      for (const role of data.roles) {\n        const newRole = new Role(this, role);\n        this.roles.set(newRole.id, newRole);\n      }\n    }\n\n    if (data.presences) {\n      for (const presence of data.presences) {\n        this._setPresence(presence.user.id, presence);\n      }\n    }\n\n    this._rawVoiceStates = new Collection();\n    if (data.voice_states) {\n      for (const voiceState of data.voice_states) {\n        this._rawVoiceStates.set(voiceState.user_id, voiceState);\n        const member = this.members.get(voiceState.user_id);\n        const voiceChannel = this.channels.get(voiceState.channel_id);\n        if (member && voiceChannel) {\n          member.serverMute = voiceState.mute;\n          member.serverDeaf = voiceState.deaf;\n          member.selfMute = voiceState.self_mute;\n          member.selfDeaf = voiceState.self_deaf;\n          member.voiceSessionID = voiceState.session_id;\n          member.voiceChannelID = voiceState.channel_id;\n          voiceChannel.members.set(member.user.id, member);\n        }\n      }\n    }\n\n    if (!this.emojis) {\n      /**\n       * A collection of emojis that are in this guild\n       * The key is the emoji's ID, the value is the emoji\n       * @type {Collection<Snowflake, Emoji>}\n       */\n      this.emojis = new Collection();\n      for (const emoji of data.emojis) this.emojis.set(emoji.id, new Emoji(this, emoji));\n    } else {\n      this.client.actions.GuildEmojisUpdate.handle({\n        guild_id: this.id,\n        emojis: data.emojis,\n      });\n    }\n  }\n\n  /**\n   * The timestamp the guild was created at\n   * @type {number}\n   * @readonly\n   */\n  get createdTimestamp() {\n    return Snowflake.deconstruct(this.id).timestamp;\n  }\n\n  /**\n   * The time the guild was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * The time the client user joined the guild\n   * @type {Date}\n   * @readonly\n   */\n  get joinedAt() {\n    return new Date(this.joinedTimestamp);\n  }\n\n  /**\n   * If this guild is verified\n   * @type {boolean}\n   * @readonly\n   */\n  get verified() {\n    return this.features.includes('VERIFIED');\n  }\n\n  /**\n   * The URL to this guild's icon\n   * @type {?string}\n   * @readonly\n   */\n  get iconURL() {\n    if (!this.icon) return null;\n    return Constants.Endpoints.Guild(this).Icon(this.client.options.http.cdn, this.icon);\n  }\n\n  /**\n   * The acronym that shows up in place of a guild icon.\n   * @type {string}\n   * @readonly\n   */\n  get nameAcronym() {\n    return this.name.replace(/\\w+/g, name => name[0]).replace(/\\s/g, '');\n  }\n\n  /**\n   * The URL to this guild's splash\n   * @type {?string}\n   * @readonly\n   */\n  get splashURL() {\n    if (!this.splash) return null;\n    return Constants.Endpoints.Guild(this).Splash(this.client.options.http.cdn, this.splash);\n  }\n\n  /**\n   * The owner of the guild\n   * @type {?GuildMember}\n   * @readonly\n   */\n  get owner() {\n    return this.members.get(this.ownerID);\n  }\n\n  /**\n   * AFK voice channel for this guild\n   * @type {?VoiceChannel}\n   * @readonly\n   */\n  get afkChannel() {\n    return this.client.channels.get(this.afkChannelID) || null;\n  }\n\n  /**\n   * System channel for this guild\n   * @type {?GuildChannel}\n   * @readonly\n   */\n  get systemChannel() {\n    return this.client.channels.get(this.systemChannelID) || null;\n  }\n\n  /**\n   * If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection\n   * @type {?VoiceConnection}\n   * @readonly\n   */\n  get voiceConnection() {\n    if (this.client.browser) return null;\n    return this.client.voice.connections.get(this.id) || null;\n  }\n\n  /**\n   * The position of this guild\n   * <warn>This is only available when using a user account.</warn>\n   * @type {?number}\n   * @readonly\n   */\n  get position() {\n    if (this.client.user.bot) return null;\n    if (!this.client.user.settings.guildPositions) return null;\n    return this.client.user.settings.guildPositions.indexOf(this.id);\n  }\n\n  /**\n   * Whether the guild is muted\n   * <warn>This is only available when using a user account.</warn>\n   * @type {?boolean}\n   * @readonly\n   */\n  get muted() {\n    if (this.client.user.bot) return null;\n    try {\n      return this.client.user.guildSettings.get(this.id).muted;\n    } catch (err) {\n      return false;\n    }\n  }\n\n  /**\n   * The type of message that should notify you\n   * <warn>This is only available when using a user account.</warn>\n   * @type {?MessageNotificationType}\n   * @readonly\n   */\n  get messageNotifications() {\n    if (this.client.user.bot) return null;\n    try {\n      return this.client.user.guildSettings.get(this.id).messageNotifications;\n    } catch (err) {\n      return null;\n    }\n  }\n\n  /**\n   * Whether to receive mobile push notifications\n   * <warn>This is only available when using a user account.</warn>\n   * @type {?boolean}\n   * @readonly\n   */\n  get mobilePush() {\n    if (this.client.user.bot) return null;\n    try {\n      return this.client.user.guildSettings.get(this.id).mobilePush;\n    } catch (err) {\n      return false;\n    }\n  }\n\n  /**\n   * Whether to suppress everyone messages\n   * <warn>This is only available when using a user account.</warn>\n   * @type {?boolean}\n   * @readonly\n   */\n  get suppressEveryone() {\n    if (this.client.user.bot) return null;\n    try {\n      return this.client.user.guildSettings.get(this.id).suppressEveryone;\n    } catch (err) {\n      return null;\n    }\n  }\n\n  /**\n   * The `@everyone` role of the guild\n   * @type {Role}\n   * @readonly\n   */\n  get defaultRole() {\n    return this.roles.get(this.id);\n  }\n\n  /**\n   * The client user as a GuildMember of this guild\n   * @type {?GuildMember}\n   * @readonly\n   */\n  get me() {\n    return this.members.get(this.client.user.id);\n  }\n\n  /**\n   * Fetches a collection of roles in the current guild sorted by position\n   * @type {Collection<Snowflake, Role>}\n   * @readonly\n   * @private\n   */\n  get _sortedRoles() {\n    return this._sortPositionWithID(this.roles);\n  }\n\n  /**\n   * Returns the GuildMember form of a User object, if the user is present in the guild.\n   * @param {UserResolvable} user The user that you want to obtain the GuildMember of\n   * @returns {?GuildMember}\n   * @example\n   * // Get the guild member of a user\n   * const member = guild.member(message.author);\n   */\n  member(user) {\n    return this.client.resolver.resolveGuildMember(this, user);\n  }\n\n  /**\n   * An object containing information about a guild member's ban.\n   * @typedef {Object} BanInfo\n   * @property {User} user User that was banned\n   * @property {?string} reason Reason the user was banned\n   */\n\n  /**\n   * Fetch a ban for a user.\n   * @returns {Promise<BanInfo>}\n   * @param {UserResolvable} user The user to fetch the ban for\n   * @example\n   * // Get ban\n   * guild.fetchBan(message.author)\n   *   .then(({ user, reason }) => console.log(`${user.tag} was banned for the reason: ${reason}.`))\n   *   .catch(console.error);\n   */\n  fetchBan(user) {\n    return this.client.rest.methods.getGuildBan(this, user);\n  }\n\n  /**\n   * Fetch a collection of banned users in this guild.\n   * @returns {Promise<Collection<Snowflake, User|BanInfo>>}\n   * @param {boolean} [withReasons=false] Whether or not to include the ban reason(s)\n   * @example\n   * // Fetch bans in guild\n   * guild.fetchBans()\n   *   .then(bans => console.log(`This guild has ${bans.size} bans`))\n   *   .catch(console.error);\n   */\n  fetchBans(withReasons = false) {\n    if (withReasons) return this.client.rest.methods.getGuildBans(this);\n    return this.client.rest.methods.getGuildBans(this)\n      .then(bans => {\n        const users = new Collection();\n        for (const ban of bans.values()) users.set(ban.user.id, ban.user);\n        return users;\n      });\n  }\n\n  /**\n   * Fetch a collection of invites to this guild.\n   * Resolves with a collection mapping invites by their codes.\n   * @returns {Promise<Collection<string, Invite>>}\n   * @example\n   * // Fetch invites\n   * guild.fetchInvites()\n   *   .then(invites => console.log(`Fetched ${invites.size} invites`))\n   *   .catch(console.error);\n   * @example\n   * // Fetch invite creator by their id\n   * guild.fetchInvites()\n   *  .then(invites => console.log(invites.find(invite => invite.inviter.id === '84484653687267328')))\n   *  .catch(console.error);\n   */\n  fetchInvites() {\n    return this.client.rest.methods.getGuildInvites(this);\n  }\n\n  /**\n   * Fetches the vanity url invite code to this guild.\n   * Resolves with a string matching the vanity url invite code, not the full url.\n   * @returns {Promise<string>}\n   * @example\n   * // Fetch invites\n   * guild.fetchVanityCode()\n   *   .then(code => {\n   *     console.log(`Vanity URL: https://discord.gg/${code}`);\n   *   })\n   *   .catch(console.error);\n   */\n  fetchVanityCode() {\n    if (!this.features.includes('VANITY_URL')) {\n      return Promise.reject(new Error('This guild does not have the VANITY_URL feature enabled.'));\n    }\n    return this.client.rest.methods.getGuildVanityCode(this);\n  }\n\n\n  /**\n   * Fetch all webhooks for the guild.\n   * @returns {Promise<Collection<Snowflake, Webhook>>}\n   * @example\n   * // Fetch webhooks\n   * guild.fetchWebhooks()\n   *   .then(webhooks => console.log(`Fetched ${webhooks.size} webhooks`))\n   *   .catch(console.error);\n   */\n  fetchWebhooks() {\n    return this.client.rest.methods.getGuildWebhooks(this);\n  }\n\n  /**\n   * Fetch available voice regions.\n   * @returns {Promise<Collection<string, VoiceRegion>>}\n   * @example\n   * // Fetch voice regions\n   * guild.fetchVoiceRegions()\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  fetchVoiceRegions() {\n    return this.client.rest.methods.fetchVoiceRegions(this.id);\n  }\n\n  /**\n   * The Guild Embed object\n   * @typedef {Object} GuildEmbedData\n   * @property {boolean} enabled Whether the embed is enabled\n   * @property {?ChannelResolvable} channel The embed channel\n   */\n\n  /**\n   * Fetches the guild embed.\n   * @returns {Promise<GuildEmbedData>}\n   * @example\n   * // Fetches the guild embed\n   * guild.fetchEmbed()\n   *   .then(embed => console.log(`The embed is ${embed.enabled ? 'enabled' : 'disabled'}`))\n   *   .catch(console.error);\n   */\n  fetchEmbed() {\n    return this.client.rest.methods.fetchEmbed(this.id);\n  }\n\n  /**\n   * Fetch audit logs for this guild.\n   * @param {Object} [options={}] Options for fetching audit logs\n   * @param {Snowflake|GuildAuditLogsEntry} [options.before] Limit to entries from before specified entry\n   * @param {Snowflake|GuildAuditLogsEntry} [options.after] Limit to entries from after specified entry\n   * @param {number} [options.limit] Limit number of entries\n   * @param {UserResolvable} [options.user] Only show entries involving this user\n   * @param {AuditLogAction} [options.type] Only show entries involving this action type\n   * @returns {Promise<GuildAuditLogs>}\n   * @example\n   * // Output audit log entries\n   * guild.fetchAuditLogs()\n   *   .then(audit => console.log(audit.entries.first()))\n   *   .catch(console.error);\n   */\n  fetchAuditLogs(options) {\n    return this.client.rest.methods.getGuildAuditLogs(this, options);\n  }\n\n  /**\n   * Adds a user to the guild using OAuth2. Requires the `CREATE_INSTANT_INVITE` permission.\n   * @param {UserResolvable} user User to add to the guild\n   * @param {Object} options Options for the addition\n   * @param {string} options.accessToken An OAuth2 access token for the user with the `guilds.join` scope granted to the\n   * bot's application\n   * @param {string} [options.nick] Nickname to give the member (requires `MANAGE_NICKNAMES`)\n   * @param {Collection<Snowflake, Role>|Role[]|Snowflake[]} [options.roles] Roles to add to the member\n   * (requires `MANAGE_ROLES`)\n   * @param {boolean} [options.mute] Whether the member should be muted (requires `MUTE_MEMBERS`)\n   * @param {boolean} [options.deaf] Whether the member should be deafened (requires `DEAFEN_MEMBERS`)\n   * @returns {Promise<GuildMember>}\n   */\n  addMember(user, options) {\n    user = this.client.resolver.resolveUserID(user);\n    if (this.members.has(user)) return Promise.resolve(this.members.get(user));\n    return this.client.rest.methods.putGuildMember(this, user, options);\n  }\n\n  /**\n   * Fetch a single guild member from a user.\n   * @param {UserResolvable} user The user to fetch the member for\n   * @param {boolean} [cache=true] Insert the member into the members cache\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Fetch a guild member\n   * guild.fetchMember(message.author)\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  fetchMember(user, cache = true) {\n    user = this.client.resolver.resolveUser(user);\n    if (!user) return Promise.reject(new Error('Invalid or uncached id provided.'));\n    const member = this.members.get(user.id);\n    if (member && member.joinedTimestamp) return Promise.resolve(member);\n    return this.client.rest.methods.getGuildMember(this, user, cache);\n  }\n\n  /**\n   * Fetches all the members in the guild, even if they are offline. If the guild has less than 250 members,\n   * this should not be necessary.\n   * @param {string} [query=''] Limit fetch to members with similar usernames\n   * @param {number} [limit=0] Maximum number of members to request\n   * @returns {Promise<Guild>}\n   * @example\n   * // Fetch guild members\n   * guild.fetchMembers()\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // Fetches a maximum of 1 member with the given query\n   * guild.fetchMembers('hydrabolt', 1)\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  fetchMembers(query = '', limit = 0) {\n    return new Promise((resolve, reject) => {\n      if (this.memberCount === this.members.size) {\n        resolve(this);\n        return;\n      }\n      this.client.ws.send({\n        op: Constants.OPCodes.REQUEST_GUILD_MEMBERS,\n        d: {\n          guild_id: this.id,\n          query,\n          limit,\n        },\n      });\n      const handler = (members, guild) => {\n        if (guild.id !== this.id) return;\n        if (this.memberCount === this.members.size || members.length < 1000) {\n          this.client.removeListener(Constants.Events.GUILD_MEMBERS_CHUNK, handler);\n          resolve(this);\n        }\n      };\n      this.client.on(Constants.Events.GUILD_MEMBERS_CHUNK, handler);\n      this.client.setTimeout(() => reject(new Error('Members didn\\'t arrive in time.')), 120 * 1000);\n    });\n  }\n\n  /**\n   * Performs a search within the entire guild.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {MessageSearchOptions} [options={}] Options to pass to the search\n   * @returns {Promise<MessageSearchResult>}\n   * @example\n   * guild.search({\n   *   content: 'discord.js',\n   *   before: '2016-11-17'\n   * })\n   *   .then(res => {\n   *     const hit = res.messages[0].find(m => m.hit).content;\n   *     console.log(`I found: **${hit}**, total results: ${res.totalResults}`);\n   *   })\n   *   .catch(console.error);\n   */\n  search(options = {}) {\n    return this.client.rest.methods.search(this, options);\n  }\n\n  /**\n   * The data for editing a guild.\n   * @typedef {Object} GuildEditData\n   * @property {string} [name] The name of the guild\n   * @property {string} [region] The region of the guild\n   * @property {number} [verificationLevel] The verification level of the guild\n   * @property {number} [explicitContentFilter] The level of the explicit content filter\n   * @property {ChannelResolvable} [afkChannel] The AFK channel of the guild\n   * @property {ChannelResolvable} [systemChannel] The system channel of the guild\n   * @property {number} [afkTimeout] The AFK timeout of the guild\n   * @property {Base64Resolvable} [icon] The icon of the guild\n   * @property {GuildMemberResolvable} [owner] The owner of the guild\n   * @property {Base64Resolvable} [splash] The splash screen of the guild\n   */\n\n  /**\n   * Updates the guild with new information - e.g. a new name.\n   * @param {GuildEditData} data The data to update the guild with\n   * @param {string} [reason] Reason for editing the guild\n   * @returns {Promise<Guild>}\n   * @example\n   * // Set the guild name and region\n   * guild.edit({\n   *   name: 'Discord Guild',\n   *   region: 'london',\n   * })\n   *   .then(g => console.log(`Changed guild name to ${g} and region to ${g.region}`))\n   *   .catch(console.error);\n   */\n  edit(data, reason) {\n    const _data = {};\n    if (data.name) _data.name = data.name;\n    if (data.region) _data.region = data.region;\n    if (typeof data.verificationLevel !== 'undefined') _data.verification_level = Number(data.verificationLevel);\n    if (typeof data.afkChannel !== 'undefined') {\n      _data.afk_channel_id = this.client.resolver.resolveChannelID(data.afkChannel);\n    }\n    if (typeof data.systemChannel !== 'undefined') {\n      _data.system_channel_id = this.client.resolver.resolveChannelID(data.systemChannel);\n    }\n    if (data.afkTimeout) _data.afk_timeout = Number(data.afkTimeout);\n    if (typeof data.icon !== 'undefined') _data.icon = data.icon;\n    if (data.owner) _data.owner_id = this.client.resolver.resolveUser(data.owner).id;\n    if (typeof data.splash !== 'undefined') _data.splash = data.splash;\n    if (typeof data.explicitContentFilter !== 'undefined') {\n      _data.explicit_content_filter = Number(data.explicitContentFilter);\n    }\n    if (typeof data.defaultMessageNotifications !== 'undefined') {\n      _data.default_message_notifications = typeof data.defaultMessageNotifications === 'string' ?\n        Constants.DefaultMessageNotifications.indexOf(data.defaultMessageNotifications) :\n        Number(data.defaultMessageNotifications);\n    }\n    return this.client.rest.methods.updateGuild(this, _data, reason);\n  }\n\n  /**\n   * Edit the level of the explicit content filter.\n   * @param {number} explicitContentFilter The new level of the explicit content filter\n   * @param {string} [reason] Reason for changing the level of the guild's explicit content filter\n   * @returns {Promise<Guild>}\n   */\n  setExplicitContentFilter(explicitContentFilter, reason) {\n    return this.edit({ explicitContentFilter }, reason);\n  }\n\n  /**\n   * Edits the setting of the default message notifications of the guild.\n   * @param {DefaultMessageNotifications|number} defaultMessageNotifications\n   * The new setting for the default message notifications\n   * @param {string} [reason] Reason for changing the setting of the default message notifications\n   * @returns {Promise<Guild>}\n   */\n  setDefaultMessageNotifications(defaultMessageNotifications, reason) {\n    return this.edit({ defaultMessageNotifications }, reason);\n  }\n\n  /**\n   * Edit the name of the guild.\n   * @param {string} name The new name of the guild\n   * @param {string} [reason] Reason for changing the guild's name\n   * @returns {Promise<Guild>}\n   * @example\n   * // Edit the guild name\n   * guild.setName('Discord Guild')\n   *  .then(g => console.log(`Updated guild name to ${g}`))\n   *  .catch(console.error);\n   */\n  setName(name, reason) {\n    return this.edit({ name }, reason);\n  }\n\n  /**\n   * Edit the region of the guild.\n   * @param {string} region The new region of the guild\n   * @param {string} [reason] Reason for changing the guild's region\n   * @returns {Promise<Guild>}\n   * @example\n   * // Edit the guild region\n   * guild.setRegion('london')\n   *  .then(g => console.log(`Updated guild region to ${g.region}`))\n   *  .catch(console.error);\n   */\n  setRegion(region, reason) {\n    return this.edit({ region }, reason);\n  }\n\n  /**\n   * Edit the verification level of the guild.\n   * @param {number} verificationLevel The new verification level of the guild\n   * @param {string} [reason] Reason for changing the guild's verification level\n   * @returns {Promise<Guild>}\n   * @example\n   * // Edit the guild verification level\n   * guild.setVerificationLevel(1)\n   *  .then(g => console.log(`Updated guild verification level to ${g.verificationLevel}`))\n   *  .catch(console.error);\n   */\n  setVerificationLevel(verificationLevel, reason) {\n    return this.edit({ verificationLevel }, reason);\n  }\n\n  /**\n   * Edit the AFK channel of the guild.\n   * @param {ChannelResolvable} afkChannel The new AFK channel\n   * @param {string} [reason] Reason for changing the guild's AFK channel\n   * @returns {Promise<Guild>}\n   * @example\n   * // Edit the guild AFK channel\n   * guild.setAFKChannel(channel)\n   *  .then(g => console.log(`Updated guild AFK channel to ${g.afkChannel.name}`))\n   *  .catch(console.error);\n   */\n  setAFKChannel(afkChannel, reason) {\n    return this.edit({ afkChannel }, reason);\n  }\n\n  /**\n   * Edit the system channel of the guild.\n   * @param {ChannelResolvable} systemChannel The new system channel\n   * @param {string} [reason] Reason for changing the guild's system channel\n   * @returns {Promise<Guild>}\n   */\n  setSystemChannel(systemChannel, reason) {\n    return this.edit({ systemChannel }, reason);\n  }\n\n  /**\n   * Edit the AFK timeout of the guild.\n   * @param {number} afkTimeout The time in seconds that a user must be idle to be considered AFK\n   * @param {string} [reason] Reason for changing the guild's AFK timeout\n   * @returns {Promise<Guild>}\n   * @example\n   * // Edit the guild AFK channel\n   * guild.setAFKTimeout(60)\n   *  .then(g => console.log(`Updated guild AFK timeout to ${g.afkTimeout}`))\n   *  .catch(console.error);\n   */\n  setAFKTimeout(afkTimeout, reason) {\n    return this.edit({ afkTimeout }, reason);\n  }\n\n  /**\n   * Set a new guild icon.\n   * @param {Base64Resolvable|BufferResolvable} icon The new icon of the guild\n   * @param {string} [reason] Reason for changing the guild's icon\n   * @returns {Promise<Guild>}\n   * @example\n   * // Edit the guild icon\n   * guild.setIcon('./icon.png')\n   *  .then(console.log)\n   *  .catch(console.error);\n   */\n  setIcon(icon, reason) {\n    return this.client.resolver.resolveImage(icon).then(data => this.edit({ icon: data, reason }));\n  }\n\n  /**\n   * Sets a new owner of the guild.\n   * @param {GuildMemberResolvable} owner The new owner of the guild\n   * @param {string} [reason] Reason for setting the new owner\n   * @returns {Promise<Guild>}\n   * @example\n   * // Edit the guild owner\n   * guild.setOwner(guild.members.first())\n   *  .then(g => console.log(`Updated the guild owner to ${g.owner.displayName}`))\n   *  .catch(console.error);\n   */\n  setOwner(owner, reason) {\n    return this.edit({ owner }, reason);\n  }\n\n  /**\n   * Set a new guild splash screen.\n   * @param {BufferResolvable|Base64Resolvable} splash The new splash screen of the guild\n   * @param {string} [reason] Reason for changing the guild's splash screen\n   * @returns {Promise<Guild>}\n   * @example\n   * // Edit the guild splash\n   * guild.setSplash('./splash.png')\n   *  .then(console.log)\n   *  .catch(console.error);\n   */\n  setSplash(splash) {\n    return this.client.resolver.resolveImage(splash).then(data => this.edit({ splash: data }));\n  }\n\n  /**\n   * Sets the position of the guild in the guild listing.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {number} position Absolute or relative position\n   * @param {boolean} [relative=false] Whether to position relatively or absolutely\n   * @returns {Promise<Guild>}\n   */\n  setPosition(position, relative) {\n    if (this.client.user.bot) {\n      return Promise.reject(new Error('Setting guild position is only available for user accounts'));\n    }\n    return this.client.user.settings.setGuildPosition(this, position, relative);\n  }\n\n  /**\n   * Marks all messages in this guild as read.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {Promise<Guild>}\n   */\n  acknowledge() {\n    return this.client.rest.methods.ackGuild(this);\n  }\n\n  /**\n   * Allow direct messages from guild members.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {boolean} allow Whether to allow direct messages\n   * @returns {Promise<Guild>}\n   */\n  allowDMs(allow) {\n    const settings = this.client.user.settings;\n    if (allow) return settings.removeRestrictedGuild(this);\n    else return settings.addRestrictedGuild(this);\n  }\n\n  /**\n   * Bans a user from the guild.\n   * @param {UserResolvable} user The user to ban\n   * @param {Object|number|string} [options] Ban options. If a number, the number of days to delete messages for, if a\n   * string, the ban reason. Supplying an object allows you to do both.\n   * @param {number} [options.days=0] Number of days of messages to delete\n   * @param {string} [options.reason] Reason for banning\n   * @returns {Promise<GuildMember|User|string>} Result object will be resolved as specifically as possible.\n   * If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot\n   * be resolved, the user ID will be the result.\n   * @example\n   * // Ban a user by ID\n   * guild.ban('some user ID')\n   *   .then(user => console.log(`Banned ${user.username || user.id || user} from ${guild}`))\n   *   .catch(console.error);\n   * @example\n   * // Ban a user by object with reason and days\n   * guild.ban(user, { days: 7, reason: 'He needed to go' })\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  ban(user, options = {}) {\n    if (typeof options === 'number') {\n      options = { reason: null, 'delete-message-days': options };\n    } else if (typeof options === 'string') {\n      options = { reason: options, 'delete-message-days': 0 };\n    }\n    if (options.days) options['delete-message-days'] = options.days;\n    return this.client.rest.methods.banGuildMember(this, user, options);\n  }\n\n  /**\n   * Unbans a user from the guild.\n   * @param {UserResolvable} user The user to unban\n   * @param {string} [reason] Reason for unbanning the user\n   * @returns {Promise<User>}\n   * @example\n   * // Unban a user by ID (or with a user/guild member object)\n   * guild.unban('some user ID')\n   *   .then(user => console.log(`Unbanned ${user.username} from ${guild}`))\n   *   .catch(console.error);\n   */\n  unban(user, reason) {\n    return this.client.rest.methods.unbanGuildMember(this, user, reason);\n  }\n\n  /**\n   * Prunes members from the guild based on how long they have been inactive.\n   * @param {number} days Number of days of inactivity required to kick\n   * @param {boolean} [dry=false] If true, will return number of users that will be kicked, without actually doing it\n   * @param {string} [reason] Reason for this prune\n   * @returns {Promise<number>} The number of members that were/will be kicked\n   * @example\n   * // See how many members will be pruned\n   * guild.pruneMembers(12, true)\n   *   .then(pruned => console.log(`This will prune ${pruned} people!`))\n   *   .catch(console.error);\n   * @example\n   * // Actually prune the members\n   * guild.pruneMembers(12)\n   *   .then(pruned => console.log(`I just pruned ${pruned} people!`))\n   *   .catch(console.error);\n   */\n  pruneMembers(days, dry = false, reason) {\n    if (typeof days !== 'number') throw new TypeError('Days must be a number.');\n    return this.client.rest.methods.pruneGuildMembers(this, days, dry, reason);\n  }\n\n  /**\n   * Syncs this guild (already done automatically every 30 seconds).\n   * <warn>This is only available when using a user account.</warn>\n   */\n  sync() {\n    if (!this.client.user.bot) this.client.syncGuilds([this]);\n  }\n\n  /**\n   * Overwrites to use when creating a channel or replacing overwrites\n   * @typedef {Object} ChannelCreationOverwrites\n   * @property {PermissionResolvable} [allow] The permissions to allow\n   * @property {PermissionResolvable} [allowed] The permissions to allow\n   * **(deprecated)**\n   * @property {PermissionResolvable} [deny] The permissions to deny\n   * @property {PermissionResolvable} [denied] The permissions to deny\n   * **(deprecated)**\n   * @property {GuildMemberResolvable|RoleResolvable} memberOrRole Member or role this overwrite is for\n   */\n\n  /**\n   * Creates a new channel in the guild.\n   * @param {string} name The name of the new channel\n   * @param {string|ChannelData} [typeOrOptions='text']\n   * The type of the new channel, either `text` or `voice` or `category`. **(deprecated, use options)**\n   * Alternatively options for the new channel, overriding the following parameters.\n   * @param {ChannelCreationOverwrites[]|Collection<Snowflake, PermissionOverwrites>} [permissionOverwrites]\n   * Permission overwrites **(deprecated, use options)**\n   * @param {string} [reason] Reason for creating this channel **(deprecated, use options)**\n   * @returns {Promise<CategoryChannel|TextChannel|VoiceChannel>}\n   * @example\n   * // Create a new text channel\n   * guild.createChannel('new-general', { type: 'text' })\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // Create a new category channel with permission overwrites\n   * guild.createChannel('new-category', {\n   *   type: 'category',\n   *   permissionsOverwrites: [{\n   *     id: guild.id,\n   *     deny: ['MANAGE_MESSAGES'],\n   *     allow: ['SEND_MESSAGES']\n   *   }]\n   * })\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  createChannel(name, typeOrOptions, permissionOverwrites, reason) {\n    if (!typeOrOptions || (typeof typeOrOptions === 'string')) {\n      if (typeOrOptions) {\n        ((any, ...more) => console.warn(any, more))(\n          'Guild#createChannel: Create channels with an options object instead of separate parameters',\n          'DeprecationWarning'\n        );\n      }\n      typeOrOptions = {\n        type: typeOrOptions,\n        permissionOverwrites,\n        reason,\n      };\n    }\n    return this.client.rest.methods.createChannel(this, name, typeOrOptions);\n  }\n\n  /**\n   * The data needed for updating a channel's position.\n   * @typedef {Object} ChannelPosition\n   * @property {ChannelResolvable} channel Channel to update\n   * @property {number} position New position for the channel\n   */\n\n  /**\n   * Batch-updates the guild's channels' positions.\n   * @param {ChannelPosition[]} channelPositions Channel positions to update\n   * @returns {Promise<Guild>}\n   * @example\n   * guild.updateChannels([{ channel: channelID, position: newChannelIndex }])\n   *   .then(g => console.log(`Updated channel positions for ${g}`))\n   *   .catch(console.error);\n   */\n  setChannelPositions(channelPositions) {\n    return this.client.rest.methods.updateChannelPositions(this.id, channelPositions);\n  }\n\n  /**\n   * Edits the guild's embed.\n   * @param {GuildEmbedData} embed The embed for the guild\n   * @param {string} [reason] Reason for changing the guild's embed\n   * @returns {Promise<Guild>}\n   */\n  setEmbed(embed, reason) {\n    return this.client.rest.methods.updateEmbed(this.id, embed, reason)\n      .then(() => this);\n  }\n\n  /**\n   * Creates a new role in the guild with given information.\n   * @param {RoleData} [data] The data to update the role with\n   * @param {string} [reason] Reason for creating this role\n   * @returns {Promise<Role>}\n   * @example\n   * // Create a new role\n   * guild.createRole()\n   *   .then(role => console.log(`Created new role with name ${role.name}`))\n   *   .catch(console.error);\n   * @example\n   * // Create a new role with data\n   * guild.createRole({\n   *   name: 'Super Cool People',\n   *   color: 'BLUE',\n   * })\n   *   .then(role => console.log(`Created new role with name ${role.name} and color ${role.color}`))\n   *   .catch(console.error)\n   */\n  createRole(data = {}, reason) {\n    return this.client.rest.methods.createGuildRole(this, data, reason);\n  }\n\n  /**\n   * Creates a new custom emoji in the guild.\n   * @param {BufferResolvable|Base64Resolvable} attachment The image for the emoji\n   * @param {string} name The name for the emoji\n   * @param {Collection<Snowflake, Role>|Role[]} [roles] Roles to limit the emoji to\n   * @param {string} [reason] Reason for creating the emoji\n   * @returns {Promise<Emoji>} The created emoji\n   * @example\n   * // Create a new emoji from a url\n   * guild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n   *   .then(emoji => console.log(`Created new emoji with name ${emoji.name}`))\n   *   .catch(console.error);\n   * @example\n   * // Create a new emoji from a file on your computer\n   * guild.createEmoji('./memes/banana.png', 'banana')\n   *   .then(emoji => console.log(`Created new emoji with name ${emoji.name}`))\n   *   .catch(console.error);\n   */\n  createEmoji(attachment, name, roles, reason) {\n    if (typeof attachment === 'string' && attachment.startsWith('data:')) {\n      return this.client.rest.methods.createEmoji(this, attachment, name, roles, reason);\n    } else {\n      return this.client.resolver.resolveImage(attachment).then(data =>\n        this.client.rest.methods.createEmoji(this, data, name, roles, reason)\n      );\n    }\n  }\n\n  /**\n   * Delete an emoji.\n   * @param {Emoji|string} emoji The emoji to delete\n   * @param {string} [reason] Reason for deleting the emoji\n   * @returns {Promise}\n   */\n  deleteEmoji(emoji, reason) {\n    if (typeof emoji === 'string') emoji = this.emojis.get(emoji);\n    if (!(emoji instanceof Emoji)) throw new TypeError('Emoji must be either an instance of Emoji or an ID');\n    return this.client.rest.methods.deleteEmoji(emoji, reason);\n  }\n\n  /**\n   * Causes the client to leave the guild.\n   * @returns {Promise<Guild>}\n   * @example\n   * // Leave a guild\n   * guild.leave()\n   *   .then(g => console.log(`Left the guild ${g}`))\n   *   .catch(console.error);\n   */\n  leave() {\n    return this.client.rest.methods.leaveGuild(this);\n  }\n\n  /**\n   * Causes the client to delete the guild.\n   * @returns {Promise<Guild>}\n   * @example\n   * // Delete a guild\n   * guild.delete()\n   *   .then(g => console.log(`Deleted the guild ${g}`))\n   *   .catch(console.error);\n   */\n  delete() {\n    return this.client.rest.methods.deleteGuild(this);\n  }\n\n  /**\n   * Whether this guild equals another guild. It compares all properties, so for most operations\n   * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\n   * what most users need.\n   * @param {Guild} guild The guild to compare with\n   * @returns {boolean}\n   */\n  equals(guild) {\n    let equal =\n      guild &&\n      this.id === guild.id &&\n      this.available === !guild.unavailable &&\n      this.splash === guild.splash &&\n      this.region === guild.region &&\n      this.name === guild.name &&\n      this.memberCount === guild.member_count &&\n      this.large === guild.large &&\n      this.icon === guild.icon &&\n      Util.arraysEqual(this.features, guild.features) &&\n      this.ownerID === guild.owner_id &&\n      this.verificationLevel === guild.verification_level &&\n      this.embedEnabled === guild.embed_enabled;\n\n    if (equal) {\n      if (this.embedChannel) {\n        if (this.embedChannel.id !== guild.embed_channel_id) equal = false;\n      } else if (guild.embed_channel_id) {\n        equal = false;\n      }\n    }\n\n    return equal;\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the guild's name instead of the guild object.\n   * @returns {string}\n   * @example\n   * // Logs: Hello from My Guild!\n   * console.log(`Hello from ${guild}!`);\n   * @example\n   * // Logs: Hello from My Guild!\n   * console.log('Hello from ' + guild + '!');\n   */\n  toString() {\n    return this.name;\n  }\n\n  _addMember(guildUser, emitEvent = true) {\n    const existing = this.members.has(guildUser.user.id);\n    if (!(guildUser.user instanceof User)) guildUser.user = this.client.dataManager.newUser(guildUser.user);\n\n    guildUser.joined_at = guildUser.joined_at || 0;\n    const member = new GuildMember(this, guildUser);\n    this.members.set(member.id, member);\n\n    if (this._rawVoiceStates && this._rawVoiceStates.has(member.user.id)) {\n      const voiceState = this._rawVoiceStates.get(member.user.id);\n      member.serverMute = voiceState.mute;\n      member.serverDeaf = voiceState.deaf;\n      member.selfMute = voiceState.self_mute;\n      member.selfDeaf = voiceState.self_deaf;\n      member.voiceSessionID = voiceState.session_id;\n      member.voiceChannelID = voiceState.channel_id;\n      if (this.client.channels.has(voiceState.channel_id)) {\n        this.client.channels.get(voiceState.channel_id).members.set(member.user.id, member);\n      } else {\n        this.client.emit('warn', `Member ${member.id} added in guild ${this.id} with an uncached voice channel`);\n      }\n    }\n\n    /**\n     * Emitted whenever a user joins a guild.\n     * @event Client#guildMemberAdd\n     * @param {GuildMember} member The member that has joined a guild\n     */\n    if (this.client.ws.connection.status === Constants.Status.READY && emitEvent && !existing) {\n      this.client.emit(Constants.Events.GUILD_MEMBER_ADD, member);\n    }\n\n    return member;\n  }\n\n  _updateMember(member, data) {\n    const oldMember = Util.cloneObject(member);\n\n    if (data.roles) member._roles = data.roles;\n    if (typeof data.nick !== 'undefined') member.nickname = data.nick;\n\n    const notSame = member.nickname !== oldMember.nickname || !Util.arraysEqual(member._roles, oldMember._roles);\n\n    if (this.client.ws.connection.status === Constants.Status.READY && notSame) {\n      /**\n       * Emitted whenever a guild member changes - i.e. new role, removed role, nickname.\n       * @event Client#guildMemberUpdate\n       * @param {GuildMember} oldMember The member before the update\n       * @param {GuildMember} newMember The member after the update\n       */\n      this.client.emit(Constants.Events.GUILD_MEMBER_UPDATE, oldMember, member);\n    }\n\n    return {\n      old: oldMember,\n      mem: member,\n    };\n  }\n\n  _removeMember(guildMember) {\n    if (guildMember.voiceChannel) guildMember.voiceChannel.members.delete(guildMember.id);\n    this.members.delete(guildMember.id);\n  }\n\n  _memberSpeakUpdate(user, speaking) {\n    const member = this.members.get(user);\n    if (member && member.speaking !== speaking) {\n      member.speaking = speaking;\n      /**\n       * Emitted once a guild member starts/stops speaking.\n       * @event Client#guildMemberSpeaking\n       * @param {GuildMember} member The member that started/stopped speaking\n       * @param {boolean} speaking Whether or not the member is speaking\n       */\n      this.client.emit(Constants.Events.GUILD_MEMBER_SPEAKING, member, speaking);\n    }\n  }\n\n  _setPresence(id, presence) {\n    if (this.presences.get(id)) {\n      this.presences.get(id).update(presence);\n      return;\n    }\n    this.presences.set(id, new Presence(presence, this.client));\n  }\n\n  /**\n   * Set the position of a role in this guild.\n   * @param {string|Role} role The role to edit, can be a role object or a role ID\n   * @param {number} position The new position of the role\n   * @param {boolean} [relative=false] Position Moves the role relative to its current position\n   * @returns {Promise<Guild>}\n   */\n  setRolePosition(role, position, relative = false) {\n    if (typeof role === 'string') {\n      role = this.roles.get(role);\n      if (!role) return Promise.reject(new Error('Supplied role is not a role or snowflake.'));\n    }\n\n    position = Number(position);\n    if (isNaN(position)) return Promise.reject(new Error('Supplied position is not a number.'));\n\n    let updatedRoles = this._sortedRoles.array();\n\n    Util.moveElementInArray(updatedRoles, role, position, relative);\n\n    updatedRoles = updatedRoles.map((r, i) => ({ id: r.id, position: i }));\n    return this.client.rest.methods.setRolePositions(this.id, updatedRoles);\n  }\n\n  /**\n   * Set the position of a channel in this guild.\n   * @param {string|GuildChannel} channel The channel to edit, can be a channel object or a channel ID\n   * @param {number} position The new position of the channel\n   * @param {boolean} [relative=false] Position Moves the channel relative to its current position\n   * @returns {Promise<Guild>}\n   */\n  setChannelPosition(channel, position, relative = false) {\n    if (typeof channel === 'string') {\n      channel = this.channels.get(channel);\n      if (!channel) return Promise.reject(new Error('Supplied channel is not a channel or snowflake.'));\n    }\n\n    position = Number(position);\n    if (isNaN(position)) return Promise.reject(new Error('Supplied position is not a number.'));\n\n    let updatedChannels = this._sortedChannels(channel.type).array();\n\n    Util.moveElementInArray(updatedChannels, channel, position, relative);\n\n    updatedChannels = updatedChannels.map((r, i) => ({ id: r.id, position: i }));\n    return this.client.rest.methods.setChannelPositions(this.id, updatedChannels);\n  }\n\n  /**\n   * Fetches a collection of channels in the current guild sorted by position.\n   * @param {string} type The channel type\n   * @returns {Collection<Snowflake, GuildChannel>}\n   * @private\n   */\n  _sortedChannels(type) {\n    return this._sortPositionWithID(this.channels.filter(c => {\n      if (type === 'voice' && c.type === 'voice') return true;\n      else if (type !== 'voice' && c.type !== 'voice') return true;\n      else return type === c.type;\n    }));\n  }\n\n  /**\n   * Sorts a collection by object position or ID if the positions are equivalent.\n   * Intended to be identical to Discord's sorting method.\n   * @param {Collection} collection The collection to sort\n   * @returns {Collection}\n   * @private\n   */\n  _sortPositionWithID(collection) {\n    return collection.sort((a, b) =>\n      a.position !== b.position ?\n        a.position - b.position :\n        Long.fromString(a.id).sub(Long.fromString(b.id)).toNumber()\n    );\n  }\n}\n\n/**\n * The `#general` TextChannel of the guild\n * @name Guild#defaultChannel\n * @type {TextChannel}\n * @readonly\n * @deprecated\n */\nObject.defineProperty(Guild.prototype, 'defaultChannel', {\n  get: util.deprecate(function defaultChannel() {\n    return this.channels.get(this.id);\n  }, 'Guild#defaultChannel: This property is obsolete, will be removed in v12.0.0, and may not function as expected.'),\n});\n\nGuild.prototype.acknowledge =\n  util.deprecate(Guild.prototype.acknowledge, 'Guild#acknowledge: userbot methods will be removed');\n\nGuild.prototype.setPosition =\n  util.deprecate(Guild.prototype.setPosition, 'Guild#setPosition: userbot methods will be removed');\n\nGuild.prototype.search =\n  util.deprecate(Guild.prototype.search, 'Guild#search: userbot methods will be removed');\n\nGuild.prototype.sync =\n  util.deprecate(Guild.prototype.sync, 'Guild#sync:, userbot methods will be removed');\n\nmodule.exports = Guild;\n\n\n//# sourceURL=webpack:///./src/structures/Guild.js?");

/***/ }),

/***/ "./src/structures/GuildAuditLogs.js":
/*!******************************************!*\
  !*** ./src/structures/GuildAuditLogs.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Snowflake = __webpack_require__(/*! ../util/Snowflake */ \"./src/util/Snowflake.js\");\nconst Webhook = __webpack_require__(/*! ./Webhook */ \"./src/structures/Webhook.js\");\nconst Invite = __webpack_require__(/*! ./Invite */ \"./src/structures/Invite.js\");\n\n/**\n * The target type of an entry, e.g. `GUILD`. Here are the available types:\n * * GUILD\n * * CHANNEL\n * * USER\n * * ROLE\n * * INVITE\n * * WEBHOOK\n * * EMOJI\n * * MESSAGE\n * @typedef {string} AuditLogTargetType\n */\n\n/**\n * Key mirror of all available audit log targets.\n * @name GuildAuditLogs.Targets\n * @type {AuditLogTargetType}\n */\nconst Targets = {\n  ALL: 'ALL',\n  GUILD: 'GUILD',\n  CHANNEL: 'CHANNEL',\n  USER: 'USER',\n  ROLE: 'ROLE',\n  INVITE: 'INVITE',\n  WEBHOOK: 'WEBHOOK',\n  EMOJI: 'EMOJI',\n  MESSAGE: 'MESSAGE',\n};\n\n/**\n * The action of an entry. Here are the available actions:\n * * ALL: null\n * * GUILD_UPDATE: 1\n * * CHANNEL_CREATE: 10\n * * CHANNEL_UPDATE: 11\n * * CHANNEL_DELETE: 12\n * * CHANNEL_OVERWRITE_CREATE: 13\n * * CHANNEL_OVERWRITE_UPDATE: 14\n * * CHANNEL_OVERWRITE_DELETE: 15\n * * MEMBER_KICK: 20\n * * MEMBER_PRUNE: 21\n * * MEMBER_BAN_ADD: 22\n * * MEMBER_BAN_REMOVE: 23\n * * MEMBER_UPDATE: 24\n * * MEMBER_ROLE_UPDATE: 25\n * * ROLE_CREATE: 30\n * * ROLE_UPDATE: 31\n * * ROLE_DELETE: 32\n * * INVITE_CREATE: 40\n * * INVITE_UPDATE: 41\n * * INVITE_DELETE: 42\n * * WEBHOOK_CREATE: 50\n * * WEBHOOK_UPDATE: 51\n * * WEBHOOK_DELETE: 52\n * * EMOJI_CREATE: 60\n * * EMOJI_UPDATE: 61\n * * EMOJI_DELETE: 62\n * * MESSAGE_DELETE: 72\n * @typedef {?number|string} AuditLogAction\n */\n\n/**\n * All available actions keyed under their names to their numeric values.\n * @name GuildAuditLogs.Actions\n * @type {AuditLogAction}\n */\nconst Actions = {\n  ALL: null,\n  GUILD_UPDATE: 1,\n  CHANNEL_CREATE: 10,\n  CHANNEL_UPDATE: 11,\n  CHANNEL_DELETE: 12,\n  CHANNEL_OVERWRITE_CREATE: 13,\n  CHANNEL_OVERWRITE_UPDATE: 14,\n  CHANNEL_OVERWRITE_DELETE: 15,\n  MEMBER_KICK: 20,\n  MEMBER_PRUNE: 21,\n  MEMBER_BAN_ADD: 22,\n  MEMBER_BAN_REMOVE: 23,\n  MEMBER_UPDATE: 24,\n  MEMBER_ROLE_UPDATE: 25,\n  ROLE_CREATE: 30,\n  ROLE_UPDATE: 31,\n  ROLE_DELETE: 32,\n  INVITE_CREATE: 40,\n  INVITE_UPDATE: 41,\n  INVITE_DELETE: 42,\n  WEBHOOK_CREATE: 50,\n  WEBHOOK_UPDATE: 51,\n  WEBHOOK_DELETE: 52,\n  EMOJI_CREATE: 60,\n  EMOJI_UPDATE: 61,\n  EMOJI_DELETE: 62,\n  MESSAGE_DELETE: 72,\n};\n\n\n/**\n * Audit logs entries are held in this class.\n */\nclass GuildAuditLogs {\n  constructor(guild, data) {\n    if (data.users) for (const user of data.users) guild.client.dataManager.newUser(user);\n\n    /**\n     * Cached webhooks\n     * @type {Collection<Snowflake, Webhook>}\n     * @private\n     */\n    this.webhooks = new Collection();\n    if (data.webhooks) {\n      for (const hook of data.webhooks) {\n        this.webhooks.set(hook.id, new Webhook(guild.client, hook));\n      }\n    }\n\n    /**\n     * The entries for this guild's audit logs\n     * @type {Collection<Snowflake, GuildAuditLogsEntry>}\n     */\n    this.entries = new Collection();\n    for (const item of data.audit_log_entries) {\n      const entry = new GuildAuditLogsEntry(this, guild, item);\n      this.entries.set(entry.id, entry);\n    }\n  }\n\n  /**\n   * Handles possible promises for entry targets.\n   * @returns {Promise<GuildAuditLogs>}\n   */\n  static build(...args) {\n    const logs = new GuildAuditLogs(...args);\n    return Promise.all(logs.entries.map(e => e.target)).then(() => logs);\n  }\n\n  /**\n   * The target of an entry. It can be one of:\n   * * A guild\n   * * A user\n   * * A role\n   * * An emoji\n   * * An invite\n   * * A webhook\n   * * An object where the keys represent either the new value or the old value\n   * @typedef {?Object|Guild|User|Role|Emoji|Invite|Webhook} AuditLogEntryTarget\n   */\n\n  /**\n   * Find target type from entry action.\n   * @param {number} target The action target\n   * @returns {?string}\n   */\n  static targetType(target) {\n    if (target < 10) return Targets.GUILD;\n    if (target < 20) return Targets.CHANNEL;\n    if (target < 30) return Targets.USER;\n    if (target < 40) return Targets.ROLE;\n    if (target < 50) return Targets.INVITE;\n    if (target < 60) return Targets.WEBHOOK;\n    if (target < 70) return Targets.EMOJI;\n    if (target < 80) return Targets.MESSAGE;\n    return null;\n  }\n\n  /**\n   * The action type of an entry, e.g. `CREATE`. Here are the available types:\n   * * CREATE\n   * * DELETE\n   * * UPDATE\n   * * ALL\n   * @typedef {string} AuditLogActionType\n   */\n\n\n  /**\n   * Finds the action type from the entry action.\n   * @param {AuditLogAction} action The action target\n   * @returns {AuditLogActionType}\n   */\n  static actionType(action) {\n    if ([\n      Actions.CHANNEL_CREATE,\n      Actions.CHANNEL_OVERWRITE_CREATE,\n      Actions.MEMBER_BAN_REMOVE,\n      Actions.ROLE_CREATE,\n      Actions.INVITE_CREATE,\n      Actions.WEBHOOK_CREATE,\n      Actions.EMOJI_CREATE,\n    ].includes(action)) return 'CREATE';\n\n    if ([\n      Actions.CHANNEL_DELETE,\n      Actions.CHANNEL_OVERWRITE_DELETE,\n      Actions.MEMBER_KICK,\n      Actions.MEMBER_PRUNE,\n      Actions.MEMBER_BAN_ADD,\n      Actions.ROLE_DELETE,\n      Actions.INVITE_DELETE,\n      Actions.WEBHOOK_DELETE,\n      Actions.EMOJI_DELETE,\n      Actions.MESSAGE_DELETE,\n    ].includes(action)) return 'DELETE';\n\n    if ([\n      Actions.GUILD_UPDATE,\n      Actions.CHANNEL_UPDATE,\n      Actions.CHANNEL_OVERWRITE_UPDATE,\n      Actions.MEMBER_UPDATE,\n      Actions.MEMBER_ROLE_UPDATE,\n      Actions.ROLE_UPDATE,\n      Actions.INVITE_UPDATE,\n      Actions.WEBHOOK_UPDATE,\n      Actions.EMOJI_UPDATE,\n    ].includes(action)) return 'UPDATE';\n\n    return 'ALL';\n  }\n}\n\n/**\n * Audit logs entry.\n */\nclass GuildAuditLogsEntry {\n  constructor(logs, guild, data) {\n    const targetType = GuildAuditLogs.targetType(data.action_type);\n    /**\n     * The target type of this entry\n     * @type {AuditLogTargetType}\n     */\n    this.targetType = targetType;\n\n    /**\n     * The action type of this entry\n     * @type {AuditLogActionType}\n     */\n    this.actionType = GuildAuditLogs.actionType(data.action_type);\n\n    /**\n     * Specific action type of this entry in its string representation\n     * @type {AuditLogAction}\n     */\n    this.action = Object.keys(Actions).find(k => Actions[k] === data.action_type);\n\n    /**\n     * The reason of this entry\n     * @type {?string}\n     */\n    this.reason = data.reason || null;\n\n    /**\n     * The user that executed this entry\n     * @type {User}\n     */\n    this.executor = guild.client.users.get(data.user_id);\n\n    /**\n     * An entry in the audit log representing a specific change.\n     * @typedef {object} AuditLogChange\n     * @property {string} key The property that was changed, e.g. `nick` for nickname changes\n     * @property {*} [old] The old value of the change, e.g. for nicknames, the old nickname\n     * @property {*} [new] The new value of the change, e.g. for nicknames, the new nickname\n     */\n\n    /**\n     * Specific property changes\n     * @type {AuditLogChange[]}\n     */\n    this.changes = data.changes ? data.changes.map(c => ({ key: c.key, old: c.old_value, new: c.new_value })) : null;\n\n    /**\n     * The ID of this entry\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * Any extra data from the entry\n     * @type {?Object|Role|GuildMember}\n     */\n    this.extra = null;\n    if (data.options) {\n      if (data.action_type === Actions.MEMBER_PRUNE) {\n        this.extra = {\n          removed: data.options.members_removed,\n          days: data.options.delete_member_days,\n        };\n      } else if (data.action_type === Actions.MESSAGE_DELETE) {\n        this.extra = {\n          count: data.options.count,\n          channel: guild.channels.get(data.options.channel_id),\n        };\n      } else {\n        switch (data.options.type) {\n          case 'member':\n            this.extra = guild.members.get(data.options.id);\n            if (!this.extra) this.extra = { id: data.options.id };\n            break;\n          case 'role':\n            this.extra = guild.roles.get(data.options.id);\n            if (!this.extra) this.extra = { id: data.options.id, name: data.options.role_name };\n            break;\n          default:\n            break;\n        }\n      }\n    }\n\n    if ([Targets.USER, Targets.GUILD].includes(targetType)) {\n      /**\n       * The target of this entry\n       * @type {AuditLogEntryTarget}\n       */\n      this.target = guild.client[`${targetType.toLowerCase()}s`].get(data.target_id);\n    } else if (targetType === Targets.WEBHOOK) {\n      this.target = logs.webhooks.get(data.target_id) ||\n        new Webhook(guild.client,\n          this.changes.reduce((o, c) => {\n            o[c.key] = c.new || c.old;\n            return o;\n          }, {\n            id: data.target_id,\n            guild_id: guild.id,\n          }));\n    } else if (targetType === Targets.INVITE) {\n      const changes = this.changes.reduce((o, c) => {\n        o[c.key] = c.new || c.old;\n        return o;\n      }, {\n        id: data.target_id,\n        guild,\n      });\n      changes.channel = { id: changes.channel_id };\n      this.target = new Invite(guild.client, changes);\n    } else if (targetType === Targets.MESSAGE) {\n      this.target = guild.client.users.get(data.target_id);\n    } else {\n      this.target = guild[`${targetType.toLowerCase()}s`].get(data.target_id);\n    }\n  }\n\n  /**\n   * The timestamp this entry was created at\n   * @type {number}\n   * @readonly\n   */\n  get createdTimestamp() {\n    return Snowflake.deconstruct(this.id).timestamp;\n  }\n\n  /**\n   * The time this entry was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n}\n\nGuildAuditLogs.Actions = Actions;\nGuildAuditLogs.Targets = Targets;\nGuildAuditLogs.Entry = GuildAuditLogsEntry;\n\nmodule.exports = GuildAuditLogs;\n\n\n//# sourceURL=webpack:///./src/structures/GuildAuditLogs.js?");

/***/ }),

/***/ "./src/structures/GuildChannel.js":
/*!****************************************!*\
  !*** ./src/structures/GuildChannel.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Channel = __webpack_require__(/*! ./Channel */ \"./src/structures/Channel.js\");\nconst Role = __webpack_require__(/*! ./Role */ \"./src/structures/Role.js\");\nconst PermissionOverwrites = __webpack_require__(/*! ./PermissionOverwrites */ \"./src/structures/PermissionOverwrites.js\");\nconst Permissions = __webpack_require__(/*! ../util/Permissions */ \"./src/util/Permissions.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Invite = __webpack_require__(/*! ./Invite */ \"./src/structures/Invite.js\");\n\n/**\n * Represents a guild channel (i.e. text channels and voice channels).\n * @extends {Channel}\n */\nclass GuildChannel extends Channel {\n  constructor(guild, data) {\n    super(guild.client, data);\n\n    /**\n     * The guild the channel is in\n     * @type {Guild}\n     */\n    this.guild = guild;\n  }\n\n  setup(data) {\n    super.setup(data);\n\n    /**\n     * The name of the guild channel\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The position of the channel in the list\n     * @type {number}\n     */\n    this.position = data.position;\n\n    /**\n     * The ID of the category parent of this channel\n     * @type {?Snowflake}\n     */\n    this.parentID = data.parent_id;\n\n    /**\n     * A map of permission overwrites in this channel for roles and users\n     * @type {Collection<Snowflake, PermissionOverwrites>}\n     */\n    this.permissionOverwrites = new Collection();\n    if (data.permission_overwrites) {\n      for (const overwrite of data.permission_overwrites) {\n        this.permissionOverwrites.set(overwrite.id, new PermissionOverwrites(this, overwrite));\n      }\n    }\n  }\n\n  /**\n   * The position of the channel\n   * @type {number}\n   * @readonly\n   */\n  get calculatedPosition() {\n    const sorted = this.guild._sortedChannels(this.type);\n    return sorted.array().indexOf(sorted.get(this.id));\n  }\n\n  /**\n   * The category parent of this channel\n   * @type {?CategoryChannel}\n   * @readonly\n   */\n  get parent() {\n    return this.guild.channels.get(this.parentID) || null;\n  }\n\n  /**\n   * Gets the overall set of permissions for a user in this channel, taking into account channel overwrites.\n   * @param {GuildMemberResolvable} member The user that you want to obtain the overall permissions for\n   * @returns {?Permissions}\n   */\n  memberPermissions(member) {\n    member = this.client.resolver.resolveGuildMember(this.guild, member);\n    if (!member) return null;\n\n    if (member.id === this.guild.ownerID) return new Permissions(member, Permissions.ALL);\n\n    const roles = member.roles;\n    const permissions = new Permissions(roles.map(role => role.permissions));\n\n    if (permissions.has(Permissions.FLAGS.ADMINISTRATOR)) return new Permissions(Permissions.ALL).freeze();\n\n    const overwrites = this.overwritesFor(member, true, roles);\n\n    return permissions\n      .remove(overwrites.everyone ? overwrites.everyone.deny : 0)\n      .add(overwrites.everyone ? overwrites.everyone.allow : 0)\n      .remove(overwrites.roles.length > 0 ? overwrites.roles.map(role => role.deny) : 0)\n      .add(overwrites.roles.length > 0 ? overwrites.roles.map(role => role.allow) : 0)\n      .remove(overwrites.member ? overwrites.member.deny : 0)\n      .add(overwrites.member ? overwrites.member.allow : 0)\n      .freeze();\n  }\n\n  /**\n   * Gets the overall set of permissions for a role in this channel, taking into account channel overwrites.\n   * @param {RoleResolvable} role The role that you want to obtain the overall permissions for\n   * @returns {?Permissions}\n   */\n  rolePermissions(role) {\n    if (role.permissions & Permissions.FLAGS.ADMINISTRATOR) return new Permissions(Permissions.ALL).freeze();\n\n    const everyoneOverwrites = this.permissionOverwrites.get(this.guild.id);\n    const roleOverwrites = this.permissionOverwrites.get(role.id);\n\n    return new Permissions(role.permissions)\n      .remove(everyoneOverwrites ? everyoneOverwrites.deny : 0)\n      .add(everyoneOverwrites ? everyoneOverwrites.allow : 0)\n      .remove(roleOverwrites ? roleOverwrites.deny : 0)\n      .add(roleOverwrites ? roleOverwrites.allow : 0)\n      .freeze();\n  }\n\n  /**\n   * Get the overall set of permissions for a member or role in this channel, taking into account channel overwrites.\n   * @param {GuildMemberResolvable|RoleResolvable} memberOrRole The member or role to obtain the overall permissions for\n   * @returns {?Permissions}\n   */\n  permissionsFor(memberOrRole) {\n    const member = this.guild.member(memberOrRole);\n    if (member) return this.memberPermissions(member);\n    const role = this.client.resolver.resolveRole(this.guild, memberOrRole);\n    if (role) return this.rolePermissions(role);\n    return null;\n  }\n\n  overwritesFor(member, verified = false, roles = null) {\n    if (!verified) member = this.client.resolver.resolveGuildMember(this.guild, member);\n    if (!member) return [];\n\n    roles = roles || member.roles;\n    const roleOverwrites = [];\n    let memberOverwrites;\n    let everyoneOverwrites;\n\n    for (const overwrite of this.permissionOverwrites.values()) {\n      if (overwrite.id === this.guild.id) {\n        everyoneOverwrites = overwrite;\n      } else if (roles.has(overwrite.id)) {\n        roleOverwrites.push(overwrite);\n      } else if (overwrite.id === member.id) {\n        memberOverwrites = overwrite;\n      }\n    }\n\n    return {\n      everyone: everyoneOverwrites,\n      roles: roleOverwrites,\n      member: memberOverwrites,\n    };\n  }\n\n  /**\n   * Replaces the permission overwrites for a channel\n   * @param {Object} [options] Options\n   * @param {ChannelCreationOverwrites[]|Collection<Snowflake, PermissionOverwrites>} [options.overwrites]\n   * Permission overwrites\n   * @param {string} [options.reason] Reason for updating the channel overwrites\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * channel.replacePermissionOverwrites({\n   * overwrites: [\n   *   {\n   *      id: message.author.id,\n   *      denied: ['VIEW_CHANNEL'],\n   *   },\n   * ],\n   *   reason: 'Needed to change permissions'\n   * });\n   */\n  replacePermissionOverwrites({ overwrites, reason } = {}) {\n    return this.edit({ permissionOverwrites: overwrites, reason })\n      .then(() => this);\n  }\n\n  /**\n   * An object mapping permission flags to `true` (enabled), `null` (unset) or `false` (disabled).\n   * ```js\n   * {\n   *  'SEND_MESSAGES': true,\n   *  'EMBED_LINKS': null,\n   *  'ATTACH_FILES': false,\n   * }\n   * ```\n   * @typedef {Object} PermissionOverwriteOptions\n   */\n\n  /**\n   * Overwrites the permissions for a user or role in this channel.\n   * @param {Role|Snowflake|UserResolvable} userOrRole The user or role to update\n   * @param {PermissionOverwriteOptions} options The configuration for the update\n   * @param {string} [reason] Reason for creating/editing this overwrite\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * // Overwrite permissions for a message author\n   * message.channel.overwritePermissions(message.author, {\n   *   SEND_MESSAGES: false\n   * })\n   *   .then(updated => console.log(updated.permissionOverwrites.get(message.author.id)))\n   *   .catch(console.error);\n   * @example\n   * // Overwite permissions for a message author and reset some\n   * message.channel.overwritePermissions(message.author, {\n   *   VIEW_CHANNEL: false,\n   *   SEND_MESSAGES: null\n   * })\n   *   .then(updated => console.log(updated.permissionOverwrites.get(message.author.id)))\n   *   .catch(console.error);\n   */\n  overwritePermissions(userOrRole, options, reason) {\n    const payload = {\n      allow: 0,\n      deny: 0,\n    };\n\n    if (userOrRole instanceof Role) {\n      payload.type = 'role';\n    } else if (this.guild.roles.has(userOrRole)) {\n      userOrRole = this.guild.roles.get(userOrRole);\n      payload.type = 'role';\n    } else {\n      userOrRole = this.client.resolver.resolveUser(userOrRole);\n      payload.type = 'member';\n      if (!userOrRole) return Promise.reject(new TypeError('Supplied parameter was neither a User nor a Role.'));\n    }\n\n    payload.id = userOrRole.id;\n\n    const prevOverwrite = this.permissionOverwrites.get(userOrRole.id);\n\n    if (prevOverwrite) {\n      payload.allow = prevOverwrite.allow;\n      payload.deny = prevOverwrite.deny;\n    }\n\n    for (const perm in options) {\n      if (options[perm] === true) {\n        payload.allow |= Permissions.FLAGS[perm] || 0;\n        payload.deny &= ~(Permissions.FLAGS[perm] || 0);\n      } else if (options[perm] === false) {\n        payload.allow &= ~(Permissions.FLAGS[perm] || 0);\n        payload.deny |= Permissions.FLAGS[perm] || 0;\n      } else if (options[perm] === null) {\n        payload.allow &= ~(Permissions.FLAGS[perm] || 0);\n        payload.deny &= ~(Permissions.FLAGS[perm] || 0);\n      }\n    }\n\n    return this.client.rest.methods.setChannelOverwrite(this, payload, reason).then(() => this);\n  }\n\n  /**\n   * Locks in the permission overwrites from the parent channel.\n   * @returns {Promise<GuildChannel>}\n   */\n  lockPermissions() {\n    if (!this.parent) return Promise.reject(new TypeError('Could not find a parent to this guild channel.'));\n    const permissionOverwrites = this.parent.permissionOverwrites.map(overwrite => ({\n      deny: overwrite.deny,\n      allow: overwrite.allow,\n      id: overwrite.id,\n      type: overwrite.type,\n    }));\n    return this.edit({ permissionOverwrites });\n  }\n\n  /**\n   * The data for a guild channel.\n   * @typedef {Object} ChannelData\n   * @property {string} [type] The type of the channel (Only when creating)\n   * @property {string} [name] The name of the channel\n   * @property {number} [position] The position of the channel\n   * @property {string} [topic] The topic of the text channel\n   * @property {boolean} [nsfw] Whether the channel is NSFW\n   * @property {number} [bitrate] The bitrate of the voice channel\n   * @property {number} [userLimit] The user limit of the channel\n   * @property {CategoryChannel|Snowflake} [parent] The parent or parent ID of the channel\n   * @property {ChannelCreationOverwrites[]|Collection<Snowflake, PermissionOverwrites>} [permissionOverwrites]\n   * Overwrites of the channel\n   * @property {number} [rateLimitPerUser] The rate limit per user of the channel\n   */\n\n  /**\n   * Edits the channel.\n   * @param {ChannelData} data The new data for the channel\n   * @param {string} [reason] Reason for editing this channel\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * // Edit a channel\n   * channel.edit({ name: 'new-channel' })\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  edit(data, reason) {\n    return this.client.rest.methods.updateChannel(this, data, reason).then(() => this);\n  }\n\n  /**\n   * Set a new name for the guild channel.\n   * @param {string} name The new name for the guild channel\n   * @param {string} [reason] Reason for changing the guild channel's name\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * // Set a new channel name\n   * channel.setName('not_general')\n   *   .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n   *   .catch(console.error);\n   */\n  setName(name, reason) {\n    return this.edit({ name }, reason);\n  }\n\n  /**\n   * Set a new position for the guild channel.\n   * @param {number} position The new position for the guild channel\n   * @param {boolean} [relative=false] Move the position relative to its current value\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * // Set a new channel position\n   * channel.setPosition(2)\n   *   .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n   *   .catch(console.error);\n   */\n  setPosition(position, relative) {\n    return this.guild.setChannelPosition(this, position, relative);\n  }\n\n  /**\n   * Set a new parent for the guild channel.\n   * @param {CategoryChannel|SnowFlake} parent The new parent for the guild channel\n   * @param {string} [reason] Reason for changing the guild channel's parent\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * // Sets the parent of a channel\n   * channel.setParent('174674066072928256')\n   *   .then(updated => console.log(`Set the category of ${updated.name} to ${updated.parent.name}`))\n   *   .catch(console.error);\n   */\n  setParent(parent, reason) {\n    parent = this.client.resolver.resolveChannelID(parent);\n    return this.edit({ parent }, reason);\n  }\n\n  /**\n   * Set a new topic for the guild channel.\n   * @param {string} topic The new topic for the guild channel\n   * @param {string} [reason] Reason for changing the guild channel's topic\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * // Set a new channel topic\n   * channel.setTopic('Needs more rate limiting')\n   *   .then(updated => console.log(`Channel's new topic is ${updated.topic}`))\n   *   .catch(console.error);\n   */\n  setTopic(topic, reason) {\n    return this.edit({ topic }, reason);\n  }\n\n  /**\n   * Create an invite to this guild channel.\n   * <warn>This is only available when using a bot account.</warn>\n   * @param {Object} [options={}] Options for the invite\n   * @param {boolean} [options.temporary=false] Whether members that joined via the invite should be automatically\n   * kicked after 24 hours if they have not yet received a role\n   * @param {number} [options.maxAge=86400] How long the invite should last (in seconds, 0 for forever)\n   * @param {number} [options.maxUses=0] Maximum number of uses\n   * @param {boolean} [options.unique=false] Create a unique invite, or use an existing one with similar settings\n   * @param {string} [reason] Reason for creating the invite\n   * @returns {Promise<Invite>}\n   * @example\n   * // Create an invite to a channel\n   * channel.createInvite()\n   *   .then(invite => console.log(`Created an invite with a code of ${invite.code}`))\n   *   .catch(console.error);\n   */\n  createInvite(options = {}, reason) {\n    return this.client.rest.methods.createChannelInvite(this, options, reason);\n  }\n\n  /**\n   * Clone this channel.\n   * @param {string} [name=this.name] Optional name for the new channel, otherwise it has the name of this channel\n   * @param {boolean} [withPermissions=true] Whether to clone the channel with this channel's permission overwrites\n   * @param {boolean} [withTopic=true] Whether to clone the channel with this channel's topic\n   * @param {string} [reason] Reason for cloning this channel\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * // Clone a channel\n   * channel.clone(undefined, true, false, 'Needed a clone')\n   *   .then(clone => console.log(`Cloned ${channel.name} to make a channel called ${clone.name}`))\n   *   .catch(console.error);\n   */\n  clone(name = this.name, withPermissions = true, withTopic = true, reason) {\n    return this.guild.createChannel(name, {\n      type: this.type,\n      permissionOverwrites: withPermissions ? this.permissionOverwrites : undefined,\n      topic: withTopic ? this.topic : undefined,\n      reason,\n    });\n  }\n\n  /**\n   * Fetches a collection of invites to this guild channel.\n   * Resolves with a collection mapping invites by their codes.\n   * @returns {Promise<Collection<string, Invite>>}\n   */\n  fetchInvites() {\n    return this.client.rest.makeRequest('get', Constants.Endpoints.Channel(this.id).invites, true)\n      .then(data => {\n        const invites = new Collection();\n        for (let invite of data) {\n          invite = new Invite(this.client, invite);\n          invites.set(invite.code, invite);\n        }\n\n        return invites;\n      });\n  }\n\n  /**\n   * Deletes this channel.\n   * @param {string} [reason] Reason for deleting this channel\n   * @returns {Promise<GuildChannel>}\n   * @example\n   * // Delete the channel\n   * channel.delete('Making room for new channels')\n   *   .then(deleted => console.log(`Deleted ${deleted.name} to make room for new channels`))\n   *   .catch(console.error);\n   */\n  delete(reason) {\n    return this.client.rest.methods.deleteChannel(this, reason);\n  }\n\n  /**\n   * Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\n   * In most cases, a simple `channel.id === channel2.id` will do, and is much faster too.\n   * @param {GuildChannel} channel Channel to compare with\n   * @returns {boolean}\n   */\n  equals(channel) {\n    let equal = channel &&\n      this.id === channel.id &&\n      this.type === channel.type &&\n      this.topic === channel.topic &&\n      this.position === channel.position &&\n      this.name === channel.name;\n\n    if (equal) {\n      if (this.permissionOverwrites && channel.permissionOverwrites) {\n        equal = this.permissionOverwrites.equals(channel.permissionOverwrites);\n      } else {\n        equal = !this.permissionOverwrites && !channel.permissionOverwrites;\n      }\n    }\n\n    return equal;\n  }\n\n  /**\n   * Whether the channel is deletable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get deletable() {\n    return this.id !== this.guild.id &&\n      this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS);\n  }\n\n  /**\n   * Whether the channel is manageable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get manageable() {\n    if (this.client.user.id === this.guild.ownerID) return true;\n    const permissions = this.permissionsFor(this.client.user);\n    if (!permissions) return false;\n    return permissions.has([Permissions.FLAGS.MANAGE_CHANNELS, Permissions.FLAGS.VIEW_CHANNEL]);\n  }\n\n  /**\n   * Whether the channel is muted\n   * <warn>This is only available when using a user account.</warn>\n   * @type {?boolean}\n   * @readonly\n   */\n  get muted() {\n    if (this.client.user.bot) return null;\n    try {\n      return this.client.user.guildSettings.get(this.guild.id).channelOverrides.get(this.id).muted;\n    } catch (err) {\n      return false;\n    }\n  }\n\n  /**\n   * The type of message that should notify you\n   * <warn>This is only available when using a user account.</warn>\n   * @type {?MessageNotificationType}\n   * @readonly\n   */\n  get messageNotifications() {\n    if (this.client.user.bot) return null;\n    try {\n      return this.client.user.guildSettings.get(this.guild.id).channelOverrides.get(this.id).messageNotifications;\n    } catch (err) {\n      return Constants.MessageNotificationTypes[3];\n    }\n  }\n\n  /**\n   * When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.\n   * @returns {string}\n   * @example\n   * // Logs: Hello from <#123456789012345678>\n   * console.log(`Hello from ${channel}`);\n   * @example\n   * // Logs: Hello from <#123456789012345678>\n   * console.log('Hello from ' + channel);\n   */\n  toString() {\n    return `<#${this.id}>`;\n  }\n}\n\nmodule.exports = GuildChannel;\n\n\n//# sourceURL=webpack:///./src/structures/GuildChannel.js?");

/***/ }),

/***/ "./src/structures/GuildMember.js":
/*!***************************************!*\
  !*** ./src/structures/GuildMember.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const TextBasedChannel = __webpack_require__(/*! ./interfaces/TextBasedChannel */ \"./src/structures/interfaces/TextBasedChannel.js\");\nconst Role = __webpack_require__(/*! ./Role */ \"./src/structures/Role.js\");\nconst Permissions = __webpack_require__(/*! ../util/Permissions */ \"./src/util/Permissions.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst { Presence } = __webpack_require__(/*! ./Presence */ \"./src/structures/Presence.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Represents a member of a guild on Discord.\n * @implements {TextBasedChannel}\n */\nclass GuildMember {\n  constructor(guild, data) {\n    /**\n     * The client that instantiated this GuildMember\n     * @name GuildMember#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: guild.client });\n\n    /**\n     * The guild that this member is part of\n     * @type {Guild}\n     */\n    this.guild = guild;\n\n    /**\n     * The user that this member instance Represents\n     * @type {User}\n     */\n    this.user = {};\n\n    /**\n     * The timestamp this member joined the guild at\n     * @type {number}\n     */\n    this.joinedTimestamp = null;\n\n    this._roles = [];\n    if (data) this.setup(data);\n\n    /**\n     * The ID of the last message sent by this member in their guild, if one was sent\n     * @type {?Snowflake}\n     */\n    this.lastMessageID = null;\n\n    /**\n     * The Message object of the last message sent by this member in their guild, if one was sent\n     * @type {?Message}\n     */\n    this.lastMessage = null;\n\n    /**\n     * Whether the member has been removed from the guild\n     * @type {boolean}\n     */\n    this.deleted = false;\n  }\n\n  setup(data) {\n    /**\n     * Whether this member is deafened server-wide\n     * @type {boolean}\n     */\n    this.serverDeaf = data.deaf;\n\n    /**\n     * Whether this member is muted server-wide\n     * @type {boolean}\n     */\n    this.serverMute = data.mute;\n\n    /**\n     * Whether this member is self-muted\n     * @type {boolean}\n     */\n    this.selfMute = data.self_mute;\n\n    /**\n     * Whether this member is self-deafened\n     * @type {boolean}\n     */\n    this.selfDeaf = data.self_deaf;\n\n    /**\n     * The voice session ID of this member, if any\n     * @type {?Snowflake}\n     */\n    this.voiceSessionID = data.session_id;\n\n    /**\n     * The voice channel ID of this member, if any\n     * @type {?Snowflake}\n     */\n    this.voiceChannelID = data.channel_id;\n\n    /**\n     * Whether this member is speaking and the client is in the same channel\n     * @type {boolean}\n     */\n    this.speaking = false;\n\n    /**\n     * The nickname of this member, if they have one\n     * @type {?string}\n     */\n    this.nickname = data.nick || null;\n\n    if (data.joined_at) this.joinedTimestamp = new Date(data.joined_at).getTime();\n\n    this.user = data.user;\n    this._roles = data.roles;\n  }\n\n  /**\n   * The time this member joined the guild\n   * @type {?Date}\n   * @readonly\n   */\n  get joinedAt() {\n    return this.joinedTimestamp ? new Date(this.joinedTimestamp) : null;\n  }\n\n  /**\n   * The presence of this member\n   * @type {Presence}\n   * @readonly\n   */\n  get presence() {\n    return this.frozenPresence || this.guild.presences.get(this.id) || new Presence(undefined, this.client);\n  }\n\n  /**\n   * A list of roles that are applied to this member, mapped by the role ID\n   * @type {Collection<Snowflake, Role>}\n   * @readonly\n   */\n  get roles() {\n    const list = new Collection();\n    const everyoneRole = this.guild.roles.get(this.guild.id);\n\n    if (everyoneRole) list.set(everyoneRole.id, everyoneRole);\n\n    for (const roleID of this._roles) {\n      const role = this.guild.roles.get(roleID);\n      if (role) list.set(role.id, role);\n    }\n\n    return list;\n  }\n\n  /**\n   * The role of this member with the highest position\n   * @type {Role}\n   * @readonly\n   */\n  get highestRole() {\n    return this.roles.reduce((prev, role) => !prev || role.comparePositionTo(prev) > 0 ? role : prev);\n  }\n\n  /**\n   * The role of this member used to set their color\n   * @type {?Role}\n   * @readonly\n   */\n  get colorRole() {\n    const coloredRoles = this.roles.filter(role => role.color);\n    if (!coloredRoles.size) return null;\n    return coloredRoles.reduce((prev, role) => !prev || role.comparePositionTo(prev) > 0 ? role : prev);\n  }\n\n  /**\n   * The displayed color of this member in base 10\n   * @type {number}\n   * @readonly\n   */\n  get displayColor() {\n    const role = this.colorRole;\n    return (role && role.color) || 0;\n  }\n\n  /**\n   * The displayed color of this member in hexadecimal\n   * @type {string}\n   * @readonly\n   */\n  get displayHexColor() {\n    const role = this.colorRole;\n    return (role && role.hexColor) || '#000000';\n  }\n\n  /**\n   * The role of this member used to hoist them in a separate category in the users list\n   * @type {?Role}\n   * @readonly\n   */\n  get hoistRole() {\n    const hoistedRoles = this.roles.filter(role => role.hoist);\n    if (!hoistedRoles.size) return null;\n    return hoistedRoles.reduce((prev, role) => !prev || role.comparePositionTo(prev) > 0 ? role : prev);\n  }\n\n  /**\n   * Whether this member is muted in any way\n   * @type {boolean}\n   * @readonly\n   */\n  get mute() {\n    return this.selfMute || this.serverMute;\n  }\n\n  /**\n   * Whether this member is deafened in any way\n   * @type {boolean}\n   * @readonly\n   */\n  get deaf() {\n    return this.selfDeaf || this.serverDeaf;\n  }\n\n  /**\n   * The voice channel this member is in, if any\n   * @type {?VoiceChannel}\n   * @readonly\n   */\n  get voiceChannel() {\n    return this.guild.channels.get(this.voiceChannelID);\n  }\n\n  /**\n   * The ID of this user\n   * @type {Snowflake}\n   * @readonly\n   */\n  get id() {\n    return this.user.id;\n  }\n\n  /**\n   * The nickname of this member, or their username if they don't have one\n   * @type {string}\n   * @readonly\n   */\n  get displayName() {\n    return this.nickname || this.user.username;\n  }\n\n  /**\n   * The overall set of permissions for this member, taking only roles into account\n   * @type {Permissions}\n   * @readonly\n   */\n  get permissions() {\n    if (this.user.id === this.guild.ownerID) return new Permissions(this, Permissions.ALL);\n\n    let permissions = 0;\n    const roles = this.roles;\n    for (const role of roles.values()) permissions |= role.permissions;\n\n    return new Permissions(this, permissions);\n  }\n\n  /**\n   * Whether this member is manageable in terms of role hierarchy by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get manageable() {\n    if (this.user.id === this.guild.ownerID) return false;\n    if (this.user.id === this.client.user.id) return false;\n    return this.guild.me.highestRole.comparePositionTo(this.highestRole) > 0;\n  }\n\n  /**\n   * Whether this member is kickable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get kickable() {\n    return this.manageable && this.guild.me.permissions.has(Permissions.FLAGS.KICK_MEMBERS);\n  }\n\n  /**\n   * Whether this member is bannable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get bannable() {\n    return this.manageable && this.guild.me.permissions.has(Permissions.FLAGS.BAN_MEMBERS);\n  }\n\n  /**\n   * Returns `channel.permissionsFor(guildMember)`. Returns permissions for this member in a guild channel,\n   * taking into account roles and permission overwrites.\n   * @param {ChannelResolvable} channel The guild channel to use as context\n   * @returns {?Permissions}\n   */\n  permissionsIn(channel) {\n    channel = this.client.resolver.resolveChannel(channel);\n    if (!channel || !channel.guild) throw new Error('Could not resolve channel to a guild channel.');\n    return channel.permissionsFor(this);\n  }\n\n  /**\n   * Checks if any of this member's roles have a permission.\n   * @param {PermissionResolvable} permission Permission(s) to check for\n   * @param {boolean} [explicit=false] Whether to require the role to explicitly have the exact permission\n   * **(deprecated)**\n   * @param {boolean} [checkAdmin] Whether to allow the administrator permission to override\n   * (takes priority over `explicit`)\n   * @param {boolean} [checkOwner] Whether to allow being the guild's owner to override\n   * (takes priority over `explicit`)\n   * @returns {boolean}\n   */\n  hasPermission(permission, explicit = false, checkAdmin, checkOwner) {\n    if (typeof checkAdmin === 'undefined') checkAdmin = !explicit;\n    if (typeof checkOwner === 'undefined') checkOwner = !explicit;\n    if (checkOwner && this.user.id === this.guild.ownerID) return true;\n    return this.roles.some(r => r.hasPermission(permission, undefined, checkAdmin));\n  }\n\n  /**\n   * Checks whether the roles of this member allows them to perform specific actions.\n   * @param {PermissionResolvable} permissions The permissions to check for\n   * @param {boolean} [explicit=false] Whether to require the member to explicitly have the exact permissions\n   * @returns {boolean}\n   * @deprecated\n   */\n  hasPermissions(permissions, explicit = false) {\n    if (!explicit && this.user.id === this.guild.ownerID) return true;\n    return this.hasPermission(permissions, explicit);\n  }\n\n  /**\n   * Checks whether the roles of this member allows them to perform specific actions, and lists any missing permissions.\n   * @param {PermissionResolvable} permissions The permissions to check for\n   * @param {boolean} [explicit=false] Whether to require the member to explicitly have the exact permissions\n   * @returns {PermissionResolvable}\n   */\n  missingPermissions(permissions, explicit = false) {\n    if (!(permissions instanceof Array)) permissions = [permissions];\n    return this.permissions.missing(permissions, explicit);\n  }\n\n  /**\n   * The data for editing this member.\n   * @typedef {Object} GuildMemberEditData\n   * @property {string} [nick] The nickname to set for the member\n   * @property {Collection<Snowflake, Role>|RoleResolvable[]} [roles] The roles or role IDs to apply\n   * @property {boolean} [mute] Whether or not the member should be muted\n   * @property {boolean} [deaf] Whether or not the member should be deafened\n   * @property {ChannelResolvable} [channel] Channel to move member to (if they are connected to voice)\n   */\n\n  /**\n   * Edits this member.\n   * @param {GuildMemberEditData} data The data to edit the member with\n   * @param {string} [reason] Reason for editing this user\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Set a member's nickname and clear their roles\n   * message.member.edit({\n   *   nick: 'Cool Name',\n   *   roles: []\n   * })\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  edit(data, reason) {\n    return this.client.rest.methods.updateGuildMember(this, data, reason);\n  }\n\n  /**\n   * Mute/unmute this member.\n   * @param {boolean} mute Whether or not the member should be muted\n   * @param {string} [reason] Reason for muting or unmuting\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Mute a member with a reason\n   * message.member.setMute(true, 'It needed to be done')\n   *   .then(() => console.log(`Muted ${message.member.displayName}`)))\n   *   .catch(console.error);\n   */\n  setMute(mute, reason) {\n    return this.edit({ mute }, reason);\n  }\n\n  /**\n   * Deafen/undeafen this member.\n   * @param {boolean} deaf Whether or not the member should be deafened\n   * @param {string} [reason] Reason for deafening or undeafening\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Deafen a member\n   * message.member.setDeaf(true)\n   *   .then(() => console.log(`Deafened ${message.member.displayName}`))\n   *   .catch(console.error);\n   */\n  setDeaf(deaf, reason) {\n    return this.edit({ deaf }, reason);\n  }\n\n  /**\n   * Moves this member to the given channel.\n   * @param {ChannelResolvable} channel The channel to move the member to\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Moves a member to a voice channel\n   * member.setVoiceChannel('174674066072928256')\n   *   .then(() => console.log(`Moved ${member.displayName}`))\n   *   .catch(console.error);\n   */\n  setVoiceChannel(channel) {\n    return this.edit({ channel });\n  }\n\n  /**\n   * Sets the roles applied to this member.\n   * @param {Collection<Snowflake, Role>|RoleResolvable[]} roles The roles or role IDs to apply\n   * @param {string} [reason] Reason for applying the roles\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Set the member's roles to a single role\n   * guildMember.setRoles(['391156570408615936'])\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // Remove all of the member's roles\n   * guildMember.setRoles([])\n   *   .then(member => console.log(`${member.displayName} now has ${member.roles.size} roles`))\n   *   .catch(console.error);\n   */\n  setRoles(roles, reason) {\n    return this.edit({ roles }, reason);\n  }\n\n  /**\n   * Adds a single role to this member.\n   * @param {RoleResolvable} role The role or ID of the role to add\n   * @param {string} [reason] Reason for adding the role\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Give a role to a member\n   * message.member.addRole('193654001089118208')\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  addRole(role, reason) {\n    if (!(role instanceof Role)) role = this.guild.roles.get(role);\n    if (!role) return Promise.reject(new TypeError('Supplied parameter was neither a Role nor a Snowflake.'));\n    return this.client.rest.methods.addMemberRole(this, role, reason);\n  }\n\n  /**\n   * Adds multiple roles to this member.\n   * @param {Collection<Snowflake, Role>|RoleResolvable[]} roles The roles or role IDs to add\n   * @param {string} [reason] Reason for adding the roles\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Gives a member a few roles\n   * message.member.addRoles(['193654001089118208', '369308579892690945'])\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  addRoles(roles, reason) {\n    let allRoles;\n    if (roles instanceof Collection) {\n      allRoles = this._roles.slice();\n      for (const role of roles.values()) allRoles.push(role.id);\n    } else {\n      allRoles = this._roles.concat(roles);\n    }\n    return this.edit({ roles: allRoles }, reason);\n  }\n\n  /**\n   * Removes a single role from this member.\n   * @param {RoleResolvable} role The role or ID of the role to remove\n   * @param {string} [reason] Reason for removing the role\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Remove a role from a member\n   * message.member.removeRole('193654001089118208')\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  removeRole(role, reason) {\n    if (!(role instanceof Role)) role = this.guild.roles.get(role);\n    if (!role) return Promise.reject(new TypeError('Supplied parameter was neither a Role nor a Snowflake.'));\n    return this.client.rest.methods.removeMemberRole(this, role, reason);\n  }\n\n  /**\n   * Removes multiple roles from this member.\n   * @param {Collection<Snowflake, Role>|RoleResolvable[]} roles The roles or role IDs to remove\n   * @param {string} [reason] Reason for removing the roles\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Removes a few roles from the member\n   * message.member.removeRoles(['193654001089118208', '369308579892690945'])\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  removeRoles(roles, reason) {\n    const allRoles = this._roles.slice();\n    if (roles instanceof Collection) {\n      for (const role of roles.values()) {\n        const index = allRoles.indexOf(role.id);\n        if (index >= 0) allRoles.splice(index, 1);\n      }\n    } else {\n      for (const role of roles) {\n        const index = allRoles.indexOf(role instanceof Role ? role.id : role);\n        if (index >= 0) allRoles.splice(index, 1);\n      }\n    }\n    return this.edit({ roles: allRoles }, reason);\n  }\n\n  /**\n   * Set the nickname for this member.\n   * @param {string} nick The nickname for the guild member\n   * @param {string} [reason] Reason for setting the nickname\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Update the member's nickname\n   * message.member.setNickname('Cool Name')\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  setNickname(nick, reason) {\n    return this.edit({ nick }, reason);\n  }\n\n  /**\n   * Creates a DM channel between the client and this member.\n   * @returns {Promise<DMChannel>}\n   */\n  createDM() {\n    return this.user.createDM();\n  }\n\n  /**\n   * Deletes any DMs with this guild member.\n   * @returns {Promise<DMChannel>}\n   */\n  deleteDM() {\n    return this.user.deleteDM();\n  }\n\n  /**\n   * Kick this member from the guild.\n   * @param {string} [reason] Reason for kicking user\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Kick a member\n   * member.kick()\n   *   .then(() => console.log(`Kicked ${member.displayName}`))\n   *   .catch(console.error);\n   */\n  kick(reason) {\n    return this.client.rest.methods.kickGuildMember(this.guild, this, reason);\n  }\n\n  /**\n   * Ban this member.\n   * @param {Object|number|string} [options] Ban options. If a number, the number of days to delete messages for, if a\n   * string, the ban reason. Supplying an object allows you to do both.\n   * @param {number} [options.days=0] Number of days of messages to delete\n   * @param {string} [options.reason] Reason for banning\n   * @returns {Promise<GuildMember>}\n   * @example\n   * // Ban a guild member\n   * member.ban(7)\n   *   .then(() => console.log(`Banned ${member.displayName}`))\n   *   .catch(console.error);\n   */\n  ban(options) {\n    return this.guild.ban(this, options);\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the user's mention instead of the Member object.\n   * @returns {string}\n   * @example\n   * // Logs: Hello from <@123456789>!\n   * console.log(`Hello from ${member}!`);\n   */\n  toString() {\n    return `<@${this.nickname ? '!' : ''}${this.user.id}>`;\n  }\n\n  // These are here only for documentation purposes - they are implemented by TextBasedChannel\n  /* eslint-disable no-empty-function */\n  send() {}\n  sendMessage() {}\n  sendEmbed() {}\n  sendFile() {}\n  sendCode() {}\n}\n\nTextBasedChannel.applyToClass(GuildMember);\n\nGuildMember.prototype.hasPermissions = util.deprecate(GuildMember.prototype.hasPermissions,\n  'GuildMember#hasPermissions is deprecated - use GuildMember#hasPermission, it now takes an array');\nGuildMember.prototype.missingPermissions = util.deprecate(GuildMember.prototype.missingPermissions,\n  'GuildMember#missingPermissions is deprecated - use GuildMember#permissions.missing, it now takes an array');\n\nmodule.exports = GuildMember;\n\n\n//# sourceURL=webpack:///./src/structures/GuildMember.js?");

/***/ }),

/***/ "./src/structures/Invite.js":
/*!**********************************!*\
  !*** ./src/structures/Invite.js ***!
  \**********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const PartialGuild = __webpack_require__(/*! ./PartialGuild */ \"./src/structures/PartialGuild.js\");\nconst PartialGuildChannel = __webpack_require__(/*! ./PartialGuildChannel */ \"./src/structures/PartialGuildChannel.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\n\n/**\n * Represents an invitation to a guild channel.\n * <warn>The only guaranteed properties are `code`, `url`, `guild`, and `channel`.\n * Other properties can be missing.</warn>\n */\nclass Invite {\n  constructor(client, data) {\n    /**\n     * The client that instantiated the invite\n     * @name Invite#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The guild the invite is for. If this guild is already known, this will be a guild object. If the guild is\n     * unknown, this will be a PartialGuild object\n     * @type {Guild|PartialGuild}\n     */\n    this.guild = this.client.guilds.get(data.guild.id) || new PartialGuild(this.client, data.guild);\n\n    /**\n     * The code for this invite\n     * @type {string}\n     */\n    this.code = data.code;\n\n    /**\n     * The approximate number of online members of the guild this invite is for\n     * @type {number}\n     */\n    this.presenceCount = data.approximate_presence_count;\n\n    /**\n     * The approximate total number of members of the guild this invite is for\n     * @type {number}\n     */\n    this.memberCount = data.approximate_member_count;\n\n    /**\n     * The number of text channels the guild this invite goes to has\n     * @type {number}\n     */\n    this.textChannelCount = data.guild.text_channel_count;\n\n    /**\n     * The number of voice channels the guild this invite goes to has\n     * @type {number}\n     */\n    this.voiceChannelCount = data.guild.voice_channel_count;\n\n    /**\n     * Whether or not this invite is temporary\n     * @type {boolean}\n     */\n    this.temporary = data.temporary;\n\n    /**\n     * The maximum age of the invite, in seconds\n     * @type {?number}\n     */\n    this.maxAge = data.max_age;\n\n    /**\n     * How many times this invite has been used\n     * @type {number}\n     */\n    this.uses = data.uses;\n\n    /**\n     * The maximum uses of this invite\n     * @type {number}\n     */\n    this.maxUses = data.max_uses;\n\n    if (data.inviter) {\n      /**\n       * The user who created this invite\n       * @type {?User}\n       */\n      this.inviter = this.client.dataManager.newUser(data.inviter);\n    }\n\n    /**\n     * The channel the invite is for. If this channel is already known, this will be a GuildChannel object.\n     * If the channel is unknown, this will be a PartialGuildChannel object.\n     * @type {GuildChannel|PartialGuildChannel}\n     */\n    this.channel = this.client.channels.get(data.channel.id) || new PartialGuildChannel(this.client, data.channel);\n\n    /**\n     * The timestamp the invite was created at\n     * @type {number}\n     */\n    this.createdTimestamp = new Date(data.created_at).getTime();\n  }\n\n  /**\n   * The time the invite was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * The timestamp the invite will expire at\n   * @type {number}\n   * @readonly\n   */\n  get expiresTimestamp() {\n    return this.createdTimestamp + (this.maxAge * 1000);\n  }\n\n  /**\n   * The time the invite will expire\n   * @type {Date}\n   * @readonly\n   */\n  get expiresAt() {\n    return new Date(this.expiresTimestamp);\n  }\n\n  /**\n   * The URL to the invite\n   * @type {string}\n   * @readonly\n   */\n  get url() {\n    return Constants.Endpoints.inviteLink(this.code);\n  }\n\n  /**\n   * Deletes this invite.\n   * @param {string} [reason] Reason for deleting this invite\n   * @returns {Promise<Invite>}\n   */\n  delete(reason) {\n    return this.client.rest.methods.deleteInvite(this, reason);\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the invite's URL instead of the object.\n   * @returns {string}\n   * @example\n   * // Logs: Invite: https://discord.gg/A1b2C3\n   * console.log(`Invite: ${invite}`);\n   */\n  toString() {\n    return this.url;\n  }\n}\n\nmodule.exports = Invite;\n\n\n//# sourceURL=webpack:///./src/structures/Invite.js?");

/***/ }),

/***/ "./src/structures/Message.js":
/*!***********************************!*\
  !*** ./src/structures/Message.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Mentions = __webpack_require__(/*! ./MessageMentions */ \"./src/structures/MessageMentions.js\");\nconst Attachment = __webpack_require__(/*! ./MessageAttachment */ \"./src/structures/MessageAttachment.js\");\nconst Embed = __webpack_require__(/*! ./MessageEmbed */ \"./src/structures/MessageEmbed.js\");\nconst RichEmbed = __webpack_require__(/*! ./RichEmbed */ \"./src/structures/RichEmbed.js\");\nconst MessageReaction = __webpack_require__(/*! ./MessageReaction */ \"./src/structures/MessageReaction.js\");\nconst ReactionCollector = __webpack_require__(/*! ./ReactionCollector */ \"./src/structures/ReactionCollector.js\");\nconst Util = __webpack_require__(/*! ../util/Util */ \"./src/util/Util.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Permissions = __webpack_require__(/*! ../util/Permissions */ \"./src/util/Permissions.js\");\nlet GuildMember;\n\n/**\n * Represents a message on Discord.\n */\nclass Message {\n  constructor(channel, data, client) {\n    /**\n     * The client that instantiated the Message\n     * @name Message#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    /**\n     * The channel that the message was sent in\n     * @type {TextChannel|DMChannel|GroupDMChannel}\n     */\n    this.channel = channel;\n\n    /**\n     * Whether this message has been deleted\n     * @type {boolean}\n     */\n    this.deleted = false;\n\n    if (data) this.setup(data);\n  }\n\n  setup(data) { // eslint-disable-line complexity\n    /**\n     * The ID of the message\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The type of the message\n     * @type {MessageType}\n     */\n    this.type = Constants.MessageTypes[data.type];\n\n    /**\n     * The content of the message\n     * @type {string}\n     */\n    this.content = data.content;\n\n    /**\n     * The author of the message\n     * @type {User}\n     */\n    this.author = this.client.dataManager.newUser(data.author, !data.webhook_id);\n\n    /**\n     * Represents the author of the message as a guild member\n     * Only available if the message comes from a guild where the author is still a member\n     * @type {?GuildMember}\n     */\n    this.member = this.guild ? this.guild.member(this.author) || null : null;\n\n    /**\n     * Whether or not this message is pinned\n     * @type {boolean}\n     */\n    this.pinned = data.pinned;\n\n    /**\n     * Whether or not the message was Text-To-Speech\n     * @type {boolean}\n     */\n    this.tts = data.tts;\n\n    /**\n     * A random number or string used for checking message delivery\n     * @type {string}\n     */\n    this.nonce = data.nonce;\n\n    /**\n     * Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)\n     * @type {boolean}\n     */\n    this.system = data.type === 6;\n\n    /**\n     * A list of embeds in the message - e.g. YouTube Player\n     * @type {MessageEmbed[]}\n     */\n    this.embeds = data.embeds.map(e => new Embed(this, e));\n\n    /**\n     * A collection of attachments in the message - e.g. Pictures - mapped by their ID\n     * @type {Collection<Snowflake, MessageAttachment>}\n     */\n    this.attachments = new Collection();\n    for (const attachment of data.attachments) this.attachments.set(attachment.id, new Attachment(this, attachment));\n\n    /**\n     * The timestamp the message was sent at\n     * @type {number}\n     */\n    this.createdTimestamp = new Date(data.timestamp).getTime();\n\n    /**\n     * The timestamp the message was last edited at (if applicable)\n     * @type {?number}\n     */\n    this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null;\n\n    /**\n     * A collection of reactions to this message, mapped by the reaction ID\n     * @type {Collection<Snowflake, MessageReaction>}\n     */\n    this.reactions = new Collection();\n    if (data.reactions && data.reactions.length > 0) {\n      for (const reaction of data.reactions) {\n        const id = reaction.emoji.id ? `${reaction.emoji.name}:${reaction.emoji.id}` : reaction.emoji.name;\n        this.reactions.set(id, new MessageReaction(this, reaction.emoji, reaction.count, reaction.me));\n      }\n    }\n\n    /**\n     * All valid mentions that the message contains\n     * @type {MessageMentions}\n     */\n    this.mentions = new Mentions(this, data.mentions, data.mention_roles, data.mention_everyone);\n\n    /**\n     * ID of the webhook that sent the message, if applicable\n     * @type {?Snowflake}\n     */\n    this.webhookID = data.webhook_id || null;\n\n    /**\n     * Whether this message is a hit in a search\n     * @type {?boolean}\n     */\n    this.hit = typeof data.hit === 'boolean' ? data.hit : null;\n\n    /**\n     * The previous versions of the message, sorted with the most recent first\n     * @type {Message[]}\n     * @private\n     */\n    this._edits = [];\n  }\n\n  /**\n   * Updates the message.\n   * @param {Object} data Raw Discord message update data\n   * @private\n   */\n  patch(data) {\n    const clone = Util.cloneObject(this);\n    this._edits.unshift(clone);\n\n    if ('edited_timestamp' in data) this.editedTimestamp = new Date(data.edited_timestamp).getTime();\n    if ('content' in data) this.content = data.content;\n    if ('pinned' in data) this.pinned = data.pinned;\n    if ('tts' in data) this.tts = data.tts;\n    if ('embeds' in data) this.embeds = data.embeds.map(e => new Embed(this, e));\n    else this.embeds = this.embeds.slice();\n\n    if ('attachments' in data) {\n      this.attachments = new Collection();\n      for (const attachment of data.attachments) this.attachments.set(attachment.id, new Attachment(this, attachment));\n    } else {\n      this.attachments = new Collection(this.attachments);\n    }\n\n    this.mentions = new Mentions(\n      this,\n      'mentions' in data ? data.mentions : this.mentions.users,\n      'mentions_roles' in data ? data.mentions_roles : this.mentions.roles,\n      'mention_everyone' in data ? data.mention_everyone : this.mentions.everyone\n    );\n  }\n\n  /**\n   * The time the message was sent\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * The time the message was last edited at (if applicable)\n   * @type {?Date}\n   * @readonly\n   */\n  get editedAt() {\n    return this.editedTimestamp ? new Date(this.editedTimestamp) : null;\n  }\n\n  /**\n   * The guild the message was sent in (if in a guild channel)\n   * @type {?Guild}\n   * @readonly\n   */\n  get guild() {\n    return this.channel.guild || null;\n  }\n\n  /**\n   * The url to jump to the message\n   * @type {string}\n   * @readonly\n   */\n  get url() {\n    return `https://discordapp.com/channels/${this.guild ? this.guild.id : '@me'}/${this.channel.id}/${this.id}`;\n  }\n\n  /**\n   * The message contents with all mentions replaced by the equivalent text.\n   * If mentions cannot be resolved to a name, the relevant mention in the message content will not be converted.\n   * @type {string}\n   * @readonly\n   */\n  get cleanContent() {\n    return this.content\n      .replace(/@(everyone|here)/g, '@\\u200b$1')\n      .replace(/<@!?[0-9]+>/g, input => {\n        const id = input.replace(/<|!|>|@/g, '');\n        if (this.channel.type === 'dm' || this.channel.type === 'group') {\n          return this.client.users.has(id) ? `@${this.client.users.get(id).username}` : input;\n        }\n\n        const member = this.channel.guild.members.get(id);\n        if (member) {\n          if (member.nickname) return `@${member.nickname}`;\n          return `@${member.user.username}`;\n        } else {\n          const user = this.client.users.get(id);\n          if (user) return `@${user.username}`;\n          return input;\n        }\n      })\n      .replace(/<#[0-9]+>/g, input => {\n        const channel = this.client.channels.get(input.replace(/<|#|>/g, ''));\n        if (channel) return `#${channel.name}`;\n        return input;\n      })\n      .replace(/<@&[0-9]+>/g, input => {\n        if (this.channel.type === 'dm' || this.channel.type === 'group') return input;\n        const role = this.guild.roles.get(input.replace(/<|@|>|&/g, ''));\n        if (role) return `@${role.name}`;\n        return input;\n      });\n  }\n\n  /**\n   * Creates a reaction collector.\n   * @param {CollectorFilter} filter The filter to apply\n   * @param {ReactionCollectorOptions} [options={}] Options to send to the collector\n   * @returns {ReactionCollector}\n   * @example\n   * // Create a reaction collector\n   * const filter = (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someID'\n   * const collector = message.createReactionCollector(filter, { time: 15000 });\n   * collector.on('collect', r => console.log(`Collected ${r.emoji.name}`));\n   * collector.on('end', collected => console.log(`Collected ${collected.size} items`));\n   */\n  createReactionCollector(filter, options = {}) {\n    return new ReactionCollector(this, filter, options);\n  }\n\n  /**\n   * An object containing the same properties as CollectorOptions, but a few more:\n   * @typedef {ReactionCollectorOptions} AwaitReactionsOptions\n   * @property {string[]} [errors] Stop/end reasons that cause the promise to reject\n   */\n\n  /**\n   * Similar to createMessageCollector but in promise form.\n   * Resolves with a collection of reactions that pass the specified filter.\n   * @param {CollectorFilter} filter The filter function to use\n   * @param {AwaitReactionsOptions} [options={}] Optional options to pass to the internal collector\n   * @returns {Promise<Collection<string, MessageReaction>>}\n   * @example\n   * // Create a reaction collector\n   * const filter = (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someID'\n   * message.awaitReactions(filter, { time: 15000 })\n   *   .then(collected => console.log(`Collected ${collected.size} reactions`))\n   *   .catch(console.error);\n   */\n  awaitReactions(filter, options = {}) {\n    return new Promise((resolve, reject) => {\n      const collector = this.createReactionCollector(filter, options);\n      collector.once('end', (reactions, reason) => {\n        if (options.errors && options.errors.includes(reason)) reject(reactions);\n        else resolve(reactions);\n      });\n    });\n  }\n\n  /**\n   * An array of cached versions of the message, including the current version\n   * Sorted from latest (first) to oldest (last)\n   * @type {Message[]}\n   * @readonly\n   */\n  get edits() {\n    const copy = this._edits.slice();\n    copy.unshift(this);\n    return copy;\n  }\n\n  /**\n   * Whether the message is editable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get editable() {\n    return this.author.id === this.client.user.id;\n  }\n\n  /**\n   * Whether the message is deletable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get deletable() {\n    return !this.deleted && (this.author.id === this.client.user.id || (this.guild &&\n      this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES)\n    ));\n  }\n\n  /**\n   * Whether the message is pinnable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get pinnable() {\n    return !this.guild ||\n      this.channel.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_MESSAGES);\n  }\n\n  /**\n   * Whether or not a user, channel or role is mentioned in this message.\n   * @param {GuildChannel|User|Role|string} data Either a guild channel, user or a role object, or a string representing\n   * the ID of any of these\n   * @returns {boolean}\n   */\n  isMentioned(data) {\n    data = data && data.id ? data.id : data;\n    return this.mentions.users.has(data) || this.mentions.channels.has(data) || this.mentions.roles.has(data);\n  }\n\n  /**\n   * Whether or not a guild member is mentioned in this message. Takes into account\n   * user mentions, role mentions, and @everyone/@here mentions.\n   * @param {GuildMember|User} member The member/user to check for a mention of\n   * @returns {boolean}\n   */\n  isMemberMentioned(member) {\n    // Lazy-loading is used here to get around a circular dependency that breaks things\n    if (!GuildMember) GuildMember = __webpack_require__(/*! ./GuildMember */ \"./src/structures/GuildMember.js\");\n    if (this.mentions.everyone) return true;\n    if (this.mentions.users.has(member.id)) return true;\n    if (member instanceof GuildMember && member.roles.some(r => this.mentions.roles.has(r.id))) return true;\n    return false;\n  }\n\n  /**\n   * Options that can be passed into editMessage.\n   * @typedef {Object} MessageEditOptions\n   * @property {Object} [embed] An embed to be added/edited\n   * @property {string|boolean} [code] Language for optional codeblock formatting to apply\n   */\n\n  /**\n   * Edit the content of the message.\n   * @param {StringResolvable} [content] The new content for the message\n   * @param {MessageEditOptions|RichEmbed} [options] The options to provide\n   * @returns {Promise<Message>}\n   * @example\n   * // Update the content of a message\n   * message.edit('This is my new content!')\n   *   .then(msg => console.log(`New message content: ${msg}`))\n   *   .catch(console.error);\n   */\n  edit(content, options) {\n    if (!options && typeof content === 'object' && !(content instanceof Array)) {\n      options = content;\n      content = '';\n    } else if (!options) {\n      options = {};\n    }\n    if (options instanceof RichEmbed) options = { embed: options };\n    return this.client.rest.methods.updateMessage(this, content, options);\n  }\n\n  /**\n   * Edit the content of the message, with a code block.\n   * @param {string} lang The language for the code block\n   * @param {StringResolvable} content The new content for the message\n   * @returns {Promise<Message>}\n   * @deprecated\n   */\n  editCode(lang, content) {\n    content = Util.escapeMarkdown(this.client.resolver.resolveString(content), true);\n    return this.edit(`\\`\\`\\`${lang || ''}\\n${content}\\n\\`\\`\\``);\n  }\n\n  /**\n   * Pins this message to the channel's pinned messages.\n   * @returns {Promise<Message>}\n   */\n  pin() {\n    return this.client.rest.methods.pinMessage(this);\n  }\n\n  /**\n   * Unpins this message from the channel's pinned messages.\n   * @returns {Promise<Message>}\n   */\n  unpin() {\n    return this.client.rest.methods.unpinMessage(this);\n  }\n\n  /**\n   * Add a reaction to the message.\n   * @param {string|Emoji|ReactionEmoji} emoji The emoji to react with\n   * @returns {Promise<MessageReaction>}\n   * @example\n   * // React to a message with a unicode emoji\n   * message.react('🤔')\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // React to a message with a custom emoji\n   * message.react(message.guild.emojis.get('123456789012345678'))\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  react(emoji) {\n    emoji = this.client.resolver.resolveEmojiIdentifier(emoji);\n    if (!emoji) throw new TypeError('Emoji must be a string or Emoji/ReactionEmoji');\n\n    return this.client.rest.methods.addMessageReaction(this, emoji);\n  }\n\n  /**\n   * Remove all reactions from a message.\n   * @returns {Promise<Message>}\n   */\n  clearReactions() {\n    return this.client.rest.methods.removeMessageReactions(this);\n  }\n\n  /**\n   * Deletes the message.\n   * @param {number} [timeout=0] How long to wait to delete the message in milliseconds\n   * @returns {Promise<Message>}\n   * @example\n   * // Delete a message\n   * message.delete()\n   *   .then(msg => console.log(`Deleted message from ${msg.author.username}`))\n   *   .catch(console.error);\n   */\n  delete(timeout = 0) {\n    if (timeout <= 0) {\n      return this.client.rest.methods.deleteMessage(this);\n    } else {\n      return new Promise(resolve => {\n        this.client.setTimeout(() => {\n          resolve(this.delete());\n        }, timeout);\n      });\n    }\n  }\n\n  /**\n   * Reply to the message.\n   * @param {StringResolvable} [content] The content for the message\n   * @param {MessageOptions} [options] The options to provide\n   * @returns {Promise<Message|Message[]>}\n   * @example\n   * // Reply to a message\n   * message.reply('Hey, I\\'m a reply!')\n   *   .then(sent => console.log(`Sent a reply to ${sent.author.username}`))\n   *   .catch(console.error);\n   */\n  reply(content, options) {\n    if (!options && typeof content === 'object' && !(content instanceof Array)) {\n      options = content;\n      content = '';\n    } else if (!options) {\n      options = {};\n    }\n    return this.channel.send(content, Object.assign(options, { reply: this.member || this.author }));\n  }\n\n  /**\n   * Marks the message as read.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {Promise<Message>}\n   */\n  acknowledge() {\n    return this.client.rest.methods.ackMessage(this);\n  }\n\n  /**\n   * Fetches the webhook used to create this message.\n   * @returns {Promise<?Webhook>}\n   */\n  fetchWebhook() {\n    if (!this.webhookID) return Promise.reject(new Error('The message was not sent by a webhook.'));\n    return this.client.fetchWebhook(this.webhookID);\n  }\n\n  /**\n   * Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\n   * without checking all the properties, use `message.id === message2.id`, which is much more efficient. This\n   * method allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.\n   * @param {Message} message The message to compare it to\n   * @param {Object} rawData Raw data passed through the WebSocket about this message\n   * @returns {boolean}\n   */\n  equals(message, rawData) {\n    if (!message) return false;\n    const embedUpdate = !message.author && !message.attachments;\n    if (embedUpdate) return this.id === message.id && this.embeds.length === message.embeds.length;\n\n    let equal = this.id === message.id &&\n        this.author.id === message.author.id &&\n        this.content === message.content &&\n        this.tts === message.tts &&\n        this.nonce === message.nonce &&\n        this.embeds.length === message.embeds.length &&\n        this.attachments.length === message.attachments.length;\n\n    if (equal && rawData) {\n      equal = this.mentions.everyone === message.mentions.everyone &&\n        this.createdTimestamp === new Date(rawData.timestamp).getTime() &&\n        this.editedTimestamp === new Date(rawData.edited_timestamp).getTime();\n    }\n\n    return equal;\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the message's content instead of the object.\n   * @returns {string}\n   * @example\n   * // Logs: Message: This is a message!\n   * console.log(`Message: ${message}`);\n   */\n  toString() {\n    return this.content;\n  }\n\n  _addReaction(emoji, user) {\n    const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;\n    let reaction;\n    if (this.reactions.has(emojiID)) {\n      reaction = this.reactions.get(emojiID);\n      if (!reaction.me) reaction.me = user.id === this.client.user.id;\n    } else {\n      reaction = new MessageReaction(this, emoji, 0, user.id === this.client.user.id);\n      this.reactions.set(emojiID, reaction);\n    }\n    if (!reaction.users.has(user.id)) {\n      reaction.users.set(user.id, user);\n      reaction.count++;\n    }\n    return reaction;\n  }\n\n  _removeReaction(emoji, user) {\n    const emojiID = emoji.id ? `${emoji.name}:${emoji.id}` : emoji.name;\n    if (this.reactions.has(emojiID)) {\n      const reaction = this.reactions.get(emojiID);\n      if (reaction.users.has(user.id)) {\n        reaction.users.delete(user.id);\n        reaction.count--;\n        if (user.id === this.client.user.id) reaction.me = false;\n        if (reaction.count <= 0) this.reactions.delete(emojiID);\n        return reaction;\n      }\n    }\n    return null;\n  }\n\n  _clearReactions() {\n    this.reactions.clear();\n  }\n}\n\nmodule.exports = Message;\n\n\n//# sourceURL=webpack:///./src/structures/Message.js?");

/***/ }),

/***/ "./src/structures/MessageAttachment.js":
/*!*********************************************!*\
  !*** ./src/structures/MessageAttachment.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Represents an attachment in a message.\n */\nclass MessageAttachment {\n  constructor(message, data) {\n    /**\n     * The client that instantiated this MessageAttachment\n     * @name MessageAttachment#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: message.client });\n\n    /**\n     * The message this attachment is part of\n     * @type {Message}\n     */\n    this.message = message;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The ID of this attachment\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The file name of this attachment\n     * @type {string}\n     */\n    this.filename = data.filename;\n\n    /**\n     * The size of this attachment in bytes\n     * @type {number}\n     */\n    this.filesize = data.size;\n\n    /**\n     * The URL to this attachment\n     * @type {string}\n     */\n    this.url = data.url;\n\n    /**\n     * The Proxy URL to this attachment\n     * @type {string}\n     */\n    this.proxyURL = data.proxy_url;\n\n    /**\n     * The height of this attachment (if an image)\n     * @type {?number}\n     */\n    this.height = data.height;\n\n    /**\n     * The width of this attachment (if an image)\n     * @type {?number}\n     */\n    this.width = data.width;\n  }\n}\n\nmodule.exports = MessageAttachment;\n\n\n//# sourceURL=webpack:///./src/structures/MessageAttachment.js?");

/***/ }),

/***/ "./src/structures/MessageCollector.js":
/*!********************************************!*\
  !*** ./src/structures/MessageCollector.js ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Collector = __webpack_require__(/*! ./interfaces/Collector */ \"./src/structures/interfaces/Collector.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * @typedef {CollectorOptions} MessageCollectorOptions\n * @property {number} max The maximum amount of messages to process\n * @property {number} maxMatches The maximum amount of messages to collect\n */\n\n/**\n * Collects messages on a channel.\n * @extends {Collector}\n */\nclass MessageCollector extends Collector {\n  /**\n   * @param {TextChannel|DMChannel|GroupDMChannel} channel The channel\n   * @param {CollectorFilter} filter The filter to be applied to this collector\n   * @param {MessageCollectorOptions} options The options to be applied to this collector\n   * @emits MessageCollector#message\n   */\n  constructor(channel, filter, options = {}) {\n    super(channel.client, filter, options);\n\n    /**\n     * The channel\n     * @type {TextBasedChannel}\n     */\n    this.channel = channel;\n\n    /**\n     * Total number of messages that were received in the channel during message collection\n     * @type {number}\n     */\n    this.received = 0;\n\n    this.client.setMaxListeners(this.client.getMaxListeners() + 1);\n    this.client.on('message', this.listener);\n\n    // For backwards compatibility (remove in v12)\n    if (this.options.max) this.options.maxProcessed = this.options.max;\n    if (this.options.maxMatches) this.options.max = this.options.maxMatches;\n    this._reEmitter = message => {\n      /**\n       * Emitted when the collector receives a message.\n       * @event MessageCollector#message\n       * @param {Message} message The message\n       * @deprecated\n       */\n      this.emit('message', message);\n    };\n    this.on('collect', this._reEmitter);\n  }\n\n  // Remove in v12\n  on(eventName, listener) {\n    if (eventName === 'message') {\n      listener = util.deprecate(listener, 'MessageCollector will soon no longer emit \"message\", use \"collect\" instead');\n    }\n    super.on(eventName, listener);\n  }\n\n  /**\n   * Handle an incoming message for possible collection.\n   * @param {Message} message The message that could be collected\n   * @returns {?{key: Snowflake, value: Message}}\n   * @private\n   */\n  handle(message) {\n    if (message.channel.id !== this.channel.id) return null;\n    this.received++;\n    return {\n      key: message.id,\n      value: message,\n    };\n  }\n\n  /**\n   * Check after collection to see if the collector is done.\n   * @returns {?string} Reason to end the collector, if any\n   * @private\n   */\n  postCheck() {\n    // Consider changing the end reasons for v12\n    if (this.options.maxMatches && this.collected.size >= this.options.max) return 'matchesLimit';\n    if (this.options.max && this.received >= this.options.maxProcessed) return 'limit';\n    return null;\n  }\n\n  /**\n   * Removes event listeners.\n   * @private\n   */\n  cleanup() {\n    this.removeListener('collect', this._reEmitter);\n    this.client.removeListener('message', this.listener);\n    this.client.setMaxListeners(this.client.getMaxListeners() - 1);\n  }\n}\n\nmodule.exports = MessageCollector;\n\n\n//# sourceURL=webpack:///./src/structures/MessageCollector.js?");

/***/ }),

/***/ "./src/structures/MessageEmbed.js":
/*!****************************************!*\
  !*** ./src/structures/MessageEmbed.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Represents an embed in a message (image/video preview, rich embed, etc.)\n * <info>This class is only used for *received* embeds. If you wish to send one, use the {@link RichEmbed} class.</info>\n */\nclass MessageEmbed {\n  constructor(message, data) {\n    /**\n     * The client that instantiated this embed\n     * @name MessageEmbed#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: message.client });\n\n    /**\n     * The message this embed is part of\n     * @type {Message}\n     */\n    this.message = message;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The type of this embed\n     * @type {string}\n     */\n    this.type = data.type;\n\n    /**\n     * The title of this embed\n     * @type {?string}\n     */\n    this.title = data.title;\n\n    /**\n     * The description of this embed\n     * @type {?string}\n     */\n    this.description = data.description;\n\n    /**\n     * The URL of this embed\n     * @type {string}\n     */\n    this.url = data.url;\n\n    /**\n     * The color of the embed\n     * @type {number}\n     */\n    this.color = data.color;\n\n    /**\n     * The fields of this embed\n     * @type {MessageEmbedField[]}\n     */\n    this.fields = [];\n    if (data.fields) for (const field of data.fields) this.fields.push(new MessageEmbedField(this, field));\n\n    /**\n     * The timestamp of this embed\n     * @type {number}\n     */\n    this.timestamp = data.timestamp;\n\n    /**\n     * The thumbnail of this embed\n     * @type {?MessageEmbedThumbnail}\n     */\n    this.thumbnail = data.thumbnail ? new MessageEmbedThumbnail(this, data.thumbnail) : null;\n\n    /**\n     * The image of this embed\n     * @type {?MessageEmbedImage}\n     */\n    this.image = data.image ? new MessageEmbedImage(this, data.image) : null;\n\n    /**\n     * The video of this embed\n     * @type {?MessageEmbedVideo}\n     */\n    this.video = data.video ? new MessageEmbedVideo(this, data.video) : null;\n\n    /**\n     * The author of this embed\n     * @type {?MessageEmbedAuthor}\n     */\n    this.author = data.author ? new MessageEmbedAuthor(this, data.author) : null;\n\n    /**\n     * The provider of this embed\n     * @type {?MessageEmbedProvider}\n     */\n    this.provider = data.provider ? new MessageEmbedProvider(this, data.provider) : null;\n\n    /**\n     * The footer of this embed\n     * @type {?MessageEmbedFooter}\n     */\n    this.footer = data.footer ? new MessageEmbedFooter(this, data.footer) : null;\n  }\n\n  /**\n   * The date this embed was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * The hexadecimal version of the embed color, with a leading hash\n   * @type {?string}\n   * @readonly\n   */\n  get hexColor() {\n    if (!this.color) return null;\n    let col = this.color.toString(16);\n    while (col.length < 6) col = `0${col}`;\n    return `#${col}`;\n  }\n}\n\n/**\n * Represents a thumbnail for a message embed.\n */\nclass MessageEmbedThumbnail {\n  constructor(embed, data) {\n    /**\n     * The embed this thumbnail is part of\n     * @type {MessageEmbed}\n     */\n    this.embed = embed;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The URL for this thumbnail\n     * @type {string}\n     */\n    this.url = data.url;\n\n    /**\n     * The Proxy URL for this thumbnail\n     * @type {string}\n     */\n    this.proxyURL = data.proxy_url;\n\n    /**\n     * The height of the thumbnail\n     * @type {number}\n     */\n    this.height = data.height;\n\n    /**\n     * The width of the thumbnail\n     * @type {number}\n     */\n    this.width = data.width;\n  }\n}\n\n/**\n * Represents an image for a message embed.\n */\nclass MessageEmbedImage {\n  constructor(embed, data) {\n    /**\n     * The embed this image is part of\n     * @type {MessageEmbed}\n     */\n    this.embed = embed;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The URL for this image\n     * @type {string}\n     */\n    this.url = data.url;\n\n    /**\n     * The Proxy URL for this image\n     * @type {string}\n     */\n    this.proxyURL = data.proxy_url;\n\n    /**\n     * The height of the image\n     * @type {number}\n     */\n    this.height = data.height;\n\n    /**\n     * The width of the image\n     * @type {number}\n     */\n    this.width = data.width;\n  }\n}\n\n/**\n * Represents a video for a message embed.\n */\nclass MessageEmbedVideo {\n  constructor(embed, data) {\n    /**\n     * The embed this video is part of\n     * @type {MessageEmbed}\n     */\n    this.embed = embed;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The source URL for this video\n     * @type {string}\n     */\n    this.url = data.url;\n\n    /**\n     * The height of the video\n     * @type {number}\n     */\n    this.height = data.height;\n\n    /**\n     * The width of the video\n     * @type {number}\n     */\n    this.width = data.width;\n  }\n}\n\n/**\n * Represents a provider for a message embed.\n */\nclass MessageEmbedProvider {\n  constructor(embed, data) {\n    /**\n     * The embed this provider is part of\n     * @type {MessageEmbed}\n     */\n    this.embed = embed;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The name of this provider\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The URL of this provider\n     * @type {string}\n     */\n    this.url = data.url;\n  }\n}\n\n/**\n * Represents an author for a message embed.\n */\nclass MessageEmbedAuthor {\n  constructor(embed, data) {\n    /**\n     * The embed this author is part of\n     * @type {MessageEmbed}\n     */\n    this.embed = embed;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The name of this author\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The URL of this author\n     * @type {string}\n     */\n    this.url = data.url;\n\n    /**\n     * The icon URL of this author\n     * @type {string}\n     */\n    this.iconURL = data.icon_url;\n  }\n}\n\n/**\n * Represents a field for a message embed.\n */\nclass MessageEmbedField {\n  constructor(embed, data) {\n    /**\n     * The embed this footer is part of\n     * @type {MessageEmbed}\n     */\n    this.embed = embed;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The name of this field\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The value of this field\n     * @type {string}\n     */\n    this.value = data.value;\n\n    /**\n     * If this field is displayed inline\n     * @type {boolean}\n     */\n    this.inline = data.inline;\n  }\n}\n\n/**\n * Represents the footer of a message embed.\n */\nclass MessageEmbedFooter {\n  constructor(embed, data) {\n    /**\n     * The embed this footer is part of\n     * @type {MessageEmbed}\n     */\n    this.embed = embed;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The text in this footer\n     * @type {string}\n     */\n    this.text = data.text;\n\n    /**\n     * The icon URL of this footer\n     * @type {string}\n     */\n    this.iconURL = data.icon_url;\n\n    /**\n     * The proxy icon URL of this footer\n     * @type {string}\n     */\n    this.proxyIconUrl = data.proxy_icon_url;\n  }\n}\n\nMessageEmbed.Thumbnail = MessageEmbedThumbnail;\nMessageEmbed.Image = MessageEmbedImage;\nMessageEmbed.Video = MessageEmbedVideo;\nMessageEmbed.Provider = MessageEmbedProvider;\nMessageEmbed.Author = MessageEmbedAuthor;\nMessageEmbed.Field = MessageEmbedField;\nMessageEmbed.Footer = MessageEmbedFooter;\n\nmodule.exports = MessageEmbed;\n\n\n//# sourceURL=webpack:///./src/structures/MessageEmbed.js?");

/***/ }),

/***/ "./src/structures/MessageMentions.js":
/*!*******************************************!*\
  !*** ./src/structures/MessageMentions.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\n\n/**\n * Keeps track of mentions in a {@link Message}.\n */\nclass MessageMentions {\n  constructor(message, users, roles, everyone) {\n    /**\n     * Whether `@everyone` or `@here` were mentioned\n     * @type {boolean}\n     */\n    this.everyone = Boolean(everyone);\n\n    if (users) {\n      if (users instanceof Collection) {\n        /**\n         * Any users that were mentioned\n         * @type {Collection<Snowflake, User>}\n         */\n        this.users = new Collection(users);\n      } else {\n        this.users = new Collection();\n        for (const mention of users) {\n          let user = message.client.users.get(mention.id);\n          if (!user) user = message.client.dataManager.newUser(mention);\n          this.users.set(user.id, user);\n        }\n      }\n    } else {\n      this.users = new Collection();\n    }\n\n    if (roles) {\n      if (roles instanceof Collection) {\n        /**\n         * Any roles that were mentioned\n         * @type {Collection<Snowflake, Role>}\n         */\n        this.roles = new Collection(roles);\n      } else {\n        this.roles = new Collection();\n        for (const mention of roles) {\n          const role = message.channel.guild.roles.get(mention);\n          if (role) this.roles.set(role.id, role);\n        }\n      }\n    } else {\n      this.roles = new Collection();\n    }\n\n    /**\n     * Content of the message\n     * @type {Message}\n     * @private\n     */\n    this._content = message.content;\n\n    /**\n     * The client the message is from\n     * @type {Client}\n     * @private\n     */\n    this._client = message.client;\n\n    /**\n     * The guild the message is in\n     * @type {?Guild}\n     * @private\n     */\n    this._guild = message.channel.guild;\n\n    /**\n     * Cached members for {@MessageMention#members}\n     * @type {?Collection<Snowflake, GuildMember>}\n     * @private\n     */\n    this._members = null;\n\n    /**\n     * Cached channels for {@MessageMention#channels}\n     * @type {?Collection<Snowflake, GuildChannel>}\n     * @private\n     */\n    this._channels = null;\n  }\n\n  /**\n   * Any members that were mentioned (only in {@link TextChannel}s)\n   * @type {?Collection<Snowflake, GuildMember>}\n   * @readonly\n   */\n  get members() {\n    if (this._members) return this._members;\n    if (!this._guild) return null;\n    this._members = new Collection();\n    this.users.forEach(user => {\n      const member = this._guild.member(user);\n      if (member) this._members.set(member.user.id, member);\n    });\n    return this._members;\n  }\n\n  /**\n   * Any channels that were mentioned\n   * @type {Collection<Snowflake, GuildChannel>}\n   * @readonly\n   */\n  get channels() {\n    if (this._channels) return this._channels;\n    this._channels = new Collection();\n    let matches;\n    while ((matches = this.constructor.CHANNELS_PATTERN.exec(this._content)) !== null) {\n      const chan = this._client.channels.get(matches[1]);\n      if (chan) this._channels.set(chan.id, chan);\n    }\n    return this._channels;\n  }\n}\n\n/**\n * Regular expression that globally matches `@everyone` and `@here`\n * @type {RegExp}\n */\nMessageMentions.EVERYONE_PATTERN = /@(everyone|here)/g;\n\n/**\n * Regular expression that globally matches user mentions like `<@81440962496172032>`\n * @type {RegExp}\n */\nMessageMentions.USERS_PATTERN = /<@!?[0-9]+>/g;\n\n/**\n * Regular expression that globally matches role mentions like `<@&297577916114403338>`\n * @type {RegExp}\n */\nMessageMentions.ROLES_PATTERN = /<@&[0-9]+>/g;\n\n/**\n * Regular expression that globally matches channel mentions like `<#222079895583457280>`\n * @type {RegExp}\n */\nMessageMentions.CHANNELS_PATTERN = /<#([0-9]+)>/g;\n\nmodule.exports = MessageMentions;\n\n\n//# sourceURL=webpack:///./src/structures/MessageMentions.js?");

/***/ }),

/***/ "./src/structures/MessageReaction.js":
/*!*******************************************!*\
  !*** ./src/structures/MessageReaction.js ***!
  \*******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Emoji = __webpack_require__(/*! ./Emoji */ \"./src/structures/Emoji.js\");\nconst ReactionEmoji = __webpack_require__(/*! ./ReactionEmoji */ \"./src/structures/ReactionEmoji.js\");\n\n/**\n * Represents a reaction to a message.\n */\nclass MessageReaction {\n  constructor(message, emoji, count, me) {\n    /**\n     * The message that this reaction refers to\n     * @type {Message}\n     */\n    this.message = message;\n\n    /**\n     * Whether the client has given this reaction\n     * @type {boolean}\n     */\n    this.me = me;\n\n    /**\n     * The number of people that have given the same reaction\n     * @type {number}\n     */\n    this.count = count || 0;\n\n    /**\n     * The users that have given this reaction, mapped by their ID\n     * @type {Collection<Snowflake, User>}\n     */\n    this.users = new Collection();\n\n    this._emoji = new ReactionEmoji(this, emoji.name, emoji.id);\n  }\n\n  /**\n   * The emoji of this reaction, either an Emoji object for known custom emojis, or a ReactionEmoji\n   * object which has fewer properties. Whatever the prototype of the emoji, it will still have\n   * `name`, `id`, `identifier` and `toString()`\n   * @type {Emoji|ReactionEmoji}\n   * @readonly\n   */\n  get emoji() {\n    if (this._emoji instanceof Emoji) return this._emoji;\n    // Check to see if the emoji has become known to the client\n    if (this._emoji.id) {\n      const emojis = this.message.client.emojis;\n      if (emojis.has(this._emoji.id)) {\n        const emoji = emojis.get(this._emoji.id);\n        this._emoji = emoji;\n        return emoji;\n      }\n    }\n    return this._emoji;\n  }\n\n  /**\n   * Removes a user from this reaction.\n   * @param {UserResolvable} [user=this.message.client.user] The user to remove the reaction of\n   * @returns {Promise<MessageReaction>}\n   */\n  remove(user = this.message.client.user) {\n    const message = this.message;\n    const userID = this.message.client.resolver.resolveUserID(user);\n    if (!userID) return Promise.reject(new Error('Couldn\\'t resolve the user ID to remove from the reaction.'));\n    return message.client.rest.methods.removeMessageReaction(\n      message, this.emoji.identifier, userID\n    );\n  }\n\n  /**\n   * Fetch all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs.\n   * @param {number} [limit=100] The maximum amount of users to fetch, defaults to 100\n   * @param {Object} [options] Options to fetch users\n   * @param {Snowflake} [options.before] Limit fetching users to those with an id lower than the supplied id\n   * @param {Snowflake} [options.after] Limit fetching users to those with an id greater than the supplied id\n   * @returns {Promise<Collection<Snowflake, User>>}\n   */\n  fetchUsers(limit = 100, { after, before } = {}) {\n    const message = this.message;\n    return message.client.rest.methods.getMessageReactionUsers(\n      message, this.emoji.identifier, { after, before, limit }\n    ).then(data => {\n      const users = new Collection();\n      for (const rawUser of data) {\n        const user = this.message.client.dataManager.newUser(rawUser);\n        this.users.set(user.id, user);\n        users.set(user.id, user);\n      }\n      return users;\n    });\n  }\n}\n\nmodule.exports = MessageReaction;\n\n\n//# sourceURL=webpack:///./src/structures/MessageReaction.js?");

/***/ }),

/***/ "./src/structures/OAuth2Application.js":
/*!*********************************************!*\
  !*** ./src/structures/OAuth2Application.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Snowflake = __webpack_require__(/*! ../util/Snowflake */ \"./src/util/Snowflake.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Represents an OAuth2 Application.\n */\nclass OAuth2Application {\n  constructor(client, data) {\n    /**\n     * The client that instantiated the application\n     * @name OAuth2Application#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The ID of the app\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The name of the app\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The app's description\n     * @type {string}\n     */\n    this.description = data.description;\n\n    /**\n     * The app's icon hash\n     * @type {?string}\n     */\n    this.icon = data.icon;\n\n    /**\n     * The app's icon URL\n     * @type {string}\n     */\n    this.iconURL = `https://cdn.discordapp.com/app-icons/${this.id}/${this.icon}.jpg`;\n\n    /**\n     * The app's RPC origins\n     * @type {?string[]}\n     */\n    this.rpcOrigins = data.rpc_origins;\n\n    /**\n     * The app's redirect URIs\n     * @type {string[]}\n     */\n    this.redirectURIs = data.redirect_uris;\n\n    /**\n     * If this app's bot requires a code grant when using the OAuth2 flow\n     * @type {boolean}\n     */\n    this.botRequireCodeGrant = data.bot_require_code_grant;\n\n    /**\n     * If this app's bot is public\n     * @type {boolean}\n     */\n    this.botPublic = data.bot_public;\n\n    /**\n     * If this app can use rpc\n     * @type {boolean}\n     */\n    this.rpcApplicationState = data.rpc_application_state;\n\n    /**\n     * Object containing basic info about this app's bot\n     * @type {Object}\n     */\n    this.bot = data.bot;\n\n    /**\n     * The flags for the app\n     * @type {number}\n     */\n    this.flags = data.flags;\n\n    /**\n     * OAuth2 secret for the application\n     * @type {boolean}\n     */\n    this.secret = data.secret;\n\n    if (data.owner) {\n      /**\n       * The owner of this OAuth application\n       * @type {?User}\n       */\n      this.owner = this.client.dataManager.newUser(data.owner);\n    }\n  }\n\n  /**\n   * The timestamp the app was created at\n   * @type {number}\n   * @readonly\n   */\n  get createdTimestamp() {\n    return Snowflake.deconstruct(this.id).timestamp;\n  }\n\n  /**\n   * The time the app was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * Reset the app's secret and bot token.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {OAuth2Application}\n   */\n  reset() {\n    return this.client.rest.methods.resetApplication(this.id);\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the app name rather than the app object.\n   * @returns {string}\n   */\n  toString() {\n    return this.name;\n  }\n}\n\nOAuth2Application.prototype.reset =\n  util.deprecate(OAuth2Application.prototype.reset, 'OAuth2Application#reset: userbot methods will be removed');\n\nmodule.exports = OAuth2Application;\n\n\n//# sourceURL=webpack:///./src/structures/OAuth2Application.js?");

/***/ }),

/***/ "./src/structures/PartialGuild.js":
/*!****************************************!*\
  !*** ./src/structures/PartialGuild.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/*\n{ splash: null,\n     id: '123123123',\n     icon: '123123123',\n     name: 'name' }\n*/\n\n/**\n * Represents a guild that the client only has limited information for - e.g. from invites.\n */\nclass PartialGuild {\n  constructor(client, data) {\n    /**\n     * The client that instantiated this PartialGuild\n     * @name PartialGuild#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The ID of this guild\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The name of this guild\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The hash of this guild's icon\n     * @type {?string}\n     */\n    this.icon = data.icon;\n\n    /**\n     * The hash of the guild splash image (VIP only)\n     * @type {?string}\n     */\n    this.splash = data.splash;\n  }\n}\n\nmodule.exports = PartialGuild;\n\n\n//# sourceURL=webpack:///./src/structures/PartialGuild.js?");

/***/ }),

/***/ "./src/structures/PartialGuildChannel.js":
/*!***********************************************!*\
  !*** ./src/structures/PartialGuildChannel.js ***!
  \***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\n\n/*\n{ type: 0, id: '123123', name: 'heavy-testing' } }\n*/\n\n/**\n * Represents a guild channel that the client only has limited information for - e.g. from invites.\n */\nclass PartialGuildChannel {\n  constructor(client, data) {\n    /**\n     * The client that instantiated this PartialGuildChannel\n     * @name PartialGuildChannel#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The ID of this guild channel\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The name of this guild channel\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The type of this guild channel - `text` or `voice`\n     * @type {string}\n     */\n    this.type = Constants.ChannelTypes.TEXT === data.type ? 'text' : 'voice';\n  }\n}\n\nmodule.exports = PartialGuildChannel;\n\n\n//# sourceURL=webpack:///./src/structures/PartialGuildChannel.js?");

/***/ }),

/***/ "./src/structures/PermissionOverwrites.js":
/*!************************************************!*\
  !*** ./src/structures/PermissionOverwrites.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Permissions = __webpack_require__(/*! ../util/Permissions */ \"./src/util/Permissions.js\");\n\n/**\n * Represents a permission overwrite for a role or member in a guild channel.\n */\nclass PermissionOverwrites {\n  constructor(guildChannel, data) {\n    /**\n     * The GuildChannel this overwrite is for\n     * @name PermissionOverwrites#channel\n     * @type {GuildChannel}\n     * @readonly\n     */\n    Object.defineProperty(this, 'channel', { value: guildChannel });\n\n    if (data) this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The ID of this overwrite, either a user ID or a role ID\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The type of this overwrite\n     * @type {string}\n     */\n    this.type = data.type;\n\n    /**\n     * The permissions that are denied for the user or role as a bitfield.\n     * @type {number}\n     * @deprecated\n     */\n    this.deny = data.deny;\n\n    /**\n     * The permissions that are allowed for the user or role as a bitfield.\n     * @type {number}\n     * @deprecated\n     */\n    this.allow = data.allow;\n\n    /**\n     * The permissions that are denied for the user or role.\n     * @type {Permissions}\n     */\n    this.denied = new Permissions(data.deny).freeze();\n\n    /**\n     * The permissions that are allowed for the user or role.\n     * @type {Permissions}\n     */\n    this.allowed = new Permissions(data.allow).freeze();\n  }\n\n  /**\n   * Delete this Permission Overwrite.\n   * @param {string} [reason] Reason for deleting this overwrite\n   * @returns {Promise<PermissionOverwrites>}\n   */\n  delete(reason) {\n    return this.channel.client.rest.methods.deletePermissionOverwrites(this, reason);\n  }\n}\n\nmodule.exports = PermissionOverwrites;\n\n\n//# sourceURL=webpack:///./src/structures/PermissionOverwrites.js?");

/***/ }),

/***/ "./src/structures/Presence.js":
/*!************************************!*\
  !*** ./src/structures/Presence.js ***!
  \************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const { ActivityFlags, Endpoints } = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\n\n/**\n * The status of this presence:\n *\n * * **`online`** - user is online\n * * **`idle`** - user is AFK\n * * **`offline`** - user is offline or invisible\n * * **`dnd`** - user is in Do Not Disturb\n * @typedef {string} PresenceStatus\n */\n\n/**\n * Represents a user's presence.\n */\nclass Presence {\n  constructor(data = {}, client) {\n    Object.defineProperty(this, 'client', { value: client });\n\n    /**\n     * The status of this presence:\n     * @type {PresenceStatus}\n     */\n    this.status = data.status || 'offline';\n\n    /**\n     * The game that the user is playing\n     * @type {?Game}\n     */\n    this.game = data.game ? new Game(data.game, this) : null;\n\n    /**\n     * The devices this presence is on\n     * @type {?object}\n     * @property {PresenceStatus} web\n     * @property {PresenceStatus} mobile\n     * @property {PresenceStatus} desktop\n     */\n    this.clientStatus = data.client_status || null;\n  }\n\n  update(data) {\n    this.status = data.status || this.status;\n    this.game = data.game ? new Game(data.game, this) : null;\n    this.clientStatus = data.client_status || null;\n  }\n\n  /**\n   * Whether this presence is equal to another\n   * @param {Presence} presence The presence to compare with\n   * @returns {boolean}\n   */\n  equals(presence) {\n    return this === presence || (\n      presence &&\n      this.status === presence.status &&\n      (this.game ? this.game.equals(presence.game) : !presence.game) &&\n      this.clientStatus.web === presence.clientStatus.web &&\n      this.clientStatus.mobile === presence.clientStatus.mobile &&\n      this.clientStatus.desktop === presence.clientStatus.desktop\n    );\n  }\n}\n\n/**\n * Represents a game that is part of a user's presence.\n */\nclass Game {\n  constructor(data, presence) {\n    Object.defineProperty(this, 'presence', { value: presence });\n\n    /**\n     * The name of the game being played\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The type of the game status, its possible values:\n     * - 0: Playing\n     * - 1: Streaming\n     * - 2: Listening\n     * - 3: Watching\n     * @type {number}\n     */\n    this.type = data.type;\n\n    /**\n     * If the game is being streamed, a link to the stream\n     * @type {?string}\n     */\n    this.url = data.url || null;\n\n    /**\n     * Details about the activity\n     * @type {?string}\n     */\n    this.details = data.details || null;\n\n    /**\n     * State of the activity\n     * @type {?string}\n     */\n    this.state = data.state || null;\n\n    /**\n     * Application ID associated with this activity\n     * @type {?Snowflake}\n     */\n    this.applicationID = data.application_id || null;\n\n    /**\n     * Timestamps for the activity\n     * @type {?Object}\n     * @prop {?Date} start When the activity started\n     * @prop {?Date} end When the activity will end\n     */\n    this.timestamps = data.timestamps ? {\n      start: data.timestamps.start ? new Date(Number(data.timestamps.start)) : null,\n      end: data.timestamps.end ? new Date(Number(data.timestamps.end)) : null,\n    } : null;\n\n    /**\n     * Party of the activity\n     * @type {?Object}\n     * @prop {?string} id ID of the party\n     * @prop {number[]} size Size of the party as `[current, max]`\n     */\n    this.party = data.party || null;\n\n    /**\n     * Assets for rich presence\n     * @type {?RichPresenceAssets}\n     */\n    this.assets = data.assets ? new RichPresenceAssets(this, data.assets) : null;\n\n    this.syncID = data.sync_id;\n    this._flags = data.flags;\n  }\n\n  get flags() {\n    const flags = [];\n    for (const [name, flag] of Object.entries(ActivityFlags)) {\n      if ((this._flags & flag) === flag) flags.push(name);\n    }\n    return flags;\n  }\n\n  /**\n   * Whether or not the game is being streamed\n   * @type {boolean}\n   * @readonly\n   */\n  get streaming() {\n    return this.type === 1;\n  }\n\n  /**\n   * When concatenated with a string, this automatically returns the game's name instead of the Game object.\n   * @returns {string}\n   */\n  toString() {\n    return this.name;\n  }\n\n  /**\n   * Whether this game is equal to another game\n   * @param {Game} game The game to compare with\n   * @returns {boolean}\n   */\n  equals(game) {\n    return this === game || (\n      game &&\n      this.name === game.name &&\n      this.type === game.type &&\n      this.url === game.url\n    );\n  }\n}\n\n/**\n * Assets for a rich presence\n */\nclass RichPresenceAssets {\n  constructor(game, assets) {\n    Object.defineProperty(this, 'game', { value: game });\n\n    /**\n     * Hover text for the large image\n     * @type {?string}\n     */\n    this.largeText = assets.large_text || null;\n\n    /**\n     * Hover text for the small image\n     * @type {?string}\n     */\n    this.smallText = assets.small_text || null;\n\n    /**\n     * ID of the large image asset\n     * @type {?Snowflake}\n     */\n    this.largeImage = assets.large_image || null;\n\n    /**\n     * ID of the small image asset\n     * @type {?Snowflake}\n     */\n    this.smallImage = assets.small_image || null;\n  }\n\n  /**\n   * The URL of the small image asset\n   * @type {?string}\n   * @readonly\n   */\n  get smallImageURL() {\n    if (!this.smallImage) return null;\n    return Endpoints.CDN(this.game.presence.client.options.http.cdn)\n      .AppAsset(this.game.applicationID, this.smallImage);\n  }\n\n  /**\n   * The URL of the large image asset\n   * @type {?string}\n   * @readonly\n   */\n  get largeImageURL() {\n    if (!this.largeImage) return null;\n    if (/^spotify:/.test(this.largeImage)) {\n      return `https://i.scdn.co/image/${this.largeImage.slice(8)}`;\n    }\n    return Endpoints.CDN(this.game.presence.client.options.http.cdn)\n      .AppAsset(this.game.applicationID, this.largeImage);\n  }\n}\n\nexports.Presence = Presence;\nexports.Game = Game;\nexports.RichPresenceAssets = RichPresenceAssets;\n\n\n//# sourceURL=webpack:///./src/structures/Presence.js?");

/***/ }),

/***/ "./src/structures/ReactionCollector.js":
/*!*********************************************!*\
  !*** ./src/structures/ReactionCollector.js ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Collector = __webpack_require__(/*! ./interfaces/Collector */ \"./src/structures/interfaces/Collector.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\n\n/**\n * @typedef {CollectorOptions} ReactionCollectorOptions\n * @property {number} max The maximum total amount of reactions to collect\n * @property {number} maxEmojis The maximum number of emojis to collect\n * @property {number} maxUsers The maximum number of users to react\n */\n\n/**\n * Collects reactions on messages.\n * @extends {Collector}\n */\nclass ReactionCollector extends Collector {\n  /**\n   * @param {Message} message The message upon which to collect reactions\n   * @param {CollectorFilter} filter The filter to apply to this collector\n   * @param {ReactionCollectorOptions} [options={}] The options to apply to this collector\n   */\n  constructor(message, filter, options = {}) {\n    super(message.client, filter, options);\n\n    /**\n     * The message\n     * @type {Message}\n     */\n    this.message = message;\n\n    /**\n     * The users which have reacted\n     * @type {Collection}\n     */\n    this.users = new Collection();\n\n    /**\n     * The total number of reactions collected\n     * @type {number}\n     */\n    this.total = 0;\n\n    this.client.setMaxListeners(this.client.getMaxListeners() + 1);\n    this.client.on('messageReactionAdd', this.listener);\n  }\n\n  /**\n   * Handle an incoming reaction for possible collection.\n   * @param {MessageReaction} reaction The reaction to possibly collect\n   * @returns {?{key: Snowflake, value: MessageReaction}}\n   * @private\n   */\n  handle(reaction) {\n    if (reaction.message.id !== this.message.id) return null;\n    return {\n      key: reaction.emoji.id || reaction.emoji.name,\n      value: reaction,\n    };\n  }\n\n  /**\n   * Check after collection to see if the collector is done.\n   * @param {MessageReaction} reaction The reaction that was collected\n   * @param {User} user The user that reacted\n   * @returns {?string} Reason to end the collector, if any\n   * @private\n   */\n  postCheck(reaction, user) {\n    this.users.set(user.id, user);\n    if (this.options.max && ++this.total >= this.options.max) return 'limit';\n    if (this.options.maxEmojis && this.collected.size >= this.options.maxEmojis) return 'emojiLimit';\n    if (this.options.maxUsers && this.users.size >= this.options.maxUsers) return 'userLimit';\n    return null;\n  }\n\n  /**\n   * Remove event listeners.\n   * @private\n   */\n  cleanup() {\n    this.client.removeListener('messageReactionAdd', this.listener);\n    this.client.setMaxListeners(this.client.getMaxListeners() - 1);\n  }\n}\n\nmodule.exports = ReactionCollector;\n\n\n//# sourceURL=webpack:///./src/structures/ReactionCollector.js?");

/***/ }),

/***/ "./src/structures/ReactionEmoji.js":
/*!*****************************************!*\
  !*** ./src/structures/ReactionEmoji.js ***!
  \*****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Represents a limited emoji set used for both custom and unicode emojis. Custom emojis\n * will use this class opposed to the Emoji class when the client doesn't know enough\n * information about them.\n */\nclass ReactionEmoji {\n  constructor(reaction, name, id) {\n    /**\n     * The message reaction this emoji refers to\n     * @type {MessageReaction}\n     */\n    this.reaction = reaction;\n\n    /**\n     * The name of this reaction emoji\n     * @type {string}\n     */\n    this.name = name;\n\n    /**\n     * The ID of this reaction emoji\n     * @type {?Snowflake}\n     */\n    this.id = id;\n  }\n\n  /**\n   * The identifier of this emoji, used for message reactions\n   * @type {string}\n   * @readonly\n   */\n  get identifier() {\n    if (this.id) return `${this.name}:${this.id}`;\n    return encodeURIComponent(this.name);\n  }\n\n  /**\n   * Creates the text required to form a graphical emoji on Discord.\n   * @example\n   * // Send the emoji used in a reaction to the channel the reaction is part of\n   * reaction.message.channel.send(`The emoji used is ${reaction.emoji}`);\n   * @returns {string}\n   */\n  toString() {\n    return this.id ? `<:${this.name}:${this.id}>` : this.name;\n  }\n}\n\nmodule.exports = ReactionEmoji;\n\n\n//# sourceURL=webpack:///./src/structures/ReactionEmoji.js?");

/***/ }),

/***/ "./src/structures/RichEmbed.js":
/*!*************************************!*\
  !*** ./src/structures/RichEmbed.js ***!
  \*************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Attachment = __webpack_require__(/*! ./Attachment */ \"./src/structures/Attachment.js\");\nconst MessageEmbed = __webpack_require__(/*! ./MessageEmbed */ \"./src/structures/MessageEmbed.js\");\nlet ClientDataResolver;\n\n/**\n * A rich embed to be sent with a message with a fluent interface for creation.\n * @param {Object} [data] Data to set in the rich embed\n */\nclass RichEmbed {\n  constructor(data = {}) {\n    /**\n     * Title for this Embed\n     * @type {string}\n     */\n    this.title = data.title;\n\n    /**\n     * Description for this Embed\n     * @type {string}\n     */\n    this.description = data.description;\n\n    /**\n     * URL for this Embed\n     * @type {string}\n     */\n    this.url = data.url;\n\n    /**\n     * Color for this Embed\n     * @type {number}\n     */\n    this.color = data.color;\n\n    /**\n     * Author for this Embed\n     * @type {Object}\n     */\n    this.author = data.author;\n\n    /**\n     * Timestamp for this Embed\n     * @type {Date}\n     */\n    this.timestamp = data.timestamp;\n\n    /**\n     * Fields for this Embed\n     * @type {Object[]}\n     */\n    this.fields = data.fields || [];\n\n    /**\n     * Thumbnail for this Embed\n     * @type {Object}\n     */\n    this.thumbnail = data.thumbnail;\n\n    /**\n     * Image for this Embed\n     * @type {Object}\n     */\n    this.image = data.image;\n\n    /**\n     * Footer for this Embed\n     * @type {Object}\n     */\n    this.footer = data.footer;\n\n    /**\n     * File to upload alongside this Embed\n     * @type {FileOptions|string|Attachment}\n     */\n    this.file = data.file;\n\n    /**\n     * The files to upload alongside this Embed\n     * @type {Array<FileOptions|string|Attachment>}\n     */\n    this.files = [];\n  }\n\n  /**\n   * Sets the title of this embed.\n   * @param {StringResolvable} title The title\n   * @returns {RichEmbed} This embed\n   */\n  setTitle(title) {\n    title = resolveString(title);\n    if (title.length > 256) throw new RangeError('RichEmbed titles may not exceed 256 characters.');\n    this.title = title;\n    return this;\n  }\n\n  /**\n   * Sets the description of this embed.\n   * @param {StringResolvable} description The description\n   * @returns {RichEmbed} This embed\n   */\n  setDescription(description) {\n    description = resolveString(description);\n    if (description.length > 2048) throw new RangeError('RichEmbed descriptions may not exceed 2048 characters.');\n    this.description = description;\n    return this;\n  }\n\n  /**\n   * Sets the URL of this embed.\n   * @param {string} url The URL\n   * @returns {RichEmbed} This embed\n   */\n  setURL(url) {\n    this.url = url;\n    return this;\n  }\n\n  /**\n   * Sets the color of this embed.\n   * @param {ColorResolvable} color The color of the embed\n   * @returns {RichEmbed} This embed\n   */\n  setColor(color) {\n    if (!ClientDataResolver) ClientDataResolver = __webpack_require__(/*! ../client/ClientDataResolver */ \"./src/client/ClientDataResolver.js\");\n    this.color = ClientDataResolver.resolveColor(color);\n    return this;\n  }\n\n  /**\n   * Sets the author of this embed.\n   * @param {StringResolvable} name The name of the author\n   * @param {string} [icon] The icon URL of the author\n   * @param {string} [url] The URL of the author\n   * @returns {RichEmbed} This embed\n   */\n  setAuthor(name, icon, url) {\n    this.author = { name: resolveString(name), icon_url: icon, url };\n    return this;\n  }\n\n  /**\n   * Sets the timestamp of this embed.\n   * @param {Date|number} [timestamp=Date.now()] The timestamp or date\n   * @returns {RichEmbed} This embed\n   */\n  setTimestamp(timestamp = Date.now()) {\n    if (timestamp instanceof Date) timestamp = timestamp.getTime();\n    this.timestamp = timestamp;\n    return this;\n  }\n\n  /**\n   * Adds a field to the embed (max 25).\n   * @param {StringResolvable} name The name of the field\n   * @param {StringResolvable} value The value of the field\n   * @param {boolean} [inline=false] Set the field to display inline\n   * @returns {RichEmbed} This embed\n   */\n  addField(name, value, inline = false) {\n    if (this.fields.length >= 25) throw new RangeError('RichEmbeds may not exceed 25 fields.');\n    name = resolveString(name);\n    if (name.length > 256) throw new RangeError('RichEmbed field names may not exceed 256 characters.');\n    if (!/\\S/.test(name)) throw new RangeError('RichEmbed field names may not be empty.');\n    value = resolveString(value);\n    if (value.length > 1024) throw new RangeError('RichEmbed field values may not exceed 1024 characters.');\n    if (!/\\S/.test(value)) throw new RangeError('RichEmbed field values may not be empty.');\n    this.fields.push({ name, value, inline });\n    return this;\n  }\n\n  /**\n   * Convenience function for `<RichEmbed>.addField('\\u200B', '\\u200B', inline)`.\n   * @param {boolean} [inline=false] Set the field to display inline\n   * @returns {RichEmbed} This embed\n   */\n  addBlankField(inline = false) {\n    return this.addField('\\u200B', '\\u200B', inline);\n  }\n\n  /**\n   * Set the thumbnail of this embed.\n   * @param {string} url The URL of the thumbnail\n   * @returns {RichEmbed} This embed\n   */\n  setThumbnail(url) {\n    this.thumbnail = { url };\n    return this;\n  }\n\n  /**\n   * Set the image of this embed.\n   * @param {string} url The URL of the image\n   * @returns {RichEmbed} This embed\n   */\n  setImage(url) {\n    this.image = { url };\n    return this;\n  }\n\n  /**\n   * Sets the footer of this embed.\n   * @param {StringResolvable} text The text of the footer\n   * @param {string} [icon] The icon URL of the footer\n   * @returns {RichEmbed} This embed\n   */\n  setFooter(text, icon) {\n    text = resolveString(text);\n    if (text.length > 2048) throw new RangeError('RichEmbed footer text may not exceed 2048 characters.');\n    this.footer = { text, icon_url: icon };\n    return this;\n  }\n\n  /**\n   * Sets the file to upload alongside the embed. This file can be accessed via `attachment://fileName.extension` when\n   * setting an embed image or author/footer icons. Only one file may be attached.\n   * @param {FileOptions|string|Attachment} file Local path or URL to the file to attach,\n   * or valid FileOptions for a file to attach\n   * @returns {RichEmbed} This embed\n   */\n  attachFile(file) {\n    if (this.file) throw new RangeError('You may not upload more than one file at once.');\n    if (file instanceof Attachment) file = file.file;\n    this.file = file;\n    return this;\n  }\n\n  /**\n   * Sets the files to upload alongside the embed. A file can be accessed via `attachment://fileName.extension` when\n   * setting an embed image or author/footer icons. Multiple files can be attached.\n   * @param {Array<FileOptions|string|Attachment>} files Files to attach\n   * @returns {RichEmbed}\n   */\n  attachFiles(files) {\n    files = files.map(file => file instanceof Attachment ? file.file : file);\n    this.files = this.files.concat(files);\n    return this;\n  }\n\n  /**\n   * The accumulated length for the embed title, description, fields, author and footer text\n   * @type {number}\n   * @readonly\n   */\n  get length() {\n    return (\n      (this.title ? this.title.length : 0) +\n      (this.description ? this.description.length : 0) +\n      (this.fields.length >= 1 ? this.fields.reduce((prev, curr) =>\n        prev + curr.name.length + curr.value.length, 0) : 0) +\n      (this.footer ? this.footer.text.length : 0) +\n      (this.author ? this.author.name.length : 0));\n  }\n\n  /**\n   * Transforms the embed object to be processed.\n   * @returns {Object} The raw data of this embed\n   * @private\n   */\n  _apiTransform() {\n    return {\n      title: this.title,\n      type: 'rich',\n      description: this.description,\n      url: this.url,\n      timestamp: this.timestamp ? new Date(this.timestamp) : null,\n      color: this.color,\n      fields: this.fields ?\n        this.fields.map(field => ({ name: field.name, value: field.value, inline: field.inline })) :\n        null,\n      thumbnail: this.thumbnail ? {\n        url: this.thumbnail.url,\n      } : null,\n      image: this.image ? {\n        url: this.image.url,\n      } : null,\n      author: this.author ? {\n        name: this.author.name,\n        url: this.author.url,\n        icon_url: this.author instanceof MessageEmbed.Author ? this.author.iconURL : this.author.icon_url,\n      } : null,\n      footer: this.footer ? {\n        text: this.footer.text,\n        icon_url: this.footer instanceof MessageEmbed.Footer ? this.footer.iconURL : this.footer.icon_url,\n      } : null,\n    };\n  }\n}\n\nmodule.exports = RichEmbed;\n\nfunction resolveString(data) {\n  if (typeof data === 'string') return data;\n  if (data instanceof Array) return data.join('\\n');\n  return String(data);\n}\n\n\n//# sourceURL=webpack:///./src/structures/RichEmbed.js?");

/***/ }),

/***/ "./src/structures/Role.js":
/*!********************************!*\
  !*** ./src/structures/Role.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Snowflake = __webpack_require__(/*! ../util/Snowflake */ \"./src/util/Snowflake.js\");\nconst Permissions = __webpack_require__(/*! ../util/Permissions */ \"./src/util/Permissions.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Represents a role on Discord.\n */\nclass Role {\n  constructor(guild, data) {\n    /**\n     * The client that instantiated the role\n     * @name Role#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: guild.client });\n\n    /**\n     * The guild that the role belongs to\n     * @type {Guild}\n     */\n    this.guild = guild;\n\n    /**\n     * Whether the role has been deleted\n     * @type {boolean}\n     */\n    this.deleted = false;\n\n    if (data) this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The ID of the role (unique to the guild it is part of)\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The name of the role\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The base 10 color of the role\n     * @type {number}\n     */\n    this.color = data.color;\n\n    /**\n     * If true, users that are part of this role will appear in a separate category in the users list\n     * @type {boolean}\n     */\n    this.hoist = data.hoist;\n\n    /**\n     * The position of the role from the API\n     * @type {number}\n     */\n    this.position = data.position;\n\n    /**\n     * The permissions bitfield of the role\n     * @type {number}\n     */\n    this.permissions = data.permissions;\n\n    /**\n     * Whether or not the role is managed by an external service\n     * @type {boolean}\n     */\n    this.managed = data.managed;\n\n    /**\n     * Whether or not the role can be mentioned by anyone\n     * @type {boolean}\n     */\n    this.mentionable = data.mentionable;\n  }\n\n  /**\n   * The timestamp the role was created at\n   * @type {number}\n   * @readonly\n   */\n  get createdTimestamp() {\n    return Snowflake.deconstruct(this.id).timestamp;\n  }\n\n  /**\n   * The time the role was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * The hexadecimal version of the role color, with a leading hashtag\n   * @type {string}\n   * @readonly\n   */\n  get hexColor() {\n    let col = this.color.toString(16);\n    while (col.length < 6) col = `0${col}`;\n    return `#${col}`;\n  }\n\n  /**\n   * The cached guild members that have this role\n   * @type {Collection<Snowflake, GuildMember>}\n   * @readonly\n   */\n  get members() {\n    return this.guild.members.filter(m => m.roles.has(this.id));\n  }\n\n  /**\n   * Whether the role is editable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get editable() {\n    if (this.managed) return false;\n    const clientMember = this.guild.member(this.client.user);\n    if (!clientMember.permissions.has(Permissions.FLAGS.MANAGE_ROLES_OR_PERMISSIONS)) return false;\n    return clientMember.highestRole.comparePositionTo(this) > 0;\n  }\n\n  /**\n   * The position of the role in the role manager\n   * @type {number}\n   * @readonly\n   */\n  get calculatedPosition() {\n    const sorted = this.guild._sortedRoles;\n    return sorted.array().indexOf(sorted.get(this.id));\n  }\n\n  /**\n   * Get an object mapping permission names to whether or not the role enables that permission.\n   * @returns {Object<string, boolean>}\n   * @example\n   * // Print the serialized role permissions\n   * console.log(role.serialize());\n   */\n  serialize() {\n    return new Permissions(this.permissions).serialize();\n  }\n\n  /**\n   * Checks if the role has a permission.\n   * @param {PermissionResolvable} permission Permission(s) to check for\n   * @param {boolean} [explicit=false] Whether to require the role to explicitly have the exact permission\n   * **(deprecated)**\n   * @param {boolean} [checkAdmin] Whether to allow the administrator permission to override\n   * (takes priority over `explicit`)\n   * @returns {boolean}\n   * @example\n   * // See if a role can ban a member\n   * if (role.hasPermission('BAN_MEMBERS')) {\n   *   console.log('This role can ban members');\n   * } else {\n   *   console.log('This role can\\'t ban members');\n   * }\n   */\n  hasPermission(permission, explicit = false, checkAdmin) {\n    return new Permissions(this.permissions).has(\n      permission, typeof checkAdmin !== 'undefined' ? checkAdmin : !explicit\n    );\n  }\n\n  /**\n   * Checks if the role has all specified permissions.\n   * @param {PermissionResolvable} permissions The permissions to check for\n   * @param {boolean} [explicit=false] Whether to require the role to explicitly have the exact permissions\n   * @returns {boolean}\n   * @deprecated\n   */\n  hasPermissions(permissions, explicit = false) {\n    return new Permissions(this.permissions).has(permissions, !explicit);\n  }\n\n  /**\n   * Compares this role's position to another role's.\n   * @param {Role} role Role to compare to this one\n   * @returns {number} Negative number if this role's position is lower (other role's is higher),\n   * positive number if this one is higher (other's is lower), 0 if equal\n   */\n  comparePositionTo(role) {\n    return this.constructor.comparePositions(this, role);\n  }\n\n  /**\n   * The data for a role.\n   * @typedef {Object} RoleData\n   * @property {string} [name] The name of the role\n   * @property {ColorResolvable} [color] The color of the role, either a hex string or a base 10 number\n   * @property {boolean} [hoist] Whether or not the role should be hoisted\n   * @property {number} [position] The position of the role\n   * @property {PermissionResolvable|number} [permissions] The permissions of the role\n   * @property {boolean} [mentionable] Whether or not the role should be mentionable\n   */\n\n  /**\n   * Edits the role.\n   * @param {RoleData} data The new data for the role\n   * @param {string} [reason] The reason for editing this role\n   * @returns {Promise<Role>}\n   * @example\n   * // Edit name of a role\n   * role.edit({ name: 'New Name' })\n   *   .then(updated => console.log(`Edited role name from ${role.name} to ${updated.name}`))\n   *   .catch(console.error);\n   */\n  edit(data, reason) {\n    return this.client.rest.methods.updateGuildRole(this, data, reason);\n  }\n\n  /**\n   * Set a new name for the role.\n   * @param {string} name The new name of the role\n   * @param {string} [reason] Reason for changing the role's name\n   * @returns {Promise<Role>}\n   * @example\n   * // Set the name of the role\n   * role.setName('New Name')\n   *   .then(updated => console.log(`Edited role name from ${role.name} to ${updated.name}`))\n   *   .catch(console.error);\n   */\n  setName(name, reason) {\n    return this.edit({ name }, reason);\n  }\n\n  /**\n   * Set a new color for the role.\n   * @param {ColorResolvable} color The color of the role\n   * @param {string} [reason] Reason for changing the role's color\n   * @returns {Promise<Role>}\n   * @example\n   * // Set the color of a role\n   * role.setColor('#FF0000')\n   *   .then(updated => console.log(`Set color of role to ${role.color}`))\n   *   .catch(console.error);\n   */\n  setColor(color, reason) {\n    return this.edit({ color }, reason);\n  }\n\n  /**\n   * Set whether or not the role should be hoisted.\n   * @param {boolean} hoist Whether or not to hoist the role\n   * @param {string} [reason] Reason for setting whether or not the role should be hoisted\n   * @returns {Promise<Role>}\n   * @example\n   * // Set the hoist of the role\n   * role.setHoist(true)\n   *   .then(updated => console.log(`Role hoisted: ${updated.hoist}`))\n   *   .catch(console.error);\n   */\n  setHoist(hoist, reason) {\n    return this.edit({ hoist }, reason);\n  }\n\n  /**\n   * Set the position of the role.\n   * @param {number} position The position of the role\n   * @param {boolean} [relative=false] Move the position relative to its current value\n   * @returns {Promise<Role>}\n   * @example\n   * // Set the position of the role\n   * role.setPosition(1)\n   *   .then(updated => console.log(`Role position: ${updated.position}`))\n   *   .catch(console.error);\n   */\n  setPosition(position, relative) {\n    return this.guild.setRolePosition(this, position, relative).then(() => this);\n  }\n\n  /**\n   * Set the permissions of the role.\n   * @param {PermissionResolvable} permissions The permissions of the role\n   * @param {string} [reason] Reason for changing the role's permissions\n   * @returns {Promise<Role>}\n   * @example\n   * // Set the permissions of the role\n   * role.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n   *   .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))\n   *   .catch(console.error);\n   * @example\n   * // Remove all permissions from a role\n   * role.setPermissions(0)\n   *   .then(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))\n   *   .catch(console.error);\n   */\n  setPermissions(permissions, reason) {\n    return this.edit({ permissions }, reason);\n  }\n\n  /**\n   * Set whether this role is mentionable.\n   * @param {boolean} mentionable Whether this role should be mentionable\n   * @param {string} [reason] Reason for setting whether or not this role should be mentionable\n   * @returns {Promise<Role>}\n   * @example\n   * // Make the role mentionable\n   * role.setMentionable(true, 'Role needs to be pinged')\n   *   .then(updated => console.log(`Role mentionable: ${updated.mentionable}`))\n   *   .catch(console.error);\n   */\n  setMentionable(mentionable, reason) {\n    return this.edit({ mentionable }, reason);\n  }\n\n  /**\n   * Deletes the role.\n   * @param {string} [reason] Reason for deleting the role\n   * @returns {Promise<Role>}\n   * @example\n   * // Delete a role\n   * role.delete('The role needed to go')\n   *   .then(deleted => console.log(`Deleted role ${deleted.name}`))\n   *   .catch(console.error);\n   */\n  delete(reason) {\n    return this.client.rest.methods.deleteGuildRole(this, reason);\n  }\n\n  /**\n   * Whether this role equals another role. It compares all properties, so for most operations\n   * it is advisable to just compare `role.id === role2.id` as it is much faster and is often\n   * what most users need.\n   * @param {Role} role Role to compare with\n   * @returns {boolean}\n   */\n  equals(role) {\n    return role &&\n      this.id === role.id &&\n      this.name === role.name &&\n      this.color === role.color &&\n      this.hoist === role.hoist &&\n      this.position === role.position &&\n      this.permissions === role.permissions &&\n      this.managed === role.managed;\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the role mention rather than the Role object.\n   * @returns {string}\n   */\n  toString() {\n    if (this.id === this.guild.id) return '@everyone';\n    return `<@&${this.id}>`;\n  }\n\n  /**\n   * Compares the positions of two roles.\n   * @param {Role} role1 First role to compare\n   * @param {Role} role2 Second role to compare\n   * @returns {number} Negative number if the first role's position is lower (second role's is higher),\n   * positive number if the first's is higher (second's is lower), 0 if equal\n   */\n  static comparePositions(role1, role2) {\n    if (role1.position === role2.position) return role2.id - role1.id;\n    return role1.position - role2.position;\n  }\n}\n\nRole.prototype.hasPermissions = util\n  .deprecate(Role.prototype.hasPermissions,\n    'Role#hasPermissions is deprecated - use Role#hasPermission instead, it now takes an array');\n\nmodule.exports = Role;\n\n\n//# sourceURL=webpack:///./src/structures/Role.js?");

/***/ }),

/***/ "./src/structures/TextChannel.js":
/*!***************************************!*\
  !*** ./src/structures/TextChannel.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const GuildChannel = __webpack_require__(/*! ./GuildChannel */ \"./src/structures/GuildChannel.js\");\nconst TextBasedChannel = __webpack_require__(/*! ./interfaces/TextBasedChannel */ \"./src/structures/interfaces/TextBasedChannel.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\n\n/**\n * Represents a guild text channel on Discord.\n * @extends {GuildChannel}\n * @implements {TextBasedChannel}\n */\nclass TextChannel extends GuildChannel {\n  constructor(guild, data) {\n    super(guild, data);\n    this.type = 'text';\n    /**\n     * A collection containing the messages sent to this channel\n     * @type {Collection<Snowflake, Message>}\n     */\n    this.messages = new Collection();\n    this._typing = new Map();\n  }\n\n  setup(data) {\n    super.setup(data);\n\n    /**\n     * The topic of the text channel\n     * @type {?string}\n     */\n    this.topic = data.topic;\n\n    /**\n     * If the Discord considers this channel NSFW\n     * @type {boolean}\n     * @readonly\n     */\n    this.nsfw = Boolean(data.nsfw);\n\n    /**\n     * The ID of the last message sent in this channel, if one was sent\n     * @type {?Snowflake}\n     */\n    this.lastMessageID = data.last_message_id;\n\n    /**\n     * The timestamp when the last pinned message was pinned, if there was one\n     * @type {?number}\n     */\n    this.lastPinTimestamp = data.last_pin_timestamp ? new Date(data.last_pin_timestamp).getTime() : null;\n\n    /**\n     * The ratelimit per user for this channel\n     * @type {number}\n     */\n    this.rateLimitPerUser = data.rate_limit_per_user || 0;\n  }\n\n  /**\n   * A collection of members that can see this channel, mapped by their ID\n   * @type {Collection<Snowflake, GuildMember>}\n   * @readonly\n   */\n  get members() {\n    const members = new Collection();\n    for (const member of this.guild.members.values()) {\n      if (this.permissionsFor(member).has('READ_MESSAGES')) {\n        members.set(member.id, member);\n      }\n    }\n    return members;\n  }\n\n  /**\n   * Fetch all webhooks for the channel.\n   * @returns {Promise<Collection<Snowflake, Webhook>>}\n   * @example\n   * // Fetch webhooks\n   * channel.fetchWebhooks()\n   *   .then(hooks => console.log(`This channel has ${hooks.size} hooks`))\n   *   .catch(console.error);\n   */\n  fetchWebhooks() {\n    return this.client.rest.methods.getChannelWebhooks(this);\n  }\n\n  /**\n   * Sets whether this channel is flagged as NSFW.\n   * @param {boolean} nsfw Whether the channel should be considered NSFW\n   * @param {string} [reason] Reason for changing the channel's NSFW flag\n   * @returns {Promise<TextChannel>}\n   */\n  setNSFW(nsfw, reason) {\n    return this.edit({ nsfw }, reason);\n  }\n\n  /**\n   * Create a webhook for the channel.\n   * @param {string} name The name of the webhook\n   * @param {BufferResolvable|Base64Resolvable} [avatar] The avatar for the webhook\n   * @param {string} [reason] Reason for creating this webhook\n   * @returns {Promise<Webhook>} webhook The created webhook\n   * @example\n   * channel.createWebhook('Snek', 'https://i.imgur.com/mI8XcpG.jpg')\n   *   .then(webhook => console.log(`Created webhook ${webhook}`))\n   *   .catch(console.error)\n   */\n  createWebhook(name, avatar, reason) {\n    if (typeof avatar === 'string' && avatar.startsWith('data:')) {\n      return this.client.rest.methods.createWebhook(this, name, avatar, reason);\n    } else {\n      return this.client.resolver.resolveImage(avatar).then(data =>\n        this.client.rest.methods.createWebhook(this, name, data, reason)\n      );\n    }\n  }\n\n  /**\n   * Sets the rate limit per user for this channel.\n   * @param {number} rateLimitPerUser The new ratelimit\n   * @param {string} [reason] Reason for changing the channel's ratelimits\n   * @returns {Promise<TextChannel>}\n   */\n  setRateLimitPerUser(rateLimitPerUser, reason) {\n    return this.edit({ rateLimitPerUser }, reason);\n  }\n\n  // These are here only for documentation purposes - they are implemented by TextBasedChannel\n  /* eslint-disable no-empty-function */\n  get lastMessage() {}\n  get lastPinAt() {}\n  send() { }\n  sendMessage() { }\n  sendEmbed() { }\n  sendFile() { }\n  sendFiles() { }\n  sendCode() { }\n  fetchMessage() { }\n  fetchMessages() { }\n  fetchPinnedMessages() { }\n  search() { }\n  startTyping() { }\n  stopTyping() { }\n  get typing() { }\n  get typingCount() { }\n  createCollector() { }\n  createMessageCollector() { }\n  awaitMessages() { }\n  bulkDelete() { }\n  acknowledge() { }\n  _cacheMessage() { }\n}\n\nTextBasedChannel.applyToClass(TextChannel, true);\n\nmodule.exports = TextChannel;\n\n\n//# sourceURL=webpack:///./src/structures/TextChannel.js?");

/***/ }),

/***/ "./src/structures/User.js":
/*!********************************!*\
  !*** ./src/structures/User.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const TextBasedChannel = __webpack_require__(/*! ./interfaces/TextBasedChannel */ \"./src/structures/interfaces/TextBasedChannel.js\");\nconst Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst Presence = __webpack_require__(/*! ./Presence */ \"./src/structures/Presence.js\").Presence;\nconst Snowflake = __webpack_require__(/*! ../util/Snowflake */ \"./src/util/Snowflake.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Represents a user on Discord.\n * @implements {TextBasedChannel}\n */\nclass User {\n  constructor(client, data) {\n    /**\n     * The client that created the instance of the user\n     * @name User#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    if (data) this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The ID of the user\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The username of the user\n     * @type {string}\n     */\n    this.username = data.username;\n\n    /**\n     * A discriminator based on username for the user\n     * @type {string}\n     */\n    this.discriminator = data.discriminator;\n\n    /**\n     * The ID of the user's avatar\n     * @type {string}\n     */\n    this.avatar = data.avatar;\n\n    /**\n     * Whether or not the user is a bot\n     * @type {boolean}\n     */\n    this.bot = Boolean(data.bot);\n\n    /**\n     * The ID of the last message sent by the user, if one was sent\n     * @type {?Snowflake}\n     */\n    this.lastMessageID = null;\n\n    /**\n     * The Message object of the last message sent by the user, if one was sent\n     * @type {?Message}\n     */\n    this.lastMessage = null;\n  }\n\n  patch(data) {\n    for (const prop of ['id', 'username', 'discriminator', 'avatar', 'bot']) {\n      if (typeof data[prop] !== 'undefined') this[prop] = data[prop];\n    }\n    if (data.token) this.client.token = data.token;\n  }\n\n  /**\n   * The timestamp the user was created at\n   * @type {number}\n   * @readonly\n   */\n  get createdTimestamp() {\n    return Snowflake.deconstruct(this.id).timestamp;\n  }\n\n  /**\n   * The time the user was created\n   * @type {Date}\n   * @readonly\n   */\n  get createdAt() {\n    return new Date(this.createdTimestamp);\n  }\n\n  /**\n   * The presence of this user\n   * @type {Presence}\n   * @readonly\n   */\n  get presence() {\n    if (this.client.presences.has(this.id)) return this.client.presences.get(this.id);\n    for (const guild of this.client.guilds.values()) {\n      if (guild.presences.has(this.id)) return guild.presences.get(this.id);\n    }\n    return new Presence(undefined, this.client);\n  }\n\n  /**\n   * A link to the user's avatar\n   * @type {?string}\n   * @readonly\n   */\n  get avatarURL() {\n    if (!this.avatar) return null;\n    return Constants.Endpoints.User(this).Avatar(this.client.options.http.cdn, this.avatar);\n  }\n\n  /**\n   * A link to the user's default avatar\n   * @type {string}\n   * @readonly\n   */\n  get defaultAvatarURL() {\n    const avatars = Object.keys(Constants.DefaultAvatars);\n    const avatar = avatars[this.discriminator % avatars.length];\n    return Constants.Endpoints.CDN(this.client.options.http.host).Asset(`${Constants.DefaultAvatars[avatar]}.png`);\n  }\n\n  /**\n   * A link to the user's avatar if they have one. Otherwise a link to their default avatar will be returned\n   * @type {string}\n   * @readonly\n   */\n  get displayAvatarURL() {\n    return this.avatarURL || this.defaultAvatarURL;\n  }\n\n  /**\n   * The Discord \"tag\" (e.g. `hydrabolt#0001`) for this user\n   * @type {string}\n   * @readonly\n   */\n  get tag() {\n    return `${this.username}#${this.discriminator}`;\n  }\n\n  /**\n   * The note that is set for the user\n   * <warn>This is only available when using a user account.</warn>\n   * @type {?string}\n   * @readonly\n   */\n  get note() {\n    return this.client.user.notes.get(this.id) || null;\n  }\n\n  /**\n   * Check whether the user is typing in a channel.\n   * @param {ChannelResolvable} channel The channel to check in\n   * @returns {boolean}\n   */\n  typingIn(channel) {\n    channel = this.client.resolver.resolveChannel(channel);\n    return channel._typing.has(this.id);\n  }\n\n  /**\n   * Get the time that the user started typing.\n   * @param {ChannelResolvable} channel The channel to get the time in\n   * @returns {?Date}\n   */\n  typingSinceIn(channel) {\n    channel = this.client.resolver.resolveChannel(channel);\n    return channel._typing.has(this.id) ? new Date(channel._typing.get(this.id).since) : null;\n  }\n\n  /**\n   * Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.\n   * @param {ChannelResolvable} channel The channel to get the time in\n   * @returns {number}\n   */\n  typingDurationIn(channel) {\n    channel = this.client.resolver.resolveChannel(channel);\n    return channel._typing.has(this.id) ? channel._typing.get(this.id).elapsedTime : -1;\n  }\n\n  /**\n   * The DM between the client's user and this user\n   * @type {?DMChannel}\n   * @readonly\n   */\n  get dmChannel() {\n    return this.client.channels.find(c => c.type === 'dm' && c.recipient.id === this.id);\n  }\n\n  /**\n   * Creates a DM channel between the client and the user.\n   * @returns {Promise<DMChannel>}\n   */\n  createDM() {\n    return this.client.rest.methods.createDM(this);\n  }\n\n  /**\n   * Deletes a DM channel (if one exists) between the client and the user. Resolves with the channel if successful.\n   * @returns {Promise<DMChannel>}\n   */\n  deleteDM() {\n    return this.client.rest.methods.deleteChannel(this);\n  }\n\n  /**\n   * Sends a friend request to the user.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {Promise<User>}\n   */\n  addFriend() {\n    return this.client.rest.methods.addFriend(this);\n  }\n\n  /**\n   * Removes the user from your friends.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {Promise<User>}\n   */\n  removeFriend() {\n    return this.client.rest.methods.removeFriend(this);\n  }\n\n  /**\n   * Blocks the user.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {Promise<User>}\n   */\n  block() {\n    return this.client.rest.methods.blockUser(this);\n  }\n\n  /**\n   * Unblocks the user.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {Promise<User>}\n   */\n  unblock() {\n    return this.client.rest.methods.unblockUser(this);\n  }\n\n  /**\n   * Get the profile of the user.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {Promise<UserProfile>}\n   */\n  fetchProfile() {\n    return this.client.rest.methods.fetchUserProfile(this);\n  }\n\n  /**\n   * Sets a note for the user.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {string} note The note to set for the user\n   * @returns {Promise<User>}\n   */\n  setNote(note) {\n    return this.client.rest.methods.setNote(this, note);\n  }\n\n  /**\n   * Checks if the user is equal to another. It compares ID, username, discriminator, avatar, and bot flags.\n   * It is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.\n   * @param {User} user User to compare with\n   * @returns {boolean}\n   */\n  equals(user) {\n    let equal = user &&\n      this.id === user.id &&\n      this.username === user.username &&\n      this.discriminator === user.discriminator &&\n      this.avatar === user.avatar &&\n      this.bot === Boolean(user.bot);\n\n    return equal;\n  }\n\n  /**\n   * When concatenated with a string, this automatically concatenates the user's mention instead of the User object.\n   * @returns {string}\n   * @example\n   * // logs: Hello from <@123456789>!\n   * console.log(`Hello from ${user}!`);\n   */\n  toString() {\n    return `<@${this.id}>`;\n  }\n\n  // These are here only for documentation purposes - they are implemented by TextBasedChannel\n  /* eslint-disable no-empty-function */\n  send() {}\n  sendMessage() {}\n  sendEmbed() {}\n  sendFile() {}\n  sendCode() {}\n}\n\nTextBasedChannel.applyToClass(User);\n\nUser.prototype.block =\n  util.deprecate(User.prototype.block, 'User#block: userbot methods will be removed');\n\nUser.prototype.unblock =\n  util.deprecate(User.prototype.unblock, 'User#unblock: userbot methods will be removed');\n\nUser.prototype.addFriend =\n  util.deprecate(User.prototype.addFriend, 'User#addFriend: userbot methods will be removed');\n\nUser.prototype.removeFriend =\n  util.deprecate(User.prototype.removeFriend, 'User#removeFriend: userbot methods will be removed');\n\nUser.prototype.setNote =\n  util.deprecate(User.prototype.setNote, 'User#setNote, userbot methods will be removed');\n\nUser.prototype.fetchProfile =\n  util.deprecate(User.prototype.fetchProfile, 'User#fetchProfile: userbot methods will be removed');\n\nmodule.exports = User;\n\n\n//# sourceURL=webpack:///./src/structures/User.js?");

/***/ }),

/***/ "./src/structures/UserConnection.js":
/*!******************************************!*\
  !*** ./src/structures/UserConnection.js ***!
  \******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Represents a user connection (or \"platform identity\").\n */\nclass UserConnection {\n  constructor(user, data) {\n    /**\n     * The user that owns the connection\n     * @type {User}\n     */\n    this.user = user;\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * The type of the connection\n     * @type {string}\n     */\n    this.type = data.type;\n\n    /**\n     * The username of the connection account\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The id of the connection account\n     * @type {string}\n     */\n    this.id = data.id;\n\n    /**\n     * Whether the connection is revoked\n     * @type {boolean}\n     */\n    this.revoked = data.revoked;\n\n    /**\n     * Partial server integrations (not yet implemented)\n     * @type {Object[]}\n     */\n    this.integrations = data.integrations;\n  }\n}\n\nmodule.exports = UserConnection;\n\n\n//# sourceURL=webpack:///./src/structures/UserConnection.js?");

/***/ }),

/***/ "./src/structures/UserProfile.js":
/*!***************************************!*\
  !*** ./src/structures/UserProfile.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst UserConnection = __webpack_require__(/*! ./UserConnection */ \"./src/structures/UserConnection.js\");\n\n/**\n * Represents a user's profile on Discord.\n */\nclass UserProfile {\n  constructor(user, data) {\n    /**\n     * The owner of the profile\n     * @type {User}\n     */\n    this.user = user;\n\n    /**\n     * The client that created the instance of the UserProfile\n     * @name UserProfile#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: user.client });\n\n    /**\n     * The guilds that the client user and the user share\n     * @type {Collection<Snowflake, Guild>}\n     */\n    this.mutualGuilds = new Collection();\n\n    /**\n     * The user's connections\n     * @type {Collection<Snowflake, UserConnection>}\n     */\n    this.connections = new Collection();\n\n    this.setup(data);\n  }\n\n  setup(data) {\n    /**\n     * If the user has Discord Premium\n     * @type {boolean}\n     */\n    this.premium = data.premium;\n\n    /**\n     * The date since which the user has had Discord Premium\n     * @type {?Date}\n     */\n    this.premiumSince = data.premium_since ? new Date(data.premium_since) : null;\n\n    for (const guild of data.mutual_guilds) {\n      if (this.client.guilds.has(guild.id)) {\n        this.mutualGuilds.set(guild.id, this.client.guilds.get(guild.id));\n      }\n    }\n    for (const connection of data.connected_accounts) {\n      this.connections.set(connection.id, new UserConnection(this.user, connection));\n    }\n  }\n}\n\nmodule.exports = UserProfile;\n\n\n//# sourceURL=webpack:///./src/structures/UserProfile.js?");

/***/ }),

/***/ "./src/structures/VoiceChannel.js":
/*!****************************************!*\
  !*** ./src/structures/VoiceChannel.js ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const GuildChannel = __webpack_require__(/*! ./GuildChannel */ \"./src/structures/GuildChannel.js\");\nconst Collection = __webpack_require__(/*! ../util/Collection */ \"./src/util/Collection.js\");\nconst Permissions = __webpack_require__(/*! ../util/Permissions */ \"./src/util/Permissions.js\");\n\n/**\n * Represents a guild voice channel on Discord.\n * @extends {GuildChannel}\n */\nclass VoiceChannel extends GuildChannel {\n  constructor(guild, data) {\n    super(guild, data);\n\n    /**\n     * The members in this voice channel\n     * @type {Collection<Snowflake, GuildMember>}\n     */\n    this.members = new Collection();\n\n    this.type = 'voice';\n  }\n\n  setup(data) {\n    super.setup(data);\n\n    /**\n     * The bitrate of this voice channel\n     * @type {number}\n     */\n    this.bitrate = data.bitrate * 0.001;\n\n    /**\n     * The maximum amount of users allowed in this channel - 0 means unlimited.\n     * @type {number}\n     */\n    this.userLimit = data.user_limit;\n  }\n\n  /**\n   * The voice connection for this voice channel, if the client is connected\n   * @type {?VoiceConnection}\n   * @readonly\n   */\n  get connection() {\n    const connection = this.guild.voiceConnection;\n    if (connection && connection.channel.id === this.id) return connection;\n    return null;\n  }\n\n  /**\n   * Checks if the voice channel is full\n   * @type {boolean}\n   * @readonly\n   */\n  get full() {\n    return this.userLimit > 0 && this.members.size >= this.userLimit;\n  }\n\n  /**\n   * Whether the channel is deletable by the client user\n   * @type {boolean}\n   * @readonly\n   */\n  get deletable() {\n    return super.deletable && this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT);\n  }\n\n  /**\n   * Checks if the client has permission join the voice channel\n   * @type {boolean}\n   * @readonly\n   */\n  get joinable() {\n    if (this.client.browser) return false;\n    if (!this.permissionsFor(this.client.user).has('CONNECT')) return false;\n    if (this.full && !this.permissionsFor(this.client.user).has('MOVE_MEMBERS')) return false;\n    return true;\n  }\n\n  /**\n   * Checks if the client has permission to send audio to the voice channel\n   * @type {boolean}\n   * @readonly\n   */\n  get speakable() {\n    return this.permissionsFor(this.client.user).has('SPEAK');\n  }\n\n  /**\n   * Sets the bitrate of the channel (in kbps).\n   * @param {number} bitrate The new bitrate\n   * @param {string} [reason] Reason for changing the channel's bitrate\n   * @returns {Promise<VoiceChannel>}\n   * @example\n   * // Set the bitrate of a voice channel\n   * voiceChannel.setBitrate(48)\n   *   .then(vc => console.log(`Set bitrate to ${vc.bitrate}kbps for ${vc.name}`))\n   *   .catch(console.error);\n   */\n  setBitrate(bitrate, reason) {\n    bitrate *= 1000;\n    return this.edit({ bitrate }, reason);\n  }\n\n  /**\n   * Sets the user limit of the channel.\n   * @param {number} userLimit The new user limit\n   * @param {string} [reason] Reason for changing the user limit\n   * @returns {Promise<VoiceChannel>}\n   * @example\n   * // Set the user limit of a voice channel\n   * voiceChannel.setUserLimit(42)\n   *   .then(vc => console.log(`Set user limit to ${vc.userLimit} for ${vc.name}`))\n   *   .catch(console.error);\n   */\n  setUserLimit(userLimit, reason) {\n    return this.edit({ userLimit }, reason);\n  }\n\n  /**\n   * Attempts to join this voice channel.\n   * @returns {Promise<VoiceConnection>}\n   * @example\n   * // Join a voice channel\n   * voiceChannel.join()\n   *   .then(connection => console.log('Connected!'))\n   *   .catch(console.error);\n   */\n  join() {\n    if (this.client.browser) return Promise.reject(new Error('Voice connections are not available in browsers.'));\n    return this.client.voice.joinChannel(this);\n  }\n\n  /**\n   * Leaves this voice channel.\n   * @example\n   * // Leave a voice channel\n   * voiceChannel.leave();\n   */\n  leave() {\n    if (this.client.browser) return;\n    const connection = this.client.voice.connections.get(this.guild.id);\n    if (connection && connection.channel.id === this.id) connection.disconnect();\n  }\n}\n\nmodule.exports = VoiceChannel;\n\n\n//# sourceURL=webpack:///./src/structures/VoiceChannel.js?");

/***/ }),

/***/ "./src/structures/VoiceRegion.js":
/*!***************************************!*\
  !*** ./src/structures/VoiceRegion.js ***!
  \***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/**\n * Represents a Discord voice region for guilds.\n */\nclass VoiceRegion {\n  constructor(data) {\n    /**\n     * The ID of the region\n     * @type {string}\n     */\n    this.id = data.id;\n\n    /**\n     * Name of the region\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * Whether the region is VIP-only\n     * @type {boolean}\n     */\n    this.vip = data.vip;\n\n    /**\n     * Whether the region is deprecated\n     * @type {boolean}\n     */\n    this.deprecated = data.deprecated;\n\n    /**\n     * Whether the region is optimal\n     * @type {boolean}\n     */\n    this.optimal = data.optimal;\n\n    /**\n     * Whether the region is custom\n     * @type {boolean}\n     */\n    this.custom = data.custom;\n\n    /**\n     * A sample hostname for what a connection might look like\n     * @type {string}\n     */\n    this.sampleHostname = data.sample_hostname;\n  }\n}\n\nmodule.exports = VoiceRegion;\n\n\n//# sourceURL=webpack:///./src/structures/VoiceRegion.js?");

/***/ }),

/***/ "./src/structures/Webhook.js":
/*!***********************************!*\
  !*** ./src/structures/Webhook.js ***!
  \***********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(Buffer) {const EventEmitter = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\nconst path = __webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\");\nconst Util = __webpack_require__(/*! ../util/Util */ \"./src/util/Util.js\");\nconst Attachment = __webpack_require__(/*! ./Attachment */ \"./src/structures/Attachment.js\");\nconst RichEmbed = __webpack_require__(/*! ./RichEmbed */ \"./src/structures/RichEmbed.js\");\n\n/**\n * Represents a webhook.\n */\nclass Webhook extends EventEmitter {\n  constructor(client, dataOrID, token) {\n    super();\n    if (client) {\n      /**\n       * The client that instantiated the webhook\n       * @name Webhook#client\n       * @type {Client}\n       * @readonly\n       */\n      Object.defineProperty(this, 'client', { value: client });\n      if (dataOrID) this.setup(dataOrID);\n    } else {\n      this.id = dataOrID;\n      this.token = token;\n      Object.defineProperty(this, 'client', { value: this });\n    }\n  }\n\n  setup(data) {\n    /**\n     * The name of the webhook\n     * @type {string}\n     */\n    this.name = data.name;\n\n    /**\n     * The token for the webhook\n     * @name Webhook#token\n     * @type {string}\n     */\n    Object.defineProperty(this, 'token', { value: data.token, writable: true, configurable: true });\n\n    /**\n     * The avatar for the webhook\n     * @type {?string}\n     */\n    this.avatar = data.avatar;\n\n    /**\n     * The ID of the webhook\n     * @type {Snowflake}\n     */\n    this.id = data.id;\n\n    /**\n     * The guild the webhook belongs to\n     * @type {Snowflake}\n     */\n    this.guildID = data.guild_id;\n\n    /**\n     * The channel the webhook belongs to\n     * @type {Snowflake}\n     */\n    this.channelID = data.channel_id;\n\n    if (data.user) {\n      /**\n       * The owner of the webhook\n       * @type {?User|Object}\n       */\n      this.owner = this.client.users ? this.client.users.get(data.user.id) : data.user;\n    } else {\n      this.owner = null;\n    }\n  }\n\n  /**\n   * Options that can be passed into send, sendMessage, sendFile, sendEmbed, and sendCode.\n   * @typedef {Object} WebhookMessageOptions\n   * @property {string} [username=this.name] Username override for the message\n   * @property {string} [avatarURL] Avatar URL override for the message\n   * @property {boolean} [tts=false] Whether or not the message should be spoken aloud\n   * @property {string} [nonce=''] The nonce for the message\n   * @property {Array<RichEmbed|Object>} [embeds] An array of embeds for the message\n   * (see [here](https://discordapp.com/developers/docs/resources/channel#embed-object) for more details)\n   * @property {boolean} [disableEveryone=this.client.options.disableEveryone] Whether or not @everyone and @here\n   * should be replaced with plain-text\n   * @property {FileOptions|BufferResolvable|Attachment} [file] A file to send with the message **(deprecated)**\n   * @property {FileOptions[]|BufferResolvable[]|Attachment[]} [files] Files to send with the message\n   * @property {string|boolean} [code] Language for optional codeblock formatting to apply\n   * @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if\n   * it exceeds the character limit. If an object is provided, these are the options for splitting the message.\n   */\n\n  /**\n   * Send a message with this webhook.\n   * @param {StringResolvable} content The content to send\n   * @param {WebhookMessageOptions|Attachment|RichEmbed} [options] The options to provide,\n   * can also be just a RichEmbed or Attachment\n   * @returns {Promise<Message|Message[]|Object|Object[]>}\n   * @example\n   * // Send a basic message\n   * webhook.send('hello!')\n   *   .then(message => console.log(`Sent message: ${message.content}`))\n   *   .catch(console.error);\n   * @example\n   * // Send a remote file\n   * webhook.send({\n   *   files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n   * })\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // Send a local file\n   * webhook.send({\n   *   files: [{\n   *     attachment: 'entire/path/to/file.jpg',\n   *     name: 'file.jpg'\n   *   }]\n   * })\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // Send an embed with a local image inside\n   * webhook.send('This is an embed', {\n   *   embeds: [{\n   *     thumbnail: {\n   *          url: 'attachment://file.jpg'\n   *       }\n   *    }],\n   *    files: [{\n   *       attachment: 'entire/path/to/file.jpg',\n   *       name: 'file.jpg'\n   *    }]\n   * })\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  send(content, options) { // eslint-disable-line complexity\n    if (!options && typeof content === 'object' && !(content instanceof Array)) {\n      options = content;\n      content = '';\n    } else if (!options) {\n      options = {};\n    }\n\n    if (options instanceof Attachment) options = { files: [options] };\n    if (options instanceof RichEmbed) options = { embeds: [options] };\n\n    if (content) {\n      content = this.client.resolver.resolveString(content);\n      let { split, code, disableEveryone } = options;\n      if (split && typeof split !== 'object') split = {};\n      if (typeof code !== 'undefined' && (typeof code !== 'boolean' || code === true)) {\n        content = Util.escapeMarkdown(content, true);\n        content = `\\`\\`\\`${typeof code !== 'boolean' ? code || '' : ''}\\n${content}\\n\\`\\`\\``;\n        if (split) {\n          split.prepend = `\\`\\`\\`${typeof code !== 'boolean' ? code || '' : ''}\\n`;\n          split.append = '\\n```';\n        }\n      }\n      if (disableEveryone || (typeof disableEveryone === 'undefined' && this.client.options.disableEveryone)) {\n        content = content.replace(/@(everyone|here)/g, '@\\u200b$1');\n      }\n\n      if (split) content = Util.splitMessage(content, split);\n    }\n\n    if (options.file) {\n      if (options.files) options.files.push(options.file);\n      else options.files = [options.file];\n    }\n\n    if (options.embeds) {\n      const files = [];\n      for (const embed of options.embeds) {\n        if (embed.file) files.push(embed.file);\n      }\n      if (options.files) options.files.push(...files);\n      else options.files = files;\n    }\n\n    if (options.embeds) options.embeds = options.embeds.map(e => new RichEmbed(e)._apiTransform());\n\n    if (options.files) {\n      for (let i = 0; i < options.files.length; i++) {\n        let file = options.files[i];\n        if (typeof file === 'string' || Buffer.isBuffer(file)) file = { attachment: file };\n        if (!file.name) {\n          if (typeof file.attachment === 'string') {\n            file.name = path.basename(file.attachment);\n          } else if (file.attachment && file.attachment.path) {\n            file.name = path.basename(file.attachment.path);\n          } else if (file instanceof Attachment) {\n            file = { attachment: file.file, name: path.basename(file.file) || 'file.jpg' };\n          } else {\n            file.name = 'file.jpg';\n          }\n        } else if (file instanceof Attachment) {\n          file = file.file;\n        }\n        options.files[i] = file;\n      }\n\n      return Promise.all(options.files.map(file =>\n        this.client.resolver.resolveFile(file.attachment).then(resource => {\n          file.file = resource;\n          return file;\n        })\n      )).then(files => this.client.rest.methods.sendWebhookMessage(this, content, options, files));\n    }\n\n    return this.client.rest.methods.sendWebhookMessage(this, content, options);\n  }\n\n  /**\n   * Send a message with this webhook\n   * @param {StringResolvable} content The content to send\n   * @param {WebhookMessageOptions} [options={}] The options to provide\n   * @returns {Promise<Message|Message[]>}\n   * @deprecated\n   * @example\n   * // Send a message\n   * webhook.sendMessage('hello!')\n   *  .then(message => console.log(`Sent message: ${message.content}`))\n   *  .catch(console.error);\n   */\n  sendMessage(content, options = {}) {\n    return this.send(content, options);\n  }\n\n  /**\n   * Send a file with this webhook.\n   * @param {BufferResolvable} attachment The file to send\n   * @param {string} [name='file.jpg'] The name and extension of the file\n   * @param {StringResolvable} [content] Text message to send with the attachment\n   * @param {WebhookMessageOptions} [options] The options to provide\n   * @returns {Promise<Message>}\n   * @deprecated\n   */\n  sendFile(attachment, name, content, options = {}) {\n    return this.send(content, Object.assign(options, { file: { attachment, name } }));\n  }\n\n  /**\n   * Send a code block with this webhook.\n   * @param {string} lang Language for the code block\n   * @param {StringResolvable} content Content of the code block\n   * @param {WebhookMessageOptions} options The options to provide\n   * @returns {Promise<Message|Message[]>}\n   * @deprecated\n   */\n  sendCode(lang, content, options = {}) {\n    return this.send(content, Object.assign(options, { code: lang }));\n  }\n\n  /**\n   * Send a raw slack message with this webhook.\n   * @param {Object} body The raw body to send\n   * @returns {Promise}\n   * @example\n   * // Send a slack message\n   * webhook.sendSlackMessage({\n   *   'username': 'Wumpus',\n   *   'attachments': [{\n   *     'pretext': 'this looks pretty cool',\n   *     'color': '#F0F',\n   *     'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n   *     'footer': 'Powered by sneks',\n   *     'ts': Date.now() / 1000\n   *   }]\n   * }).catch(console.error);\n   */\n  sendSlackMessage(body) {\n    return this.client.rest.methods.sendSlackWebhookMessage(this, body);\n  }\n\n  /**\n   * Edit the webhook.\n   * @param {string} name The new name for the webhook\n   * @param {BufferResolvable} [avatar] The new avatar for the webhook\n   * @returns {Promise<Webhook>}\n   */\n  edit(name = this.name, avatar) {\n    if (avatar) {\n      return this.client.resolver.resolveImage(avatar).then(data =>\n        this.client.rest.methods.editWebhook(this, name, data)\n      );\n    }\n    return this.client.rest.methods.editWebhook(this, name);\n  }\n\n  /**\n   * Delete the webhook.\n   * @param {string} [reason] Reason for deleting the webhook\n   * @returns {Promise}\n   */\n  delete(reason) {\n    return this.client.rest.methods.deleteWebhook(this, reason);\n  }\n}\n\nmodule.exports = Webhook;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/structures/Webhook.js?");

/***/ }),

/***/ "./src/structures/interfaces/Collector.js":
/*!************************************************!*\
  !*** ./src/structures/interfaces/Collector.js ***!
  \************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Collection = __webpack_require__(/*! ../../util/Collection */ \"./src/util/Collection.js\");\nconst EventEmitter = __webpack_require__(/*! events */ \"./node_modules/events/events.js\").EventEmitter;\n\n/**\n * Filter to be applied to the collector.\n * @typedef {Function} CollectorFilter\n * @param {...*} args Any arguments received by the listener\n * @param {Collection} collection The items collected by this collector\n * @returns {boolean}\n */\n\n/**\n * Options to be applied to the collector.\n * @typedef {Object} CollectorOptions\n * @property {number} [time] How long to run the collector for\n */\n\n/**\n * Abstract class for defining a new Collector.\n * @abstract\n */\nclass Collector extends EventEmitter {\n  constructor(client, filter, options = {}) {\n    super();\n\n    /**\n     * The client\n     * @name Collector#client\n     * @type {Client}\n     * @readonly\n     */\n    Object.defineProperty(this, 'client', { value: client });\n\n    /**\n     * The filter applied to this collector\n     * @type {CollectorFilter}\n     */\n    this.filter = filter;\n\n    /**\n     * The options of this collector\n     * @type {CollectorOptions}\n     */\n    this.options = options;\n\n    /**\n     * The items collected by this collector\n     * @type {Collection}\n     */\n    this.collected = new Collection();\n\n    /**\n     * Whether this collector has finished collecting\n     * @type {boolean}\n     */\n    this.ended = false;\n\n    /**\n     * Timeout for cleanup\n     * @type {?Timeout}\n     * @private\n     */\n    this._timeout = null;\n\n    /**\n     * Call this to handle an event as a collectable element\n     * Accepts any event data as parameters\n     * @type {Function}\n     * @private\n     */\n    this.listener = this._handle.bind(this);\n    if (options.time) this._timeout = this.client.setTimeout(() => this.stop('time'), options.time);\n  }\n\n  /**\n   * @param {...*} args The arguments emitted by the listener\n   * @emits Collector#collect\n   * @private\n   */\n  _handle(...args) {\n    const collect = this.handle(...args);\n    if (!collect || !this.filter(...args, this.collected)) return;\n\n    this.collected.set(collect.key, collect.value);\n\n    /**\n     * Emitted whenever an element is collected.\n     * @event Collector#collect\n     * @param {*} element The element that got collected\n     * @param {Collector} collector The collector\n     */\n    this.emit('collect', collect.value, this);\n\n    const post = this.postCheck(...args);\n    if (post) this.stop(post);\n  }\n\n  /**\n   * Return a promise that resolves with the next collected element;\n   * rejects with collected elements if the collector finishes without receiving a next element\n   * @type {Promise}\n   * @readonly\n   */\n  get next() {\n    return new Promise((resolve, reject) => {\n      if (this.ended) {\n        reject(this.collected);\n        return;\n      }\n\n      const cleanup = () => {\n        this.removeListener('collect', onCollect);\n        this.removeListener('end', onEnd);\n      };\n\n      const onCollect = item => {\n        cleanup();\n        resolve(item);\n      };\n\n      const onEnd = () => {\n        cleanup();\n        reject(this.collected); // eslint-disable-line prefer-promise-reject-errors\n      };\n\n      this.on('collect', onCollect);\n      this.on('end', onEnd);\n    });\n  }\n\n  /**\n   * Stop this collector and emit the `end` event.\n   * @param {string} [reason='user'] The reason this collector is ending\n   * @emits Collector#end\n   */\n  stop(reason = 'user') {\n    if (this.ended) return;\n\n    if (this._timeout) this.client.clearTimeout(this._timeout);\n    this.ended = true;\n    this.cleanup();\n\n    /**\n     * Emitted when the collector is finished collecting.\n     * @event Collector#end\n     * @param {Collection} collected The elements collected by the collector\n     * @param {string} reason The reason the collector ended\n     */\n    this.emit('end', this.collected, reason);\n  }\n\n  /* eslint-disable no-empty-function, valid-jsdoc */\n  /**\n   * Handles incoming events from the `listener` function. Returns null if the event should not be collected,\n   * or returns an object describing the data that should be stored.\n   * @see Collector#listener\n   * @param {...*} args Any args the event listener emits\n   * @returns {?{key: string, value}} Data to insert into collection, if any\n   * @abstract\n   */\n  handle() {}\n\n  /**\n   * This method runs after collection to see if the collector should finish.\n   * @param {...*} args Any args the event listener emits\n   * @returns {?string} Reason to end the collector, if any\n   * @abstract\n   */\n  postCheck() {}\n\n  /**\n   * Called when the collector is ending.\n   * @abstract\n   */\n  cleanup() {}\n  /* eslint-enable no-empty-function, valid-jsdoc */\n}\n\nmodule.exports = Collector;\n\n\n//# sourceURL=webpack:///./src/structures/interfaces/Collector.js?");

/***/ }),

/***/ "./src/structures/interfaces/TextBasedChannel.js":
/*!*******************************************************!*\
  !*** ./src/structures/interfaces/TextBasedChannel.js ***!
  \*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(Buffer) {const path = __webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\");\nconst Message = __webpack_require__(/*! ../Message */ \"./src/structures/Message.js\");\nconst MessageCollector = __webpack_require__(/*! ../MessageCollector */ \"./src/structures/MessageCollector.js\");\nconst Collection = __webpack_require__(/*! ../../util/Collection */ \"./src/util/Collection.js\");\nconst Attachment = __webpack_require__(/*! ../../structures/Attachment */ \"./src/structures/Attachment.js\");\nconst RichEmbed = __webpack_require__(/*! ../../structures/RichEmbed */ \"./src/structures/RichEmbed.js\");\nconst Snowflake = __webpack_require__(/*! ../../util/Snowflake */ \"./src/util/Snowflake.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Interface for classes that have text-channel-like features.\n * @interface\n */\nclass TextBasedChannel {\n  constructor() {\n    /**\n     * A collection containing the messages sent to this channel\n     * @type {Collection<Snowflake, Message>}\n     */\n    this.messages = new Collection();\n\n    /**\n     * The ID of the last message in the channel, if one was sent\n     * @type {?Snowflake}\n     */\n    this.lastMessageID = null;\n\n    /**\n     * The Message object of the last message in the channel, if one was sent\n     * @type {?Message}\n     */\n    this.lastMessage = null;\n\n    /**\n     * The timestamp when the last pinned message was pinned, if there was one\n     * @type {?number}\n     */\n    this.lastPinTimestamp = null;\n  }\n\n  /**\n   * Options provided when sending or editing a message.\n   * @typedef {Object} MessageOptions\n   * @property {boolean} [tts=false] Whether or not the message should be spoken aloud\n   * @property {string} [nonce=''] The nonce for the message\n   * @property {RichEmbed|Object} [embed] An embed for the message\n   * (see [here](https://discordapp.com/developers/docs/resources/channel#embed-object) for more details)\n   * @property {boolean} [disableEveryone=this.client.options.disableEveryone] Whether or not @everyone and @here\n   * should be replaced with plain-text\n   * @property {FileOptions|BufferResolvable|Attachment} [file] A file to send with the message **(deprecated)**\n   * @property {FileOptions[]|BufferResolvable[]|Attachment[]} [files] Files to send with the message\n   * @property {string|boolean} [code] Language for optional codeblock formatting to apply\n   * @property {boolean|SplitOptions} [split=false] Whether or not the message should be split into multiple messages if\n   * it exceeds the character limit. If an object is provided, these are the options for splitting the message\n   * @property {UserResolvable} [reply] User to reply to (prefixes the message with a mention, except in DMs)\n   */\n\n  /**\n   * @typedef {Object} FileOptions\n   * @property {BufferResolvable} attachment File to attach\n   * @property {string} [name='file.jpg'] Filename of the attachment\n   */\n\n  /**\n   * Options for splitting a message.\n   * @typedef {Object} SplitOptions\n   * @property {number} [maxLength=1950] Maximum character length per message piece\n   * @property {string} [char='\\n'] Character to split the message with\n   * @property {string} [prepend=''] Text to prepend to every piece except the first\n   * @property {string} [append=''] Text to append to every piece except the last\n   */\n\n  /**\n   * Send a message to this channel.\n   * @param {StringResolvable} [content] Text for the message\n   * @param {MessageOptions|Attachment|RichEmbed} [options] Options for the message,\n   * can also be just a RichEmbed or Attachment\n   * @returns {Promise<Message|Message[]>}\n   * @example\n   * // Send a basic message\n   * channel.send('hello!')\n   *   .then(message => console.log(`Sent message: ${message.content}`))\n   *   .catch(console.error);\n   * @example\n   * // Send a remote file\n   * channel.send({\n   *   files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n   * })\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // Send a local file\n   * channel.send({\n   *   files: [{\n   *     attachment: 'entire/path/to/file.jpg',\n   *     name: 'file.jpg'\n   *   }]\n   * })\n   *   .then(console.log)\n   *   .catch(console.error);\n   * @example\n   * // Send an embed with a local image inside\n   * channel.send('This is an embed', {\n   *   embed: {\n   *     thumbnail: {\n   *          url: 'attachment://file.jpg'\n   *       }\n   *    },\n   *    files: [{\n   *       attachment: 'entire/path/to/file.jpg',\n   *       name: 'file.jpg'\n   *    }]\n   * })\n   *   .then(console.log)\n   *   .catch(console.error);\n   */\n  // eslint-disable-next-line complexity\n  send(content, options) {\n    if (!options && typeof content === 'object' && !(content instanceof Array)) {\n      options = content;\n      content = '';\n    } else if (!options) {\n      options = {};\n    }\n\n    const { reply } = options;\n    if (options instanceof Attachment) options = { files: [options.file] };\n    if (options instanceof RichEmbed) {\n      if (options.reply) options.reply = undefined;\n      options = { embed: options };\n    }\n    options.reply = reply;\n\n    if (options.embed) {\n      if (options.embed.file) {\n        if (options.files) options.files.push(options.embed.file);\n        else options.files = [options.embed.file];\n      }\n      if (options.embed.files) {\n        if (options.files) options.files = options.files.concat(options.embed.files);\n        else options.files = options.embed.files;\n      }\n    }\n\n    if (options.file) {\n      if (options.files) options.files.push(options.file);\n      else options.files = [options.file];\n    }\n\n    if (options.embed) options.embed = new RichEmbed(options.embed)._apiTransform();\n\n    if (options.files) {\n      for (let i = 0; i < options.files.length; i++) {\n        let file = options.files[i];\n        if (!file || typeof file === 'string' || Buffer.isBuffer(file)) file = { attachment: file };\n        if (!file.name) {\n          if (typeof file.attachment === 'string') {\n            file.name = path.basename(file.attachment);\n          } else if (file.attachment && file.attachment.path) {\n            file.name = path.basename(file.attachment.path);\n          } else if (file instanceof Attachment) {\n            file = { attachment: file.file, name: path.basename(file.file) || 'file.jpg' };\n          } else {\n            file.name = 'file.jpg';\n          }\n        } else if (file instanceof Attachment) {\n          file = file.file;\n        }\n        options.files[i] = file;\n      }\n\n      return Promise.all(options.files.map(file =>\n        this.client.resolver.resolveFile(file.attachment).then(resource => {\n          file.file = resource;\n          return file;\n        })\n      )).then(files => this.client.rest.methods.sendMessage(this, content, options, files));\n    }\n\n    return this.client.rest.methods.sendMessage(this, content, options);\n  }\n\n  /**\n   * Gets a single message from this channel, regardless of it being cached or not. Since the single message fetching\n   * endpoint is reserved for bot accounts, this abstracts the `fetchMessages` method to obtain the single message when\n   * using a user account.\n   * @param {Snowflake} messageID ID of the message to get\n   * @returns {Promise<Message>}\n   * @example\n   * // Get message\n   * channel.fetchMessage('99539446449315840')\n   *   .then(message => console.log(message.content))\n   *   .catch(console.error);\n   */\n  fetchMessage(messageID) {\n    if (!this.client.user.bot) {\n      return this.fetchMessages({ limit: 1, around: messageID }).then(messages => {\n        const msg = messages.get(messageID);\n        if (!msg) throw new Error('Message not found.');\n        return msg;\n      });\n    }\n    return this.client.rest.methods.getChannelMessage(this, messageID).then(data => {\n      const msg = data instanceof Message ? data : new Message(this, data, this.client);\n      this._cacheMessage(msg);\n      return msg;\n    });\n  }\n\n  /**\n   * The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n   * `after` are mutually exclusive. All the parameters are optional.\n   * @typedef {Object} ChannelLogsQueryOptions\n   * @property {number} [limit=50] Number of messages to acquire\n   * @property {Snowflake} [before] ID of a message to get the messages that were posted before it\n   * @property {Snowflake} [after] ID of a message to get the messages that were posted after it\n   * @property {Snowflake} [around] ID of a message to get the messages that were posted around it\n   */\n\n  /**\n   * Gets the past messages sent in this channel. Resolves with a collection mapping message ID's to Message objects.\n   * <info>The returned Collection does not contain reaction users of the messages if they were not cached.\n   * Those need to be fetched separately in such a case.</info>\n   * @param {ChannelLogsQueryOptions} [options={}] Query parameters to pass in\n   * @returns {Promise<Collection<Snowflake, Message>>}\n   * @example\n   * // Get messages\n   * channel.fetchMessages({ limit: 10 })\n   *   .then(messages => console.log(`Received ${messages.size} messages`))\n   *   .catch(console.error);\n   * @example\n   * // Get messages and filter by user ID\n   * channel.fetchMessages()\n   *   .then(messages => console.log(`${messages.filter(m => m.author.id === '84484653687267328').size} messages`))\n   *   .catch(console.error);\n   */\n  fetchMessages(options = {}) {\n    return this.client.rest.methods.getChannelMessages(this, options).then(data => {\n      const messages = new Collection();\n      for (const message of data) {\n        const msg = new Message(this, message, this.client);\n        messages.set(message.id, msg);\n        this._cacheMessage(msg);\n      }\n      return messages;\n    });\n  }\n\n  /**\n   * Fetches the pinned messages of this channel and returns a collection of them.\n   * <info>The returned Collection does not contain any reaction data of the messages.\n   * Those need to be fetched separately.</info>\n   * @returns {Promise<Collection<Snowflake, Message>>}\n   * @example\n   * // Get pinned messages\n   * channel.fetchPinnedMessages()\n   *   .then(messages => console.log(`Received ${messages.size} messages`))\n   *   .catch(console.error);\n   */\n  fetchPinnedMessages() {\n    return this.client.rest.methods.getChannelPinnedMessages(this).then(data => {\n      const messages = new Collection();\n      for (const message of data) {\n        const msg = new Message(this, message, this.client);\n        messages.set(message.id, msg);\n        this._cacheMessage(msg);\n      }\n      return messages;\n    });\n  }\n\n  /**\n   * @typedef {Object} MessageSearchOptions\n   * @property {string} [content] Message content\n   * @property {Snowflake} [maxID] Maximum ID for the filter\n   * @property {Snowflake} [minID] Minimum ID for the filter\n   * @property {string} [has] One of `link`, `embed`, `file`, `video`, `image`, or `sound`,\n   * or add `-` to negate (e.g. `-file`)\n   * @property {ChannelResolvable} [channel] Channel to limit search to (only for guild search endpoint)\n   * @property {UserResolvable} [author] Author to limit search\n   * @property {string} [authorType] One of `user`, `bot`, `webhook`, or add `-` to negate (e.g. `-webhook`)\n   * @property {string} [sortBy='recent'] `recent` or `relevant`\n   * @property {string} [sortOrder='desc'] `asc` or `desc`\n   * @property {number} [contextSize=2] How many messages to get around the matched message (0 to 2)\n   * @property {number} [limit=25] Maximum number of results to get (1 to 25)\n   * @property {number} [offset=0] Offset the \"pages\" of results (since you can only see 25 at a time)\n   * @property {UserResolvable} [mentions] Mentioned user filter\n   * @property {boolean} [mentionsEveryone] If everyone is mentioned\n   * @property {string} [linkHostname] Filter links by hostname\n   * @property {string} [embedProvider] The name of an embed provider\n   * @property {string} [embedType] one of `image`, `video`, `url`, `rich`\n   * @property {string} [attachmentFilename] The name of an attachment\n   * @property {string} [attachmentExtension] The extension of an attachment\n   * @property {Date} [before] Date to find messages before\n   * @property {Date} [after] Date to find messages before\n   * @property {Date} [during] Date to find messages during (range of date to date + 24 hours)\n   * @property {boolean} [nsfw=false] Include results from NSFW channels\n   */\n\n  /**\n   * @typedef {Object} MessageSearchResult\n   * @property {number} totalResults Total result count\n   * @property {Message[][]} messages Array of message results\n   * The message which has triggered the result will have the `hit` property set to `true`\n   */\n\n  /**\n   * Performs a search within the channel.\n   * <warn>This is only available when using a user account.</warn>\n   * @param {MessageSearchOptions} [options={}] Options to pass to the search\n   * @returns {Promise<MessageSearchResult>}\n   * @example\n   * channel.search({\n   *   content: 'discord.js',\n   *   before: '2016-11-17'\n   * }).then(res => {\n   *   const hit = res.messages[0].find(m => m.hit).content;\n   *   console.log(`I found: **${hit}**, total results: ${res.totalResults}`);\n   * }).catch(console.error);\n   */\n  search(options = {}) {\n    return this.client.rest.methods.search(this, options);\n  }\n\n  /**\n   * Starts a typing indicator in the channel.\n   * @param {number} [count] The number of times startTyping should be considered to have been called\n   * @example\n   * // Start typing in a channel\n   * channel.startTyping();\n   */\n  startTyping(count) {\n    if (typeof count !== 'undefined' && count < 1) throw new RangeError('Count must be at least 1.');\n    if (this.client.user._typing.has(this.id)) {\n      const entry = this.client.user._typing.get(this.id);\n      entry.count = count || entry.count + 1;\n      return;\n    }\n\n    const entry = {\n      count: count || 1,\n      interval: this.client.setInterval(() => {\n        this.client.rest.methods.sendTyping(this.id).catch(() => {\n          this.client.clearInterval(entry.interval);\n          this.client.user._typing.delete(this.id);\n        });\n      }, 9000),\n    };\n    this.client.rest.methods.sendTyping(this.id).catch(() => {\n      this.client.clearInterval(entry.interval);\n      this.client.user._typing.delete(this.id);\n    });\n    this.client.user._typing.set(this.id, entry);\n  }\n\n  /**\n   * Stops the typing indicator in the channel.\n   * The indicator will only stop if this is called as many times as startTyping().\n   * <info>It can take a few seconds for the client user to stop typing.</info>\n   * @param {boolean} [force=false] Whether or not to reset the call count and force the indicator to stop\n   * @example\n   * // Reduce the typing count by one and stop typing if it reached 0\n   * channel.stopTyping();\n   * @example\n   * // Force typing to fully stop in a channel\n   * channel.stopTyping(true);\n   */\n  stopTyping(force = false) {\n    if (this.client.user._typing.has(this.id)) {\n      const entry = this.client.user._typing.get(this.id);\n      entry.count--;\n      if (entry.count <= 0 || force) {\n        this.client.clearInterval(entry.interval);\n        this.client.user._typing.delete(this.id);\n      }\n    }\n  }\n\n  /**\n   * Whether or not the typing indicator is being shown in the channel\n   * @type {boolean}\n   * @readonly\n   */\n  get typing() {\n    return this.client.user._typing.has(this.id);\n  }\n\n  /**\n   * Number of times `startTyping` has been called\n   * @type {number}\n   * @readonly\n   */\n  get typingCount() {\n    if (this.client.user._typing.has(this.id)) return this.client.user._typing.get(this.id).count;\n    return 0;\n  }\n\n  /**\n   * The Message object of the last message in the channel, if one was sent\n   * @type {?Message}\n   * @readonly\n   */\n  get lastMessage() {\n    return this.messages.get(this.lastMessageID) || null;\n  }\n\n  /**\n   * The date when the last pinned message was pinned, if there was one\n   * @type {?Date}\n   * @readonly\n   */\n  get lastPinAt() {\n    return this.lastPinTimestamp ? new Date(this.lastPinTimestamp) : null;\n  }\n\n  /**\n   * Creates a Message Collector\n   * @param {CollectorFilter} filter The filter to create the collector with\n   * @param {MessageCollectorOptions} [options={}] The options to pass to the collector\n   * @returns {MessageCollector}\n   * @deprecated\n   */\n  createCollector(filter, options) {\n    return this.createMessageCollector(filter, options);\n  }\n\n  /**\n   * Creates a Message Collector.\n   * @param {CollectorFilter} filter The filter to create the collector with\n   * @param {MessageCollectorOptions} [options={}] The options to pass to the collector\n   * @returns {MessageCollector}\n   * @example\n   * // Create a message collector\n   * const filter = m => m.content.includes('discord');\n   * const collector = channel.createMessageCollector(filter, { time: 15000 });\n   * collector.on('collect', m => console.log(`Collected ${m.content}`));\n   * collector.on('end', collected => console.log(`Collected ${collected.size} items`));\n   */\n  createMessageCollector(filter, options = {}) {\n    return new MessageCollector(this, filter, options);\n  }\n\n  /**\n   * An object containing the same properties as CollectorOptions, but a few more:\n   * @typedef {MessageCollectorOptions} AwaitMessagesOptions\n   * @property {string[]} [errors] Stop/end reasons that cause the promise to reject\n   */\n\n  /**\n   * Similar to createCollector but in promise form. Resolves with a collection of messages that pass the specified\n   * filter.\n   * @param {CollectorFilter} filter The filter function to use\n   * @param {AwaitMessagesOptions} [options={}] Optional options to pass to the internal collector\n   * @returns {Promise<Collection<Snowflake, Message>>}\n   * @example\n   * // Await !vote messages\n   * const filter = m => m.content.startsWith('!vote');\n   * // Errors: ['time'] treats ending because of the time limit as an error\n   * channel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n   *   .then(collected => console.log(collected.size))\n   *   .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));\n   */\n  awaitMessages(filter, options = {}) {\n    return new Promise((resolve, reject) => {\n      const collector = this.createCollector(filter, options);\n      collector.once('end', (collection, reason) => {\n        if (options.errors && options.errors.includes(reason)) {\n          reject(collection);\n        } else {\n          resolve(collection);\n        }\n      });\n    });\n  }\n\n  /**\n   * Bulk delete given messages that are newer than two weeks.\n   * <warn>This is only available when using a bot account.</warn>\n   * @param {Collection<Snowflake, Message>|Message[]|Snowflake[]|number} messages\n   * Messages or number of messages to delete\n   * @param {boolean} [filterOld=false] Filter messages to remove those which are older than two weeks automatically\n   * @returns {Promise<Collection<Snowflake, Message>>} Deleted messages\n   * @example\n   * // Bulk delete messages\n   * channel.bulkDelete(5)\n   *   .then(messages => console.log(`Bulk deleted ${messages.size} messages`))\n   *   .catch(console.error);\n   */\n  bulkDelete(messages, filterOld = false) {\n    if (messages instanceof Array || messages instanceof Collection) {\n      let messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id || m);\n      if (filterOld) {\n        messageIDs = messageIDs.filter(id => Date.now() - Snowflake.deconstruct(id).date.getTime() < 1209600000);\n      }\n      if (messageIDs.length === 0) return Promise.resolve(new Collection());\n      if (messageIDs.length === 1) {\n        return this.fetchMessage(messageIDs[0]).then(m => m.delete()).then(m => new Collection([[m.id, m]]));\n      }\n      return this.client.rest.methods.bulkDeleteMessages(this, messageIDs);\n    }\n    if (!isNaN(messages)) return this.fetchMessages({ limit: messages }).then(msgs => this.bulkDelete(msgs, filterOld));\n    throw new TypeError('The messages must be an Array, Collection, or number.');\n  }\n\n  /**\n   * Marks all messages in this channel as read.\n   * <warn>This is only available when using a user account.</warn>\n   * @returns {Promise<TextChannel|GroupDMChannel|DMChannel>}\n   */\n  acknowledge() {\n    if (!this.lastMessageID) return Promise.resolve(this);\n    return this.client.rest.methods.ackTextChannel(this);\n  }\n\n  _cacheMessage(message) {\n    const maxSize = this.client.options.messageCacheMaxSize;\n    if (maxSize === 0) return null;\n    if (this.messages.size >= maxSize && maxSize > 0) this.messages.delete(this.messages.firstKey());\n    this.messages.set(message.id, message);\n    return message;\n  }\n}\n\n/** @lends TextBasedChannel.prototype */\nconst Deprecated = {\n  /**\n   * Send a message to this channel.\n   * @param {StringResolvable} [content] Text for the message\n   * @param {MessageOptions} [options={}] Options for the message\n   * @returns {Promise<Message|Message[]>}\n   * @deprecated\n   * @example\n   * // Send a message\n   * channel.sendMessage('hello!')\n   *  .then(message => console.log(`Sent message: ${message.content}`))\n   *  .catch(console.error);\n   */\n  sendMessage(content, options) {\n    return this.send(content, options);\n  },\n\n  /**\n   * Send an embed to this channel.\n   * @param {RichEmbed|Object} embed Embed for the message\n   * @param {string} [content] Text for the message\n   * @param {MessageOptions} [options] Options for the message\n   * @returns {Promise<Message>}\n   * @deprecated\n   */\n  sendEmbed(embed, content, options) {\n    if (!options && typeof content === 'object' && !(content instanceof Array)) {\n      options = content;\n      content = '';\n    } else if (!options) {\n      options = {};\n    }\n    return this.send(content, Object.assign(options, { embed }));\n  },\n\n  /**\n   * Send files to this channel.\n   * @param {FileOptions[]|string[]} files Files to send with the message\n   * @param {StringResolvable} [content] Text for the message\n   * @param {MessageOptions} [options] Options for the message\n   * @returns {Promise<Message>}\n   * @deprecated\n   */\n  sendFiles(files, content, options = {}) {\n    return this.send(content, Object.assign(options, { files }));\n  },\n\n  /**\n   * Send a file to this channel.\n   * @param {BufferResolvable} attachment File to send\n   * @param {string} [name='file.jpg'] Name and extension of the file\n   * @param {StringResolvable} [content] Text for the message\n   * @param {MessageOptions} [options] Options for the message\n   * @returns {Promise<Message>}\n   * @deprecated\n   */\n  sendFile(attachment, name, content, options = {}) {\n    return this.send({ files: [{ attachment, name }], content, options });\n  },\n\n  /**\n   * Send a code block to this channel.\n   * @param {string} lang Language for the code block\n   * @param {StringResolvable} content Content of the code block\n   * @param {MessageOptions} [options] Options for the message\n   * @returns {Promise<Message|Message[]>}\n   * @deprecated\n   */\n  sendCode(lang, content, options = {}) {\n    return this.send(content, Object.assign(options, { code: lang }));\n  },\n};\n\nfor (const key of Object.keys(Deprecated)) {\n  TextBasedChannel.prototype[key] = util.deprecate(Deprecated[key], `TextChannel#${key}: use TextChannel#send instead`);\n}\n\nexports.applyToClass = (structure, full = false, ignore = []) => {\n  const props = ['send', 'sendMessage', 'sendEmbed', 'sendFile', 'sendFiles', 'sendCode'];\n  if (full) {\n    props.push(\n      '_cacheMessage',\n      'acknowledge',\n      'fetchMessages',\n      'fetchMessage',\n      'search',\n      'lastMessage',\n      'lastPinAt',\n      'bulkDelete',\n      'startTyping',\n      'stopTyping',\n      'typing',\n      'typingCount',\n      'fetchPinnedMessages',\n      'createCollector',\n      'createMessageCollector',\n      'awaitMessages'\n    );\n  }\n  for (const prop of props) {\n    if (ignore.includes(prop)) continue;\n    Object.defineProperty(structure.prototype, prop, Object.getOwnPropertyDescriptor(TextBasedChannel.prototype, prop));\n  }\n};\n\nTextBasedChannel.prototype.acknowledge = util.deprecate(\n  TextBasedChannel.prototype.acknowledge, 'TextBasedChannel#acknowledge: userbot methods will be removed'\n);\n\nTextBasedChannel.prototype.search =\n  util.deprecate(TextBasedChannel.prototype.search, 'TextBasedChannel#search: userbot methods will be removed');\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/structures/interfaces/TextBasedChannel.js?");

/***/ }),

/***/ "./src/structures/shared/resolvePermissions.js":
/*!*****************************************************!*\
  !*** ./src/structures/shared/resolvePermissions.js ***!
  \*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Permissions = __webpack_require__(/*! ../../util/Permissions */ \"./src/util/Permissions.js\");\nconst Collection = __webpack_require__(/*! ../../util/Collection */ \"./src/util/Collection.js\");\n\nmodule.exports = function resolvePermissions(overwrites, guild) {\n  if (overwrites instanceof Collection || overwrites instanceof Array) {\n    overwrites = overwrites.map(overwrite => {\n      const role = this.client.resolver.resolveRole(guild, overwrite.id);\n      if (role) {\n        overwrite.id = role.id;\n        overwrite.type = 'role';\n      } else {\n        overwrite.id = this.client.resolver.resolveUserID(overwrite.id);\n        overwrite.type = 'member';\n      }\n\n      return {\n        allow: Permissions.resolve(overwrite.allow || overwrite.allowed || 0),\n        deny: Permissions.resolve(overwrite.deny || overwrite.denied || 0),\n        type: overwrite.type,\n        id: overwrite.id,\n      };\n    });\n  }\n\n  return overwrites;\n};\n\n\n//# sourceURL=webpack:///./src/structures/shared/resolvePermissions.js?");

/***/ }),

/***/ "./src/util/Collection.js":
/*!********************************!*\
  !*** ./src/util/Collection.js ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has\n * an ID, for significantly improved performance and ease-of-use.\n * @extends {Map}\n */\nclass Collection extends Map {\n  constructor(iterable) {\n    super(iterable);\n\n    /**\n     * Cached array for the `array()` method - will be reset to `null` whenever `set()` or `delete()` are called\n     * @name Collection#_array\n     * @type {?Array}\n     * @private\n     */\n    Object.defineProperty(this, '_array', { value: null, writable: true, configurable: true });\n\n    /**\n     * Cached array for the `keyArray()` method - will be reset to `null` whenever `set()` or `delete()` are called\n     * @name Collection#_keyArray\n     * @type {?Array}\n     * @private\n     */\n    Object.defineProperty(this, '_keyArray', { value: null, writable: true, configurable: true });\n  }\n\n  set(key, val) {\n    this._array = null;\n    this._keyArray = null;\n    return super.set(key, val);\n  }\n\n  delete(key) {\n    this._array = null;\n    this._keyArray = null;\n    return super.delete(key);\n  }\n\n  /**\n   * Creates an ordered array of the values of this collection, and caches it internally. The array will only be\n   * reconstructed if an item is added to or removed from the collection, or if you change the length of the array\n   * itself. If you don't want this caching behavior, use `[...collection.values()]` or\n   * `Array.from(collection.values())` instead.\n   * @returns {Array}\n   */\n  array() {\n    if (!this._array || this._array.length !== this.size) this._array = [...this.values()];\n    return this._array;\n  }\n\n  /**\n   * Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\n   * reconstructed if an item is added to or removed from the collection, or if you change the length of the array\n   * itself. If you don't want this caching behavior, use `[...collection.keys()]` or\n   * `Array.from(collection.keys())` instead.\n   * @returns {Array}\n   */\n  keyArray() {\n    if (!this._keyArray || this._keyArray.length !== this.size) this._keyArray = [...this.keys()];\n    return this._keyArray;\n  }\n\n  /**\n   * Obtains the first value(s) in this collection.\n   * @param {number} [count] Number of values to obtain from the beginning\n   * @returns {*|Array<*>} The single value if `count` is undefined, or an array of values of `count` length\n   */\n  first(count) {\n    if (count === undefined) return this.values().next().value;\n    if (typeof count !== 'number') throw new TypeError('The count must be a number.');\n    if (!Number.isInteger(count) || count < 1) throw new RangeError('The count must be an integer greater than 0.');\n    count = Math.min(this.size, count);\n    const arr = new Array(count);\n    const iter = this.values();\n    for (let i = 0; i < count; i++) arr[i] = iter.next().value;\n    return arr;\n  }\n\n  /**\n   * Obtains the first key(s) in this collection.\n   * @param {number} [count] Number of keys to obtain from the beginning\n   * @returns {*|Array<*>} The single key if `count` is undefined, or an array of keys of `count` length\n   */\n  firstKey(count) {\n    if (count === undefined) return this.keys().next().value;\n    if (typeof count !== 'number') throw new TypeError('The count must be a number.');\n    if (!Number.isInteger(count) || count < 1) throw new RangeError('The count must be an integer greater than 0.');\n    count = Math.min(this.size, count);\n    const arr = new Array(count);\n    const iter = this.keys();\n    for (let i = 0; i < count; i++) arr[i] = iter.next().value;\n    return arr;\n  }\n\n  /**\n   * Obtains the last value(s) in this collection. This relies on {@link Collection#array}, and thus the caching\n   * mechanism applies here as well.\n   * @param {number} [count] Number of values to obtain from the end\n   * @returns {*|Array<*>} The single value if `count` is undefined, or an array of values of `count` length\n   */\n  last(count) {\n    const arr = this.array();\n    if (count === undefined) return arr[arr.length - 1];\n    if (typeof count !== 'number') throw new TypeError('The count must be a number.');\n    if (!Number.isInteger(count) || count < 1) throw new RangeError('The count must be an integer greater than 0.');\n    return arr.slice(-count);\n  }\n\n  /**\n   * Obtains the last key(s) in this collection. This relies on {@link Collection#keyArray}, and thus the caching\n   * mechanism applies here as well.\n   * @param {number} [count] Number of keys to obtain from the end\n   * @returns {*|Array<*>} The single key if `count` is undefined, or an array of keys of `count` length\n   */\n  lastKey(count) {\n    const arr = this.keyArray();\n    if (count === undefined) return arr[arr.length - 1];\n    if (typeof count !== 'number') throw new TypeError('The count must be a number.');\n    if (!Number.isInteger(count) || count < 1) throw new RangeError('The count must be an integer greater than 0.');\n    return arr.slice(-count);\n  }\n\n  /**\n   * Obtains random value(s) from this collection. This relies on {@link Collection#array}, and thus the caching\n   * mechanism applies here as well.\n   * @param {number} [count] Number of values to obtain randomly\n   * @returns {*|Array<*>} The single value if `count` is undefined, or an array of values of `count` length\n   */\n  random(count) {\n    let arr = this.array();\n    if (count === undefined) return arr[Math.floor(Math.random() * arr.length)];\n    if (typeof count !== 'number') throw new TypeError('The count must be a number.');\n    if (!Number.isInteger(count) || count < 1) throw new RangeError('The count must be an integer greater than 0.');\n    if (arr.length === 0) return [];\n    const rand = new Array(count);\n    arr = arr.slice();\n    for (let i = 0; i < count; i++) rand[i] = arr.splice(Math.floor(Math.random() * arr.length), 1)[0];\n    return rand;\n  }\n\n  /**\n   * Obtains random key(s) from this collection. This relies on {@link Collection#keyArray}, and thus the caching\n   * mechanism applies here as well.\n   * @param {number} [count] Number of keys to obtain randomly\n   * @returns {*|Array<*>} The single key if `count` is undefined, or an array of keys of `count` length\n   */\n  randomKey(count) {\n    let arr = this.keyArray();\n    if (count === undefined) return arr[Math.floor(Math.random() * arr.length)];\n    if (typeof count !== 'number') throw new TypeError('The count must be a number.');\n    if (!Number.isInteger(count) || count < 1) throw new RangeError('The count must be an integer greater than 0.');\n    if (arr.length === 0) return [];\n    const rand = new Array(count);\n    arr = arr.slice();\n    for (let i = 0; i < count; i++) rand[i] = arr.splice(Math.floor(Math.random() * arr.length), 1)[0];\n    return rand;\n  }\n\n  /**\n   * Searches for all items where their specified property's value is identical to the given value\n   * (`item[prop] === value`).\n   * @param {string} prop The property to test against\n   * @param {*} value The expected value\n   * @returns {Array}\n   * @deprecated\n   * @example\n   * collection.findAll('username', 'Bob');\n   */\n  findAll(prop, value) {\n    if (typeof prop !== 'string') throw new TypeError('Key must be a string.');\n    if (typeof value === 'undefined') throw new Error('Value must be specified.');\n    const results = [];\n    for (const item of this.values()) {\n      if (item[prop] === value) results.push(item);\n    }\n    return results;\n  }\n\n  /**\n   * Searches for a single item where its specified property's value is identical to the given value\n   * (`item[prop] === value`), or the given function returns a truthy value. In the latter case, this is identical to\n   * [Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).\n   * <warn>All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you\n   * should use the `get` method. See\n   * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) for details.</warn>\n   * @param {string|Function} propOrFn The property to test against, or the function to test with\n   * @param {*} [value] The expected value - only applicable and required if using a property for the first argument\n   * @returns {*}\n   * @example\n   * collection.find('username', 'Bob');\n   * @example\n   * collection.find(val => val.username === 'Bob');\n   */\n  find(propOrFn, value) {\n    if (typeof propOrFn === 'string') {\n      if (typeof value === 'undefined') throw new Error('Value must be specified.');\n      for (const item of this.values()) {\n        if (item[propOrFn] === value) return item;\n      }\n      return null;\n    } else if (typeof propOrFn === 'function') {\n      for (const [key, val] of this) {\n        if (propOrFn(val, key, this)) return val;\n      }\n      return null;\n    } else {\n      throw new Error('First argument must be a property string or a function.');\n    }\n  }\n\n  /* eslint-disable max-len */\n  /**\n   * Searches for the key of a single item where its specified property's value is identical to the given value\n   * (`item[prop] === value`), or the given function returns a truthy value. In the latter case, this is identical to\n   * [Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).\n   * @param {string|Function} propOrFn The property to test against, or the function to test with\n   * @param {*} [value] The expected value - only applicable and required if using a property for the first argument\n   * @returns {*}\n   * @example\n   * collection.findKey('username', 'Bob');\n   * @example\n   * collection.findKey(val => val.username === 'Bob');\n   */\n  /* eslint-enable max-len */\n  findKey(propOrFn, value) {\n    if (typeof propOrFn === 'string') {\n      if (typeof value === 'undefined') throw new Error('Value must be specified.');\n      for (const [key, val] of this) {\n        if (val[propOrFn] === value) return key;\n      }\n      return null;\n    } else if (typeof propOrFn === 'function') {\n      for (const [key, val] of this) {\n        if (propOrFn(val, key, this)) return key;\n      }\n      return null;\n    } else {\n      throw new Error('First argument must be a property string or a function.');\n    }\n  }\n\n  /**\n   * Searches for the existence of a single item where its specified property's value is identical to the given value\n   * (`item[prop] === value`).\n   * <warn>Do not use this to check for an item by its ID. Instead, use `collection.has(id)`. See\n   * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) for details.</warn>\n   * @param {string} prop The property to test against\n   * @param {*} value The expected value\n   * @returns {boolean}\n   * @deprecated\n   * @example\n   * if (collection.exists('username', 'Bob')) {\n   *  console.log('user here!');\n   * }\n   */\n  exists(prop, value) {\n    return Boolean(this.find(prop, value));\n  }\n\n  /**\n   * Removes entries that satisfy the provided filter function.\n   * @param {Function} fn Function used to test (should return a boolean)\n   * @param {Object} [thisArg] Value to use as `this` when executing function\n   * @returns {number} The number of removed entries\n   */\n  sweep(fn, thisArg) {\n    if (thisArg) fn = fn.bind(thisArg);\n    const previousSize = this.size;\n    for (const [key, val] of this) {\n      if (fn(val, key, this)) this.delete(key);\n    }\n    return previousSize - this.size;\n  }\n\n  /**\n   * Identical to\n   * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\n   * but returns a Collection instead of an Array.\n   * @param {Function} fn Function used to test (should return a boolean)\n   * @param {Object} [thisArg] Value to use as `this` when executing function\n   * @returns {Collection}\n   */\n  filter(fn, thisArg) {\n    if (thisArg) fn = fn.bind(thisArg);\n    const results = new Collection();\n    for (const [key, val] of this) {\n      if (fn(val, key, this)) results.set(key, val);\n    }\n    return results;\n  }\n\n  /**\n   * Identical to\n   * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).\n   * @param {Function} fn Function used to test (should return a boolean)\n   * @param {Object} [thisArg] Value to use as `this` when executing function\n   * @returns {Array}\n   * @deprecated\n   */\n  filterArray(fn, thisArg) {\n    if (thisArg) fn = fn.bind(thisArg);\n    const results = [];\n    for (const [key, val] of this) {\n      if (fn(val, key, this)) results.push(val);\n    }\n    return results;\n  }\n\n  /**\n   * Partitions the collection into two collections where the first collection\n   * contains the items that passed and the second contains the items that failed.\n   * @param {Function} fn Function used to test (should return a boolean)\n   * @param {*} [thisArg] Value to use as `this` when executing function\n   * @returns {Collection[]}\n   * @example const [big, small] = collection.partition(guild => guild.memberCount > 250);\n   */\n  partition(fn, thisArg) {\n    if (typeof thisArg !== 'undefined') fn = fn.bind(thisArg);\n    const results = [new Collection(), new Collection()];\n    for (const [key, val] of this) {\n      if (fn(val, key, this)) {\n        results[0].set(key, val);\n      } else {\n        results[1].set(key, val);\n      }\n    }\n    return results;\n  }\n\n  /**\n   * Identical to\n   * [Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).\n   * @param {Function} fn Function that produces an element of the new array, taking three arguments\n   * @param {*} [thisArg] Value to use as `this` when executing function\n   * @returns {Array}\n   */\n  map(fn, thisArg) {\n    if (thisArg) fn = fn.bind(thisArg);\n    const arr = new Array(this.size);\n    let i = 0;\n    for (const [key, val] of this) arr[i++] = fn(val, key, this);\n    return arr;\n  }\n\n  /**\n   * Identical to\n   * [Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).\n   * @param {Function} fn Function used to test (should return a boolean)\n   * @param {Object} [thisArg] Value to use as `this` when executing function\n   * @returns {boolean}\n   */\n  some(fn, thisArg) {\n    if (thisArg) fn = fn.bind(thisArg);\n    for (const [key, val] of this) {\n      if (fn(val, key, this)) return true;\n    }\n    return false;\n  }\n\n  /**\n   * Identical to\n   * [Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).\n   * @param {Function} fn Function used to test (should return a boolean)\n   * @param {Object} [thisArg] Value to use as `this` when executing function\n   * @returns {boolean}\n   */\n  every(fn, thisArg) {\n    if (thisArg) fn = fn.bind(thisArg);\n    for (const [key, val] of this) {\n      if (!fn(val, key, this)) return false;\n    }\n    return true;\n  }\n\n  /**\n   * Identical to\n   * [Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).\n   * @param {Function} fn Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,\n   * and `collection`\n   * @param {*} [initialValue] Starting value for the accumulator\n   * @returns {*}\n   */\n  reduce(fn, initialValue) {\n    let accumulator;\n    if (typeof initialValue !== 'undefined') {\n      accumulator = initialValue;\n      for (const [key, val] of this) accumulator = fn(accumulator, val, key, this);\n    } else {\n      let first = true;\n      for (const [key, val] of this) {\n        if (first) {\n          accumulator = val;\n          first = false;\n          continue;\n        }\n        accumulator = fn(accumulator, val, key, this);\n      }\n    }\n    return accumulator;\n  }\n\n  /**\n   * Identical to\n   * [Map.forEach()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach),\n   * but returns the collection instead of undefined.\n   * @param {Function} fn Function to execute for each element\n   * @param {*} [thisArg] Value to use as `this` when executing function\n   * @returns {Collection}\n   * @example\n   * collection\n   *  .tap(user => console.log(user.username))\n   *  .filter(user => user.bot)\n   *  .tap(user => console.log(user.username));\n   */\n  tap(fn, thisArg) {\n    this.forEach(fn, thisArg);\n    return this;\n  }\n\n  /**\n   * Creates an identical shallow copy of this collection.\n   * @returns {Collection}\n   * @example const newColl = someColl.clone();\n   */\n  clone() {\n    return new this.constructor(this);\n  }\n\n  /**\n   * Combines this collection with others into a new collection. None of the source collections are modified.\n   * @param {...Collection} collections Collections to merge\n   * @returns {Collection}\n   * @example const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);\n   */\n  concat(...collections) {\n    const newColl = this.clone();\n    for (const coll of collections) {\n      for (const [key, val] of coll) newColl.set(key, val);\n    }\n    return newColl;\n  }\n\n  /**\n   * Calls the `delete()` method on all items that have it.\n   * @returns {Promise[]}\n   */\n  deleteAll() {\n    const returns = [];\n    for (const item of this.values()) {\n      if (item.delete) returns.push(item.delete());\n    }\n    return returns;\n  }\n\n  /**\n   * Checks if this collection shares identical key-value pairings with another.\n   * This is different to checking for equality using equal-signs, because\n   * the collections may be different objects, but contain the same data.\n   * @param {Collection} collection Collection to compare with\n   * @returns {boolean} Whether the collections have identical contents\n   */\n  equals(collection) {\n    if (!collection) return false;\n    if (this === collection) return true;\n    if (this.size !== collection.size) return false;\n    return !this.find((value, key) => {\n      const testVal = collection.get(key);\n      return testVal !== value || (testVal === undefined && !collection.has(key));\n    });\n  }\n\n  /**\n   * The sort() method sorts the elements of a collection in place and returns the collection.\n   * The sort is not necessarily stable. The default sort order is according to string Unicode code points.\n   * @param {Function} [compareFunction] Specifies a function that defines the sort order.\n   * if omitted, the collection is sorted according to each character's Unicode code point value,\n   * according to the string conversion of each element.\n   * @returns {Collection}\n   */\n  sort(compareFunction = (x, y) => +(x > y) || +(x === y) - 1) {\n    return new Collection([...this.entries()].sort((a, b) => compareFunction(a[1], b[1], a[0], b[0])));\n  }\n}\n\nCollection.prototype.findAll =\n  util.deprecate(Collection.prototype.findAll, 'Collection#findAll: use Collection#filter instead');\n\nCollection.prototype.filterArray =\n  util.deprecate(Collection.prototype.filterArray, 'Collection#filterArray: use Collection#filter instead');\n\nCollection.prototype.exists =\n  util.deprecate(Collection.prototype.exists, 'Collection#exists: use Collection#some instead');\n\nCollection.prototype.find = function find(propOrFn, value) {\n  if (typeof propOrFn === 'string') {\n    ((any, ...more) => console.warn(any, more))('Collection#find: pass a function instead', 'DeprecationWarning');\n    if (typeof value === 'undefined') throw new Error('Value must be specified.');\n    for (const item of this.values()) {\n      if (item[propOrFn] === value) return item;\n    }\n    return null;\n  } else if (typeof propOrFn === 'function') {\n    for (const [key, val] of this) {\n      if (propOrFn(val, key, this)) return val;\n    }\n    return null;\n  } else {\n    throw new Error('First argument must be a property string or a function.');\n  }\n};\n\nCollection.prototype.findKey = function findKey(propOrFn, value) {\n  if (typeof propOrFn === 'string') {\n    ((any, ...more) => console.warn(any, more))('Collection#findKey: pass a function instead', 'DeprecationWarning');\n    if (typeof value === 'undefined') throw new Error('Value must be specified.');\n    for (const [key, val] of this) {\n      if (val[propOrFn] === value) return key;\n    }\n    return null;\n  } else if (typeof propOrFn === 'function') {\n    for (const [key, val] of this) {\n      if (propOrFn(val, key, this)) return key;\n    }\n    return null;\n  } else {\n    throw new Error('First argument must be a property string or a function.');\n  }\n};\n\nmodule.exports = Collection;\n\n\n//# sourceURL=webpack:///./src/util/Collection.js?");

/***/ }),

/***/ "./src/util/Constants.js":
/*!*******************************!*\
  !*** ./src/util/Constants.js ***!
  \*******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {exports.Package = __webpack_require__(/*! ../../package.json */ \"./package.json\");\n\n/**\n * Options for a client.\n * @typedef {Object} ClientOptions\n * @property {string} [apiRequestMethod='sequential'] One of `sequential` or `burst`. The sequential handler executes\n * all requests in the order they are triggered, whereas the burst handler runs multiple in parallel, and doesn't\n * provide the guarantee of any particular order. Burst mode is more likely to hit a 429 ratelimit error by its nature,\n * and is therefore slightly riskier to use.\n * @property {number} [shardId=0] ID of the shard to run\n * @property {number} [shardCount=0] Total number of shards\n * @property {number} [messageCacheMaxSize=200] Maximum number of messages to cache per channel\n * (-1 or Infinity for unlimited - don't do this without message sweeping, otherwise memory usage will climb\n * indefinitely)\n * @property {number} [messageCacheLifetime=0] How long a message should stay in the cache until it is considered\n * sweepable (in seconds, 0 for forever)\n * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than\n * the message cache lifetime (in seconds, 0 for never)\n * @property {boolean} [fetchAllMembers=false] Whether to cache all guild members and users upon startup, as well as\n * upon joining a guild (should be avoided whenever possible)\n * @property {boolean} [disableEveryone=false] Default value for {@link MessageOptions#disableEveryone}\n * @property {boolean} [sync=false] Whether to periodically sync guilds (for user accounts)\n * @property {number} [restWsBridgeTimeout=5000] Maximum time permitted between REST responses and their\n * corresponding websocket events\n * @property {number} [restTimeOffset=500] Extra time in millseconds to wait before continuing to make REST\n * requests (higher values will reduce rate-limiting errors on bad connections)\n * @property {number} [retryLimit=Infinity] How many times to retry on 5XX errors\n * (Infinity for indefinite amount of retries)\n * @property {WSEventType[]} [disabledEvents] An array of disabled websocket events. Events in this array will not be\n * processed, potentially resulting in performance improvements for larger bots. Only disable events you are\n * 100% certain you don't need, as many are important, but not obviously so. The safest one to disable with the\n * most impact is typically `TYPING_START`.\n * @property {WebsocketOptions} [ws] Options for the WebSocket\n * @property {HTTPOptions} [http] HTTP options\n */\nexports.DefaultOptions = {\n  apiRequestMethod: 'sequential',\n  shardId: 0,\n  shardCount: 0,\n  messageCacheMaxSize: 200,\n  messageCacheLifetime: 0,\n  messageSweepInterval: 0,\n  fetchAllMembers: false,\n  disableEveryone: false,\n  sync: false,\n  restWsBridgeTimeout: 5000,\n  retryLimit: Infinity,\n  disabledEvents: [],\n  restTimeOffset: 500,\n\n  /**\n   * WebSocket options (these are left as snake_case to match the API)\n   * @typedef {Object} WebsocketOptions\n   * @property {number} [large_threshold=250] Number of members in a guild to be considered large\n   * @property {boolean} [compress=true] Whether to compress data sent on the connection\n   * (defaults to `false` for browsers)\n   */\n  ws: {\n    large_threshold: 250,\n    compress: __webpack_require__(/*! os */ \"./node_modules/os-browserify/browser.js\").platform() !== 'browser',\n    properties: {\n      $os: process ? process.platform : 'discord.js',\n      $browser: 'discord.js',\n      $device: 'discord.js',\n      $referrer: '',\n      $referring_domain: '',\n    },\n    version: 6,\n  },\n\n  /**\n   * HTTP options\n   * @typedef {Object} HTTPOptions\n   * @property {number} [version=7] API version to use\n   * @property {string} [api='https://discordapp.com/api'] Base url of the API\n   * @property {string} [cdn='https://cdn.discordapp.com'] Base url of the CDN\n   * @property {string} [invite='https://discord.gg'] Base url of invites\n   */\n  http: {\n    version: 7,\n    host: 'https://discordapp.com',\n    cdn: 'https://cdn.discordapp.com',\n  },\n};\n\nexports.WSCodes = {\n  1000: 'Connection gracefully closed',\n  4004: 'Tried to identify with an invalid token',\n  4010: 'Sharding data provided was invalid',\n  4011: 'Shard would be on too many guilds if connected',\n};\n\nexports.Errors = {\n  NO_TOKEN: 'Request to use token, but token was unavailable to the client.',\n  NO_BOT_ACCOUNT: 'Only bot accounts are able to make use of this feature.',\n  NO_USER_ACCOUNT: 'Only user accounts are able to make use of this feature.',\n  BAD_WS_MESSAGE: 'A bad message was received from the websocket; either bad compression, or not JSON.',\n  TOOK_TOO_LONG: 'Something took too long to do.',\n  NOT_A_PERMISSION: 'Invalid permission string or number.',\n  INVALID_RATE_LIMIT_METHOD: 'Unknown rate limiting method.',\n  BAD_LOGIN: 'Incorrect login details were provided.',\n  INVALID_SHARD: 'Invalid shard settings were provided.',\n  SHARDING_REQUIRED: 'This session would have handled too many guilds - Sharding is required.',\n  INVALID_TOKEN: 'An invalid token was provided.',\n};\n\nconst Endpoints = exports.Endpoints = {\n  User: userID => {\n    if (userID.id) userID = userID.id;\n    const base = `/users/${userID}`;\n    return {\n      toString: () => base,\n      channels: `${base}/channels`,\n      profile: `${base}/profile`,\n      relationships: `${base}/relationships`,\n      settings: `${base}/settings`,\n      Relationship: uID => `${base}/relationships/${uID}`,\n      Guild: guildID => ({\n        toString: () => `${base}/guilds/${guildID}`,\n        settings: `${base}/guilds/${guildID}/settings`,\n      }),\n      Note: id => `${base}/notes/${id}`,\n      Mentions: (limit, roles, everyone, guildID) =>\n        `${base}/mentions?limit=${limit}&roles=${roles}&everyone=${everyone}${guildID ? `&guild_id=${guildID}` : ''}`,\n      Avatar: (root, hash) => {\n        if (userID === '1') return hash;\n        return Endpoints.CDN(root).Avatar(userID, hash);\n      },\n    };\n  },\n  guilds: '/guilds',\n  Guild: guildID => {\n    if (guildID.id) guildID = guildID.id;\n    const base = `/guilds/${guildID}`;\n    return {\n      toString: () => base,\n      prune: `${base}/prune`,\n      embed: `${base}/embed`,\n      bans: `${base}/bans`,\n      integrations: `${base}/integrations`,\n      members: `${base}/members`,\n      channels: `${base}/channels`,\n      invites: `${base}/invites`,\n      roles: `${base}/roles`,\n      emojis: `${base}/emojis`,\n      search: `${base}/messages/search`,\n      vanityURL: `${base}/vanity-url`,\n      voiceRegions: `${base}/regions`,\n      webhooks: `${base}/webhooks`,\n      ack: `${base}/ack`,\n      settings: `${base}/settings`,\n      auditLogs: `${base}/audit-logs`,\n      Emoji: emojiID => `${base}/emojis/${emojiID}`,\n      Icon: (root, hash) => Endpoints.CDN(root).Icon(guildID, hash),\n      Splash: (root, hash) => Endpoints.CDN(root).Splash(guildID, hash),\n      Role: roleID => `${base}/roles/${roleID}`,\n      Member: memberID => {\n        if (memberID.id) memberID = memberID.id;\n        const mbase = `${base}/members/${memberID}`;\n        return {\n          toString: () => mbase,\n          Role: roleID => `${mbase}/roles/${roleID}`,\n          nickname: `${base}/members/@me/nick`,\n        };\n      },\n    };\n  },\n  channels: '/channels',\n  Channel: channelID => {\n    if (channelID.id) channelID = channelID.id;\n    const base = `/channels/${channelID}`;\n    return {\n      toString: () => base,\n      messages: {\n        toString: () => `${base}/messages`,\n        bulkDelete: `${base}/messages/bulk-delete`,\n      },\n      invites: `${base}/invites`,\n      typing: `${base}/typing`,\n      permissions: `${base}/permissions`,\n      webhooks: `${base}/webhooks`,\n      search: `${base}/messages/search`,\n      pins: `${base}/pins`,\n      Icon: (root, hash) => Endpoints.CDN(root).GDMIcon(channelID, hash),\n      Pin: messageID => `${base}/pins/${messageID}`,\n      Recipient: recipientID => `${base}/recipients/${recipientID}`,\n      Message: messageID => {\n        if (messageID.id) messageID = messageID.id;\n        const mbase = `${base}/messages/${messageID}`;\n        return {\n          toString: () => mbase,\n          reactions: `${mbase}/reactions`,\n          ack: `${mbase}/ack`,\n          Reaction: emoji => {\n            const rbase = `${mbase}/reactions/${emoji}`;\n            return {\n              toString: () => rbase,\n              User: userID => `${rbase}/${userID}`,\n            };\n          },\n        };\n      },\n    };\n  },\n  Message: m => exports.Endpoints.Channel(m.channel).Message(m),\n  Member: m => exports.Endpoints.Guild(m.guild).Member(m),\n  CDN(root) {\n    return {\n      Emoji: (emojiID, format = 'png') => `${root}/emojis/${emojiID}.${format}`,\n      Asset: name => `${root}/assets/${name}`,\n      Avatar: (userID, hash) => `${root}/avatars/${userID}/${hash}.${hash.startsWith('a_') ? 'gif' : 'png?size=2048'}`,\n      Icon: (guildID, hash) => `${root}/icons/${guildID}/${hash}.jpg`,\n      AppIcon: (clientID, hash) => `${root}/app-icons/${clientID}/${hash}.png`,\n      AppAsset: (clientID, hash) => `${root}/app-assets/${clientID}/${hash}.png`,\n      GDMIcon: (channelID, hash) => `${root}/channel-icons/${channelID}/${hash}.jpg?size=2048`,\n      Splash: (guildID, hash) => `${root}/splashes/${guildID}/${hash}.jpg`,\n    };\n  },\n  OAUTH2: {\n    Application: appID => {\n      const base = `/oauth2/applications/${appID}`;\n      return {\n        toString: () => base,\n        resetSecret: `${base}/reset`,\n        resetToken: `${base}/bot/reset`,\n      };\n    },\n    App: appID => `/oauth2/authorize?client_id=${appID}`,\n  },\n  login: '/auth/login',\n  logout: '/auth/logout',\n  voiceRegions: '/voice/regions',\n  gateway: {\n    toString: () => '/gateway',\n    bot: '/gateway/bot',\n  },\n  Invite: inviteID => `/invite/${inviteID}?with_counts=true`,\n  inviteLink: id => `https://discord.gg/${id}`,\n  Webhook: (webhookID, token) => `/webhooks/${webhookID}${token ? `/${token}` : ''}`,\n};\n\n\n/**\n * The current status of the client. Here are the available statuses:\n * * READY\n * * CONNECTING\n * * RECONNECTING\n * * IDLE\n * * NEARLY\n * * DISCONNECTED\n * @typedef {number} Status\n */\nexports.Status = {\n  READY: 0,\n  CONNECTING: 1,\n  RECONNECTING: 2,\n  IDLE: 3,\n  NEARLY: 4,\n  DISCONNECTED: 5,\n};\n\n/**\n * The current status of a voice connection. Here are the available statuses:\n * * CONNECTED\n * * CONNECTING\n * * AUTHENTICATING\n * * RECONNECTING\n * * DISCONNECTED\n * @typedef {number} VoiceStatus\n */\nexports.VoiceStatus = {\n  CONNECTED: 0,\n  CONNECTING: 1,\n  AUTHENTICATING: 2,\n  RECONNECTING: 3,\n  DISCONNECTED: 4,\n};\n\nexports.ChannelTypes = {\n  TEXT: 0,\n  DM: 1,\n  VOICE: 2,\n  GROUP_DM: 3,\n  CATEGORY: 4,\n};\n\nexports.OPCodes = {\n  DISPATCH: 0,\n  HEARTBEAT: 1,\n  IDENTIFY: 2,\n  STATUS_UPDATE: 3,\n  VOICE_STATE_UPDATE: 4,\n  VOICE_GUILD_PING: 5,\n  RESUME: 6,\n  RECONNECT: 7,\n  REQUEST_GUILD_MEMBERS: 8,\n  INVALID_SESSION: 9,\n  HELLO: 10,\n  HEARTBEAT_ACK: 11,\n};\n\nexports.VoiceOPCodes = {\n  IDENTIFY: 0,\n  SELECT_PROTOCOL: 1,\n  READY: 2,\n  HEARTBEAT: 3,\n  SESSION_DESCRIPTION: 4,\n  SPEAKING: 5,\n};\n\nexports.Events = {\n  RATE_LIMIT: 'rateLimit',\n  READY: 'ready',\n  RESUME: 'resume',\n  GUILD_CREATE: 'guildCreate',\n  GUILD_DELETE: 'guildDelete',\n  GUILD_UPDATE: 'guildUpdate',\n  GUILD_UNAVAILABLE: 'guildUnavailable',\n  GUILD_AVAILABLE: 'guildAvailable',\n  GUILD_MEMBER_ADD: 'guildMemberAdd',\n  GUILD_MEMBER_REMOVE: 'guildMemberRemove',\n  GUILD_MEMBER_UPDATE: 'guildMemberUpdate',\n  GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable',\n  GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking',\n  GUILD_MEMBERS_CHUNK: 'guildMembersChunk',\n  GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate',\n  GUILD_ROLE_CREATE: 'roleCreate',\n  GUILD_ROLE_DELETE: 'roleDelete',\n  GUILD_ROLE_UPDATE: 'roleUpdate',\n  GUILD_EMOJI_CREATE: 'emojiCreate',\n  GUILD_EMOJI_DELETE: 'emojiDelete',\n  GUILD_EMOJI_UPDATE: 'emojiUpdate',\n  GUILD_BAN_ADD: 'guildBanAdd',\n  GUILD_BAN_REMOVE: 'guildBanRemove',\n  CHANNEL_CREATE: 'channelCreate',\n  CHANNEL_DELETE: 'channelDelete',\n  CHANNEL_UPDATE: 'channelUpdate',\n  CHANNEL_PINS_UPDATE: 'channelPinsUpdate',\n  MESSAGE_CREATE: 'message',\n  MESSAGE_DELETE: 'messageDelete',\n  MESSAGE_UPDATE: 'messageUpdate',\n  MESSAGE_BULK_DELETE: 'messageDeleteBulk',\n  MESSAGE_REACTION_ADD: 'messageReactionAdd',\n  MESSAGE_REACTION_REMOVE: 'messageReactionRemove',\n  MESSAGE_REACTION_REMOVE_ALL: 'messageReactionRemoveAll',\n  USER_UPDATE: 'userUpdate',\n  USER_NOTE_UPDATE: 'userNoteUpdate',\n  USER_SETTINGS_UPDATE: 'clientUserSettingsUpdate',\n  USER_GUILD_SETTINGS_UPDATE: 'clientUserGuildSettingsUpdate',\n  PRESENCE_UPDATE: 'presenceUpdate',\n  VOICE_STATE_UPDATE: 'voiceStateUpdate',\n  TYPING_START: 'typingStart',\n  TYPING_STOP: 'typingStop',\n  WEBHOOKS_UPDATE: 'webhookUpdate',\n  DISCONNECT: 'disconnect',\n  RECONNECTING: 'reconnecting',\n  ERROR: 'error',\n  WARN: 'warn',\n  DEBUG: 'debug',\n};\n\n/**\n * The type of an activity of a users presence, e.g. `PLAYING`. Here are the available types:\n * * PLAYING\n * * STREAMING\n * * LISTENING\n * * WATCHING\n * @typedef {string} ActivityType\n */\nexports.ActivityTypes = [\n  'PLAYING',\n  'STREAMING',\n  'LISTENING',\n  'WATCHING',\n];\n\nexports.ActivityFlags = {\n  INSTANCE: 1 << 0,\n  JOIN: 1 << 1,\n  SPECTATE: 1 << 2,\n  JOIN_REQUEST: 1 << 3,\n  SYNC: 1 << 4,\n  PLAY: 1 << 5,\n};\n\n/**\n * The type of a websocket message event, e.g. `MESSAGE_CREATE`. Here are the available events:\n * * READY\n * * RESUMED\n * * GUILD_SYNC\n * * GUILD_CREATE\n * * GUILD_DELETE\n * * GUILD_UPDATE\n * * GUILD_MEMBER_ADD\n * * GUILD_MEMBER_REMOVE\n * * GUILD_MEMBER_UPDATE\n * * GUILD_MEMBERS_CHUNK\n * * GUILD_INTEGRATIONS_UPDATE\n * * GUILD_ROLE_CREATE\n * * GUILD_ROLE_DELETE\n * * GUILD_ROLE_UPDATE\n * * GUILD_BAN_ADD\n * * GUILD_BAN_REMOVE\n * * CHANNEL_CREATE\n * * CHANNEL_DELETE\n * * CHANNEL_UPDATE\n * * CHANNEL_PINS_UPDATE\n * * MESSAGE_CREATE\n * * MESSAGE_DELETE\n * * MESSAGE_UPDATE\n * * MESSAGE_DELETE_BULK\n * * MESSAGE_REACTION_ADD\n * * MESSAGE_REACTION_REMOVE\n * * MESSAGE_REACTION_REMOVE_ALL\n * * USER_UPDATE\n * * USER_NOTE_UPDATE\n * * USER_SETTINGS_UPDATE\n * * PRESENCE_UPDATE\n * * VOICE_STATE_UPDATE\n * * TYPING_START\n * * VOICE_SERVER_UPDATE\n * * RELATIONSHIP_ADD\n * * RELATIONSHIP_REMOVE\n * * WEBHOOKS_UPDATE\n * @typedef {string} WSEventType\n */\nexports.WSEvents = {\n  READY: 'READY',\n  RESUMED: 'RESUMED',\n  GUILD_SYNC: 'GUILD_SYNC',\n  GUILD_CREATE: 'GUILD_CREATE',\n  GUILD_DELETE: 'GUILD_DELETE',\n  GUILD_UPDATE: 'GUILD_UPDATE',\n  GUILD_MEMBER_ADD: 'GUILD_MEMBER_ADD',\n  GUILD_MEMBER_REMOVE: 'GUILD_MEMBER_REMOVE',\n  GUILD_MEMBER_UPDATE: 'GUILD_MEMBER_UPDATE',\n  GUILD_MEMBERS_CHUNK: 'GUILD_MEMBERS_CHUNK',\n  GUILD_INTEGRATIONS_UPDATE: 'GUILD_INTEGRATIONS_UPDATE',\n  GUILD_ROLE_CREATE: 'GUILD_ROLE_CREATE',\n  GUILD_ROLE_DELETE: 'GUILD_ROLE_DELETE',\n  GUILD_ROLE_UPDATE: 'GUILD_ROLE_UPDATE',\n  GUILD_BAN_ADD: 'GUILD_BAN_ADD',\n  GUILD_BAN_REMOVE: 'GUILD_BAN_REMOVE',\n  GUILD_EMOJIS_UPDATE: 'GUILD_EMOJIS_UPDATE',\n  CHANNEL_CREATE: 'CHANNEL_CREATE',\n  CHANNEL_DELETE: 'CHANNEL_DELETE',\n  CHANNEL_UPDATE: 'CHANNEL_UPDATE',\n  CHANNEL_PINS_UPDATE: 'CHANNEL_PINS_UPDATE',\n  MESSAGE_CREATE: 'MESSAGE_CREATE',\n  MESSAGE_DELETE: 'MESSAGE_DELETE',\n  MESSAGE_UPDATE: 'MESSAGE_UPDATE',\n  MESSAGE_DELETE_BULK: 'MESSAGE_DELETE_BULK',\n  MESSAGE_REACTION_ADD: 'MESSAGE_REACTION_ADD',\n  MESSAGE_REACTION_REMOVE: 'MESSAGE_REACTION_REMOVE',\n  MESSAGE_REACTION_REMOVE_ALL: 'MESSAGE_REACTION_REMOVE_ALL',\n  USER_UPDATE: 'USER_UPDATE',\n  USER_NOTE_UPDATE: 'USER_NOTE_UPDATE',\n  USER_SETTINGS_UPDATE: 'USER_SETTINGS_UPDATE',\n  USER_GUILD_SETTINGS_UPDATE: 'USER_GUILD_SETTINGS_UPDATE',\n  PRESENCE_UPDATE: 'PRESENCE_UPDATE',\n  VOICE_STATE_UPDATE: 'VOICE_STATE_UPDATE',\n  TYPING_START: 'TYPING_START',\n  VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE',\n  RELATIONSHIP_ADD: 'RELATIONSHIP_ADD',\n  RELATIONSHIP_REMOVE: 'RELATIONSHIP_REMOVE',\n  WEBHOOKS_UPDATE: 'WEBHOOKS_UPDATE',\n};\n\n/**\n * The type of a message, e.g. `DEFAULT`. Here are the available types:\n * * DEFAULT\n * * RECIPIENT_ADD\n * * RECIPIENT_REMOVE\n * * CALL\n * * CHANNEL_NAME_CHANGE\n * * CHANNEL_ICON_CHANGE\n * * PINS_ADD\n * * GUILD_MEMBER_JOIN\n * @typedef {string} MessageType\n */\nexports.MessageTypes = [\n  'DEFAULT',\n  'RECIPIENT_ADD',\n  'RECIPIENT_REMOVE',\n  'CALL',\n  'CHANNEL_NAME_CHANGE',\n  'CHANNEL_ICON_CHANGE',\n  'PINS_ADD',\n  'GUILD_MEMBER_JOIN',\n];\n\n/**\n * The type of a message notification setting. Here are the available types:\n * * EVERYTHING\n * * MENTIONS\n * * NOTHING\n * * INHERIT (only for GuildChannel)\n * @typedef {string} MessageNotificationType\n */\nexports.MessageNotificationTypes = [\n  'EVERYTHING',\n  'MENTIONS',\n  'NOTHING',\n  'INHERIT',\n];\n\nexports.DefaultAvatars = {\n  BLURPLE: '6debd47ed13483642cf09e832ed0bc1b',\n  GREY: '322c936a8c8be1b803cd94861bdfa868',\n  GREEN: 'dd4dbc0016779df1378e7812eabaa04d',\n  ORANGE: '0e291f67c9274a1abdddeb3fd919cbaa',\n  RED: '1cbd08c76f8af6dddce02c5138971129',\n};\n\nexports.ExplicitContentFilterTypes = [\n  'DISABLED',\n  'NON_FRIENDS',\n  'FRIENDS_AND_NON_FRIENDS',\n];\n\nexports.UserSettingsMap = {\n  /**\n   * Automatically convert emoticons in your messages to emoji\n   * For example, when you type `:-)` Discord will convert it to 😃\n   * @name ClientUserSettings#convertEmoticons\n   * @type {boolean}\n   */\n  convert_emoticons: 'convertEmoticons',\n\n  /**\n   * If new guilds should automatically disable DMs between you and its members\n   * @name ClientUserSettings#defaultGuildsRestricted\n   * @type {boolean}\n   */\n  default_guilds_restricted: 'defaultGuildsRestricted',\n\n  /**\n   * Automatically detect accounts from services like Steam and Blizzard when you open the Discord client\n   * @name ClientUserSettings#detectPlatformAccounts\n   * @type {boolean}\n   */\n  detect_platform_accounts: 'detectPlatformAccounts',\n\n  /**\n   * Developer Mode exposes context menu items helpful for people writing bots using the Discord API\n   * @name ClientUserSettings#developerMode\n   * @type {boolean}\n   */\n  developer_mode: 'developerMode',\n\n  /**\n   * Allow playback and usage of the `/tts` command\n   * @name ClientUserSettings#enableTTSCommand\n   * @type {boolean}\n   */\n  enable_tts_command: 'enableTTSCommand',\n\n  /**\n   * The theme of the client. Either `light` or `dark`\n   * @name ClientUserSettings#theme\n   * @type {string}\n   */\n  theme: 'theme',\n\n  /**\n   * Last status set in the client\n   * @name ClientUserSettings#status\n   * @type {PresenceStatus}\n   */\n  status: 'status',\n\n  /**\n   * Display currently running game as status message\n   * @name ClientUserSettings#showCurrentGame\n   * @type {boolean}\n   */\n  show_current_game: 'showCurrentGame',\n\n  /**\n   * Display images, videos, and lolcats when uploaded directly to Discord\n   * @name ClientUserSettings#inlineAttachmentMedia\n   * @type {boolean}\n   */\n  inline_attachment_media: 'inlineAttachmentMedia',\n\n  /**\n   * Display images, videos, and lolcats when uploaded posted as links in chat\n   * @name ClientUserSettings#inlineEmbedMedia\n   * @type {boolean}\n   */\n  inline_embed_media: 'inlineEmbedMedia',\n\n  /**\n   * Language the Discord client will use, as an RFC 3066 language identifier\n   * @name ClientUserSettings#locale\n   * @type {string}\n   */\n  locale: 'locale',\n\n  /**\n   * Display messages in compact mode\n   * @name ClientUserSettings#messageDisplayCompact\n   * @type {boolean}\n   */\n  message_display_compact: 'messageDisplayCompact',\n\n  /**\n   * Show emoji reactions on messages\n   * @name ClientUserSettings#renderReactions\n   * @type {boolean}\n   */\n  render_reactions: 'renderReactions',\n\n  /**\n   * Array of snowflake IDs for guilds, in the order they appear in the Discord client\n   * @name ClientUserSettings#guildPositions\n   * @type {Snowflake[]}\n   */\n  guild_positions: 'guildPositions',\n\n  /**\n   * Array of snowflake IDs for guilds which you will not recieve DMs from\n   * @name ClientUserSettings#restrictedGuilds\n   * @type {Snowflake[]}\n   */\n  restricted_guilds: 'restrictedGuilds',\n\n  explicit_content_filter: function explicitContentFilter(type) { // eslint-disable-line func-name-matching\n    /**\n     * Safe direct messaging; force people's messages with images to be scanned before they are sent to you.\n     * One of `DISABLED`, `NON_FRIENDS`, `FRIENDS_AND_NON_FRIENDS`\n     * @name ClientUserSettings#explicitContentFilter\n     * @type {string}\n     */\n    return exports.ExplicitContentFilterTypes[type];\n  },\n  friend_source_flags: function friendSources(flags) { // eslint-disable-line func-name-matching\n    /**\n     * Who can add you as a friend\n     * @name ClientUserSettings#friendSources\n     * @type {Object}\n     * @property {boolean} all Mutual friends and mutual guilds\n     * @property {boolean} mutualGuilds Only mutual guilds\n     * @property {boolean} mutualFriends Only mutual friends\n     */\n    return {\n      all: flags.all || false,\n      mutualGuilds: flags.all ? true : flags.mutual_guilds || false,\n      mutualFriends: flags.all ? true : flags.mutualFriends || false,\n    };\n  },\n};\n\nexports.UserGuildSettingsMap = {\n  message_notifications: function messageNotifications(type) { // eslint-disable-line func-name-matching\n    /**\n     * The type of message that should notify you\n     * @name ClientUserGuildSettings#messageNotifications\n     * @type {MessageNotificationType}\n     */\n    return exports.MessageNotificationTypes[type];\n  },\n  /**\n   * Whether to receive mobile push notifications\n   * @name ClientUserGuildSettings#mobilePush\n   * @type {boolean}\n   */\n  mobile_push: 'mobilePush',\n  /**\n   * Whether the guild is muted\n   * @name ClientUserGuildSettings#muted\n   * @type {boolean}\n   */\n  muted: 'muted',\n  /**\n   * Whether to suppress everyone mention\n   * @name ClientUserGuildSettings#suppressEveryone\n   * @type {boolean}\n   */\n  suppress_everyone: 'suppressEveryone',\n  /**\n   * A collection containing all the channel overrides\n   * @name ClientUserGuildSettings#channelOverrides\n   * @type {Collection<ClientUserChannelOverride>}\n   */\n  channel_overrides: 'channelOverrides',\n};\n\nexports.UserChannelOverrideMap = {\n  message_notifications: function messageNotifications(type) { // eslint-disable-line func-name-matching\n    /**\n     * The type of message that should notify you\n     * @name ClientUserChannelOverride#messageNotifications\n     * @type {MessageNotificationType}\n     */\n    return exports.MessageNotificationTypes[type];\n  },\n  /**\n   * Whether the channel is muted\n   * @name ClientUserChannelOverride#muted\n   * @type {boolean}\n   */\n  muted: 'muted',\n};\n\nexports.Colors = {\n  DEFAULT: 0x000000,\n  WHITE: 0xFFFFFF,\n  AQUA: 0x1ABC9C,\n  GREEN: 0x2ECC71,\n  BLUE: 0x3498DB,\n  PURPLE: 0x9B59B6,\n  LUMINOUS_VIVID_PINK: 0xE91E63,\n  GOLD: 0xF1C40F,\n  ORANGE: 0xE67E22,\n  RED: 0xE74C3C,\n  GREY: 0x95A5A6,\n  NAVY: 0x34495E,\n  DARK_AQUA: 0x11806A,\n  DARK_GREEN: 0x1F8B4C,\n  DARK_BLUE: 0x206694,\n  DARK_PURPLE: 0x71368A,\n  DARK_VIVID_PINK: 0xAD1457,\n  DARK_GOLD: 0xC27C0E,\n  DARK_ORANGE: 0xA84300,\n  DARK_RED: 0x992D22,\n  DARK_GREY: 0x979C9F,\n  DARKER_GREY: 0x7F8C8D,\n  LIGHT_GREY: 0xBCC0C0,\n  DARK_NAVY: 0x2C3E50,\n  BLURPLE: 0x7289DA,\n  GREYPLE: 0x99AAB5,\n  DARK_BUT_NOT_BLACK: 0x2C2F33,\n  NOT_QUITE_BLACK: 0x23272A,\n};\n\n/**\n * An error encountered while performing an API request. Here are the potential errors:\n * * UNKNOWN_ACCOUNT\n * * UNKNOWN_APPLICATION\n * * UNKNOWN_CHANNEL\n * * UNKNOWN_GUILD\n * * UNKNOWN_INTEGRATION\n * * UNKNOWN_INVITE\n * * UNKNOWN_MEMBER\n * * UNKNOWN_MESSAGE\n * * UNKNOWN_OVERWRITE\n * * UNKNOWN_PROVIDER\n * * UNKNOWN_ROLE\n * * UNKNOWN_TOKEN\n * * UNKNOWN_USER\n * * UNKNOWN_EMOJI\n * * UNKNOWN_WEBHOOK\n * * BOT_PROHIBITED_ENDPOINT\n * * BOT_ONLY_ENDPOINT\n * * MAXIMUM_GUILDS\n * * MAXIMUM_FRIENDS\n * * MAXIMUM_PINS\n * * MAXIMUM_ROLES\n * * MAXIMUM_REACTIONS\n * * UNAUTHORIZED\n * * MISSING_ACCESS\n * * INVALID_ACCOUNT_TYPE\n * * CANNOT_EXECUTE_ON_DM\n * * EMBED_DISABLED\n * * CANNOT_EDIT_MESSAGE_BY_OTHER\n * * CANNOT_SEND_EMPTY_MESSAGE\n * * CANNOT_MESSAGE_USER\n * * CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL\n * * CHANNEL_VERIFICATION_LEVEL_TOO_HIGH\n * * OAUTH2_APPLICATION_BOT_ABSENT\n * * MAXIMUM_OAUTH2_APPLICATIONS\n * * INVALID_OAUTH_STATE\n * * MISSING_PERMISSIONS\n * * INVALID_AUTHENTICATION_TOKEN\n * * NOTE_TOO_LONG\n * * INVALID_BULK_DELETE_QUANTITY\n * * CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL\n * * INVALID_OR_TAKEN_INVITE_CODE\n * * CANNOT_EXECUTE_ON_SYSTEM_MESSAGE\n * * BULK_DELETE_MESSAGE_TOO_OLD\n * * INVITE_ACCEPTED_TO_GUILD_NOT_CONTANING_BOT\n * * REACTION_BLOCKED\n * @typedef {string} APIError\n */\nexports.APIErrors = {\n  UNKNOWN_ACCOUNT: 10001,\n  UNKNOWN_APPLICATION: 10002,\n  UNKNOWN_CHANNEL: 10003,\n  UNKNOWN_GUILD: 10004,\n  UNKNOWN_INTEGRATION: 10005,\n  UNKNOWN_INVITE: 10006,\n  UNKNOWN_MEMBER: 10007,\n  UNKNOWN_MESSAGE: 10008,\n  UNKNOWN_OVERWRITE: 10009,\n  UNKNOWN_PROVIDER: 10010,\n  UNKNOWN_ROLE: 10011,\n  UNKNOWN_TOKEN: 10012,\n  UNKNOWN_USER: 10013,\n  UNKNOWN_EMOJI: 10014,\n  UNKNOWN_WEBHOOK: 10015,\n  BOT_PROHIBITED_ENDPOINT: 20001,\n  BOT_ONLY_ENDPOINT: 20002,\n  MAXIMUM_GUILDS: 30001,\n  MAXIMUM_FRIENDS: 30002,\n  MAXIMUM_PINS: 30003,\n  MAXIMUM_ROLES: 30005,\n  MAXIMUM_REACTIONS: 30010,\n  UNAUTHORIZED: 40001,\n  MISSING_ACCESS: 50001,\n  INVALID_ACCOUNT_TYPE: 50002,\n  CANNOT_EXECUTE_ON_DM: 50003,\n  EMBED_DISABLED: 50004,\n  CANNOT_EDIT_MESSAGE_BY_OTHER: 50005,\n  CANNOT_SEND_EMPTY_MESSAGE: 50006,\n  CANNOT_MESSAGE_USER: 50007,\n  CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL: 50008,\n  CHANNEL_VERIFICATION_LEVEL_TOO_HIGH: 50009,\n  OAUTH2_APPLICATION_BOT_ABSENT: 50010,\n  MAXIMUM_OAUTH2_APPLICATIONS: 50011,\n  INVALID_OAUTH_STATE: 50012,\n  MISSING_PERMISSIONS: 50013,\n  INVALID_AUTHENTICATION_TOKEN: 50014,\n  NOTE_TOO_LONG: 50015,\n  INVALID_BULK_DELETE_QUANTITY: 50016,\n  CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019,\n  INVALID_OR_TAKEN_INVITE_CODE: 50020,\n  CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021,\n  BULK_DELETE_MESSAGE_TOO_OLD: 50034,\n  INVITE_ACCEPTED_TO_GUILD_NOT_CONTANING_BOT: 50036,\n  REACTION_BLOCKED: 90001,\n};\n\n/**\n * The value set for a guild's default message notifications, e.g. `ALL`. Here are the available types:\n * * ALL\n * * MENTIONS\n * @typedef {string} DefaultMessageNotifications\n */\nexports.DefaultMessageNotifications = [\n  'ALL',\n  'MENTIONS',\n];\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./src/util/Constants.js?");

/***/ }),

/***/ "./src/util/Permissions.js":
/*!*********************************!*\
  !*** ./src/util/Permissions.js ***!
  \*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Constants = __webpack_require__(/*! ../util/Constants */ \"./src/util/Constants.js\");\nconst util = __webpack_require__(/*! util */ \"./node_modules/util/util.js\");\n\n/**\n * Data structure that makes it easy to interact with a permission bitfield. All {@link GuildMember}s have a set of\n * permissions in their guild, and each channel in the guild may also have {@link PermissionOverwrites} for the member\n * that override their default permissions.\n */\nclass Permissions {\n  /**\n   * @param {GuildMember} [member] Member the permissions are for **(deprecated)**\n   * @param {number|PermissionResolvable} permissions Permissions or bitfield to read from\n   */\n  constructor(member, permissions) {\n    permissions = typeof member === 'object' && !(member instanceof Array) ? permissions : member;\n\n    /**\n     * Member the permissions are for\n     * @type {GuildMember}\n     * @deprecated\n     */\n    this._member = typeof member === 'object' ? member : null;\n\n    /**\n     * Bitfield of the packed permissions\n     * @type {number}\n     */\n    this.bitfield = typeof permissions === 'number' ? permissions : this.constructor.resolve(permissions);\n  }\n\n  get member() {\n    return this._member;\n  }\n\n  set member(value) {\n    this._member = value;\n  }\n\n  /**\n   * Bitfield of the packed permissions\n   * @type {number}\n   * @see {@link Permissions#bitfield}\n   * @deprecated\n   * @readonly\n   */\n  get raw() {\n    return this.bitfield;\n  }\n\n  set raw(raw) {\n    this.bitfield = raw;\n  }\n\n  /**\n   * Checks whether the bitfield has a permission, or multiple permissions.\n   * @param {PermissionResolvable} permission Permission(s) to check for\n   * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override\n   * @returns {boolean}\n   */\n  has(permission, checkAdmin = true) {\n    if (permission instanceof Array) return permission.every(p => this.has(p, checkAdmin));\n    permission = this.constructor.resolve(permission);\n    if (checkAdmin && (this.bitfield & this.constructor.FLAGS.ADMINISTRATOR) > 0) return true;\n    return (this.bitfield & permission) === permission;\n  }\n\n  /**\n   * Gets all given permissions that are missing from the bitfield.\n   * @param {PermissionResolvable} permissions Permissions to check for\n   * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override\n   * @returns {PermissionResolvable}\n   */\n  missing(permissions, checkAdmin = true) {\n    if (!(permissions instanceof Array)) permissions = [permissions];\n    return permissions.filter(p => !this.has(p, checkAdmin));\n  }\n\n  /**\n   * Adds permissions to this one, creating a new instance to represent the new bitfield.\n   * @param {...PermissionResolvable} permissions Permissions to add\n   * @returns {Permissions}\n   */\n  add(...permissions) {\n    let total = 0;\n    for (let p = permissions.length - 1; p >= 0; p--) {\n      const perm = this.constructor.resolve(permissions[p]);\n      total |= perm;\n    }\n    if (Object.isFrozen(this)) return new this.constructor(this.bitfield | total);\n    this.bitfield |= total;\n    return this;\n  }\n\n  /**\n   * Removes permissions to this one, creating a new instance to represent the new bitfield.\n   * @param {...PermissionResolvable} permissions Permissions to remove\n   * @returns {Permissions}\n   */\n  remove(...permissions) {\n    let total = 0;\n    for (let p = permissions.length - 1; p >= 0; p--) {\n      const perm = this.constructor.resolve(permissions[p]);\n      total |= perm;\n    }\n    if (Object.isFrozen(this)) return new this.constructor(this.bitfield & ~total);\n    this.bitfield &= ~total;\n    return this;\n  }\n\n  /**\n   * Gets an object mapping permission name (like `VIEW_CHANNEL`) to a {@link boolean} indicating whether the\n   * permission is available.\n   * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override\n   * @returns {Object}\n   */\n  serialize(checkAdmin = true) {\n    const serialized = {};\n    for (const perm in this.constructor.FLAGS) serialized[perm] = this.has(perm, checkAdmin);\n    return serialized;\n  }\n\n  /**\n   * Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.\n   * @param {PermissionResolvable} permission The permission to check for\n   * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permission\n   * @returns {boolean}\n   * @see {@link Permissions#has}\n   * @deprecated\n   */\n  hasPermission(permission, explicit = false) {\n    return this.has(permission, !explicit);\n  }\n\n  /**\n   * Checks whether the user has all specified permissions.\n   * @param {PermissionResolvable} permissions The permissions to check for\n   * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permissions\n   * @returns {boolean}\n   * @see {@link Permissions#has}\n   * @deprecated\n   */\n  hasPermissions(permissions, explicit = false) {\n    return this.has(permissions, !explicit);\n  }\n\n  /**\n   * Checks whether the user has all specified permissions, and lists any missing permissions.\n   * @param {PermissionResolvable} permissions The permissions to check for\n   * @param {boolean} [explicit=false] Whether to require the user to explicitly have the exact permissions\n   * @returns {PermissionResolvable}\n   * @see {@link Permissions#missing}\n   * @deprecated\n   */\n  missingPermissions(permissions, explicit = false) {\n    return this.missing(permissions, !explicit);\n  }\n\n  /**\n   * Gets an {@link Array} of permission names (such as `VIEW_CHANNEL`) based on the permissions available.\n   * @param {boolean} [checkAdmin=true] Whether to allow the administrator permission to override\n   * @returns {string[]}\n   */\n  toArray(checkAdmin = true) {\n    return Object.keys(this.constructor.FLAGS).filter(perm => this.has(perm, checkAdmin));\n  }\n\n  /**\n   * Freezes these permissions, making them immutable.\n   * @returns {Permissions} These permissions\n   */\n  freeze() {\n    return Object.freeze(this);\n  }\n\n  valueOf() {\n    return this.bitfield;\n  }\n\n  /**\n   * Data that can be resolved to give a permission number. This can be:\n   * * A string (see {@link Permissions.FLAGS})\n   * * A permission number\n   * @typedef {string|number|Permissions|PermissionResolvable[]} PermissionResolvable\n   */\n\n  /**\n   * Resolves permissions to their numeric form.\n   * @param {PermissionResolvable} permission - Permission(s) to resolve\n   * @returns {number}\n   */\n  static resolve(permission) {\n    if (permission instanceof Array) return permission.map(p => this.resolve(p)).reduce((prev, p) => prev | p, 0);\n    if (permission instanceof Permissions) return permission.bitfield;\n    if (typeof permission === 'string') permission = this.FLAGS[permission];\n    if (typeof permission !== 'number' || permission < 0) throw new RangeError(Constants.Errors.NOT_A_PERMISSION);\n    return permission;\n  }\n}\n\n/**\n * Numeric permission flags. All available properties:\n * - `ADMINISTRATOR` (implicitly has *all* permissions, and bypasses all channel overwrites)\n * - `CREATE_INSTANT_INVITE` (create invitations to the guild)\n * - `KICK_MEMBERS`\n * - `BAN_MEMBERS`\n * - `MANAGE_CHANNELS` (edit and reorder channels)\n * - `MANAGE_GUILD` (edit the guild information, region, etc.)\n * - `ADD_REACTIONS` (add new reactions to messages)\n * - `VIEW_AUDIT_LOG`\n * - `PRIORITY_SPEAKER`\n * - `VIEW_CHANNEL`\n * - `READ_MESSAGES` **(deprecated)**\n * - `SEND_MESSAGES`\n * - `SEND_TTS_MESSAGES`\n * - `MANAGE_MESSAGES` (delete messages and reactions)\n * - `EMBED_LINKS` (links posted will have a preview embedded)\n * - `ATTACH_FILES`\n * - `READ_MESSAGE_HISTORY` (view messages that were posted prior to opening Discord)\n * - `MENTION_EVERYONE`\n * - `USE_EXTERNAL_EMOJIS` (use emojis from different guilds)\n * - `EXTERNAL_EMOJIS` **(deprecated)**\n * - `CONNECT` (connect to a voice channel)\n * - `SPEAK` (speak in a voice channel)\n * - `MUTE_MEMBERS` (mute members across all voice channels)\n * - `DEAFEN_MEMBERS` (deafen members across all voice channels)\n * - `MOVE_MEMBERS` (move members between voice channels)\n * - `USE_VAD` (use voice activity detection)\n * - `CHANGE_NICKNAME`\n * - `MANAGE_NICKNAMES` (change other members' nicknames)\n * - `MANAGE_ROLES`\n * - `MANAGE_ROLES_OR_PERMISSIONS` **(deprecated)**\n * - `MANAGE_WEBHOOKS`\n * - `MANAGE_EMOJIS`\n * @type {Object}\n * @see {@link https://discordapp.com/developers/docs/topics/permissions}\n */\nPermissions.FLAGS = {\n  CREATE_INSTANT_INVITE: 1 << 0,\n  KICK_MEMBERS: 1 << 1,\n  BAN_MEMBERS: 1 << 2,\n  ADMINISTRATOR: 1 << 3,\n  MANAGE_CHANNELS: 1 << 4,\n  MANAGE_GUILD: 1 << 5,\n  ADD_REACTIONS: 1 << 6,\n  VIEW_AUDIT_LOG: 1 << 7,\n  PRIORITY_SPEAKER: 1 << 8,\n\n  VIEW_CHANNEL: 1 << 10,\n  READ_MESSAGES: 1 << 10,\n  SEND_MESSAGES: 1 << 11,\n  SEND_TTS_MESSAGES: 1 << 12,\n  MANAGE_MESSAGES: 1 << 13,\n  EMBED_LINKS: 1 << 14,\n  ATTACH_FILES: 1 << 15,\n  READ_MESSAGE_HISTORY: 1 << 16,\n  MENTION_EVERYONE: 1 << 17,\n  EXTERNAL_EMOJIS: 1 << 18,\n  USE_EXTERNAL_EMOJIS: 1 << 18,\n\n  CONNECT: 1 << 20,\n  SPEAK: 1 << 21,\n  MUTE_MEMBERS: 1 << 22,\n  DEAFEN_MEMBERS: 1 << 23,\n  MOVE_MEMBERS: 1 << 24,\n  USE_VAD: 1 << 25,\n\n  CHANGE_NICKNAME: 1 << 26,\n  MANAGE_NICKNAMES: 1 << 27,\n  MANAGE_ROLES: 1 << 28,\n  MANAGE_ROLES_OR_PERMISSIONS: 1 << 28,\n  MANAGE_WEBHOOKS: 1 << 29,\n  MANAGE_EMOJIS: 1 << 30,\n};\n\n/**\n * Bitfield representing every permission combined\n * @type {number}\n */\nPermissions.ALL = Object.keys(Permissions.FLAGS).reduce((all, p) => all | Permissions.FLAGS[p], 0);\n\n/**\n * Bitfield representing the default permissions for users\n * @type {number}\n */\nPermissions.DEFAULT = 104324097;\n\n/**\n * @class EvaluatedPermissions\n * @classdesc The final evaluated permissions for a member in a channel\n * @see {@link Permissions}\n * @deprecated\n */\n\nPermissions.prototype.hasPermission = util.deprecate(Permissions.prototype.hasPermission,\n  'EvaluatedPermissions#hasPermission is deprecated, use Permissions#has instead');\nPermissions.prototype.hasPermissions = util.deprecate(Permissions.prototype.hasPermissions,\n  'EvaluatedPermissions#hasPermissions is deprecated, use Permissions#has instead');\nPermissions.prototype.missingPermissions = util.deprecate(Permissions.prototype.missingPermissions,\n  'EvaluatedPermissions#missingPermissions is deprecated, use Permissions#missing instead');\nObject.defineProperty(Permissions.prototype, 'member', {\n  get: util\n    .deprecate(Object.getOwnPropertyDescriptor(Permissions.prototype, 'member').get,\n      'EvaluatedPermissions#member is deprecated'),\n});\n\nmodule.exports = Permissions;\n\n\n//# sourceURL=webpack:///./src/util/Permissions.js?");

/***/ }),

/***/ "./src/util/Snowflake.js":
/*!*******************************!*\
  !*** ./src/util/Snowflake.js ***!
  \*******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("const Long = __webpack_require__(/*! long */ \"./node_modules/long/src/long.js\");\n\n// Discord epoch (2015-01-01T00:00:00.000Z)\nconst EPOCH = 1420070400000;\nlet INCREMENT = 0;\n\n/**\n * A container for useful snowflake-related methods.\n */\nclass SnowflakeUtil {\n  constructor() {\n    throw new Error(`The ${this.constructor.name} class may not be instantiated.`);\n  }\n\n  /**\n   * A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n   * ```\n   * If we have a snowflake '266241948824764416' we can represent it as binary:\n   *\n   * 64                                          22     17     12          0\n   *  000000111011000111100001101001000101000000  00001  00000  000000000000\n   *       number of ms since Discord epoch       worker  pid    increment\n   * ```\n   * @typedef {string} Snowflake\n   */\n\n  /**\n   * Generates a Discord snowflake.\n   * <info>This hardcodes the worker ID as 1 and the process ID as 0.</info>\n   * @param {number|Date} [timestamp=Date.now()] Timestamp or date of the snowflake to generate\n   * @returns {Snowflake} The generated snowflake\n   */\n  static generate(timestamp = Date.now()) {\n    if (timestamp instanceof Date) timestamp = timestamp.getTime();\n    if (typeof timestamp !== 'number' || isNaN(timestamp)) {\n      throw new TypeError(\n        `\"timestamp\" argument must be a number (received ${isNaN(timestamp) ? 'NaN' : typeof timestamp})`\n      );\n    }\n    if (INCREMENT >= 4095) INCREMENT = 0;\n    const BINARY = `${pad((timestamp - EPOCH).toString(2), 42)}0000100000${pad((INCREMENT++).toString(2), 12)}`;\n    return Long.fromString(BINARY, 2).toString();\n  }\n\n  /**\n   * A deconstructed snowflake.\n   * @typedef {Object} DeconstructedSnowflake\n   * @property {number} timestamp Timestamp the snowflake was created\n   * @property {Date} date Date the snowflake was created\n   * @property {number} workerID Worker ID in the snowflake\n   * @property {number} processID Process ID in the snowflake\n   * @property {number} increment Increment in the snowflake\n   * @property {string} binary Binary representation of the snowflake\n   */\n\n  /**\n   * Deconstructs a Discord snowflake.\n   * @param {Snowflake} snowflake Snowflake to deconstruct\n   * @returns {DeconstructedSnowflake} Deconstructed snowflake\n   */\n  static deconstruct(snowflake) {\n    const BINARY = pad(Long.fromString(snowflake).toString(2), 64);\n    const res = {\n      timestamp: parseInt(BINARY.substring(0, 42), 2) + EPOCH,\n      workerID: parseInt(BINARY.substring(42, 47), 2),\n      processID: parseInt(BINARY.substring(47, 52), 2),\n      increment: parseInt(BINARY.substring(52, 64), 2),\n      binary: BINARY,\n    };\n    Object.defineProperty(res, 'date', {\n      get: function get() { return new Date(this.timestamp); },\n      enumerable: true,\n    });\n    return res;\n  }\n}\n\nfunction pad(v, n, c = '0') {\n  return String(v).length >= n ? String(v) : (String(c).repeat(n) + v).slice(-n);\n}\n\nmodule.exports = SnowflakeUtil;\n\n\n//# sourceURL=webpack:///./src/util/Snowflake.js?");

/***/ }),

/***/ "./src/util/Util.js":
/*!**************************!*\
  !*** ./src/util/Util.js ***!
  \**************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(Buffer) {const snekfetch = __webpack_require__(/*! snekfetch */ \"./node_modules/snekfetch/esm.mjs\");\nconst Constants = __webpack_require__(/*! ./Constants */ \"./src/util/Constants.js\");\nconst ConstantsHttp = Constants.DefaultOptions.http;\n\n/**\n * Contains various general-purpose utility methods. These functions are also available on the base `Discord` object.\n */\nclass Util {\n  constructor() {\n    throw new Error(`The ${this.constructor.name} class may not be instantiated.`);\n  }\n\n  /**\n   * Splits a string into multiple chunks at a designated character that do not exceed a specific length.\n   * @param {string} text Content to split\n   * @param {SplitOptions} [options] Options controlling the behaviour of the split\n   * @returns {string|string[]}\n   */\n  static splitMessage(text, { maxLength = 1950, char = '\\n', prepend = '', append = '' } = {}) {\n    if (text.length <= maxLength) return text;\n    const splitText = text.split(char);\n    if (splitText.some(chunk => chunk.length > maxLength)) {\n      throw new Error('Message exceeds the max length and contains no split characters.');\n    }\n    const messages = [''];\n    let msg = 0;\n    for (let i = 0; i < splitText.length; i++) {\n      if (messages[msg].length + splitText[i].length + 1 > maxLength) {\n        messages[msg] += append;\n        messages.push(prepend);\n        msg++;\n      }\n      messages[msg] += (messages[msg].length > 0 && messages[msg] !== prepend ? char : '') + splitText[i];\n    }\n    return messages;\n  }\n\n  /**\n   * Escapes any Discord-flavour markdown in a string.\n   * @param {string} text Content to escape\n   * @param {boolean} [onlyCodeBlock=false] Whether to only escape codeblocks (takes priority)\n   * @param {boolean} [onlyInlineCode=false] Whether to only escape inline code\n   * @returns {string}\n   */\n  static escapeMarkdown(text, onlyCodeBlock = false, onlyInlineCode = false) {\n    if (onlyCodeBlock) return text.replace(/```/g, '`\\u200b``');\n    if (onlyInlineCode) return text.replace(/\\\\(`|\\\\)/g, '$1').replace(/(`|\\\\)/g, '\\\\$1');\n    return text.replace(/\\\\(\\*|_|`|~|\\\\)/g, '$1').replace(/(\\*|_|`|~|\\\\)/g, '\\\\$1');\n  }\n\n  /**\n   * Gets the recommended shard count from Discord.\n   * @param {string} token Discord auth token\n   * @param {number} [guildsPerShard=1000] Number of guilds per shard\n   * @returns {Promise<number>} The recommended number of shards\n   */\n  static fetchRecommendedShards(token, guildsPerShard = 1000) {\n    return new Promise((resolve, reject) => {\n      if (!token) throw new Error('A token must be provided.');\n      snekfetch.get(`${ConstantsHttp.host}/api/v${ConstantsHttp.version}${Constants.Endpoints.gateway.bot}`)\n        .set('Authorization', `Bot ${token.replace(/^Bot\\s*/i, '')}`)\n        .end((err, res) => {\n          if (err) reject(err);\n          resolve(res.body.shards * (1000 / guildsPerShard));\n        });\n    });\n  }\n\n  /**\n   * Parses emoji info out of a string. The string must be one of:\n   * * A UTF-8 emoji (no ID)\n   * * A URL-encoded UTF-8 emoji (no ID)\n   * * A Discord custom emoji (`<:name:id>` or `<a:name:id>`)\n   * @param {string} text Emoji string to parse\n   * @returns {?Object} Object with `animated`, `name`, and `id` properties\n   * @private\n   */\n  static parseEmoji(text) {\n    if (text.includes('%')) text = decodeURIComponent(text);\n    if (!text.includes(':')) return { animated: false, name: text, id: null };\n    const m = text.match(/<?(a:)?(\\w{2,32}):(\\d{17,19})>?/);\n    if (!m) return null;\n    return { animated: Boolean(m[1]), name: m[2], id: m[3] };\n  }\n\n  /**\n   * Checks whether the arrays are equal, also removes duplicated entries from b.\n   * @param {Array<*>} a Array which will not be modified.\n   * @param {Array<*>} b Array to remove duplicated entries from.\n   * @returns {boolean} Whether the arrays are equal.\n   * @private\n   */\n  static arraysEqual(a, b) {\n    if (a === b) return true;\n    if (a.length !== b.length) return false;\n\n    for (const item of a) {\n      const ind = b.indexOf(item);\n      if (ind !== -1) b.splice(ind, 1);\n    }\n\n    return b.length === 0;\n  }\n\n  /**\n   * Shallow-copies an object with its class/prototype intact.\n   * @param {Object} obj Object to clone\n   * @returns {Object}\n   * @private\n   */\n  static cloneObject(obj) {\n    return Object.assign(Object.create(obj), obj);\n  }\n\n  /**\n   * Sets default properties on an object that aren't already specified.\n   * @param {Object} def Default properties\n   * @param {Object} given Object to assign defaults to\n   * @returns {Object}\n   * @private\n   */\n  static mergeDefault(def, given) {\n    if (!given) return def;\n    for (const key in def) {\n      if (!{}.hasOwnProperty.call(given, key)) {\n        given[key] = def[key];\n      } else if (given[key] === Object(given[key])) {\n        given[key] = this.mergeDefault(def[key], given[key]);\n      }\n    }\n\n    return given;\n  }\n\n  /**\n   * Converts an ArrayBuffer or string to a Buffer.\n   * @param {ArrayBuffer|string} ab ArrayBuffer to convert\n   * @returns {Buffer}\n   * @private\n   */\n  static convertToBuffer(ab) {\n    if (typeof ab === 'string') ab = this.str2ab(ab);\n    return Buffer.from(ab);\n  }\n\n  /**\n   * Converts a string to an ArrayBuffer.\n   * @param {string} str String to convert\n   * @returns {ArrayBuffer}\n   * @private\n   */\n  static str2ab(str) {\n    const buffer = new ArrayBuffer(str.length * 2);\n    const view = new Uint16Array(buffer);\n    for (var i = 0, strLen = str.length; i < strLen; i++) view[i] = str.charCodeAt(i);\n    return buffer;\n  }\n\n  /**\n   * Makes an Error from a plain info object.\n   * @param {Object} obj Error info\n   * @param {string} obj.name Error type\n   * @param {string} obj.message Message for the error\n   * @param {string} obj.stack Stack for the error\n   * @returns {Error}\n   * @private\n   */\n  static makeError(obj) {\n    const err = new Error(obj.message);\n    err.name = obj.name;\n    err.stack = obj.stack;\n    return err;\n  }\n\n  /**\n   * Makes a plain error info object from an Error.\n   * @param {Error} err Error to get info from\n   * @returns {Object}\n   * @private\n   */\n  static makePlainError(err) {\n    const obj = {};\n    obj.name = err.name;\n    obj.message = err.message;\n    obj.stack = err.stack;\n    return obj;\n  }\n\n  /**\n   * Moves an element in an array *in place*.\n   * @param {Array<*>} array Array to modify\n   * @param {*} element Element to move\n   * @param {number} newIndex Index or offset to move the element to\n   * @param {boolean} [offset=false] Move the element by an offset amount rather than to a set index\n   * @returns {number}\n   * @private\n   */\n  static moveElementInArray(array, element, newIndex, offset = false) {\n    const index = array.indexOf(element);\n    newIndex = (offset ? index : 0) + newIndex;\n    if (newIndex > -1 && newIndex < array.length) {\n      const removedElement = array.splice(index, 1)[0];\n      array.splice(newIndex, 0, removedElement);\n    }\n    return array.indexOf(element);\n  }\n\n  /**\n   * Creates a Promise that resolves after a specified duration.\n   * @param {number} ms How long to wait before resolving (in milliseconds)\n   * @returns {Promise<void>}\n   * @private\n   */\n  static delayFor(ms) {\n    return new Promise(resolve => {\n      setTimeout(resolve, ms);\n    });\n  }\n}\n\nmodule.exports = Util;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node_modules/buffer/index.js */ \"./node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack:///./src/util/Util.js?");

/***/ }),

/***/ 0:
/*!************************!*\
  !*** ./node (ignored) ***!
  \************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///./node_(ignored)?");

/***/ }),

/***/ 1:
/*!*************************!*\
  !*** erlpack (ignored) ***!
  \*************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///erlpack_(ignored)?");

/***/ }),

/***/ 2:
/*!********************************!*\
  !*** @discordjs/uws (ignored) ***!
  \********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///@discordjs/uws_(ignored)?");

/***/ }),

/***/ 3:
/*!********************!*\
  !*** ws (ignored) ***!
  \********************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///ws_(ignored)?");

/***/ }),

/***/ 4:
/*!********************************************!*\
  !*** ./voice/ClientVoiceManager (ignored) ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///./voice/ClientVoiceManager_(ignored)?");

/***/ }),

/***/ 5:
/*!*********************************************!*\
  !*** ../sharding/ShardClientUtil (ignored) ***!
  \*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///../sharding/ShardClientUtil_(ignored)?");

/***/ }),

/***/ 6:
/*!****************************************!*\
  !*** ./voice/VoiceBroadcast (ignored) ***!
  \****************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///./voice/VoiceBroadcast_(ignored)?");

/***/ }),

/***/ 7:
/*!**********************************!*\
  !*** ./sharding/Shard (ignored) ***!
  \**********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///./sharding/Shard_(ignored)?");

/***/ }),

/***/ 8:
/*!********************************************!*\
  !*** ./sharding/ShardClientUtil (ignored) ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///./sharding/ShardClientUtil_(ignored)?");

/***/ }),

/***/ 9:
/*!********************************************!*\
  !*** ./sharding/ShardingManager (ignored) ***!
  \********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {

eval("/* (ignored) */\n\n//# sourceURL=webpack:///./sharding/ShardingManager_(ignored)?");

/***/ })

/******/ });