>>22,s=a}s>>>=22,e.words[n-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},p.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function e(t){if(S[t])return S[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new b;else if("p192"===t)e=new m;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return S[t]=e,e},g.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},g.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},g.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},g.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},g.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},g.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},g.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},g.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},g.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},g.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},g.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},g.prototype.isqr=function(e){return this.imul(e,e.clone())},g.prototype.sqr=function(e){return this.mul(e,e)},g.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var i=this.m.add(new s(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),a=0;!n.isZero()&&0===n.andln(1);)a++,n.iushrn(1);r(!n.isZero());var o=new s(1).toRed(this),f=o.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new s(2*c*c).toRed(this);0!==this.pow(c,h).cmp(f);)c.redIAdd(f);for(var l=this.pow(c,n),u=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),p=a;0!==d.cmp(o);){for(var b=d,m=0;0!==b.cmp(o);m++)b=b.redSqr();r(m=0;n--){for(var c=t.words[n],l=h-1;l>=0;l--){var u=c>>l&1;a!==r[0]&&(a=this.sqr(a)),0!==u||0!==o?(o<<=1,o|=u,f++,(f===i||0===n&&0===l)&&(a=this.mul(a,r[o]),f=0,o=0)):f=0}h=26}return a},g.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},g.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new v(e)},n(v,g),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},v.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},v.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):n.cmpn(0)<0&&(a=n.iadd(this.m)),a._forceRed(this)},v.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}("undefined"==typeof e||e,this)}).call(t,i(117)(e))},function(e,t){function i(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function n(e){if(c===setTimeout)return setTimeout(e,0);if((c===i||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function s(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){b&&d&&(b=!1,d.length?p=d.concat(p):m=-1,p.length&&o())}function o(){if(!b){var e=n(a);b=!0;for(var t=p.length;t;){for(d=p,p=[];++m1)for(var i=1;i=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),b(i)?r.showHidden=i:i&&t._extend(r,i),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),f(r,e,r.depth)}function s(e,t){var i=n.styles[t];return i?"["+n.colors[i][0]+"m"+e+"["+n.colors[i][1]+"m":e}function a(e,t){return e}function o(e){var t={};return e.forEach(function(e,i){t[e]=!0}),t}function f(e,i,r){if(e.customInspect&&i&&M(i.inspect)&&i.inspect!==t.inspect&&(!i.constructor||i.constructor.prototype!==i)){var n=i.inspect(r,e);return v(n)||(n=f(e,n,r)),n}var s=h(e,i);if(s)return s;var a=Object.keys(i),b=o(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(i)),S(i)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(i);if(0===a.length){if(M(i)){var m=i.name?": "+i.name:"";return e.stylize("[Function"+m+"]","special")}if(k(i))return e.stylize(RegExp.prototype.toString.call(i),"regexp");if(A(i))return e.stylize(Date.prototype.toString.call(i),"date");if(S(i))return c(i)}var w="",g=!1,_=["{","}"];if(p(i)&&(g=!0,_=["[","]"]),M(i)){var y=i.name?": "+i.name:"";w=" [Function"+y+"]"}if(k(i)&&(w=" "+RegExp.prototype.toString.call(i)),A(i)&&(w=" "+Date.prototype.toUTCString.call(i)),S(i)&&(w=" "+c(i)),0===a.length&&(!g||0==i.length))return _[0]+w+_[1];if(r<0)return k(i)?e.stylize(RegExp.prototype.toString.call(i),"regexp"):e.stylize("[Object]","special");e.seen.push(i);var E;return E=g?l(e,i,r,b,a):a.map(function(t){return u(e,i,r,b,t,g)}),e.seen.pop(),d(E,w,_)}function h(e,t){if(y(t))return e.stylize("undefined","undefined");if(v(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}return g(t)?e.stylize(""+t,"number"):b(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,i,r,n){for(var s=[],a=0,o=t.length;a-1&&(o=s?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),y(a)){if(s&&n.match(/^\d+$/))return o;a=JSON.stringify(""+n),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+o}function d(e,t,i){var r=0,n=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+i[1]:i[0]+t+" "+e.join(", ")+" "+i[1]}function p(e){return Array.isArray(e)}function b(e){return"boolean"==typeof e}function m(e){return null===e}function w(e){return null==e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function _(e){return"symbol"==typeof e}function y(e){return void 0===e}function k(e){return E(e)&&"[object RegExp]"===R(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===R(e)}function S(e){return E(e)&&("[object Error]"===R(e)||e instanceof Error)}function M(e){return"function"==typeof e}function T(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function R(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}function C(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),D[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],i=0;i=s)return e;switch(e){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch(e){return"[Circular]"}default:return e}}),o=r[i];i`}sendMessage(){}sendTTSMessage(){}sendFile(){}sendCode(){}}r.applyToClass(a),e.exports=a},function(e,t){class i{constructor(e={}){this.status=e.status||"offline",this.game=e.game?new r(e.game):null}update(e){this.status=e.status||this.status,this.game=e.game?new r(e.game):null}equals(e){return e&&this.status===e.status&&this.game?this.game.equals(e.game):!e.game}}class r{constructor(e){this.name=e.name,this.type=e.type,this.url=e.url||null}get streaming(){return 1===this.type}equals(e){return e&&this.name===e.name&&this.type===e.type&&this.url===e.url}}t.Presence=i,t.Game=r},function(e,t,i){var r=t;r.utils=i(195),r.common=i(191),r.sha=i(194),r.ripemd=i(193),r.hmac=i(192),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,i){(function(e){function i(e,t){for(var i=0,r=e.length-1;r>=0;r--){var n=e[r];"."===n?e.splice(r,1):".."===n?(e.splice(r,1),i++):i&&(e.splice(r,1),i--)}if(t)for(;i--;i)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var i=[],r=0;r=-1&&!n;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,n="/"===a.charAt(0))}return t=i(r(t.split("/"),function(e){return!!e}),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),s="/"===a(e,-1);return e=i(r(e.split("/"),function(e){return!!e}),!n).join("/"),e||n||(e="."),e&&s&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,i){function r(e){for(var t=0;t=0&&""===e[i];i--);return t>i?[]:e.slice(t,i-t+1)}e=t.resolve(e).substr(1),i=t.resolve(i).substr(1);for(var n=r(e.split("/")),s=r(i.split("/")),a=Math.min(n.length,s.length),o=a,f=0;f=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var i=this._update(this._block)||this._hash();return e?i.toString(e):i},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i}).call(t,i(0).Buffer)},function(e,t){class i{constructor(e,t){this.client=e,Object.defineProperty(this,"client",{enumerable:!1,configurable:!1}),this.type=null,t&&this.setup(t)}setup(e){this.id=e.id}get createdTimestamp(){return this.id/4194304+14200704e5}get createdAt(){return new Date(this.createdTimestamp)}delete(){return this.client.rest.methods.deleteChannel(this)}}e.exports=i},function(e,t,i){const r=i(2),n=i(6);class s{constructor(e,t){this.client=e.client,Object.defineProperty(this,"client",{enumerable:!1,configurable:!1}),this.guild=e,this.setup(t)}setup(e){this.id=e.id,this.name=e.name,this.requiresColons=e.require_colons,this.managed=e.managed,this._roles=e.roles}get createdTimestamp(){return this.id/4194304+14200704e5}get createdAt(){return new Date(this.createdTimestamp)}get roles(){const e=new n;for(const t of this._roles)this.guild.roles.has(t)&&e.set(t,this.guild.roles.get(t));return e}get url(){return`${r.Endpoints.CDN}/emojis/${this.id}.png`}toString(){return this.requiresColons?`<:${this.name}:${this.id}>`:this.name}get identifier(){return this.id?`${this.name}:${this.id}`:encodeURIComponent(this.name)}}e.exports=s},function(e,t,i){const r=i(2);class n{constructor(e,t){this.client=e.client,Object.defineProperty(this,"client",{enumerable:!1,configurable:!1}),this.guild=e,t&&this.setup(t)}setup(e){this.id=e.id,this.name=e.name,this.color=e.color,this.hoist=e.hoist,this.position=e.position,this.permissions=e.permissions,this.managed=e.managed,this.mentionable=e.mentionable}get createdTimestamp(){return this.id/4194304+14200704e5}get createdAt(){return new Date(this.createdTimestamp)}get hexColor(){let e=this.color.toString(16);for(;e.length<6;)e=`0${e}`;return`#${e}`}get members(){return this.guild.members.filter(e=>e.roles.has(this.id))}serialize(){const e={};for(const t in r.PermissionFlags)e[t]=this.hasPermission(t);return e}hasPermission(e,t=false){
-return e=this.client.resolver.resolvePermission(e),!t&&(this.permissions&r.PermissionFlags.ADMINISTRATOR)>0||(this.permissions&e)>0}hasPermissions(e,t=false){return e.every(e=>this.hasPermission(e,t))}comparePositionTo(e){return this.constructor.comparePositions(this,e)}edit(e){return this.client.rest.methods.updateGuildRole(this,e)}setName(e){return this.edit({name:e})}setColor(e){return this.edit({color:e})}setHoist(e){return this.edit({hoist:e})}setPosition(e){return this.guild.setRolePosition(this,e)}setPermissions(e){return this.edit({permissions:e})}setMentionable(e){return this.edit({mentionable:e})}delete(){return this.client.rest.methods.deleteGuildRole(this)}get editable(){if(this.managed)return!1;const e=this.guild.member(this.client.user);return!!e.hasPermission(r.PermissionFlags.MANAGE_ROLES_OR_PERMISSIONS)&&e.highestRole.comparePositionTo(this)>0}equals(e){return e&&this.id===e.id&&this.name===e.name&&this.color===e.color&&this.hoist===e.hoist&&this.position===e.position&&this.permissions===e.permissions&&this.managed===e.managed}toString(){return`<@&${this.id}>`}static comparePositions(e,t){return e.position===t.position?t.id-e.id:e.position-t.position}}e.exports=n},function(e,t,i){var r=t;r.Reporter=i(141).Reporter,r.DecoderBuffer=i(80).DecoderBuffer,r.EncoderBuffer=i(80).EncoderBuffer,r.Node=i(140)},function(e,t,i){(function(t){e.exports=function(e,i){for(var r=Math.min(e.length,i.length),n=new t(r),s=0;s65536)throw new Error("requested too many random bytes");var s=new t.Uint8Array(e);e>0&&a.getRandomValues(s);var o=new i(s.buffer);return"function"==typeof n?r.nextTick(function(){n(null,o)}):o}var a=t.crypto||t.msCrypto;a&&a.getRandomValues?e.exports=s:e.exports=n}).call(t,i(16),i(0).Buffer,i(5))},function(e,t,i){function r(e,t){Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(h.prototype,t))}const n=i(14),s=i(44),a=i(69),o=i(6),f=i(31);class h{constructor(){this.messages=new o,this.lastMessageID=null}sendMessage(e,t={}){return this.client.rest.methods.sendMessage(this,e,t)}sendTTSMessage(e,t={}){return Object.assign(t,{tts:!0}),this.client.rest.methods.sendMessage(this,e,t)}sendFile(e,t,i,r={}){return t||(t="string"==typeof e?n.basename(e):e&&e.path?n.basename(e.path):"file.jpg"),this.client.resolver.resolveBuffer(e).then(e=>this.client.rest.methods.sendMessage(this,i,r,{file:e,name:t}))}sendCode(e,t,i={}){return i.split&&("object"!=typeof i.split&&(i.split={}),i.split.prepend||(i.split.prepend=`\`\`\`${e||""}
+!function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,t,i){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=340)}([function(e,t,i){"use strict";(function(e,r){function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function s(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,i){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function m(t){return+t!=t&&(t=0),e.alloc(+t)}function w(t,i){if(e.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(i){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return V(t).length;i=(""+i).toLowerCase(),n=!0}}function g(e,t,i){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if(i>>>=0,t>>>=0,i<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,i);case"utf8":case"utf-8":return R(this,t,i);case"ascii":return C(this,t,i);case"latin1":case"binary":return P(this,t,i);case"base64":return x(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function _(t,i,r,n,s){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=s?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(s)return-1;r=t.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof i&&(i=e.from(i,n)),e.isBuffer(i))return 0===i.length?-1:y(t,i,r,n,s);if("number"==typeof i)return i&=255,e.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(t,i,r):Uint8Array.prototype.lastIndexOf.call(t,i,r):y(t,[i],r,n,s);throw new TypeError("val must be string, number or Buffer")}function y(e,t,i,r,n){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,f=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,f/=2,i/=2}var h;if(n){var c=-1;for(h=i;ho&&(i=o-f),h=i;h>=0;h--){for(var l=!0,u=0;un&&(r=n)):r=n;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var a=0;a239?4:s>223?3:s>191?2:1;if(n+o<=i){var f,h,c,l;switch(o){case 1:s<128&&(a=s);break;case 2:f=e[n+1],128===(192&f)&&(l=(31&s)<<6|63&f,l>127&&(a=l));break;case 3:f=e[n+1],h=e[n+2],128===(192&f)&&128===(192&h)&&(l=(15&s)<<12|(63&f)<<6|63&h,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:f=e[n+1],h=e[n+2],c=e[n+3],128===(192&f)&&128===(192&h)&&128===(192&c)&&(l=(15&s)<<18|(63&f)<<12|(63&h)<<6|63&c,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),n+=o}return I(r)}function I(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var i="",r=0;rr)&&(i=r);for(var n="",s=t;si)throw new RangeError("Trying to access beyond buffer length")}function L(t,i,r,n,s,a){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>s||it.length)throw new RangeError("Index out of range")}function B(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,s=Math.min(e.length-i,2);n>>8*(r?n:1-n)}function U(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,s=Math.min(e.length-i,4);n>>8*(r?n:3-n)&255}function j(e,t,i,r,n,s){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function F(e,t,i,r,n){return n||j(e,t,i,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(e,t,i,r,23,4),i+4}function z(e,t,i,r,n){return n||j(e,t,i,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(e,t,i,r,52,8),i+8}function q(e){if(e=H(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function H(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function G(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var i,r=e.length,n=null,s=[],a=0;a55295&&i<57344){if(!n){if(i>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&s.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&s.push(239,191,189),n=i;continue}i=(n-55296<<10|i-56320)+65536}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;s.push(i)}else if(i<2048){if((t-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function W(e){for(var t=[],i=0;i>8,n=i%256,s.push(n),s.push(r);return s}function Y(e){return X.toByteArray(q(e))}function Z(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function $(e){return e!==e}var X=i(150),J=i(200),Q=i(106);t.Buffer=e,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,e.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:n(),t.kMaxLength=s(),e.poolSize=8192,e._augment=function(t){return t.__proto__=e.prototype,t},e.from=function(e,t,i){return o(null,e,t,i)},e.TYPED_ARRAY_SUPPORT&&(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0})),e.alloc=function(e,t,i){return h(null,e,t,i)},e.allocUnsafe=function(e){return c(null,e)},e.allocUnsafeSlow=function(e){return c(null,e)},e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,i){if(!e.isBuffer(t)||!e.isBuffer(i))throw new TypeError("Arguments must be Buffers");if(t===i)return 0;for(var r=t.length,n=i.length,s=0,a=Math.min(r,n);s0&&(e=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(e+=" ... ")),""},e.prototype.compare=function(t,i,r,n,s){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===i&&(i=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),i<0||r>t.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&i>=r)return 0;if(n>=s)return-1;if(i>=r)return 1;if(i>>>=0,r>>>=0,n>>>=0,s>>>=0,this===t)return 0;for(var a=s-n,o=r-i,f=Math.min(a,o),h=this.slice(n,s),c=t.slice(i,r),l=0;ln)&&(i=n),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return k(this,e,t,i);case"utf8":case"utf-8":return E(this,e,t,i);case"ascii":return A(this,e,t,i);case"latin1":case"binary":return S(this,e,t,i);case"base64":return M(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,i);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;e.prototype.slice=function(t,i){var r=this.length;t=~~t,i=void 0===i?r:~~i,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),i<0?(i+=r,i<0&&(i=0)):i>r&&(i=r),i0&&(n*=256);)r+=this[e+--t]*n;return r},e.prototype.readUInt8=function(e,t){return t||D(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||D(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||D(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,i){e|=0,t|=0,i||D(e,t,this.length);for(var r=this[e],n=1,s=0;++s=n&&(r-=Math.pow(2,8*t)),r},e.prototype.readIntBE=function(e,t,i){e|=0,t|=0,i||D(e,t,this.length);for(var r=t,n=1,s=this[e+--r];r>0&&(n*=256);)s+=this[e+--r]*n;return n*=128,s>=n&&(s-=Math.pow(2,8*t)),s},e.prototype.readInt8=function(e,t){return t||D(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},e.prototype.readInt16LE=function(e,t){t||D(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},e.prototype.readInt16BE=function(e,t){t||D(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},e.prototype.readInt32LE=function(e,t){return t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||D(e,4,this.length),J.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||D(e,4,this.length),J.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||D(e,8,this.length),J.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||D(e,8,this.length),J.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,i,r){if(e=+e,t|=0,i|=0,!r){var n=Math.pow(2,8*i)-1;L(this,e,t,i,n,0)}var s=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+s]=e/a&255;return t+i},e.prototype.writeUInt8=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[i]=255&t,i+1},e.prototype.writeUInt16LE=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[i]=255&t,this[i+1]=t>>>8):B(this,t,i,!0),i+2},e.prototype.writeUInt16BE=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[i]=t>>>8,this[i+1]=255&t):B(this,t,i,!1),i+2},e.prototype.writeUInt32LE=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=255&t):U(this,t,i,!0),i+4},e.prototype.writeUInt32BE=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t):U(this,t,i,!1),i+4},e.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);L(this,e,t,i,n-1,-n)}var s=0,a=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+i},e.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);L(this,e,t,i,n-1,-n)}var s=i-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+i},e.prototype.writeInt8=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[i]=255&t,i+1},e.prototype.writeInt16LE=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[i]=255&t,this[i+1]=t>>>8):B(this,t,i,!0),i+2},e.prototype.writeInt16BE=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[i]=t>>>8,this[i+1]=255&t):B(this,t,i,!1),i+2},e.prototype.writeInt32LE=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[i]=255&t,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24):U(this,t,i,!0),i+4},e.prototype.writeInt32BE=function(t,i,r){return t=+t,i|=0,r||L(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t):U(this,t,i,!1),i+4},e.prototype.writeFloatLE=function(e,t,i){return F(this,e,t,!0,i)},e.prototype.writeFloatBE=function(e,t,i){return F(this,e,t,!1,i)},e.prototype.writeDoubleLE=function(e,t,i){return z(this,e,t,!0,i)},e.prototype.writeDoubleBE=function(e,t,i){return z(this,e,t,!1,i)},e.prototype.copy=function(t,i,r,n){if(r||(r=0),n||0===n||(n=this.length),i>=t.length&&(i=t.length),i||(i=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-i=0;--s)t[s+i]=this[s+r];else if(a<1e3||!e.TYPED_ARRAY_SUPPORT)for(s=0;s>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var a;if("number"==typeof t)for(a=i;a`${n}/invite/${e}`,inviteLink:e=>`https://discord.gg/${e}`,CDN:"https://cdn.discordapp.com",user:e=>`${n}/users/${e}`,userChannels:e=>`${s.user(e)}/channels`,userProfile:e=>`${s.user(e)}/profile`,avatar:(e,t)=>"1"===e?t:`${s.user(e)}/avatars/${t}.jpg`,me:`${n}/users/@me`,meGuild:e=>`${s.me}/guilds/${e}`,relationships:e=>`${s.user(e)}/relationships`,note:e=>`${s.me}/notes/${e}`,guilds:`${n}/guilds`,guild:e=>`${s.guilds}/${e}`,guildIcon:(e,t)=>`${s.guild(e)}/icons/${t}.jpg`,guildPrune:e=>`${s.guild(e)}/prune`,guildEmbed:e=>`${s.guild(e)}/embed`,guildInvites:e=>`${s.guild(e)}/invites`,guildRoles:e=>`${s.guild(e)}/roles`,guildRole:(e,t)=>`${s.guildRoles(e)}/${t}`,guildBans:e=>`${s.guild(e)}/bans`,guildIntegrations:e=>`${s.guild(e)}/integrations`,guildMembers:e=>`${s.guild(e)}/members`,guildMember:(e,t)=>`${s.guildMembers(e)}/${t}`,stupidInconsistentGuildEndpoint:e=>`${s.guildMember(e,"@me")}/nick`,guildChannels:e=>`${s.guild(e)}/channels`,guildEmojis:e=>`${s.guild(e)}/emojis`,channels:`${n}/channels`,channel:e=>`${s.channels}/${e}`,channelMessages:e=>`${s.channel(e)}/messages`,channelInvites:e=>`${s.channel(e)}/invites`,channelTyping:e=>`${s.channel(e)}/typing`,channelPermissions:e=>`${s.channel(e)}/permissions`,channelMessage:(e,t)=>`${s.channelMessages(e)}/${t}`,channelWebhooks:e=>`${s.channel(e)}/webhooks`,messageReactions:(e,t)=>`${s.channelMessage(e,t)}/reactions`,messageReaction:(e,t,i,r)=>`${s.messageReactions(e,t)}/${i}`+`${r?`?limit=${r}`:""}`,selfMessageReaction:(e,t,i,r)=>`${s.messageReaction(e,t,i,r)}/@me`,userMessageReaction:(e,t,i,r,n)=>`${s.messageReaction(e,t,i,r)}/${n}`,webhook:(e,t)=>`${n}/webhooks/${e}${t?`/${t}`:""}`,myApplication:`${n}/oauth2/applications/@me`,getApp:e=>`${n}/oauth2/authorize?client_id=${e}`};t.Status={READY:0,CONNECTING:1,RECONNECTING:2,IDLE:3,NEARLY:4},t.ChannelTypes={text:0,DM:1,voice:2,groupDM:3},t.OPCodes={DISPATCH:0,HEARTBEAT:1,IDENTIFY:2,STATUS_UPDATE:3,VOICE_STATE_UPDATE:4,VOICE_GUILD_PING:5,RESUME:6,RECONNECT:7,REQUEST_GUILD_MEMBERS:8,INVALID_SESSION:9,HELLO:10,HEARTBEAT_ACK:11},t.VoiceOPCodes={IDENTIFY:0,SELECT_PROTOCOL:1,READY:2,HEARTBEAT:3,SESSION_DESCRIPTION:4,SPEAKING:5},t.Events={READY:"ready",GUILD_CREATE:"guildCreate",GUILD_DELETE:"guildDelete",GUILD_UPDATE:"guildUpdate",GUILD_UNAVAILABLE:"guildUnavailable",GUILD_AVAILABLE:"guildAvailable",GUILD_MEMBER_ADD:"guildMemberAdd",GUILD_MEMBER_REMOVE:"guildMemberRemove",GUILD_MEMBER_UPDATE:"guildMemberUpdate",GUILD_MEMBER_AVAILABLE:"guildMemberAvailable",GUILD_MEMBER_SPEAKING:"guildMemberSpeaking",GUILD_MEMBERS_CHUNK:"guildMembersChunk",GUILD_ROLE_CREATE:"roleCreate",GUILD_ROLE_DELETE:"roleDelete",GUILD_ROLE_UPDATE:"roleUpdate",GUILD_EMOJI_CREATE:"guildEmojiCreate",GUILD_EMOJI_DELETE:"guildEmojiDelete",GUILD_EMOJI_UPDATE:"guildEmojiUpdate",GUILD_BAN_ADD:"guildBanAdd",GUILD_BAN_REMOVE:"guildBanRemove",CHANNEL_CREATE:"channelCreate",CHANNEL_DELETE:"channelDelete",CHANNEL_UPDATE:"channelUpdate",CHANNEL_PINS_UPDATE:"channelPinsUpdate",MESSAGE_CREATE:"message",MESSAGE_DELETE:"messageDelete",MESSAGE_UPDATE:"messageUpdate",MESSAGE_BULK_DELETE:"messageDeleteBulk",MESSAGE_REACTION_ADD:"messageReactionAdd",MESSAGE_REACTION_REMOVE:"messageReactionRemove",MESSAGE_REACTION_REMOVE_ALL:"messageReactionRemoveAll",USER_UPDATE:"userUpdate",USER_NOTE_UPDATE:"userNoteUpdate",PRESENCE_UPDATE:"presenceUpdate",VOICE_STATE_UPDATE:"voiceStateUpdate",TYPING_START:"typingStart",TYPING_STOP:"typingStop",DISCONNECT:"disconnect",RECONNECTING:"reconnecting",ERROR:"error",WARN:"warn",DEBUG:"debug"},t.WSEvents={READY:"READY",GUILD_SYNC:"GUILD_SYNC",GUILD_CREATE:"GUILD_CREATE",GUILD_DELETE:"GUILD_DELETE",GUILD_UPDATE:"GUILD_UPDATE",GUILD_MEMBER_ADD:"GUILD_MEMBER_ADD",GUILD_MEMBER_REMOVE:"GUILD_MEMBER_REMOVE",GUILD_MEMBER_UPDATE:"GUILD_MEMBER_UPDATE",GUILD_MEMBERS_CHUNK:"GUILD_MEMBERS_CHUNK",GUILD_ROLE_CREATE:"GUILD_ROLE_CREATE",GUILD_ROLE_DELETE:"GUILD_ROLE_DELETE",GUILD_ROLE_UPDATE:"GUILD_ROLE_UPDATE",GUILD_BAN_ADD:"GUILD_BAN_ADD",GUILD_BAN_REMOVE:"GUILD_BAN_REMOVE",CHANNEL_CREATE:"CHANNEL_CREATE",CHANNEL_DELETE:"CHANNEL_DELETE",CHANNEL_UPDATE:"CHANNEL_UPDATE",CHANNEL_PINS_UPDATE:"CHANNEL_PINS_UPDATE",MESSAGE_CREATE:"MESSAGE_CREATE",MESSAGE_DELETE:"MESSAGE_DELETE",MESSAGE_UPDATE:"MESSAGE_UPDATE",MESSAGE_DELETE_BULK:"MESSAGE_DELETE_BULK",MESSAGE_REACTION_ADD:"MESSAGE_REACTION_ADD",MESSAGE_REACTION_REMOVE:"MESSAGE_REACTION_REMOVE",MESSAGE_REACTION_REMOVE_ALL:"MESSAGE_REACTION_REMOVE_ALL",USER_UPDATE:"USER_UPDATE",USER_NOTE_UPDATE:"USER_NOTE_UPDATE",PRESENCE_UPDATE:"PRESENCE_UPDATE",VOICE_STATE_UPDATE:"VOICE_STATE_UPDATE",TYPING_START:"TYPING_START",FRIEND_ADD:"RELATIONSHIP_ADD",FRIEND_REMOVE:"RELATIONSHIP_REMOVE",VOICE_SERVER_UPDATE:"VOICE_SERVER_UPDATE",RELATIONSHIP_ADD:"RELATIONSHIP_ADD",RELATIONSHIP_REMOVE:"RELATIONSHIP_REMOVE"},t.MessageTypes={0:"DEFAULT",1:"RECIPIENT_ADD",2:"RECIPIENT_REMOVE",3:"CALL",4:"CHANNEL_NAME_CHANGE",5:"CHANNEL_ICON_CHANGE",6:"PINS_ADD"};const a=t.PermissionFlags={CREATE_INSTANT_INVITE:1,KICK_MEMBERS:2,BAN_MEMBERS:4,ADMINISTRATOR:8,MANAGE_CHANNELS:16,MANAGE_GUILD:32,ADD_REACTIONS:64,READ_MESSAGES:1024,SEND_MESSAGES:2048,SEND_TTS_MESSAGES:4096,MANAGE_MESSAGES:8192,EMBED_LINKS:16384,ATTACH_FILES:32768,READ_MESSAGE_HISTORY:65536,MENTION_EVERYONE:1<<17,EXTERNAL_EMOJIS:1<<18,CONNECT:1<<20,SPEAK:1<<21,MUTE_MEMBERS:1<<22,DEAFEN_MEMBERS:1<<23,MOVE_MEMBERS:1<<24,USE_VAD:1<<25,CHANGE_NICKNAME:1<<26,MANAGE_NICKNAMES:1<<27,MANAGE_ROLES_OR_PERMISSIONS:1<<28,MANAGE_WEBHOOKS:1<<29,MANAGE_EMOJIS:1<<30};let o=0;for(const f in a)o|=a[f];t.ALL_PERMISSIONS=o,t.DEFAULT_PERMISSIONS=104324097}).call(t,i(8))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}},function(e,t){class i{constructor(e){this.packetManager=e}handle(e){return e}}e.exports=i},function(e,t){class i{constructor(e){this.client=e}handle(e){return e}}e.exports=i},function(e,t){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!n(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,i,n,o,f,h;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(i=this._events[e],a(i))return!1;if(r(i))switch(arguments.length){case 1:i.call(this);break;case 2:i.call(this,arguments[1]);break;case 3:i.call(this,arguments[1],arguments[2]);break;default:o=Array.prototype.slice.call(arguments,1),i.apply(this,o)}else if(s(i))for(o=Array.prototype.slice.call(arguments,1),h=i.slice(),n=h.length,f=0;f0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var n=!1;return i.listener=t,this.on(e,i),this},i.prototype.removeListener=function(e,t){var i,n,a,o;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=this._events[e],a=i.length,n=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(i)){for(o=a;o-- >0;)if(i[o]===t||i[o].listener&&i[o].listener===t){n=o;break}if(n<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,i;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i=this._events[e],r(i))this.removeListener(e,i);else if(i)for(;i.length;)this.removeListener(e,i[i.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){class i extends Map{constructor(e){super(e),this._array=null,this._keyArray=null}set(e,t){super.set(e,t),this._array=null,this._keyArray=null}delete(e){super.delete(e),this._array=null,this._keyArray=null}array(){return this._array&&this._array.length===this.size||(this._array=Array.from(this.values())),this._array}keyArray(){return this._keyArray&&this._keyArray.length===this.size||(this._keyArray=Array.from(this.keys())),this._keyArray}first(){return this.values().next().value}firstKey(){return this.keys().next().value}last(){const e=this.array();return e[e.length-1]}lastKey(){const e=this.keyArray();return e[e.length-1]}random(){const e=this.array();return e[Math.floor(Math.random()*e.length)];
+}randomKey(){const e=this.keyArray();return e[Math.floor(Math.random()*e.length)]}findAll(e,t){if("string"!=typeof e)throw new TypeError("Key must be a string.");if("undefined"==typeof t)throw new Error("Value must be specified.");const i=[];for(const r of this.values())r[e]===t&&i.push(r);return i}find(e,t){if("string"==typeof e){if("undefined"==typeof t)throw new Error("Value must be specified.");if("id"===e)throw new RangeError("Don't use .find() with IDs. Instead, use .get(id).");for(const i of this.values())if(i[e]===t)return i;return null}if("function"==typeof e){for(const[t,i]of this)if(e(i,t,this))return i;return null}throw new Error("First argument must be a property string or a function.")}findKey(e,t){if("string"==typeof e){if("undefined"==typeof t)throw new Error("Value must be specified.");for(const[i,r]of this)if(r[e]===t)return i;return null}if("function"==typeof e){for(const[t,i]of this)if(e(i,t,this))return t;return null}throw new Error("First argument must be a property string or a function.")}exists(e,t){if("id"===e)throw new RangeError("Don't use .exists() with IDs. Instead, use .has(id).");return Boolean(this.find(e,t))}filter(e,t){t&&(e=e.bind(t));const r=new i;for(const[n,s]of this)e(s,n,this)&&r.set(n,s);return r}filterArray(e,t){t&&(e=e.bind(t));const i=[];for(const[r,n]of this)e(n,r,this)&&i.push(n);return i}map(e,t){t&&(e=e.bind(t));const i=new Array(this.size);let r=0;for(const[n,s]of this)i[r++]=e(s,n,this);return i}some(e,t){t&&(e=e.bind(t));for(const[i,r]of this)if(e(r,i,this))return!0;return!1}every(e,t){t&&(e=e.bind(t));for(const[i,r]of this)if(!e(r,i,this))return!1;return!0}reduce(e,t){let i=t;for(const[r,n]of this)i=e(i,n,r,this);return i}concat(...e){const t=new this.constructor;for(const[i,r]of this)t.set(i,r);for(const n of e)for(const[i,r]of n)t.set(i,r);return t}deleteAll(){const e=[];for(const t of this.values())t.delete&&e.push(t.delete());return e}}e.exports=i},function(e,t,i){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function s(e,t,i){return s.isBN(e)?e:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))))}function a(e,t,i){for(var r=0,n=Math.min(e.length,i),s=t;s=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function o(e,t,i,r){for(var n=0,s=Math.min(e.length,i),a=t;a=49?o-49+10:o>=17?o-17+10:o}return n}function f(e){for(var t=new Array(e.bitLength()),i=0;i>>n}return t}function h(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],s=0|t.words[0],a=n*s,o=67108863&a,f=a/67108864|0;i.words[0]=o;for(var h=1;h>>26,l=67108863&f,u=Math.min(h,t.length-1),d=Math.max(0,h-e.length+1);d<=u;d++){var p=h-d|0;n=0|e.words[p],s=0|t.words[d],a=n*s+l,c+=a/67108864|0,l=67108863&a}i.words[h]=0|l,f=0|c}return 0!==f?i.words[h]=0|f:i.length--,i.strip()}function c(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,s=0;s>>26)|0,n+=a>>>26,a&=67108863}i.words[s]=o,r=a,a=n}return 0!==r?i.words[s]=r:i.length--,i.strip()}function l(e,t,i){var r=new u;return r.mulp(e,t,i)}function u(e,t){this.x=e,this.y=t}function d(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){d.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){d.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function m(){d.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){d.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(e){if("string"==typeof e){var t=s._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){g.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;var _;try{_=i(0).Buffer}catch(e){}s.isBN=function(e){return e instanceof s||null!==e&&"object"==typeof e&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return e.cmp(t)>0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var n=0;"-"===e[0]&&n++,16===t?this._parseHex(e,n):this._parseBase(e,t,n),"-"===e[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),t,i)},s.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},s.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[s]|=a<>>26-o&67108863,o+=24,o>=26&&(o-=26,s++);else if("le"===i)for(n=0,s=0;n>>26-o&67108863,o+=24,o>=26&&(o-=26,s++);return this.strip()},s.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=6)n=a(e,i,i+6),this.words[r]|=n<>>26-s&4194303,s+=24,s>=26&&(s-=26,r++);i+6!==t&&(n=a(e,t,i+6),this.words[r]|=n<>>26-s&4194303),this.strip()},s.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var s=e.length-i,a=s%r,f=Math.min(s,s-a)+i,h=0,c=i;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var y=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],k=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(e,t){e=e||10,t=0|t||1;var i;if(16===e||"hex"===e){i="";for(var n=0,s=0,a=0;a>>24-n&16777215,i=0!==s||a!==this.length-1?y[6-f.length]+f+i:f+i,n+=2,n>=26&&(n-=26,a--)}for(0!==s&&(i=s.toString(16)+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var h=k[e],c=E[e];i="";var l=this.clone();for(l.negative=0;!l.isZero();){var u=l.modn(c).toString(e);l=l.idivn(c),i=l.isZero()?u+i:y[h-u.length]+u+i}for(this.isZero()&&(i="0"+i);i.length%t!==0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return r("undefined"!=typeof _),this.toArrayLike(_,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),s=i||Math.max(1,n);r(n<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var a,o,f="le"===t,h=new e(s),c=this.clone();if(f){for(o=0;!c.isZero();o++)a=c.andln(255),c.iushrn(8),h[o]=a;for(;o=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0===(8191&t)&&(i+=13,t>>>=13),0===(127&t)&&(i+=7,t>>>=7),0===(15&t)&&(i+=4,t>>>=4),0===(3&t)&&(i+=2,t>>>=2),0===(1&t)&&i++,i},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),t?this.words[i]=this.words[i]|1<e.length?(i=this,r=e):(i=e,r=this);for(var n=0,s=0;s>>26;for(;0!==n&&s>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;var r,n;i>0?(r=this,n=e):(r=e,n=this);for(var s=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==s&&a>26,this.words[a]=67108863&t;if(0===s&&a>>13,d=0|a[1],p=8191&d,b=d>>>13,m=0|a[2],w=8191&m,g=m>>>13,v=0|a[3],_=8191&v,y=v>>>13,k=0|a[4],E=8191&k,A=k>>>13,S=0|a[5],M=8191&S,T=S>>>13,x=0|a[6],R=8191&x,I=x>>>13,C=0|a[7],P=8191&C,O=C>>>13,N=0|a[8],D=8191&N,L=N>>>13,B=0|a[9],U=8191&B,j=B>>>13,F=0|o[0],z=8191&F,q=F>>>13,H=0|o[1],G=8191&H,V=H>>>13,W=0|o[2],K=8191&W,Y=W>>>13,Z=0|o[3],$=8191&Z,X=Z>>>13,J=0|o[4],Q=8191&J,ee=J>>>13,te=0|o[5],ie=8191&te,re=te>>>13,ne=0|o[6],se=8191&ne,ae=ne>>>13,oe=0|o[7],fe=8191&oe,he=oe>>>13,ce=0|o[8],le=8191&ce,ue=ce>>>13,de=0|o[9],pe=8191&de,be=de>>>13;i.negative=e.negative^t.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,q),n=n+Math.imul(u,z)|0,s=Math.imul(u,q);var me=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,z),n=Math.imul(p,q),n=n+Math.imul(b,z)|0,s=Math.imul(b,q),r=r+Math.imul(l,G)|0,n=n+Math.imul(l,V)|0,n=n+Math.imul(u,G)|0,s=s+Math.imul(u,V)|0;var we=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(w,z),n=Math.imul(w,q),n=n+Math.imul(g,z)|0,s=Math.imul(g,q),r=r+Math.imul(p,G)|0,n=n+Math.imul(p,V)|0,n=n+Math.imul(b,G)|0,s=s+Math.imul(b,V)|0,r=r+Math.imul(l,K)|0,n=n+Math.imul(l,Y)|0,n=n+Math.imul(u,K)|0,s=s+Math.imul(u,Y)|0;var ge=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(_,z),n=Math.imul(_,q),n=n+Math.imul(y,z)|0,s=Math.imul(y,q),r=r+Math.imul(w,G)|0,n=n+Math.imul(w,V)|0,n=n+Math.imul(g,G)|0,s=s+Math.imul(g,V)|0,r=r+Math.imul(p,K)|0,n=n+Math.imul(p,Y)|0,n=n+Math.imul(b,K)|0,s=s+Math.imul(b,Y)|0,r=r+Math.imul(l,$)|0,n=n+Math.imul(l,X)|0,n=n+Math.imul(u,$)|0,s=s+Math.imul(u,X)|0;var ve=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(E,z),n=Math.imul(E,q),n=n+Math.imul(A,z)|0,s=Math.imul(A,q),r=r+Math.imul(_,G)|0,n=n+Math.imul(_,V)|0,n=n+Math.imul(y,G)|0,s=s+Math.imul(y,V)|0,r=r+Math.imul(w,K)|0,n=n+Math.imul(w,Y)|0,n=n+Math.imul(g,K)|0,s=s+Math.imul(g,Y)|0,r=r+Math.imul(p,$)|0,n=n+Math.imul(p,X)|0,n=n+Math.imul(b,$)|0,s=s+Math.imul(b,X)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,ee)|0,n=n+Math.imul(u,Q)|0,s=s+Math.imul(u,ee)|0;var _e=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(M,z),n=Math.imul(M,q),n=n+Math.imul(T,z)|0,s=Math.imul(T,q),r=r+Math.imul(E,G)|0,n=n+Math.imul(E,V)|0,n=n+Math.imul(A,G)|0,s=s+Math.imul(A,V)|0,r=r+Math.imul(_,K)|0,n=n+Math.imul(_,Y)|0,n=n+Math.imul(y,K)|0,s=s+Math.imul(y,Y)|0,r=r+Math.imul(w,$)|0,n=n+Math.imul(w,X)|0,n=n+Math.imul(g,$)|0,s=s+Math.imul(g,X)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,ee)|0,n=n+Math.imul(b,Q)|0,s=s+Math.imul(b,ee)|0,r=r+Math.imul(l,ie)|0,n=n+Math.imul(l,re)|0,n=n+Math.imul(u,ie)|0,s=s+Math.imul(u,re)|0;var ye=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(R,z),n=Math.imul(R,q),n=n+Math.imul(I,z)|0,s=Math.imul(I,q),r=r+Math.imul(M,G)|0,n=n+Math.imul(M,V)|0,n=n+Math.imul(T,G)|0,s=s+Math.imul(T,V)|0,r=r+Math.imul(E,K)|0,n=n+Math.imul(E,Y)|0,n=n+Math.imul(A,K)|0,s=s+Math.imul(A,Y)|0,r=r+Math.imul(_,$)|0,n=n+Math.imul(_,X)|0,n=n+Math.imul(y,$)|0,s=s+Math.imul(y,X)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,ee)|0,n=n+Math.imul(g,Q)|0,s=s+Math.imul(g,ee)|0,r=r+Math.imul(p,ie)|0,n=n+Math.imul(p,re)|0,n=n+Math.imul(b,ie)|0,s=s+Math.imul(b,re)|0,r=r+Math.imul(l,se)|0,n=n+Math.imul(l,ae)|0,n=n+Math.imul(u,se)|0,s=s+Math.imul(u,ae)|0;var ke=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(P,z),n=Math.imul(P,q),n=n+Math.imul(O,z)|0,s=Math.imul(O,q),r=r+Math.imul(R,G)|0,n=n+Math.imul(R,V)|0,n=n+Math.imul(I,G)|0,s=s+Math.imul(I,V)|0,r=r+Math.imul(M,K)|0,n=n+Math.imul(M,Y)|0,n=n+Math.imul(T,K)|0,s=s+Math.imul(T,Y)|0,r=r+Math.imul(E,$)|0,n=n+Math.imul(E,X)|0,n=n+Math.imul(A,$)|0,s=s+Math.imul(A,X)|0,r=r+Math.imul(_,Q)|0,n=n+Math.imul(_,ee)|0,n=n+Math.imul(y,Q)|0,s=s+Math.imul(y,ee)|0,r=r+Math.imul(w,ie)|0,n=n+Math.imul(w,re)|0,n=n+Math.imul(g,ie)|0,s=s+Math.imul(g,re)|0,r=r+Math.imul(p,se)|0,n=n+Math.imul(p,ae)|0,n=n+Math.imul(b,se)|0,s=s+Math.imul(b,ae)|0,r=r+Math.imul(l,fe)|0,n=n+Math.imul(l,he)|0,n=n+Math.imul(u,fe)|0,s=s+Math.imul(u,he)|0;var Ee=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,z),n=Math.imul(D,q),n=n+Math.imul(L,z)|0,s=Math.imul(L,q),r=r+Math.imul(P,G)|0,n=n+Math.imul(P,V)|0,n=n+Math.imul(O,G)|0,s=s+Math.imul(O,V)|0,r=r+Math.imul(R,K)|0,n=n+Math.imul(R,Y)|0,n=n+Math.imul(I,K)|0,s=s+Math.imul(I,Y)|0,r=r+Math.imul(M,$)|0,n=n+Math.imul(M,X)|0,n=n+Math.imul(T,$)|0,s=s+Math.imul(T,X)|0,r=r+Math.imul(E,Q)|0,n=n+Math.imul(E,ee)|0,n=n+Math.imul(A,Q)|0,s=s+Math.imul(A,ee)|0,r=r+Math.imul(_,ie)|0,n=n+Math.imul(_,re)|0,n=n+Math.imul(y,ie)|0,s=s+Math.imul(y,re)|0,r=r+Math.imul(w,se)|0,n=n+Math.imul(w,ae)|0,n=n+Math.imul(g,se)|0,s=s+Math.imul(g,ae)|0,r=r+Math.imul(p,fe)|0,n=n+Math.imul(p,he)|0,n=n+Math.imul(b,fe)|0,s=s+Math.imul(b,he)|0,r=r+Math.imul(l,le)|0,n=n+Math.imul(l,ue)|0,n=n+Math.imul(u,le)|0,s=s+Math.imul(u,ue)|0;var Ae=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(U,z),n=Math.imul(U,q),n=n+Math.imul(j,z)|0,s=Math.imul(j,q),r=r+Math.imul(D,G)|0,n=n+Math.imul(D,V)|0,n=n+Math.imul(L,G)|0,s=s+Math.imul(L,V)|0,r=r+Math.imul(P,K)|0,n=n+Math.imul(P,Y)|0,n=n+Math.imul(O,K)|0,s=s+Math.imul(O,Y)|0,r=r+Math.imul(R,$)|0,n=n+Math.imul(R,X)|0,n=n+Math.imul(I,$)|0,s=s+Math.imul(I,X)|0,r=r+Math.imul(M,Q)|0,n=n+Math.imul(M,ee)|0,n=n+Math.imul(T,Q)|0,s=s+Math.imul(T,ee)|0,r=r+Math.imul(E,ie)|0,n=n+Math.imul(E,re)|0,n=n+Math.imul(A,ie)|0,s=s+Math.imul(A,re)|0,r=r+Math.imul(_,se)|0,n=n+Math.imul(_,ae)|0,n=n+Math.imul(y,se)|0,s=s+Math.imul(y,ae)|0,r=r+Math.imul(w,fe)|0,n=n+Math.imul(w,he)|0,n=n+Math.imul(g,fe)|0,s=s+Math.imul(g,he)|0,r=r+Math.imul(p,le)|0,n=n+Math.imul(p,ue)|0,n=n+Math.imul(b,le)|0,s=s+Math.imul(b,ue)|0,r=r+Math.imul(l,pe)|0,n=n+Math.imul(l,be)|0,n=n+Math.imul(u,pe)|0,s=s+Math.imul(u,be)|0;var Se=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(U,G),n=Math.imul(U,V),n=n+Math.imul(j,G)|0,s=Math.imul(j,V),r=r+Math.imul(D,K)|0,n=n+Math.imul(D,Y)|0,n=n+Math.imul(L,K)|0,s=s+Math.imul(L,Y)|0,r=r+Math.imul(P,$)|0,n=n+Math.imul(P,X)|0,n=n+Math.imul(O,$)|0,s=s+Math.imul(O,X)|0,r=r+Math.imul(R,Q)|0,n=n+Math.imul(R,ee)|0,n=n+Math.imul(I,Q)|0,s=s+Math.imul(I,ee)|0,r=r+Math.imul(M,ie)|0,n=n+Math.imul(M,re)|0,n=n+Math.imul(T,ie)|0,s=s+Math.imul(T,re)|0,r=r+Math.imul(E,se)|0,n=n+Math.imul(E,ae)|0,n=n+Math.imul(A,se)|0,s=s+Math.imul(A,ae)|0,r=r+Math.imul(_,fe)|0,n=n+Math.imul(_,he)|0,n=n+Math.imul(y,fe)|0,s=s+Math.imul(y,he)|0,r=r+Math.imul(w,le)|0,n=n+Math.imul(w,ue)|0,n=n+Math.imul(g,le)|0,s=s+Math.imul(g,ue)|0,r=r+Math.imul(p,pe)|0,n=n+Math.imul(p,be)|0,n=n+Math.imul(b,pe)|0,s=s+Math.imul(b,be)|0;var Me=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(U,K),n=Math.imul(U,Y),n=n+Math.imul(j,K)|0,s=Math.imul(j,Y),r=r+Math.imul(D,$)|0,n=n+Math.imul(D,X)|0,n=n+Math.imul(L,$)|0,s=s+Math.imul(L,X)|0,r=r+Math.imul(P,Q)|0,n=n+Math.imul(P,ee)|0,n=n+Math.imul(O,Q)|0,s=s+Math.imul(O,ee)|0,r=r+Math.imul(R,ie)|0,n=n+Math.imul(R,re)|0,n=n+Math.imul(I,ie)|0,s=s+Math.imul(I,re)|0,r=r+Math.imul(M,se)|0,n=n+Math.imul(M,ae)|0,n=n+Math.imul(T,se)|0,s=s+Math.imul(T,ae)|0,r=r+Math.imul(E,fe)|0,n=n+Math.imul(E,he)|0,n=n+Math.imul(A,fe)|0,s=s+Math.imul(A,he)|0,r=r+Math.imul(_,le)|0,n=n+Math.imul(_,ue)|0,n=n+Math.imul(y,le)|0,s=s+Math.imul(y,ue)|0,r=r+Math.imul(w,pe)|0,n=n+Math.imul(w,be)|0,n=n+Math.imul(g,pe)|0,s=s+Math.imul(g,be)|0;var Te=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(U,$),n=Math.imul(U,X),n=n+Math.imul(j,$)|0,s=Math.imul(j,X),r=r+Math.imul(D,Q)|0,n=n+Math.imul(D,ee)|0,n=n+Math.imul(L,Q)|0,s=s+Math.imul(L,ee)|0,r=r+Math.imul(P,ie)|0,n=n+Math.imul(P,re)|0,n=n+Math.imul(O,ie)|0,s=s+Math.imul(O,re)|0,r=r+Math.imul(R,se)|0,n=n+Math.imul(R,ae)|0,n=n+Math.imul(I,se)|0,s=s+Math.imul(I,ae)|0,r=r+Math.imul(M,fe)|0,n=n+Math.imul(M,he)|0,n=n+Math.imul(T,fe)|0,s=s+Math.imul(T,he)|0,r=r+Math.imul(E,le)|0,n=n+Math.imul(E,ue)|0,n=n+Math.imul(A,le)|0,s=s+Math.imul(A,ue)|0,r=r+Math.imul(_,pe)|0,n=n+Math.imul(_,be)|0,n=n+Math.imul(y,pe)|0,s=s+Math.imul(y,be)|0;var xe=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(U,Q),n=Math.imul(U,ee),n=n+Math.imul(j,Q)|0,s=Math.imul(j,ee),r=r+Math.imul(D,ie)|0,n=n+Math.imul(D,re)|0,n=n+Math.imul(L,ie)|0,s=s+Math.imul(L,re)|0,r=r+Math.imul(P,se)|0,n=n+Math.imul(P,ae)|0,n=n+Math.imul(O,se)|0,s=s+Math.imul(O,ae)|0,r=r+Math.imul(R,fe)|0,n=n+Math.imul(R,he)|0,n=n+Math.imul(I,fe)|0,s=s+Math.imul(I,he)|0,r=r+Math.imul(M,le)|0,n=n+Math.imul(M,ue)|0,n=n+Math.imul(T,le)|0,s=s+Math.imul(T,ue)|0,r=r+Math.imul(E,pe)|0,n=n+Math.imul(E,be)|0,n=n+Math.imul(A,pe)|0,s=s+Math.imul(A,be)|0;var Re=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(U,ie),n=Math.imul(U,re),n=n+Math.imul(j,ie)|0,s=Math.imul(j,re),r=r+Math.imul(D,se)|0,n=n+Math.imul(D,ae)|0,n=n+Math.imul(L,se)|0,s=s+Math.imul(L,ae)|0,r=r+Math.imul(P,fe)|0,n=n+Math.imul(P,he)|0,n=n+Math.imul(O,fe)|0,s=s+Math.imul(O,he)|0,r=r+Math.imul(R,le)|0,n=n+Math.imul(R,ue)|0,n=n+Math.imul(I,le)|0,s=s+Math.imul(I,ue)|0,r=r+Math.imul(M,pe)|0,n=n+Math.imul(M,be)|0,n=n+Math.imul(T,pe)|0,s=s+Math.imul(T,be)|0;var Ie=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(U,se),n=Math.imul(U,ae),n=n+Math.imul(j,se)|0,s=Math.imul(j,ae),r=r+Math.imul(D,fe)|0,n=n+Math.imul(D,he)|0,n=n+Math.imul(L,fe)|0,s=s+Math.imul(L,he)|0,r=r+Math.imul(P,le)|0,n=n+Math.imul(P,ue)|0,n=n+Math.imul(O,le)|0,s=s+Math.imul(O,ue)|0,r=r+Math.imul(R,pe)|0,n=n+Math.imul(R,be)|0,n=n+Math.imul(I,pe)|0,s=s+Math.imul(I,be)|0;var Ce=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(U,fe),n=Math.imul(U,he),n=n+Math.imul(j,fe)|0,s=Math.imul(j,he),r=r+Math.imul(D,le)|0,n=n+Math.imul(D,ue)|0,n=n+Math.imul(L,le)|0,s=s+Math.imul(L,ue)|0,r=r+Math.imul(P,pe)|0,n=n+Math.imul(P,be)|0,n=n+Math.imul(O,pe)|0,s=s+Math.imul(O,be)|0;var Pe=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(U,le),n=Math.imul(U,ue),n=n+Math.imul(j,le)|0,s=Math.imul(j,ue),r=r+Math.imul(D,pe)|0,n=n+Math.imul(D,be)|0,n=n+Math.imul(L,pe)|0,s=s+Math.imul(L,be)|0;var Oe=(h+r|0)+((8191&n)<<13)|0;h=(s+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(U,pe),n=Math.imul(U,be),n=n+Math.imul(j,pe)|0,s=Math.imul(j,be);var Ne=(h+r|0)+((8191&n)<<13)|0;return h=(s+(n>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,f[0]=me,f[1]=we,f[2]=ge,f[3]=ve,f[4]=_e,f[5]=ye,f[6]=ke,f[7]=Ee,f[8]=Ae,f[9]=Se,f[10]=Me,f[11]=Te,f[12]=xe,f[13]=Re,f[14]=Ie,f[15]=Ce,f[16]=Pe,f[17]=Oe,f[18]=Ne,0!==h&&(f[19]=h,i.length++),i};Math.imul||(A=h),s.prototype.mulTo=function(e,t){var i,r=this.length+e.length;return i=10===this.length&&10===e.length?A(this,e,t):r<63?h(this,e,t):r<1024?c(this,e,t):l(this,e,t)},u.prototype.makeRBT=function(e){for(var t=new Array(e),i=s.prototype._countBits(e)-1,r=0;r>=1;return r},u.prototype.permute=function(e,t,i,r,n,s){for(var a=0;a>>=1)n++;return 1<>>=13,i[2*a+1]=8191&s,s>>>=13;for(a=2*t;a>=26,t+=n/67108864|0,t+=s>>>26,this.words[i]=67108863&s}return 0!==t&&(this.words[i]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=f(e);if(0===t.length)return new s(1);for(var i=this,r=0;r=0);var t,i=e%26,n=(e-i)/26,s=67108863>>>26-i<<26-i;if(0!==i){var a=0;for(t=0;t>>26-i}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0);var n;n=t?(t-t%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),o=67108863^67108863>>>s<a)for(this.length-=a,h=0;h=0&&(0!==c||h>=n);h--){var l=0|this.words[h];this.words[h]=c<<26-s|l>>>s,c=l&o}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(f/67108864|0),this.words[n+i]=67108863&a}for(;n>26,this.words[n+i]=67108863&a;if(0===o)return this.strip();for(r(o===-1),o=0,
+n=0;n>26,this.words[n]=67108863&a;return this.negative=1,this.strip()},s.prototype._wordDiv=function(e,t){var i=this.length-e.length,r=this.clone(),n=e,a=0|n.words[n.length-1],o=this._countBits(a);i=26-o,0!==i&&(n=n.ushln(i),r.iushln(i),a=0|n.words[n.length-1]);var f,h=r.length-n.length;if("mod"!==t){f=new s(null),f.length=h+1,f.words=new Array(f.length);for(var c=0;c