diff --git a/services/worker/index.ts b/services/worker/index.ts index 3ad89e3..918f5ce 100644 --- a/services/worker/index.ts +++ b/services/worker/index.ts @@ -41,8 +41,8 @@ class Provider implements WorkerProvider { const basePath = `${window.location.origin}${ipfsPathPrefix}` - this.nullifierWorkers = new Array(CORES).fill('').map(() => new Worker(`${basePath}/nullifier.worker.js`)) - this.eventsWorkers = new Array(CORES).fill('').map(() => new Worker(`${basePath}/events.worker.js`)) + this.nullifierWorkers = new Array(CORES).fill('').map(() => new Worker(`${basePath}/_nuxt/workers/nullifier.worker.js`)) + this.eventsWorkers = new Array(CORES).fill('').map(() => new Worker(`${basePath}/_nuxt/workers/events.worker.js`)) // // @ts-expect-error // this.nullifierWorkers = new Array(CORES).fill('').map(() => new NWorker()) diff --git a/static/events.worker.js b/static/events.worker.js deleted file mode 100644 index 1fa573e..0000000 --- a/static/events.worker.js +++ /dev/null @@ -1 +0,0 @@ -/*! For license information please see ../LICENSES */!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports;}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n});},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t];}.bind(null,o));return n;},r.n=function(e){var t=e&&e.__esModule?function(){return e.default;}:function(){return e;};return r.d(t,"a",t),t;},r.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e);},r.p="/_nuxt/",r(r.s=294);}([function(e,t,r){"use strict";r.d(t,"k",function(){return f;}),r.d(t,"j",function(){return l;}),r.d(t,"a",function(){return h;}),r.d(t,"b",function(){return d;}),r.d(t,"o",function(){return m;}),r.d(t,"p",function(){return y;}),r.d(t,"l",function(){return v;}),r.d(t,"i",function(){return _;}),r.d(t,"d",function(){return A;}),r.d(t,"e",function(){return M;}),r.d(t,"c",function(){return E;}),r.d(t,"g",function(){return S;}),r.d(t,"f",function(){return T;}),r.d(t,"h",function(){return x;}),r.d(t,"n",function(){return k;}),r.d(t,"m",function(){return I;});const n=new(r(2).b)("bytes/5.4.0");function o(e){return!!e.toHexString;}function c(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return c(new Uint8Array(Array.prototype.slice.apply(e,t)));}),e;}function f(e){return v(e)&&!(e.length%2)||l(e);}function l(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(null==e.length)return!1;for(let i=0;i=256||t%1)return!1;}return!0;}function h(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),c(new Uint8Array(t));}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),v(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0x0"+r.substring(2):"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const o=[];for(let i=0;ih(e)),r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r);return t.reduce((e,object)=>(n.set(object,e),e+object.length),0),c(n);}function m(e){let t=h(e);if(0===t.length)return t;let r=0;for(;rt&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),c(r);}function v(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t);}const w="0123456789abcdef";function _(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=w[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00";}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(v(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(l(e)){let t="0x";for(let i=0;i>4]+w[15&r];}return t;}return n.throwArgumentError("invalid hexlify value","value",e);}function A(data){if("string"!=typeof data)data=_(data);else if(!v(data)||data.length%2)return null;return(data.length-2)/2;}function M(data,e,t){return"string"!=typeof data?data=_(data):(!v(data)||data.length%2)&&n.throwArgumentError("invalid hexData","value",data),e=2+2*e,null!=t?"0x"+data.substring(e,2+2*t):"0x"+data.substring(e);}function E(e){let t="0x";return e.forEach(e=>{t+=_(e).substring(2);}),t;}function S(e){const t=T(_(e,{hexPad:"left"}));return"0x"===t?"0x0":t;}function T(e){"string"!=typeof e&&(e=_(e)),v(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e;}function k(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(f(e)){const r=h(e);65!==r.length&&n.throwArgumentError("invalid signature string; must be 65 bytes","signature",e),t.r=_(r.slice(0,32)),t.s=_(r.slice(32,64)),t.v=r[64],t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=_(r.slice(32,64));}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=y(h(t._vs),32);t._vs=_(r);const o=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const s=_(r);null==t.s?t.s=s:t.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",e);}null==t.recoveryParam?null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2:null==t.v?t.v=27+t.recoveryParam:t.recoveryParam!==1-t.v%2&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e),null!=t.r&&v(t.r)?t.r=x(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&v(t.s)?t.s=x(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=h(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const o=_(r);t._vs&&(v(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=x(t._vs,32)),null==t._vs?t._vs=o:t._vs!==o&&n.throwArgumentError("signature _vs mismatch v and s","signature",e);}return t;}function I(e){return _(d([(e=k(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]));}},function(e,t,r){"use strict";r.d(t,"d",function(){return f;}),r.d(t,"e",function(){return l;}),r.d(t,"f",function(){return h;}),r.d(t,"b",function(){return d;}),r.d(t,"g",function(){return m;}),r.d(t,"c",function(){return _;}),r.d(t,"a",function(){return A;});var n=r(2);var o=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const c=new n.b("properties/5.4.1");function f(object,e,t){Object.defineProperty(object,e,{enumerable:!0,value:t,writable:!1});}function l(e,t){for(let i=0;i<32;i++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor;}return null;}function h(object){return o(this,void 0,void 0,function*(){const e=Object.keys(object).map(e=>{const t=object[e];return Promise.resolve(t).then(t=>({key:e,value:t}));});return(yield Promise.all(e)).reduce((e,t)=>(e[t.key]=t.value,e),{});});}function d(object,e){object&&"object"==typeof object||c.throwArgumentError("invalid object","object",object),Object.keys(object).forEach(t=>{e[t]||c.throwArgumentError("invalid object key - "+t,"transaction:"+t,object);});}function m(object){const e={};for(const t in object)e[t]=object[t];return e;}const y={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function v(object){if(null==object||y[typeof object])return!0;if(Array.isArray(object)||"object"==typeof object){if(!Object.isFrozen(object))return!1;const e=Object.keys(object);for(let i=0;i_(e)));if("object"==typeof object){const e={};for(const t in object){const r=object[t];void 0!==r&&f(e,t,_(r));}return e;}return c.throwArgumentError("Cannot deepCopy "+typeof object,"object",object);}function _(object){return w(object);}class A{constructor(e){for(const t in e)this[t]=_(e[t]);}}},function(e,t,r){"use strict";r.d(t,"a",function(){return m;}),r.d(t,"b",function(){return v;});let n=!1,o=!1;const c={debug:1,default:2,info:2,warning:3,error:4,off:5};let f=c.default,l=null;const h=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(form=>{try{if("test"!=="test".normalize(form))throw new Error("bad normalize");}catch(t){e.push(form);}}),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation");}catch(e){return e.message;}return null;}();var d,m;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF";}(d||(d={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED";}(m||(m={}));const y="0123456789abcdef";class v{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1});}_log(e,t){const r=e.toLowerCase();null==c[r]&&this.throwArgumentError("invalid log level name","logLevel",e),f>c[r]||console.log.apply(console,t);}debug(...e){this._log(v.levels.DEBUG,e);}info(...e){this._log(v.levels.INFO,e);}warn(...e){this._log(v.levels.WARNING,e);}makeError(e,code,t){if(o)return this.makeError("censored error",code,{});code||(code=v.errors.UNKNOWN_ERROR),t||(t={});const r=[];Object.keys(t).forEach(e=>{const n=t[e];try{if(n instanceof Uint8Array){let t="";for(let i=0;i>4],t+=y[15&n[i]];r.push(e+"=Uint8Array(0x"+t+")");}else r.push(e+"="+JSON.stringify(n));}catch(n){r.push(e+"="+JSON.stringify(t[e].toString()));}}),r.push(`code=${code}`),r.push(`version=${this.version}`);const n=e;r.length&&(e+=" ("+r.join(", ")+")");const c=new Error(e);return c.reason=n,c.code=code,Object.keys(t).forEach(function(e){c[e]=t[e];}),c;}throwError(e,code,t){throw this.makeError(e,code,t);}throwArgumentError(e,t,r){return this.throwError(e,v.errors.INVALID_ARGUMENT,{argument:t,value:r});}assert(e,t,code,r){e||this.throwError(t,code,r);}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n);}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),h&&this.throwError("platform missing String.prototype.normalize",v.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:h});}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,v.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,v.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}));}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,v.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t});}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",v.errors.MISSING_NEW,{name:t.name});}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",v.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",v.errors.MISSING_NEW,{name:t.name});}static globalLogger(){return l||(l=new v("logger/5.4.1")),l;}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",v.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",v.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"});}o=!!e,n=!!t;}static setLogLevel(e){const t=c[e.toLowerCase()];null!=t?f=t:v.globalLogger().warn("invalid log level - "+e);}static from(e){return new v(e);}}v.errors=m,v.levels=d;},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed");}function o(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r(),e.prototype.constructor=e;}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"));}var f;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{f="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(325).Buffer;}catch(e){}function l(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15;}function h(e,t,r){var n=l(e,r);return r-1>=t&&(n|=l(e,r-1)<<4),n;}function d(e,t,r,n){for(var o=0,c=Math.min(e.length,r),i=t;i=49?f-49+10:f>=17?f-17+10:f;}return o;}c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words);},c.max=function(e,t){return e.cmp(t)>0?e:t;},c.min=function(e,t){return e.cmp(t)<0?e:t;},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),n(base===(0|base)&&base>=2&&base<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[r]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);else if("le"===t)for(i=0,r=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);return this.strip();},c.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)n=h(e,t,i)<=18?(o-=18,c+=1,this.words[c]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,c+=1,this.words[c]|=n>>>26):o+=8;this.strip();},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=base)r++;r--,n=n/base|0;for(var o=e.length-t,c=o%r,f=Math.min(o,o-c)+t,l=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign();},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this;},c.prototype.inspect=function(){return(this.red?"";};var m=["","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"],y=[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],v=[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];function w(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,f=o/67108864|0;r.words[0]=c;for(var l=1;l>>26,d=67108863&f,m=Math.min(l,t.length-1),y=Math.max(0,l-e.length+1);y<=m;y++){var i=l-y|0;h+=(o=(a=0|e.words[i])*(b=0|t.words[y])+d)/67108864|0,d=67108863&o;}r.words[l]=0|d,f=0|h;}return 0!==f?r.words[l]=0|f:r.length--,r.strip();}c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var r=0,o=0,i=0;i>>24-r&16777215)||i!==this.length-1?m[6-f.length]+f+t:f+t,(r+=2)>=26&&(r-=26,i--);}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}if(base===(0|base)&&base>=2&&base<=36){var l=y[base],h=v[base];t="";var d=this.clone();for(d.negative=0;!d.isZero();){var w=d.modn(h).toString(base);t=(d=d.idivn(h)).isZero()?w+t:m[l-w.length]+w+t;}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}n(!1,"Base should be between 2 and 36");},c.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e;},c.prototype.toJSON=function(){return this.toString(16);},c.prototype.toBuffer=function(e,t){return n(void 0!==f),this.toArrayLike(f,e,t);},c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);},c.prototype.toArrayLike=function(e,t,r){var o=this.byteLength(),c=r||Math.max(1,o);n(o<=c,"byte array longer than desired length"),n(c>0,"Requested array length <= 0"),this.strip();var b,i,f="le"===t,l=new e(c),q=this.clone();if(f){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),l[i]=b;for(;i=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t;},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r;},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t;},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this);},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this);},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this);},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this);},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this);},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this);},c.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip();},c.prototype.notn=function(e){return this.clone().inotn(e);},c.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this);},c.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 a,b,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==n&&i>26,this.words[i]=67108863&t;if(0===n&&i>>13,y=0|a[1],v=8191&y,w=y>>>13,_=0|a[2],A=8191&_,M=_>>>13,E=0|a[3],S=8191&E,T=E>>>13,x=0|a[4],k=8191&x,I=x>>>13,C=0|a[5],O=8191&C,B=C>>>13,R=0|a[6],P=8191&R,F=R>>>13,L=0|a[7],N=8191&L,D=L>>>13,j=0|a[8],U=8191&j,J=j>>>13,H=0|a[9],z=8191&H,G=H>>>13,K=0|b[0],V=8191&K,X=K>>>13,Q=0|b[1],Z=8191&Q,W=Q>>>13,Y=0|b[2],$=8191&Y,ee=Y>>>13,te=0|b[3],re=8191&te,ne=te>>>13,ie=0|b[4],oe=8191&ie,ae=ie>>>13,se=0|b[5],ue=8191&se,ce=se>>>13,fe=0|b[6],le=8191&fe,he=fe>>>13,de=0|b[7],pe=8191&de,be=de>>>13,me=0|b[8],ge=8191&me,ye=me>>>13,ve=0|b[9],we=8191&ve,_e=ve>>>13;r.negative=e.negative^t.negative,r.length=19;var Ae=(l+(n=Math.imul(d,V))|0)+((8191&(o=(o=Math.imul(d,X))+Math.imul(m,V)|0))<<13)|0;l=((c=Math.imul(m,X))+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(v,V),o=(o=Math.imul(v,X))+Math.imul(w,V)|0,c=Math.imul(w,X);var Me=(l+(n=n+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,W)|0)+Math.imul(m,Z)|0))<<13)|0;l=((c=c+Math.imul(m,W)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(A,V),o=(o=Math.imul(A,X))+Math.imul(M,V)|0,c=Math.imul(M,X),n=n+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,W)|0)+Math.imul(w,Z)|0,c=c+Math.imul(w,W)|0;var Ee=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(m,$)|0))<<13)|0;l=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(S,V),o=(o=Math.imul(S,X))+Math.imul(T,V)|0,c=Math.imul(T,X),n=n+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,W)|0)+Math.imul(M,Z)|0,c=c+Math.imul(M,W)|0,n=n+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0;var Se=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(m,re)|0))<<13)|0;l=((c=c+Math.imul(m,ne)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(k,V),o=(o=Math.imul(k,X))+Math.imul(I,V)|0,c=Math.imul(I,X),n=n+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(T,Z)|0,c=c+Math.imul(T,W)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(M,$)|0,c=c+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,o=(o=o+Math.imul(v,ne)|0)+Math.imul(w,re)|0,c=c+Math.imul(w,ne)|0;var Te=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(m,oe)|0))<<13)|0;l=((c=c+Math.imul(m,ae)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,V),o=(o=Math.imul(O,X))+Math.imul(B,V)|0,c=Math.imul(B,X),n=n+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,W)|0)+Math.imul(I,Z)|0,c=c+Math.imul(I,W)|0,n=n+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(T,$)|0,c=c+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(M,re)|0,c=c+Math.imul(M,ne)|0,n=n+Math.imul(v,oe)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,c=c+Math.imul(w,ae)|0;var xe=(l+(n=n+Math.imul(d,ue)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(m,ue)|0))<<13)|0;l=((c=c+Math.imul(m,ce)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(P,V),o=(o=Math.imul(P,X))+Math.imul(F,V)|0,c=Math.imul(F,X),n=n+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,W)|0)+Math.imul(B,Z)|0,c=c+Math.imul(B,W)|0,n=n+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(I,$)|0,c=c+Math.imul(I,ee)|0,n=n+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ne)|0)+Math.imul(T,re)|0,c=c+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,o=(o=o+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,c=c+Math.imul(M,ae)|0,n=n+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,c=c+Math.imul(w,ce)|0;var ke=(l+(n=n+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,he)|0)+Math.imul(m,le)|0))<<13)|0;l=((c=c+Math.imul(m,he)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,V),o=(o=Math.imul(N,X))+Math.imul(D,V)|0,c=Math.imul(D,X),n=n+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,W)|0)+Math.imul(F,Z)|0,c=c+Math.imul(F,W)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(B,$)|0,c=c+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,o=(o=o+Math.imul(k,ne)|0)+Math.imul(I,re)|0,c=c+Math.imul(I,ne)|0,n=n+Math.imul(S,oe)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(T,oe)|0,c=c+Math.imul(T,ae)|0,n=n+Math.imul(A,ue)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(M,ue)|0,c=c+Math.imul(M,ce)|0,n=n+Math.imul(v,le)|0,o=(o=o+Math.imul(v,he)|0)+Math.imul(w,le)|0,c=c+Math.imul(w,he)|0;var Ie=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,be)|0)+Math.imul(m,pe)|0))<<13)|0;l=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,V),o=(o=Math.imul(U,X))+Math.imul(J,V)|0,c=Math.imul(J,X),n=n+Math.imul(N,Z)|0,o=(o=o+Math.imul(N,W)|0)+Math.imul(D,Z)|0,c=c+Math.imul(D,W)|0,n=n+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(F,$)|0,c=c+Math.imul(F,ee)|0,n=n+Math.imul(O,re)|0,o=(o=o+Math.imul(O,ne)|0)+Math.imul(B,re)|0,c=c+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(I,oe)|0,c=c+Math.imul(I,ae)|0,n=n+Math.imul(S,ue)|0,o=(o=o+Math.imul(S,ce)|0)+Math.imul(T,ue)|0,c=c+Math.imul(T,ce)|0,n=n+Math.imul(A,le)|0,o=(o=o+Math.imul(A,he)|0)+Math.imul(M,le)|0,c=c+Math.imul(M,he)|0,n=n+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,be)|0)+Math.imul(w,pe)|0,c=c+Math.imul(w,be)|0;var Ce=(l+(n=n+Math.imul(d,ge)|0)|0)+((8191&(o=(o=o+Math.imul(d,ye)|0)+Math.imul(m,ge)|0))<<13)|0;l=((c=c+Math.imul(m,ye)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(z,V),o=(o=Math.imul(z,X))+Math.imul(G,V)|0,c=Math.imul(G,X),n=n+Math.imul(U,Z)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(J,Z)|0,c=c+Math.imul(J,W)|0,n=n+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,o=(o=o+Math.imul(P,ne)|0)+Math.imul(F,re)|0,c=c+Math.imul(F,ne)|0,n=n+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(B,oe)|0,c=c+Math.imul(B,ae)|0,n=n+Math.imul(k,ue)|0,o=(o=o+Math.imul(k,ce)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,ce)|0,n=n+Math.imul(S,le)|0,o=(o=o+Math.imul(S,he)|0)+Math.imul(T,le)|0,c=c+Math.imul(T,he)|0,n=n+Math.imul(A,pe)|0,o=(o=o+Math.imul(A,be)|0)+Math.imul(M,pe)|0,c=c+Math.imul(M,be)|0,n=n+Math.imul(v,ge)|0,o=(o=o+Math.imul(v,ye)|0)+Math.imul(w,ge)|0,c=c+Math.imul(w,ye)|0;var Oe=(l+(n=n+Math.imul(d,we)|0)|0)+((8191&(o=(o=o+Math.imul(d,_e)|0)+Math.imul(m,we)|0))<<13)|0;l=((c=c+Math.imul(m,_e)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(z,Z),o=(o=Math.imul(z,W))+Math.imul(G,Z)|0,c=Math.imul(G,W),n=n+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(J,$)|0,c=c+Math.imul(J,ee)|0,n=n+Math.imul(N,re)|0,o=(o=o+Math.imul(N,ne)|0)+Math.imul(D,re)|0,c=c+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(F,oe)|0,c=c+Math.imul(F,ae)|0,n=n+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,ce)|0)+Math.imul(B,ue)|0,c=c+Math.imul(B,ce)|0,n=n+Math.imul(k,le)|0,o=(o=o+Math.imul(k,he)|0)+Math.imul(I,le)|0,c=c+Math.imul(I,he)|0,n=n+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,be)|0)+Math.imul(T,pe)|0,c=c+Math.imul(T,be)|0,n=n+Math.imul(A,ge)|0,o=(o=o+Math.imul(A,ye)|0)+Math.imul(M,ge)|0,c=c+Math.imul(M,ye)|0;var Be=(l+(n=n+Math.imul(v,we)|0)|0)+((8191&(o=(o=o+Math.imul(v,_e)|0)+Math.imul(w,we)|0))<<13)|0;l=((c=c+Math.imul(w,_e)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),n=n+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ne)|0)+Math.imul(J,re)|0,c=c+Math.imul(J,ne)|0,n=n+Math.imul(N,oe)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,c=c+Math.imul(D,ae)|0,n=n+Math.imul(P,ue)|0,o=(o=o+Math.imul(P,ce)|0)+Math.imul(F,ue)|0,c=c+Math.imul(F,ce)|0,n=n+Math.imul(O,le)|0,o=(o=o+Math.imul(O,he)|0)+Math.imul(B,le)|0,c=c+Math.imul(B,he)|0,n=n+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,be)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,be)|0,n=n+Math.imul(S,ge)|0,o=(o=o+Math.imul(S,ye)|0)+Math.imul(T,ge)|0,c=c+Math.imul(T,ye)|0;var Re=(l+(n=n+Math.imul(A,we)|0)|0)+((8191&(o=(o=o+Math.imul(A,_e)|0)+Math.imul(M,we)|0))<<13)|0;l=((c=c+Math.imul(M,_e)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(z,re),o=(o=Math.imul(z,ne))+Math.imul(G,re)|0,c=Math.imul(G,ne),n=n+Math.imul(U,oe)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(J,oe)|0,c=c+Math.imul(J,ae)|0,n=n+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,ce)|0)+Math.imul(D,ue)|0,c=c+Math.imul(D,ce)|0,n=n+Math.imul(P,le)|0,o=(o=o+Math.imul(P,he)|0)+Math.imul(F,le)|0,c=c+Math.imul(F,he)|0,n=n+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(B,pe)|0,c=c+Math.imul(B,be)|0,n=n+Math.imul(k,ge)|0,o=(o=o+Math.imul(k,ye)|0)+Math.imul(I,ge)|0,c=c+Math.imul(I,ye)|0;var Pe=(l+(n=n+Math.imul(S,we)|0)|0)+((8191&(o=(o=o+Math.imul(S,_e)|0)+Math.imul(T,we)|0))<<13)|0;l=((c=c+Math.imul(T,_e)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,oe),o=(o=Math.imul(z,ae))+Math.imul(G,oe)|0,c=Math.imul(G,ae),n=n+Math.imul(U,ue)|0,o=(o=o+Math.imul(U,ce)|0)+Math.imul(J,ue)|0,c=c+Math.imul(J,ce)|0,n=n+Math.imul(N,le)|0,o=(o=o+Math.imul(N,he)|0)+Math.imul(D,le)|0,c=c+Math.imul(D,he)|0,n=n+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,be)|0)+Math.imul(F,pe)|0,c=c+Math.imul(F,be)|0,n=n+Math.imul(O,ge)|0,o=(o=o+Math.imul(O,ye)|0)+Math.imul(B,ge)|0,c=c+Math.imul(B,ye)|0;var Fe=(l+(n=n+Math.imul(k,we)|0)|0)+((8191&(o=(o=o+Math.imul(k,_e)|0)+Math.imul(I,we)|0))<<13)|0;l=((c=c+Math.imul(I,_e)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(z,ue),o=(o=Math.imul(z,ce))+Math.imul(G,ue)|0,c=Math.imul(G,ce),n=n+Math.imul(U,le)|0,o=(o=o+Math.imul(U,he)|0)+Math.imul(J,le)|0,c=c+Math.imul(J,he)|0,n=n+Math.imul(N,pe)|0,o=(o=o+Math.imul(N,be)|0)+Math.imul(D,pe)|0,c=c+Math.imul(D,be)|0,n=n+Math.imul(P,ge)|0,o=(o=o+Math.imul(P,ye)|0)+Math.imul(F,ge)|0,c=c+Math.imul(F,ye)|0;var Le=(l+(n=n+Math.imul(O,we)|0)|0)+((8191&(o=(o=o+Math.imul(O,_e)|0)+Math.imul(B,we)|0))<<13)|0;l=((c=c+Math.imul(B,_e)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(z,le),o=(o=Math.imul(z,he))+Math.imul(G,le)|0,c=Math.imul(G,he),n=n+Math.imul(U,pe)|0,o=(o=o+Math.imul(U,be)|0)+Math.imul(J,pe)|0,c=c+Math.imul(J,be)|0,n=n+Math.imul(N,ge)|0,o=(o=o+Math.imul(N,ye)|0)+Math.imul(D,ge)|0,c=c+Math.imul(D,ye)|0;var Ne=(l+(n=n+Math.imul(P,we)|0)|0)+((8191&(o=(o=o+Math.imul(P,_e)|0)+Math.imul(F,we)|0))<<13)|0;l=((c=c+Math.imul(F,_e)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(z,pe),o=(o=Math.imul(z,be))+Math.imul(G,pe)|0,c=Math.imul(G,be),n=n+Math.imul(U,ge)|0,o=(o=o+Math.imul(U,ye)|0)+Math.imul(J,ge)|0,c=c+Math.imul(J,ye)|0;var De=(l+(n=n+Math.imul(N,we)|0)|0)+((8191&(o=(o=o+Math.imul(N,_e)|0)+Math.imul(D,we)|0))<<13)|0;l=((c=c+Math.imul(D,_e)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(z,ge),o=(o=Math.imul(z,ye))+Math.imul(G,ge)|0,c=Math.imul(G,ye);var je=(l+(n=n+Math.imul(U,we)|0)|0)+((8191&(o=(o=o+Math.imul(U,_e)|0)+Math.imul(J,we)|0))<<13)|0;l=((c=c+Math.imul(J,_e)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863;var Ue=(l+(n=Math.imul(z,we))|0)+((8191&(o=(o=Math.imul(z,_e))+Math.imul(G,we)|0))<<13)|0;return l=((c=Math.imul(G,_e))+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,f[0]=Ae,f[1]=Me,f[2]=Ee,f[3]=Se,f[4]=Te,f[5]=xe,f[6]=ke,f[7]=Ie,f[8]=Ce,f[9]=Oe,f[10]=Be,f[11]=Re,f[12]=Pe,f[13]=Fe,f[14]=Le,f[15]=Ne,f[16]=De,f[17]=je,f[18]=Ue,0!==l&&(f[19]=l,r.length++),r;};function A(e,t,r){return new M().mulp(e,t,r);}function M(e,t){this.x=e,this.y=t;}Math.imul||(_=w),c.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?_(this,e,t):n<63?w(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,c=0;c>>26)|0)>>>26,f&=67108863;}r.words[c]=l,n=f,f=o;}return 0!==n?r.words[c]=n:r.length--,r.strip();}(this,e,t):A(this,e,t),r;},M.prototype.makeRBT=function(e){for(var t=new Array(e),r=c.prototype._countBits(e)-1,i=0;i>=1;return n;},M.prototype.permute=function(e,t,r,n,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,r[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,t+=r/67108864|0,t+=o>>>26,this.words[i]=67108863&o;}return 0!==t&&(this.words[i]=t,this.length++),this;},c.prototype.muln=function(e){return this.clone().imuln(e);},c.prototype.sqr=function(){return this.mul(this);},c.prototype.isqr=function(){return this.imul(this.clone());},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>o;}return t;}(e);if(0===t.length)return new c(1);for(var r=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,r=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t;}o&&(this.words[i]=o,this.length++);}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==l||i>=o);i--){var h=0|this.words[i];this.words[i]=l<<26-c|h>>>c,l=h&mask;}return f&&0!==l&&(f.words[f.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip();},c.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r);},c.prototype.shln=function(e){return this.clone().ishln(e);},c.prototype.ushln=function(e){return this.clone().iushln(e);},c.prototype.shrn=function(e){return this.clone().ishrn(e);},c.prototype.ushrn=function(e){return this.clone().iushrn(e);},c.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this;},c.prototype.isubn=function(e){if(n("number"==typeof e),n(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 i=0;i>26)-(l/67108864|0),this.words[i+r]=67108863&o;}for(;i>26,this.words[i+r]=67108863&o;if(0===f)return this.strip();for(n(-1===f),f=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip();},c.prototype._wordDiv=function(e,t){var r=(this.length,e.length),a=this.clone(),b=e,n=0|b.words[b.length-1];0!==(r=26-this._countBits(n))&&(b=b.ushln(r),a.iushln(r),n=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;l--){var h=67108864*(0|a.words[b.length+l])+(0|a.words[b.length+l-1]);for(h=Math.min(h/n|0,67108863),a._ishlnsubmul(b,h,l);0!==a.negative;)h--,a.negative=0,a._ishlnsubmul(b,1,l),a.isZero()||(a.negative^=1);q&&(q.words[l]=h);}return q&&q.strip(),a.strip(),"div"!==t&&0!==r&&a.iushrn(r),{div:q||null,mod:a};},c.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(f=this.neg().divmod(e,t),"mod"!==t&&(div=f.div.neg()),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(f=this.divmod(e.neg(),t),"mod"!==t&&(div=f.div.neg()),{div:div,mod:f.mod}):0!=(this.negative&e.negative)?(f=this.neg().divmod(e.neg(),t),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:f.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var div,o,f;},c.prototype.div=function(e){return this.divmod(e,"div",!1).div;},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod;},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod;},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),c=r.cmp(n);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1);},c.prototype.modn=function(e){n(e<=67108863);for(var p=(1<<26)%e,t=0,i=this.length-1;i>=0;i--)t=(p*t+(0|this.words[i]))%e;return t;},c.prototype.idivn=function(e){n(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var r=(0|this.words[i])+67108864*t;this.words[i]=r/e|0,t=r%e;}return this.strip();},c.prototype.divn=function(e){return this.clone().idivn(e);},c.prototype.egcd=function(p){n(0===p.negative),n(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var r=new c(1),o=new c(0),f=new c(0),l=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var h=t.clone(),d=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-->0;)(r.isOdd()||o.isOdd())&&(r.iadd(h),o.isub(d)),r.iushrn(1),o.iushrn(1);for(var y=0,v=1;0==(t.words[0]&v)&&y<26;++y,v<<=1);if(y>0)for(t.iushrn(y);y-->0;)(f.isOdd()||l.isOdd())&&(f.iadd(h),l.isub(d)),f.iushrn(1),l.iushrn(1);e.cmp(t)>=0?(e.isub(t),r.isub(f),o.isub(l)):(t.isub(e),f.isub(r),l.isub(o));}return{a:f,b:l,gcd:t.iushln(g)};},c.prototype._invmp=function(p){n(0===p.negative),n(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),r=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,f=1;0==(a.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(a.iushrn(i);i-->0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var l=0,h=1;0==(b.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(b.iushrn(l);l-->0;)r.isOdd()&&r.iadd(o),r.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(r)):(b.isub(a),r.isub(t));}return(e=0===a.cmpn(1)?t:r).cmpn(0)<0&&e.iadd(p),e;},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var n=a;a=b,b=n;}else if(0===r||0===b.cmpn(1))break;a.isub(b);}return b.iushln(t);},c.prototype.invm=function(e){return this.egcd(e).a.umod(e);},c.prototype.isEven=function(){return 0==(1&this.words[0]);},c.prototype.isOdd=function(){return 1==(1&this.words[0]);},c.prototype.andln=function(e){return this.words[0]&e;},c.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o;}return 0!==r&&(this.words[i]=r,this.length++),this;},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},c.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break;}}return t;},c.prototype.gtn=function(e){return 1===this.cmpn(e);},c.prototype.gt=function(e){return 1===this.cmp(e);},c.prototype.gten=function(e){return this.cmpn(e)>=0;},c.prototype.gte=function(e){return this.cmp(e)>=0;},c.prototype.ltn=function(e){return-1===this.cmpn(e);},c.prototype.lt=function(e){return-1===this.cmp(e);},c.prototype.lten=function(e){return this.cmpn(e)<=0;},c.prototype.lte=function(e){return this.cmp(e)<=0;},c.prototype.eqn=function(e){return 0===this.cmpn(e);},c.prototype.eq=function(e){return 0===this.cmp(e);},c.red=function(e){return new C(e);},c.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this);},c.prototype._forceRed=function(e){return this.red=e,this;},c.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e);},c.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},c.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},c.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},c.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},c.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},c.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},c.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},c.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var E={k256:null,p224:null,p192:null,p25519:null};function S(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function T(){S.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function x(){S.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function k(){S.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function I(){S.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function C(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t;}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function O(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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);}S.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e;},S.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r;},S.prototype.split=function(input,e){input.iushrn(this.n,0,e);},S.prototype.imulK=function(e){return e.imul(this.k);},o(T,S),T.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=r;}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9;},T.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;},c._prime=function(e){if(E[e])return E[e];var t;if("k256"===e)t=new T();else if("p224"===e)t=new x();else if("p192"===e)t=new k();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I();}return E[e]=t,t;},C.prototype._verify1=function(a){n(0===a.negative,"red works only with positives"),n(a.red,"red works only with red numbers");},C.prototype._verify2=function(a,b){n(0==(a.negative|b.negative),"red works only with positives"),n(a.red&&a.red===b.red,"red works only with red numbers");},C.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this);},C.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this);},C.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this);},C.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e;},C.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this);},C.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e;},C.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e));},C.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b));},C.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b));},C.prototype.isqr=function(a){return this.imul(a,a.clone());},C.prototype.sqr=function(a){return this.mul(a,a);},C.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t);}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);n(!q.isZero());var r=new c(1).toRed(this),o=r.redNeg(),f=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new c(2*l*l).toRed(this);0!==this.pow(l,f).cmp(o);)l.redIAdd(o);for(var h=this.pow(l,q),d=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),y=s;0!==m.cmp(r);){for(var v=m,i=0;0!==v.cmp(r);i++)v=v.redSqr();n(i=0;i--){for(var l=e.words[i],h=f-1;h>=0;h--){var d=l>>h&1;r!==t[0]&&(r=this.sqr(r)),0!==d||0!==n?(n<<=1,n|=d,(4===++o||0===i&&0===h)&&(r=this.mul(r,t[n]),o=0,n=0)):o=0;}f=26;}return r;},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},c.mont=function(e){return new O(e);},o(O,C),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},O.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},O.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},O.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this);};}(e,this);}).call(this,r(59)(e));},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r(),e.prototype.constructor=e;}};},function(e,t,r){"use strict";(function(e){var n=r(296),o=r(297),c=r(174);function f(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823;}function l(e,t){if(f()=f())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f().toString(16)+" bytes");return 0|e;}function _(e,t){if(h.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(e).length;default:if(n)return Q(e).length;t=(""+t).toLowerCase(),n=!0;}}function A(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return R(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return L(this,t,r);case"base64":return B(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0;}}function M(b,e,t){var i=b[e];b[e]=b[t],b[t]=i;}function E(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1;}else if(r<0){if(!o)return-1;r=0;}if("string"==typeof t&&(t=h.from(t,n)),h.isBuffer(t))return 0===t.length?-1:S(e,t,r,n,o);if("number"==typeof t)return t&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):S(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer");}function S(e,t,r,n,o){var i,c=1,f=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;c=2,f/=2,l/=2,r/=2;}function h(e,i){return 1===c?e[i]:e.readUInt16BE(i*c);}if(o){var d=-1;for(i=r;if&&(r=f-l),i=r;i>=0;i--){for(var m=!0,y=0;yo&&(n=o):n=o;var c=t.length;if(c%2!=0)throw new TypeError("Invalid hex string");n>c/2&&(n=c/2);for(var i=0;i>8,o=r%256,c.push(o),c.push(n);return c;}(t,e.length-r),e,r,n);}function B(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r));}function R(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:h>223?3:h>191?2:1;if(i+m<=r)switch(m){case 1:h<128&&(d=h);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&h)<<6|63&o)>127&&(d=l);break;case 3:o=e[i+1],c=e[i+2],128==(192&o)&&128==(192&c)&&(l=(15&h)<<12|(63&o)<<6|63&c)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:o=e[i+1],c=e[i+2],f=e[i+3],128==(192&o)&&128==(192&c)&&128==(192&f)&&(l=(15&h)<<18|(63&o)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(d=l);}null===d?(d=65533,m=1):d>65535&&(d-=65536,n.push(d>>>10&1023|55296),d=56320|1023&d),n.push(d),i+=m;}return function(e){var t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);var r="",i=0;for(;i0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"";},h.prototype.compare=function(e,t,r,n,o){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var c=(o>>>=0)-(n>>>=0),f=(r>>>=0)-(t>>>=0),l=Math.min(c,f),d=this.slice(n,o),m=e.slice(t,r),i=0;io)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var c=!1;;)switch(n){case"hex":return T(this,e,t,r);case"utf8":case"utf-8":return x(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return I(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(c)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),c=!0;}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)};};var P=4096;function F(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var o="",i=t;ir)throw new RangeError("Trying to access beyond buffer length");}function U(e,t,r,n,o,c){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range");}function J(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i);}function H(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255;}function z(e,t,r,n,o,c){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range");}function G(e,t,r,n,c){return c||z(e,0,r,4),o.write(e,t,r,n,23,4),r+4;}function K(e,t,r,n,c){return c||z(e,0,r,8),o.write(e,t,r,n,52,8),r+8;}h.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)n+=this[e+--t]*o;return n;},h.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e];},h.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8;},h.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1];},h.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3];},h.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3]);},h.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||j(e,t,this.length);for(var n=this[e],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*t)),n;},h.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||j(e,t,this.length);for(var i=t,n=1,o=this[e+--i];i>0&&(n*=256);)o+=this[e+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*t)),o;},h.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e];},h.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r;},h.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r;},h.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24;},h.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3];},h.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),o.read(this,e,!0,23,4);},h.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),o.read(this,e,!1,23,4);},h.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),o.read(this,e,!0,52,8);},h.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),o.read(this,e,!1,52,8);},h.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||U(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i=0&&(o*=256);)this[t+i]=e/o&255;return t+r;},h.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,1,255,0),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1;},h.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):J(this,e,t,!0),t+2;},h.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):J(this,e,t,!1),t+2;},h.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):H(this,e,t,!0),t+4;},h.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):H(this,e,t,!1),t+4;},h.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);U(this,e,t,r,o-1,-o);}var i=0,c=1,sub=0;for(this[t]=255&e;++i>0)-sub&255;return t+r;},h.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);U(this,e,t,r,o-1,-o);}var i=r-1,c=1,sub=0;for(this[t+i]=255&e;--i>=0&&(c*=256);)e<0&&0===sub&&0!==this[t+i+1]&&(sub=1),this[t+i]=(e/c>>0)-sub&255;return t+r;},h.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,1,127,-128),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1;},h.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):J(this,e,t,!0),t+2;},h.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):J(this,e,t,!1),t+2;},h.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):H(this,e,t,!0),t+4;},h.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):H(this,e,t,!1),t+4;},h.prototype.writeFloatLE=function(e,t,r){return G(this,e,t,!0,r);},h.prototype.writeFloatBE=function(e,t,r){return G(this,e,t,!1,r);},h.prototype.writeDoubleLE=function(e,t,r){return K(this,e,t,!0,r);},h.prototype.writeDoubleBE=function(e,t,r){return K(this,e,t,!1,r);},h.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=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),e.length-t=0;--i)e[i+t]=this[i+r];else if(o<1e3||!h.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&c.push(239,191,189);continue;}if(i+1===n){(t-=3)>-1&&c.push(239,191,189);continue;}o=r;continue;}if(r<56320){(t-=3)>-1&&c.push(239,191,189),o=r;continue;}r=65536+(o-55296<<10|r-56320);}else o&&(t-=3)>-1&&c.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;c.push(r);}else if(r<2048){if((t-=2)<0)break;c.push(r>>6|192,63&r|128);}else if(r<65536){if((t-=3)<0)break;c.push(r>>12|224,r>>6&63|128,63&r|128);}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;c.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128);}}return c;}function Z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"");}(e).replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e;}(e));}function W(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i;}}).call(this,r(18));},function(e,t,r){"use strict";r.d(t,"a",function(){return w;}),r.d(t,"e",function(){return _;}),r.d(t,"d",function(){return A;}),r.d(t,"b",function(){return M;}),r.d(t,"c",function(){return E;});var n=r(0),o=r(16),c=r(7),f=r(36);const l=new(r(2).b)("address/5.4.0");function h(address){Object(n.l)(address,20)||l.throwArgumentError("invalid address","address",address);const e=(address=address.toLowerCase()).substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const r=Object(n.a)(Object(c.a)(t));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&r[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("");}const d={};for(let i=0;i<10;i++)d[String(i)]=String(i);for(let i=0;i<26;i++)d[String.fromCharCode(65+i)]=String(10+i);const m=Math.floor((y=9007199254740991,Math.log10?Math.log10(y):Math.log(y)/Math.LN10));var y;function v(address){let e=(address=(address=address.toUpperCase()).substring(4)+address.substring(0,2)+"00").split("").map(e=>d[e]).join("");for(;e.length>=m;){let t=e.substring(0,m);e=parseInt(t,10)%97+e.substring(t.length);}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t;}function w(address){let e=null;if("string"!=typeof address&&l.throwArgumentError("invalid address","address",address),address.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==address.substring(0,2)&&(address="0x"+address),e=h(address),address.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==address&&l.throwArgumentError("bad address checksum","address",address);else if(address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(address.substring(2,4)!==v(address)&&l.throwArgumentError("bad icap checksum","address",address),e=Object(o.c)(address.substring(4));e.length<40;)e="0"+e;e=h("0x"+e);}else l.throwArgumentError("invalid address","address",address);return e;}function _(address){try{return w(address),!0;}catch(e){}return!1;}function A(address){let e=Object(o.b)(w(address).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+v("XE00"+e)+e;}function M(e){let t=null;try{t=w(e.from);}catch(t){l.throwArgumentError("missing from address","transaction",e);}const r=Object(n.o)(Object(n.a)(o.a.from(e.nonce).toHexString()));return w(Object(n.e)(Object(c.a)(Object(f.encode)([t,r])),12));}function E(e,t,r){return 32!==Object(n.d)(t)&&l.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(n.d)(r)&&l.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),w(Object(n.e)(Object(c.a)(Object(n.b)(["0xff",w(e),t,r])),12));}},function(e,t,r){"use strict";r.d(t,"a",function(){return f;});var n=r(288),o=r.n(n),c=r(0);function f(data){return"0x"+o.a.keccak_256(Object(c.a)(data));}},function(e,t,r){var n=r(5),o=n.Buffer;function c(e,t){for(var r in e)t[r]=e[r];}function f(e,t,r){return o(e,t,r);}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(c(n,t),t.Buffer=f),f.prototype=Object.create(o.prototype),c(o,f),f.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r);},f.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n;},f.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e);},f.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e);};},function(e,t,r){"use strict";r.d(t,"b",function(){return c;}),r.d(t,"e",function(){return f;}),r.d(t,"a",function(){return l;}),r.d(t,"c",function(){return h;}),r.d(t,"d",function(){return d;});var n=r(0),o=r(30);function c(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Object(n.a)(e);}function f(e,t){for(e=String(e);e.length>>2]>>>24-i%4*8&255;t[n+i>>>2]|=c<<24-(n+i)%4*8;}else for(var f=0;f>>2]=r[f>>>2];return this.sigBytes+=o,this;},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4);},clone:function(){var e=d.clone.call(this);return e.words=this.words.slice(0),e;},random:function(e){for(var t=[],i=0;i>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16));}return n.join("");},parse:function(e){for(var t=e.length,r=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new m.init(r,t/2);}},w=y.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o));}return n.join("");},parse:function(e){for(var t=e.length,r=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new m.init(r,t);}},_=y.Utf8={stringify:function(e){try{return decodeURIComponent(escape(w.stringify(e)));}catch(e){throw new Error("Malformed UTF-8 data");}},parse:function(e){return w.parse(unescape(encodeURIComponent(e)));}},A=h.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new m.init(),this._nDataBytes=0;},_append:function(data){"string"==typeof data&&(data=_.parse(data)),this._data.concat(data),this._nDataBytes+=data.sigBytes;},_process:function(t){var r,data=this._data,n=data.words,o=data.sigBytes,c=this.blockSize,f=o/(4*c),l=(f=t?e.ceil(f):e.max((0|f)-this._minBufferSize,0))*c,h=e.min(4*l,o);if(l){for(var d=0;d32&&v.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r;}function k(e,t){return{address:Object(n.a)(e),storageKeys:(t||[]).map((t,r)=>(32!==Object(c.d)(t)&&v.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase()))};}function I(e){if(Array.isArray(e))return e.map((e,t)=>Array.isArray(e)?(e.length>2&&v.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),k(e[0],e[1])):k(e.address,e.storageKeys));const t=Object.keys(e).map(t=>{const r=e[t].reduce((e,t)=>(e[t]=!0,e),{});return k(t,Object.keys(r).sort());});return t.sort((a,b)=>a.address.localeCompare(b.address)),t;}function C(e){return I(e).map(e=>[e.address,e.storageKeys]);}function O(e,t){if(null!=e.gasPrice){const t=o.a.from(e.gasPrice),r=o.a.from(e.maxFeePerGas||0);t.eq(r)||v.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r});}const r=[x(e.chainId||0,"chainId"),x(e.nonce||0,"nonce"),x(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),x(e.maxFeePerGas||0,"maxFeePerGas"),x(e.gasLimit||0,"gasLimit"),null!=e.to?Object(n.a)(e.to):"0x",x(e.value||0,"value"),e.data||"0x",C(e.accessList||[])];if(t){const e=Object(c.n)(t);r.push(x(e.recoveryParam,"recoveryParam")),r.push(Object(c.o)(e.r)),r.push(Object(c.o)(e.s));}return Object(c.c)(["0x02",d.encode(r)]);}function B(e,t){const r=[x(e.chainId||0,"chainId"),x(e.nonce||0,"nonce"),x(e.gasPrice||0,"gasPrice"),x(e.gasLimit||0,"gasLimit"),null!=e.to?Object(n.a)(e.to):"0x",x(e.value||0,"value"),e.data||"0x",C(e.accessList||[])];if(t){const e=Object(c.n)(t);r.push(x(e.recoveryParam,"recoveryParam")),r.push(Object(c.o)(e.r)),r.push(Object(c.o)(e.s));}return Object(c.c)(["0x01",d.encode(r)]);}function R(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&v.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){Object(h.b)(e,E);const r=[];M.forEach(function(t){let n=e[t.name]||[];const o={};t.numeric&&(o.hexPad="left"),n=Object(c.a)(Object(c.i)(n,o)),t.length&&n.length!==t.length&&n.length>0&&v.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=Object(c.o)(n),n.length>t.maxLength&&v.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push(Object(c.i)(n));});let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&v.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!Object(c.k)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push(Object(c.i)(n)),r.push("0x"),r.push("0x")),!t)return d.encode(r);const o=Object(c.n)(t);let f=27+o.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),f+=2*n+8,o.v>28&&o.v!==f&&v.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):o.v!==f&&v.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push(Object(c.i)(f)),r.push(Object(c.o)(Object(c.a)(o.r))),r.push(Object(c.o)(Object(c.a)(o.s))),d.encode(r);}(e,t);switch(e.type){case 1:return B(e,t);case 2:return O(e,t);}return v.throwError(`unsupported transaction type: ${e.type}`,y.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type});}function P(e,t,r){try{const r=A(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r;}catch(e){v.throwArgumentError("invalid v for transaction type: 1","v",t[0]);}e.r=Object(c.h)(t[1],32),e.s=Object(c.h)(t[2],32);try{const t=Object(l.a)(r(e));e.from=T(t,{r:e.r,s:e.s,recoveryParam:e.v});}catch(e){console.log(e);}}function F(e){const t=Object(c.a)(e);if(t[0]>127)return function(e){const t=d.decode(e);9!==t.length&&6!==t.length&&v.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:A(t[0]).toNumber(),gasPrice:A(t[1]),gasLimit:A(t[2]),to:_(t[3]),value:A(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.a.from(t[6]).toNumber();}catch(e){return console.log(e),r;}if(r.r=Object(c.h)(t[7],32),r.s=Object(c.h)(t[8],32),o.a.from(r.r).isZero()&&o.a.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const o=t.slice(0,6);0!==r.chainId&&(o.push(Object(c.i)(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);const f=Object(l.a)(d.encode(o));try{r.from=T(f,{r:Object(c.i)(r.r),s:Object(c.i)(r.s),recoveryParam:n});}catch(e){console.log(e);}r.hash=Object(l.a)(e);}return r.type=null,r;}(t);switch(t[0]){case 1:return function(e){const t=d.decode(e.slice(1));8!==t.length&&11!==t.length&&v.throwArgumentError("invalid component count for transaction type: 1","payload",Object(c.i)(e));const r={type:1,chainId:A(t[0]).toNumber(),nonce:A(t[1]).toNumber(),gasPrice:A(t[2]),gasLimit:A(t[3]),to:_(t[4]),value:A(t[5]),data:t[6],accessList:I(t[7])};return 8===t.length||(r.hash=Object(l.a)(e),P(r,t.slice(8),B)),r;}(t);case 2:return function(e){const t=d.decode(e.slice(1));9!==t.length&&12!==t.length&&v.throwArgumentError("invalid component count for transaction type: 2","payload",Object(c.i)(e));const r=A(t[2]),n=A(t[3]),o={type:2,chainId:A(t[0]).toNumber(),nonce:A(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:A(t[4]),to:_(t[5]),value:A(t[6]),data:t[7],accessList:I(t[8])};return 9===t.length||(o.hash=Object(l.a)(e),P(o,t.slice(9),O)),o;}(t);}return v.throwError(`unsupported transaction type: ${t[0]}`,y.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]});}},function(e,t,r){"use strict";r.d(t,"d",function(){return v;}),r.d(t,"a",function(){return _;}),r.d(t,"c",function(){return T;}),r.d(t,"b",function(){return x;});var n=r(3),o=r.n(n),c=r(0),f=r(2),l=r(118),h=o.a.BN;const d=new f.b(l.a),m={},y=9007199254740991;function v(e){return null!=e&&(_.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||Object(c.l)(e)||"bigint"==typeof e||Object(c.j)(e));}let w=!1;class _{constructor(e,t){d.checkNew(new.target,_),e!==m&&d.throwError("cannot call constructor directly; use BigNumber.from",f.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this);}fromTwos(e){return M(E(this).fromTwos(e));}toTwos(e){return M(E(this).toTwos(e));}abs(){return"-"===this._hex[0]?_.from(this._hex.substring(1)):this;}add(e){return M(E(this).add(E(e)));}sub(e){return M(E(this).sub(E(e)));}div(e){return _.from(e).isZero()&&S("division by zero","div"),M(E(this).div(E(e)));}mul(e){return M(E(this).mul(E(e)));}mod(e){const t=E(e);return t.isNeg()&&S("cannot modulo negative values","mod"),M(E(this).umod(t));}pow(e){const t=E(e);return t.isNeg()&&S("cannot raise to negative values","pow"),M(E(this).pow(t));}and(e){const t=E(e);return(this.isNegative()||t.isNeg())&&S("cannot 'and' negative values","and"),M(E(this).and(t));}or(e){const t=E(e);return(this.isNegative()||t.isNeg())&&S("cannot 'or' negative values","or"),M(E(this).or(t));}xor(e){const t=E(e);return(this.isNegative()||t.isNeg())&&S("cannot 'xor' negative values","xor"),M(E(this).xor(t));}mask(e){return(this.isNegative()||e<0)&&S("cannot mask negative values","mask"),M(E(this).maskn(e));}shl(e){return(this.isNegative()||e<0)&&S("cannot shift negative values","shl"),M(E(this).shln(e));}shr(e){return(this.isNegative()||e<0)&&S("cannot shift negative values","shr"),M(E(this).shrn(e));}eq(e){return E(this).eq(E(e));}lt(e){return E(this).lt(E(e));}lte(e){return E(this).lte(E(e));}gt(e){return E(this).gt(E(e));}gte(e){return E(this).gte(E(e));}isNegative(){return"-"===this._hex[0];}isZero(){return E(this).isZero();}toNumber(){try{return E(this).toNumber();}catch(e){S("overflow","toNumber",this.toString());}return null;}toBigInt(){try{return BigInt(this.toString());}catch(e){}return d.throwError("this platform does not support BigInt",f.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()});}toString(){return arguments.length>0&&(10===arguments[0]?w||(w=!0,d.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?d.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.b.errors.UNEXPECTED_ARGUMENT,{}):d.throwError("BigNumber.toString does not accept parameters",f.b.errors.UNEXPECTED_ARGUMENT,{})),E(this).toString(10);}toHexString(){return this._hex;}toJSON(e){return{type:"BigNumber",hex:this.toHexString()};}static from(e){if(e instanceof _)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new _(m,A(e)):e.match(/^-?[0-9]+$/)?new _(m,A(new h(e))):d.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&S("underflow","BigNumber.from",e),(e>=y||e<=-y)&&S("overflow","BigNumber.from",e),_.from(String(e));const t=e;if("bigint"==typeof t)return _.from(t.toString());if(Object(c.j)(t))return _.from(Object(c.i)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return _.from(e);}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(Object(c.l)(e)||"-"===e[0]&&Object(c.l)(e.substring(1))))return _.from(e);}return d.throwArgumentError("invalid BigNumber value","value",e);}static isBigNumber(e){return!(!e||!e._isBigNumber);}}function A(e){if("string"!=typeof e)return A(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&d.throwArgumentError("invalid hex","value",e),"0x00"===(e=A(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e;}function M(e){return _.from(A(e));}function E(e){const t=_.from(e).toHexString();return"-"===t[0]?new h("-"+t.substring(3),16):new h(t.substring(2),16);}function S(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),d.throwError(e,f.b.errors.NUMERIC_FAULT,n);}function T(e){return new h(e,36).toString(16);}function x(e){return new h(e,16).toString(36);}},function(e,t){var r,n,o=e.exports={};function c(){throw new Error("setTimeout has not been defined");}function f(){throw new Error("clearTimeout has not been defined");}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===c||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0);}catch(t){try{return r.call(null,e,0);}catch(t){return r.call(this,e,0);}}}!function(){try{r="function"==typeof setTimeout?setTimeout:c;}catch(e){r=c;}try{n="function"==typeof clearTimeout?clearTimeout:f;}catch(e){n=f;}}();var h,d=[],m=!1,y=-1;function v(){m&&h&&(m=!1,h.length?d=h.concat(d):y=-1,d.length&&w());}function w(){if(!m){var e=l(v);m=!0;for(var t=d.length;t;){for(h=d,d=[];++y1)for(var i=1;i=256)throw new Error("Depth too large!");return x(Object(o.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(o.i)(this.depth),this.parentFingerprint,Object(o.h)(Object(o.i)(this.index),4),this.chainCode,null!=this.privateKey?Object(o.b)(["0x00",this.privateKey]):this.publicKey]));}neuter(){return new O(I,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path);}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let path=this.path;path&&(path+="/"+(2147483647&e));const data=new Uint8Array(37);if(e&E){if(!this.privateKey)throw new Error("cannot derive child of neutered node");data.set(Object(o.a)(this.privateKey),1),path&&(path+="'");}else data.set(Object(o.a)(this.publicKey));for(let i=24;i>=0;i-=8)data[33+(i>>3)]=e>>24-i&255;const t=Object(o.a)(Object(m.a)(y.a.sha512,this.chainCode,data)),r=t.slice(0,32),n=t.slice(32);let f=null,l=null;if(this.privateKey)f=T(c.a.from(r).add(this.privateKey).mod(A));else{l=new d.a(Object(o.i)(r))._addPoint(this.publicKey);}let h=path;const v=this.mnemonic;return v&&(h=Object.freeze({phrase:v.phrase,path:path,locale:v.locale||"en"})),new O(I,f,l,this.fingerprint,T(n),e,this.depth+1,h);}derivePath(path){const e=path.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+path);"m"===e[0]&&e.shift();let t=this;for(let i=0;i=E)throw new Error("invalid path index - "+component);t=t._derive(E+e);}else{if(!component.match(/^[0-9]+$/))throw new Error("invalid path component - "+component);{const e=parseInt(component);if(e>=E)throw new Error("invalid path index - "+component);t=t._derive(e);}}}return t;}static _fromSeed(e,t){const r=Object(o.a)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=Object(o.a)(Object(m.a)(y.a.sha512,M,r));return new O(I,T(n.slice(0,32)),null,"0x00000000",T(n.slice(32)),0,0,t);}static fromMnemonic(e,t,r){return e=P(R(e,r=k(r)),r),O._fromSeed(B(e,t),{phrase:e,path:"m",locale:r.locale});}static fromSeed(e){return O._fromSeed(e,null);}static fromExtendedKey(e){const t=n.a.decode(e);82===t.length&&x(t.slice(0,78))===e||_.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],c=Object(o.i)(t.slice(5,9)),f=parseInt(Object(o.i)(t.slice(9,13)).substring(2),16),l=Object(o.i)(t.slice(13,45)),h=t.slice(45,78);switch(Object(o.i)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new O(I,null,Object(o.i)(h),c,l,f,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==h[0])break;return new O(I,Object(o.i)(h.slice(1)),null,c,l,f,r,null);}return _.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");}}function B(e,t){t||(t="");const r=Object(f.f)("mnemonic"+t,f.a.NFKD);return Object(l.a)(Object(f.f)(e,f.a.NFKD),r,2048,64,"sha512");}function R(e,t){t=k(t),_.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=Object(o.a)(new Uint8Array(Math.ceil(11*r.length/8)));let c=0;for(let i=0;i>3]|=1<<7-c%8),c++;}const f=32*r.length/3,l=S(r.length/3);if((Object(o.a)(Object(m.c)(n.slice(0,f/8)))[0]&l)!==(n[n.length-1]&l))throw new Error("invalid checksum");return Object(o.i)(n.slice(0,f/8));}function P(e,t){if(t=k(t),(e=Object(o.a)(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let i=0;i8?(r[r.length-1]<<=8,r[r.length-1]|=e[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[i]>>8-n,r.push(e[i]&(1<<8-n)-1),n+=3);const c=e.length/4,f=Object(o.a)(Object(m.c)(e))[0]&S(c);return r[r.length-1]<<=c,r[r.length-1]|=f>>8-c,t.join(r.map(e=>t.getWord(e)));}function F(e,t){try{return R(e,t),!0;}catch(e){}return!1;}function L(e){return("number"!=typeof e||e<0||e>=E||e%1)&&_.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`;}},function(e,t,r){"use strict";r.d(t,"a",function(){return _;}),r.d(t,"b",function(){return A;}),r.d(t,"c",function(){return M;});var n=r(127),o=r(0),c=r(1),f=r(30),l=r(2);var h=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};function d(e,t){return h(this,void 0,void 0,function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0,mode:"cors",cache:"no-cache",credentials:"same-origin",redirect:"follow",referrer:"client"},n=yield fetch(e,r),body=yield n.arrayBuffer(),c={};return n.headers.forEach?n.headers.forEach((e,t)=>{c[t.toLowerCase()]=e;}):n.headers.keys().forEach(e=>{c[e.toLowerCase()]=n.headers.get(e);}),{headers:c,statusCode:n.status,statusMessage:n.statusText,body:Object(o.a)(new Uint8Array(body))};});}var m=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const y=new l.b("web/5.4.0");function v(e){return new Promise(t=>{setTimeout(t,e);});}function w(e,t){if(null==e)return null;if("string"==typeof e)return e;if(Object(o.k)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Object(f.h)(e);}catch(e){}return Object(o.i)(e);}return e;}function _(e,body,t){const r="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;y.assertArgument(r>0&&r%1==0,"invalid connection throttle limit","connection.throttleLimit",r);const o="object"==typeof e?e.throttleCallback:null,c="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;y.assertArgument(c>0&&c%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",c);const h={};let _=null;const A={method:"GET"};let M=!1,E=12e4;if("string"==typeof e)_=e;else if("object"==typeof e){if(null!=e&&null!=e.url||y.throwArgumentError("missing URL","connection.url",e),_=e.url,"number"==typeof e.timeout&&e.timeout>0&&(E=e.timeout),e.headers)for(const t in e.headers)h[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(M=!0);if(A.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==_.substring(0,6)&&!0!==e.allowInsecureAuthentication&&y.throwError("basic authentication requires a secure https url",l.b.errors.INVALID_ARGUMENT,{argument:"url",url:_,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;h.authorization={key:"Authorization",value:"Basic "+Object(n.b)(Object(f.f)(t))};}}body&&(A.method="POST",A.body=body,null==h["content-type"]&&(h["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==h["content-length"]&&(h["content-length"]={key:"Content-Length",value:String(body.length)}));const S={};Object.keys(h).forEach(e=>{const header=h[e];S[header.key]=header.value;}),A.headers=S;const T=function(){let e=null;return{promise:new Promise(function(t,r){E&&(e=setTimeout(()=>{null!=e&&(e=null,r(y.makeError("timeout",l.b.errors.TIMEOUT,{requestBody:w(A.body,S["content-type"]),requestMethod:A.method,timeout:E,url:_})));},E));}),cancel:function(){null!=e&&(clearTimeout(e),e=null);}};}(),x=function(){return m(this,void 0,void 0,function*(){for(let e=0;e=300)&&(T.cancel(),y.throwError("bad response",l.b.errors.SERVER_ERROR,{status:n.statusCode,headers:n.headers,body:w(body,n.headers?n.headers["content-type"]:null),requestBody:w(A.body,S["content-type"]),requestMethod:A.method,url:_})),t)try{const e=yield t(body,n);return T.cancel(),e;}catch(t){if(t.throttleRetry&&e"content-type"===e.toLowerCase()).length||(r.headers=Object(c.g)(r.headers),r.headers["content-type"]="application/json");}else r.headers={"content-type":"application/json"};e=r;}return _(e,body,(e,t)=>{let n=null;if(null!=e)try{n=JSON.parse(Object(f.h)(e));}catch(t){y.throwError("invalid JSON",l.b.errors.SERVER_ERROR,{body:e,error:t});}return r&&(n=r(n,t)),n;});}function M(e,t){return t||(t={}),null==(t=Object(c.g)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise(function(r,n){let o=null,c=!1;const f=()=>!c&&(c=!0,o&&clearTimeout(o),!0);t.timeout&&(o=setTimeout(()=>{f()&&n(new Error("timeout"));},t.timeout));const l=t.retryLimit;let h=0;!function o(){return e().then(function(e){if(void 0!==e)f()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",o);else if(t.onceBlock)t.onceBlock.once("block",o);else if(!c){if(h++,h>l)return void(f()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,h)));et.ceiling&&(e=t.ceiling),setTimeout(o,e);}return null;},function(e){f()&&n(e);});}();});}},function(e,t,r){"use strict";function n(e,t,r,n,o,c,f){try{var l=e[c](f),h=l.value;}catch(e){return void r(e);}l.done?t(h):Promise.resolve(h).then(n,o);}function o(e){return function(){var t=this,r=arguments;return new Promise(function(o,c){var f=e.apply(t,r);function l(e){n(f,o,c,l,h,"next",e);}function h(e){n(f,o,c,l,h,"throw",e);}l(void 0);});};}r.d(t,"a",function(){return o;});},function(e,t,r){t.Scalar=r(96),t.PolField=r(342),t.F1Field=r(183),t.F2Field=r(234),t.F3Field=r(235),t.ZqField=t.F1Field,t.EC=r(236),t.bn128=r(427),t.utils=r(428);},function(e,t,r){var n=t;n.utils=r(45),n.common=r(84),n.sha=r(326),n.ripemd=r(330),n.hmac=r(331),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160;},,function(e,t){e.exports=function(e){return"function"==typeof e;};},function(e,t,r){var n;e.exports=(n=r(11),r(58),void(n.lib.Cipher||function(e){var t=n,r=t.lib,o=r.Base,c=r.WordArray,f=r.BufferedBlockAlgorithm,l=t.enc,h=(l.Utf8,l.Base64),d=t.algo.EvpKDF,m=r.Cipher=f.extend({cfg:o.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t);},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t);},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset();},reset:function(){f.reset.call(this),this._doReset();},process:function(e){return this._append(e),this._process();},finalize:function(e){return e&&this._append(e),this._doFinalize();},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?T:E;}return function(t){return{encrypt:function(r,n,o){return e(n).encrypt(t,r,n,o);},decrypt:function(r,n,o){return e(n).decrypt(t,r,n,o);}};};}()}),y=(r.StreamCipher=m.extend({_doFinalize:function(){return this._process(!0);},blockSize:1}),t.mode={}),v=r.BlockCipherMode=o.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t);},createDecryptor:function(e,t){return this.Decryptor.create(e,t);},init:function(e,t){this._cipher=e,this._iv=t;}}),w=y.CBC=function(){var t=v.extend();function r(t,r,n){var o,c=this._iv;c?(o=c,this._iv=e):o=this._prevBlock;for(var i=0;i>>2];data.sigBytes-=e;}},A=(r.BlockCipher=m.extend({cfg:m.cfg.extend({mode:w,padding:_}),reset:function(){var e;m.reset.call(this);var t=this.cfg,r=t.iv,n=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(n,this,r&&r.words),this._mode.__creator=e);},_doProcessBlock:function(e,t){this._mode.processBlock(e,t);},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e;},blockSize:4}),r.CipherParams=o.extend({init:function(e){this.mixIn(e);},toString:function(e){return(e||this.formatter).stringify(this);}})),M=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?c.create([1398893684,1701076831]).concat(r).concat(t):t).toString(h);},parse:function(e){var t,r=h.parse(e),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=c.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),A.create({ciphertext:r,salt:t});}},E=r.SerializableCipher=o.extend({cfg:o.extend({format:M}),encrypt:function(e,t,r,n){n=this.cfg.extend(n);var o=e.createEncryptor(r,n),c=o.finalize(t),f=o.cfg;return A.create({ciphertext:c,key:r,iv:f.iv,algorithm:e,mode:f.mode,padding:f.padding,blockSize:e.blockSize,formatter:n.format});},decrypt:function(e,t,r,n){return n=this.cfg.extend(n),t=this._parse(t,n.format),e.createDecryptor(r,n).finalize(t.ciphertext);},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e;}}),S=(t.kdf={}).OpenSSL={execute:function(e,t,r,n){n||(n=c.random(8));var o=d.create({keySize:t+r}).compute(e,n),f=c.create(o.words.slice(t),4*r);return o.sigBytes=4*t,A.create({key:o,iv:f,salt:n});}},T=r.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:S}),encrypt:function(e,t,r,n){var o=(n=this.cfg.extend(n)).kdf.execute(r,e.keySize,e.ivSize);n.iv=o.iv;var c=E.encrypt.call(this,e,t,o.key,n);return c.mixIn(o),c;},decrypt:function(e,t,r,n){n=this.cfg.extend(n),t=this._parse(t,n.format);var o=n.kdf.execute(r,e.keySize,e.ivSize,t.salt);return n.iv=o.iv,E.decrypt.call(this,e,t,o.key,n);}});}()));},function(e,t,r){var n=r(31),o=r(158),c=r(39),f=r(161),l=r(162),h=r(268),d=o("wks"),m=n.Symbol,y=h?m:m&&m.withoutSetter||f;e.exports=function(e){return c(d,e)&&(l||"string"==typeof d[e])||(l&&c(m,e)?d[e]=m[e]:d[e]=y("Symbol."+e)),d[e];};},function(e,t,r){"use strict";r.r(t);var n=r(55);r.d(t,"ethers",function(){return n;});var o=r(35);r.d(t,"Signer",function(){return o.a;});var c=r(81);r.d(t,"Wallet",function(){return c.a;}),r.d(t,"VoidSigner",function(){return o.b;});var f=r(94);r.d(t,"getDefaultProvider",function(){return f.getDefaultProvider;}),r.d(t,"providers",function(){return n.providers;});var l=r(64);r.d(t,"BaseContract",function(){return l.a;}),r.d(t,"Contract",function(){return l.b;}),r.d(t,"ContractFactory",function(){return l.c;});var h=r(16);r.d(t,"BigNumber",function(){return h.a;});var d=r(334);r.d(t,"FixedNumber",function(){return d.a;}),r.d(t,"constants",function(){return n.constants;});var m=r(2);r.d(t,"errors",function(){return m.a;}),r.d(t,"logger",function(){return n.logger;}),r.d(t,"utils",function(){return n.utils;});var y=r(537);r.d(t,"wordlists",function(){return y.a;});var v=r(117);r.d(t,"version",function(){return v.a;});var w=r(10);r.d(t,"Wordlist",function(){return w.a;});try{const e=window;null==e._ethers&&(e._ethers=n);}catch(e){}},function(e,t,r){"use strict";r.d(t,"a",function(){return c;}),r.d(t,"c",function(){return f;}),r.d(t,"b",function(){return h;}),r.d(t,"f",function(){return m;}),r.d(t,"d",function(){return v;}),r.d(t,"e",function(){return w;}),r.d(t,"h",function(){return _;}),r.d(t,"g",function(){return A;});var n=r(0);const o=new(r(2).b)("strings/5.4.0");var c,f;function l(e,t,r,output,n){if(e===f.BAD_PREFIX||e===f.UNEXPECTED_CONTINUE){let i=0;for(let e=t+1;e>6==2;e++)i++;return i;}return e===f.OVERRUN?r.length-t-1:0;}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD";}(c||(c={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation";}(f||(f={}));const h=Object.freeze({error:function(e,t,r,output,n){return o.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r);},ignore:l,replace:function(e,t,r,output,n){return e===f.OVERLONG?(output.push(n),0):(output.push(65533),l(e,t,r));}});function d(e,t){null==t&&(t=h.error),e=Object(n.a)(e);const r=[];let i=0;for(;i>7==0){r.push(n);continue;}let o=null,c=null;if(192==(224&n))o=1,c=127;else if(224==(240&n))o=2,c=2047;else{if(240!=(248&n)){i+=t(128==(192&n)?f.UNEXPECTED_CONTINUE:f.BAD_PREFIX,i-1,e,r);continue;}o=3,c=65535;}if(i-1+o>=e.length){i+=t(f.OVERRUN,i-1,e,r);continue;}let l=n&(1<<8-o-1)-1;for(let n=0;n1114111?i+=t(f.OUT_OF_RANGE,i-1-o,e,r,l):l>=55296&&l<=57343?i+=t(f.UTF16_SURROGATE,i-1-o,e,r,l):l<=c?i+=t(f.OVERLONG,i-1-o,e,r,l):r.push(l));}return r;}function m(e,form=c.current){form!=c.current&&(o.checkNormalize(),e=e.normalize(form));let t=[];for(let i=0;i>6|192),t.push(63&r|128);else if(55296==(64512&r)){i++;const n=e.charCodeAt(i);if(i>=e.length||56320!=(64512&n))throw new Error("invalid utf-8 string");const o=65536+((1023&r)<<10)+(1023&n);t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128);}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(63&r|128);}return Object(n.a)(t);}function y(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4);}function v(e,t){return'"'+d(e,t).map(e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\";}if(e>=32&&e<127)return String.fromCharCode(e);}return e<=65535?y(e):y(55296+((e-=65536)>>10&1023))+y(56320+(1023&e));}).join("")+'"';}function w(e){return e.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("");}function _(e,t){return w(d(e,t));}function A(e,form=c.current){return d(m(e,form));}},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e;};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this;}()||Function("return this")();}).call(this,r(18));},function(e,t){e.exports=function(e){try{return!!e();}catch(e){return!0;}};},function(e,t,r){"use strict";r.d(t,"a",function(){return d;}),r.d(t,"c",function(){return m;}),r.d(t,"b",function(){return y;});var n=r(287),o=r(0),c=r(1);const f=new(r(2).b)("signing-key/5.4.0");let l=null;function h(){return l||(l=new n.a("secp256k1")),l;}class d{constructor(e){Object(c.d)(this,"curve","secp256k1"),Object(c.d)(this,"privateKey",Object(o.i)(e));const t=h().keyFromPrivate(Object(o.a)(this.privateKey));Object(c.d)(this,"publicKey","0x"+t.getPublic(!1,"hex")),Object(c.d)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),Object(c.d)(this,"_isSigningKey",!0);}_addPoint(e){const t=h().keyFromPublic(Object(o.a)(this.publicKey)),r=h().keyFromPublic(Object(o.a)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex");}signDigest(e){const t=h().keyFromPrivate(Object(o.a)(this.privateKey)),r=Object(o.a)(e);32!==r.length&&f.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return Object(o.n)({recoveryParam:n.recoveryParam,r:Object(o.h)("0x"+n.r.toString(16),32),s:Object(o.h)("0x"+n.s.toString(16),32)});}computeSharedSecret(e){const t=h().keyFromPrivate(Object(o.a)(this.privateKey)),r=h().keyFromPublic(Object(o.a)(y(e)));return Object(o.h)("0x"+t.derive(r.getPublic()).toString(16),32);}static isSigningKey(e){return!(!e||!e._isSigningKey);}}function m(e,t){const r=Object(o.n)(t),n={r:Object(o.a)(r.r),s:Object(o.a)(r.s)};return"0x"+h().recoverPubKey(Object(o.a)(e),n,r.recoveryParam).encode("hex",!1);}function y(e,t){const r=Object(o.a)(e);if(32===r.length){const e=new d(r);return t?"0x"+h().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey;}return 33===r.length?t?Object(o.i)(r):"0x"+h().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+h().keyFromPublic(r).getPublic(!0,"hex"):Object(o.i)(r):f.throwArgumentError("invalid public or private key","key","[REDACTED]");}},function(e,t,r){var n=r(31),o=r(78).f,c=r(91),f=r(79),l=r(160),h=r(495),d=r(276);e.exports=function(e,source){var t,r,m,y,v,w=e.target,_=e.global,A=e.stat;if(t=_?n:A?n[w]||l(w,{}):(n[w]||{}).prototype)for(r in source){if(y=source[r],m=e.noTargetGet?(v=o(t,r))&&v.value:t[r],!d(_?r:w+(A?".":"#")+r,e.forced)&&void 0!==m){if(typeof y==typeof m)continue;h(y,m);}(e.sham||m&&m.sham)&&c(y,"sham",!0),f(t,r,y,e);}};},function(e,t,r){"use strict";r.d(t,"a",function(){return d;}),r.d(t,"b",function(){return m;});var n=r(1),o=r(2);var c=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const f=new o.b("abstract-signer/5.4.1"),l=["accessList","chainId","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],h=[o.b.errors.INSUFFICIENT_FUNDS,o.b.errors.NONCE_EXPIRED,o.b.errors.REPLACEMENT_UNDERPRICED];class d{constructor(){f.checkAbstract(new.target,d),Object(n.d)(this,"_isSigner",!0);}getBalance(e){return c(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e);});}getTransactionCount(e){return c(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e);});}estimateGas(e){return c(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield Object(n.f)(this.checkTransaction(e));return yield this.provider.estimateGas(t);});}call(e,t){return c(this,void 0,void 0,function*(){this._checkProvider("call");const r=yield Object(n.f)(this.checkTransaction(e));return yield this.provider.call(r,t);});}sendTransaction(e){return c(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r);});}getChainId(){return c(this,void 0,void 0,function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId;});}getGasPrice(){return c(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice();});}getFeeData(){return c(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData();});}resolveName(e){return c(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e);});}checkTransaction(e){for(const t in e)-1===l.indexOf(t)&&f.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=Object(n.g)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&f.throwArgumentError("from address mismatch","transaction",e),t[0])),t;}populateTransaction(e){return c(this,void 0,void 0,function*(){const t=yield Object(n.f)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then(e=>c(this,void 0,void 0,function*(){if(null==e)return null;const address=yield this.resolveName(e);return null==address&&f.throwArgumentError("provided ENS name resolves to null","tx.to",e),address;})),t.to.catch(e=>{}));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||f.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):f.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas){if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type){if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas){if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e;}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);}else null!=e.gasPrice?(r&&f.throwError("network does not support EIP-1559",o.b.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):f.throwError("failed to get consistent fee data",o.b.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});}else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas));}}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch(e=>{if(h.indexOf(e.code)>=0)throw e;return f.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",o.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t});})),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(t=>(0!==t[1]&&t[0]!==t[1]&&f.throwArgumentError("chainId address mismatch","transaction",e),t[0])),yield Object(n.f)(t);});}_checkProvider(e){this.provider||f.throwError("missing provider",o.b.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"});}static isSigner(e){return!(!e||!e._isSigner);}}class m extends d{constructor(address,e){f.checkNew(new.target,m),super(),Object(n.d)(this,"address",address),Object(n.d)(this,"provider",e||null);}getAddress(){return Promise.resolve(this.address);}_fail(e,t){return Promise.resolve().then(()=>{f.throwError(e,o.b.errors.UNSUPPORTED_OPERATION,{operation:t});});}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage");}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction");}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData");}connect(e){return new m(this.address,e);}}},function(e,t,r){"use strict";r.r(t),r.d(t,"encode",function(){return d;}),r.d(t,"decode",function(){return v;});var n=r(0),o=r(2);const c=new o.b("rlp/5.4.0");function f(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t;}function l(data,e,t){let r=0;for(let i=0;ie+1+r&&c.throwError("child data too short",o.b.errors.BUFFER_OVERRUN,{});}return{consumed:1+r,result:n};}function y(data,e){if(0===data.length&&c.throwError("data too short",o.b.errors.BUFFER_OVERRUN,{}),data[e]>=248){const t=data[e]-247;e+1+t>data.length&&c.throwError("data short segment too short",o.b.errors.BUFFER_OVERRUN,{});const r=l(data,e+1,t);return e+1+t+r>data.length&&c.throwError("data long segment too short",o.b.errors.BUFFER_OVERRUN,{}),m(data,e,e+1+t,t+r);}if(data[e]>=192){const t=data[e]-192;return e+1+t>data.length&&c.throwError("data array too short",o.b.errors.BUFFER_OVERRUN,{}),m(data,e,e+1,t);}if(data[e]>=184){const t=data[e]-183;e+1+t>data.length&&c.throwError("data array too short",o.b.errors.BUFFER_OVERRUN,{});const r=l(data,e+1,t);e+1+t+r>data.length&&c.throwError("data array too short",o.b.errors.BUFFER_OVERRUN,{});return{consumed:1+t+r,result:Object(n.i)(data.slice(e+1+t,e+1+t+r))};}if(data[e]>=128){const t=data[e]-128;e+1+t>data.length&&c.throwError("data too short",o.b.errors.BUFFER_OVERRUN,{});return{consumed:1+t,result:Object(n.i)(data.slice(e+1,e+1+t))};}return{consumed:1,result:Object(n.i)(data[e])};}function v(data){const e=Object(n.a)(data),t=y(e,0);return t.consumed!==e.length&&c.throwArgumentError("invalid rlp data","data",data),t.result;}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed");}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t);};},function(e,t,r){"use strict";var n=t,o=r(3),c=r(37),f=r(222);n.assert=c,n.toArray=f.toArray,n.zero2=f.zero2,n.toHex=f.toHex,n.encode=f.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var o=1<(o>>1)-1?(o>>1)-l:l,c.isubn(f)):f=0,n[i]=f,c.iushrn(1);}return n;},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,o=0,c=0;e.cmpn(-o)>0||t.cmpn(-c)>0;){var f,l,h=e.andln(3)+o&3,d=t.andln(3)+c&3;3===h&&(h=-1),3===d&&(d=-1),f=0==(1&h)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==d?h:-h,r[0].push(f),l=0==(1&d)?0:3!==(n=t.andln(7)+c&7)&&5!==n||2!==h?d:-d,r[1].push(l),2*o===f+1&&(o=1-o),2*c===l+1&&(c=1-c),e.iushrn(1),t.iushrn(1);}return r;},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this);};},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e;},n.intFromLE=function(e){return new o(e,"hex","le");};},function(e,t,r){var n=r(62),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(n(e),t);};},function(e,t,r){var n=r(32);e.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7;}})[1];});},function(e,t,r){"use strict";r.d(t,"a",function(){return h;}),r.d(t,"b",function(){return d;});var n=r(16),o=(r(0),r(1)),c=r(2);var f=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const l=new c.b("abstract-provider/5.4.1");class h extends o.a{static isForkEvent(e){return!(!e||!e._isForkEvent);}}class d{constructor(){l.checkAbstract(new.target,d),Object(o.d)(this,"_isProvider",!0);}getFeeData(){return f(this,void 0,void 0,function*(){const{block:e,gasPrice:t}=yield Object(o.f)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(e=>null)});let r=null,c=null;return e&&e.baseFeePerGas&&(c=n.a.from("2500000000"),r=e.baseFeePerGas.mul(2).add(c)),{maxFeePerGas:r,maxPriorityFeePerGas:c,gasPrice:t};});}addListener(e,t){return this.on(e,t);}removeListener(e,t){return this.off(e,t);}static isProvider(e){return!(!e||!e._isProvider);}}},function(e,t,r){"use strict";!function(t){function r(e){return parseInt(e)===e;}function n(e){if(!r(e.length))return!1;for(var i=0;i255)return!1;return!0;}function o(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e);}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object");}function c(e){return new Uint8Array(e);}function f(e,t,r,n,o){null==n&&null==o||(e=e.slice?e.slice(n,o):Array.prototype.slice.call(e,n,o)),t.set(e,r);}var l,h={toBytes:function(text){var e=[],i=0;for(text=encodeURI(text);i191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3);}return t.join("");}},d=(l="0123456789abcdef",{toBytes:function(text){for(var e=[],i=0;i>4]+l[15&r]);}return t.join("");}}),m={16:10,24:12,32:14},y=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],v=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],w=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],_=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],A=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],M=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],E=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],S=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],T=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],x=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],k=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],I=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],C=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],O=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],B=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function R(e){for(var t=[],i=0;i>2,this._Ke[t][i%4]=o[i],this._Kd[e-t][i%4]=o[i];for(var c,f=0,l=n;l>16&255]<<24^v[c>>8&255]<<16^v[255&c]<<8^v[c>>24&255]^y[f]<<24,f+=1,8!=n)for(i=1;i>8&255]<<8^v[c>>16&255]<<16^v[c>>24&255]<<24;for(i=n/2+1;i>2,d=l%4,this._Ke[h][d]=o[i],this._Kd[e-h][d]=o[i++],l++;}for(var h=1;h>24&255]^C[c>>16&255]^O[c>>8&255]^B[255&c];},P.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,a=[0,0,0,0],r=R(e),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var n=1;n>24&255]^A[r[(i+1)%4]>>16&255]^M[r[(i+2)%4]>>8&255]^E[255&r[(i+3)%4]]^this._Ke[n][i];r=a.slice();}var o,f=c(16);for(i=0;i<4;i++)o=this._Ke[t][i],f[4*i]=255&(v[r[i]>>24&255]^o>>24),f[4*i+1]=255&(v[r[(i+1)%4]>>16&255]^o>>16),f[4*i+2]=255&(v[r[(i+2)%4]>>8&255]^o>>8),f[4*i+3]=255&(v[255&r[(i+3)%4]]^o);return f;},P.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,a=[0,0,0,0],r=R(e),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var n=1;n>24&255]^T[r[(i+3)%4]>>16&255]^x[r[(i+2)%4]>>8&255]^k[255&r[(i+1)%4]]^this._Kd[n][i];r=a.slice();}var o,f=c(16);for(i=0;i<4;i++)o=this._Kd[t][i],f[4*i]=255&(w[r[i]>>24&255]^o>>24),f[4*i+1]=255&(w[r[(i+3)%4]>>16&255]^o>>16),f[4*i+2]=255&(w[r[(i+2)%4]>>8&255]^o>>8),f[4*i+3]=255&(w[255&r[(i+1)%4]]^o);return f;};var F=function(e){if(!(this instanceof F))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new P(e);};F.prototype.encrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=c(e.length),r=c(16),i=0;i=0;--t)this._counter[t]=e%256,e>>=8;},j.prototype.setBytes=function(e){if(16!=(e=o(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e;},j.prototype.increment=function(){for(var i=15;i>=0;i--){if(255!==this._counter[i]){this._counter[i]++;break;}this._counter[i]=0;}};var U=function(e,t){if(!(this instanceof U))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof j||(t=new j(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new P(e);};U.prototype.encrypt=function(e){for(var t=o(e,!0),i=0;i16)throw new Error("PKCS#7 padding byte out of range");for(var t=data.length-e,i=0;i=0;i--)if(c[i]!==l[i])return!1;for(i=c.length-1;i>=0;i--)if(!T(a[o=c[i]],b[o],e,t))return!1;return!0;}(e,t,r,n));}return r?e===t:e==t;}function x(object){return"[object Arguments]"==Object.prototype.toString.call(object);}function k(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0;}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e);}function I(e,t,r,n){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(e){var t;try{e();}catch(e){t=e;}return t;}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!o&&E(o,r,"Missing expected exception"+n);var c="string"==typeof n,l=!e&&o&&!r;if((!e&&f.isError(o)&&c&&k(o,r)||l)&&E(o,r,"Got unwanted exception"+n),e&&o&&r&&!k(o,r)||!e&&o)throw o;}v.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return A(M(e.actual),128)+" "+e.operator+" "+A(M(e.expected),128);}(this),this.generatedMessage=!0);var t=e.stackStartFunction||E;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error();if(r.stack){var n=r.stack,o=_(t),c=n.indexOf("\n"+o);if(c>=0){var f=n.indexOf("\n",c+1);n=n.substring(f+1);}this.stack=n;}}},f.inherits(v.AssertionError,Error),v.fail=E,v.ok=S,v.equal=function(e,t,r){e!=t&&E(e,t,r,"==",v.equal);},v.notEqual=function(e,t,r){e==t&&E(e,t,r,"!=",v.notEqual);},v.deepEqual=function(e,t,r){T(e,t,!1)||E(e,t,r,"deepEqual",v.deepEqual);},v.deepStrictEqual=function(e,t,r){T(e,t,!0)||E(e,t,r,"deepStrictEqual",v.deepStrictEqual);},v.notDeepEqual=function(e,t,r){T(e,t,!1)&&E(e,t,r,"notDeepEqual",v.notDeepEqual);},v.notDeepStrictEqual=function e(t,r,n){T(t,r,!0)&&E(t,r,n,"notDeepStrictEqual",e);},v.strictEqual=function(e,t,r){e!==t&&E(e,t,r,"===",v.strictEqual);},v.notStrictEqual=function(e,t,r){e===t&&E(e,t,r,"!==",v.notStrictEqual);},v.throws=function(e,t,r){I(!0,e,t,r);},v.doesNotThrow=function(e,t,r){I(!1,e,t,r);},v.ifError=function(e){if(e)throw e;},v.strict=n(function e(t,r){t||E(t,!0,r,"==",e);},v,{equal:v.strictEqual,deepEqual:v.deepStrictEqual,notEqual:v.notStrictEqual,notDeepEqual:v.notDeepStrictEqual}),v.strict.strict=v.strict;var C=Object.keys||function(e){var t=[];for(var r in e)l.call(e,r)&&t.push(r);return t;};}).call(this,r(18));},function(e,t,r){var n=r(26);e.exports=function(e){return"object"==typeof e?null!==e:n(e);};},function(e,t,r){"use strict";var n=r(37),o=r(4);function c(e,i){return 55296==(64512&e.charCodeAt(i))&&!(i<0||i+1>=e.length)&&56320==(64512&e.charCodeAt(i+1));}function f(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0;}function l(e){return 1===e.length?"0"+e:e;}function h(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e;}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e){if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[p++]=63&n|128):c(e,i)?(n=65536+((1023&n)<<10)+(1023&e.charCodeAt(++i)),r[p++]=n>>18|240,r[p++]=n>>12&63|128,r[p++]=n>>6&63|128,r[p++]=63&n|128):(r[p++]=n>>12|224,r[p++]=n>>6&63|128,r[p++]=63&n|128);}}else for(i=0;i>>0;}return f;},t.split32=function(e,t){for(var r=new Array(4*e.length),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o);}return r;},t.rotr32=function(e,b){return e>>>b|e<<32-b;},t.rotl32=function(e,b){return e<>>32-b;},t.sum32=function(a,b){return a+b>>>0;},t.sum32_3=function(a,b,e){return a+b+e>>>0;},t.sum32_4=function(a,b,e,t){return a+b+e+t>>>0;},t.sum32_5=function(a,b,e,t,r){return a+b+e+t+r>>>0;},t.sum64=function(e,t,r,n){var o=e[t],c=n+e[t+1]>>>0,f=(c>>0,e[t+1]=c;},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0;},t.sum64_lo=function(e,t,r,n){return t+n>>>0;},t.sum64_4_hi=function(e,t,r,n,o,c,f,dl){var l=0,h=t;return l+=(h=h+n>>>0)>>0)>>0)>>0;},t.sum64_4_lo=function(e,t,r,n,o,c,f,dl){return t+n+c+dl>>>0;},t.sum64_5_hi=function(e,t,r,n,o,c,f,dl,l,h){var d=0,m=t;return d+=(m=m+n>>>0)>>0)>>0)>>0)>>0;},t.sum64_5_lo=function(e,t,r,n,o,c,f,dl,l,h){return t+n+c+dl+h>>>0;},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0;},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0;},t.shr64_hi=function(e,t,r){return e>>>r;},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0;};},function(e,t,r){var n=r(40),o=r(269),c=r(47),f=r(110),l=Object.defineProperty;t.f=n?l:function(e,t,r){if(c(e),t=f(t),c(r),o)try{return l(e,t,r);}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e;};},function(e,t,r){var n=r(44);e.exports=function(e){if(n(e))return e;throw TypeError(String(e)+" is not an object");};},function(e,t,r){"use strict";r.d(t,"d",function(){return o;}),r.d(t,"h",function(){return c;}),r.d(t,"e",function(){return f;}),r.d(t,"f",function(){return l;}),r.d(t,"g",function(){return h;}),r.d(t,"b",function(){return d;}),r.d(t,"c",function(){return m;}),r.d(t,"a",function(){return y;});var n=r(16);const o=n.a.from(-1),c=n.a.from(0),f=n.a.from(1),l=n.a.from(2),h=n.a.from("1000000000000000000"),d=n.a.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),m=n.a.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),y=n.a.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");},function(e,t,r){"use strict";var n,o="object"==typeof Reflect?Reflect:null,c=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r);};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));}:function(e){return Object.getOwnPropertyNames(e);};var f=Number.isNaN||function(e){return e!=e;};function l(){l.init.call(this);}e.exports=l,e.exports.once=function(e,t){return new Promise(function(r,n){function o(r){e.removeListener(t,c),n(r);}function c(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments));}E(e,t,c,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&E(e,"error",t,r);}(e,o,{once:!0});});},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var h=10;function d(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e);}function m(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners;}function y(e,t,r,n){var o,c,f,l;if(d(r),void 0===(c=e._events)?(c=e._events=Object.create(null),e._eventsCount=0):(void 0!==c.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),c=e._events),f=c[t]),void 0===f)f=c[t]=r,++e._eventsCount;else if("function"==typeof f?f=c[t]=n?[r,f]:[f,r]:n?f.unshift(r):f.push(r),(o=m(e))>0&&f.length>o&&!f.warned){f.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=f.length,l=h,console&&console.warn&&console.warn(l);}return e;}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments);}function w(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=v.bind(n);return o.listener=r,n.wrapFn=o,o;}function _(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),i=0;i0&&(o=t[0]),o instanceof Error)throw o;var f=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw f.context=o,f;}var l=n[e];if(void 0===l)return!1;if("function"==typeof l)c(l,this,t);else{var h=l.length,d=M(l,h);for(i=0;i=0;i--)if(r[i]===t||r[i].listener===t){c=r[i].listener,o=i;break;}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this;},l.prototype.listeners=function(e){return _(this,e,!0);},l.prototype.rawListeners=function(e){return _(this,e,!1);},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):A.call(e,t);},l.prototype.listenerCount=A,l.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[];};},function(e,t,r){"use strict";var n=r(8).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1;}};function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0;}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e;}(e),this.encoding){case"utf16le":this.text=h,this.end=d,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=m,this.end=y,t=3;break;default:return this.write=v,void(this.end=w);}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t);}function f(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2;}function l(e){var p=this.lastTotal-this.lastNeed,t=function(e,t,p){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�";}}(this,e);return void 0!==t?t:this.lastNeed<=e.length?(e.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,p,0,e.length),void(this.lastNeed-=e.length));}function h(e,i){if((e.length-i)%2==0){var t=e.toString("utf16le",i);if(t){var r=t.charCodeAt(t.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1);}return t;}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",i,e.length-1);}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r);}return t;}function m(e,i){var t=(e.length-i)%3;return 0===t?e.toString("base64",i):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",i,e.length-t));}function y(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t;}function v(e){return e.toString(this.encoding);}function w(e){return e&&e.length?this.write(e):"";}t.StringDecoder=c,c.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0;}else i=0;return i=0)return n>0&&(e.lastNeed=n-1),n;if(--r=0)return n>0&&(e.lastNeed=n-2),n;if(--r=0)return n>0&&(2===n?n=0:e.lastNeed=n-3),n;return 0;}(this,e,i);if(!this.lastNeed)return e.toString("utf8",i);this.lastTotal=t;var r=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",i,r);},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length;};},function(e,t,r){"use strict";(function(t,n){var o=65536,c=4294967295;var f=r(8).Buffer,l=t.crypto||t.msCrypto;l&&l.getRandomValues?e.exports=function(e,t){if(e>c)throw new RangeError("requested too many random bytes");var r=f.allocUnsafe(e);if(e>0)if(e>o)for(var h=0;hthis.wordSize&&E.throwError("value out-of-bounds",A.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(w.b)([this._padding.slice(t.length%this.wordSize),t])),t;}writeValue(e){return this._writeData(this._getValue(e));}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t);};}}class k{constructor(data,e,t,r){Object(_.d)(this,"_data",Object(w.a)(data)),Object(_.d)(this,"wordSize",e||32),Object(_.d)(this,"_coerceFunc",t),Object(_.d)(this,"allowLoose",r),this._offset=0;}get data(){return Object(w.i)(this._data);}get consumed(){return this._offset;}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t;}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):k.coerce(e,t);}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:E.throwError("data out-of-bounds",A.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n);}subReader(e){return new k(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose);}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e);}readValue(){return c.a.from(this.readBytes(this.wordSize));}}var I=r(6);class C extends T{constructor(e){super("address","address",e,!1);}defaultValue(){return"0x0000000000000000000000000000000000000000";}encode(e,t){try{t=Object(I.a)(t);}catch(e){this._throwError(e.message,t);}return e.writeValue(t);}decode(e){return Object(I.a)(Object(w.h)(e.readValue().toHexString(),20));}}class O extends T{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e;}defaultValue(){return this.coder.defaultValue();}encode(e,t){return this.coder.encode(e,t);}decode(e){return this.coder.decode(e);}}const B=new A.b(M);function R(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map(t=>{const n=t.localName;return n||B.throwError("cannot encode object for signature with missing names",A.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&B.throwError("cannot encode object for signature with duplicate names",A.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n];});}else B.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&B.throwArgumentError("types/value length mismatch","tuple",r);let o=new x(e.wordSize),c=new x(e.wordSize),f=[];t.forEach((e,t)=>{let r=n[t];if(e.dynamic){let t=c.length;e.encode(c,r);let n=o.writeUpdatableValue();f.push(e=>{n(e+t);});}else e.encode(o,r);}),f.forEach(e=>{e(o.length);});let l=e.appendWriter(o);return l+=e.appendWriter(c),l;}function P(e,t){let r=[],n=e.subReader(0);t.forEach(t=>{let o=null;if(t.dynamic){let r=e.readValue(),c=n.subReader(r.toNumber());try{o=t.decode(c);}catch(e){if(e.code===A.b.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type;}}else try{o=t.decode(e);}catch(e){if(e.code===A.b.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type;}null!=o&&r.push(o);});const o=t.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e;},{});t.forEach((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const c=r[t];c instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw c;}}):r[n]=c;});for(let i=0;i{throw e;}});}return Object.freeze(r);}class F extends T{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t;}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let i=0;ie._data.length&&B.throwError("insufficient data length",A.b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let i=0;i{e.dynamic&&(r=!0),n.push(e.type);});super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e;}defaultValue(){const e=[];this.coders.forEach(t=>{e.push(t.defaultValue());});const t=this.coders.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e;},{});return this.coders.forEach((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]));}),Object.freeze(e);}encode(e,t){return R(e,this.coders,t);}decode(e){return e.coerce(this.name,P(e,this.coders));}}const V=new A.b(M),X={};let Q={calldata:!0,memory:!0,storage:!0},Z={calldata:!0,memory:!0};function W(e,t){if("bytes"===e||"string"===e){if(Q[t])return!0;}else if("address"===e){if("payable"===t)return!0;}else if((e.indexOf("[")>=0||"tuple"===e)&&Z[t])return!0;return(Q[t]||"payable"===t)&&V.throwArgumentError("invalid modifier","name",t),!1;}function Y(object,e){for(let t in e)Object(_.d)(object,t,e[t]);}const $=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),ee=new RegExp(/^(.*)\[([0-9]*)\]$/);class te{constructor(e,t){e!==X&&V.throwError("use fromString",A.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Y(this,t);let r=this.type.match(ee);Y(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:te.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this);}format(e){if(e||(e=$.sighash),$[e]||V.throwArgumentError("invalid format type","format",e),e===$.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t);}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==$.sighash&&(t+=this.type),t+="("+this.components.map(t=>t.format(e)).join(e===$.full?", ":",")+")"):t+=this.type,e!==$.sighash&&(!0===this.indexed&&(t+=" indexed"),e===$.full&&this.name&&(t+=" "+this.name)),t;}static from(e,t){return"string"==typeof e?te.fromString(e,t):te.fromObject(e);}static fromObject(e){return te.isParamType(e)?e:new te(X,{name:e.name||null,type:he(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(te.fromObject):null});}static fromString(e,t){return r=function(param,e){let t=param;function r(i){V.throwArgumentError(`unexpected character at position ${i}`,"param",param);}function n(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r;}param=param.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},c=o;for(let i=0;ite.fromString(param,t));}class ne{constructor(e,t){e!==X&&V.throwError("use a static from method",A.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Y(this,t),this._isFragment=!0,Object.freeze(this);}static from(e){return ne.isFragment(e)?e:"string"==typeof e?ne.fromString(e):ne.fromObject(e);}static fromObject(e){if(ne.isFragment(e))return e;switch(e.type){case"function":return ce.fromObject(e);case"event":return ie.fromObject(e);case"constructor":return ue.fromObject(e);case"error":return le.fromObject(e);case"fallback":case"receive":return null;}return V.throwArgumentError("invalid fragment object","value",e);}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?ie.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?ce.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?ue.fromString(e.trim()):"error"===e.split(" ")[0]?le.fromString(e.substring(5).trim()):V.throwArgumentError("unsupported fragment","value",e);}static isFragment(e){return!(!e||!e._isFragment);}}class ie extends ne{format(e){if(e||(e=$.sighash),$[e]||V.throwArgumentError("invalid format type","format",e),e===$.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});let t="";return e!==$.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===$.full?", ":",")+") ",e!==$.sighash&&this.anonymous&&(t+="anonymous "),t.trim();}static from(e){return"string"==typeof e?ie.fromString(e):ie.fromObject(e);}static fromObject(e){if(ie.isEventFragment(e))return e;"event"!==e.type&&V.throwArgumentError("invalid event object","value",e);const t={name:pe(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(te.fromObject):[],type:"event"};return new ie(X,t);}static fromString(e){let t=e.match(be);t||V.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach(e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:V.warn("unknown modifier: "+e);}}),ie.fromObject({name:t[1].trim(),anonymous:r,inputs:re(t[2],!0),type:"event"});}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type;}}function oe(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&V.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||V.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=c.a.from(r[1]),r[0]):e;}function ae(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach(e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e);}});}function se(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&V.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&V.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||V.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&V.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&V.throwArgumentError("unable to determine stateMutability","value",e),t;}class ue extends ne{format(e){if(e||(e=$.sighash),$[e]||V.throwArgumentError("invalid format type","format",e),e===$.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});e===$.sighash&&V.throwError("cannot format a constructor for sighash",A.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(input=>input.format(e)).join(e===$.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim();}static from(e){return"string"==typeof e?ue.fromString(e):ue.fromObject(e);}static fromObject(e){if(ue.isConstructorFragment(e))return e;"constructor"!==e.type&&V.throwArgumentError("invalid constructor object","value",e);let t=se(e);t.constant&&V.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(te.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.a.from(e.gas):null};return new ue(X,r);}static fromString(e){let t={type:"constructor"},r=(e=oe(e,t)).match(be);return r&&"constructor"===r[1].trim()||V.throwArgumentError("invalid constructor string","value",e),t.inputs=re(r[2].trim(),!1),ae(r[3].trim(),t),ue.fromObject(t);}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type;}}class ce extends ue{format(e){if(e||(e=$.sighash),$[e]||V.throwArgumentError("invalid format type","format",e),e===$.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(input=>JSON.parse(input.format(e))),outputs:this.outputs.map(output=>JSON.parse(output.format(e)))});let t="";return e!==$.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===$.full?", ":",")+") ",e!==$.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(output=>output.format(e)).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim();}static from(e){return"string"==typeof e?ce.fromString(e):ce.fromObject(e);}static fromObject(e){if(ce.isFunctionFragment(e))return e;"function"!==e.type&&V.throwArgumentError("invalid function object","value",e);let t=se(e);const r={type:e.type,name:pe(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(te.fromObject):[],outputs:e.outputs?e.outputs.map(te.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.a.from(e.gas):null};return new ce(X,r);}static fromString(e){let t={type:"function"},r=(e=oe(e,t)).split(" returns ");r.length>2&&V.throwArgumentError("invalid function string","value",e);let n=r[0].match(be);if(n||V.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&pe(t.name),t.inputs=re(n[2],!1),ae(n[3].trim(),t),r.length>1){let n=r[1].match(be);""==n[1].trim()&&""==n[3].trim()||V.throwArgumentError("unexpected tokens","value",e),t.outputs=re(n[2],!1);}else t.outputs=[];return ce.fromObject(t);}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type;}}function fe(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||V.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e;}class le extends ne{format(e){if(e||(e=$.sighash),$[e]||V.throwArgumentError("invalid format type","format",e),e===$.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});let t="";return e!==$.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===$.full?", ":",")+") ",t.trim();}static from(e){return"string"==typeof e?le.fromString(e):le.fromObject(e);}static fromObject(e){if(le.isErrorFragment(e))return e;"error"!==e.type&&V.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:pe(e.name),inputs:e.inputs?e.inputs.map(te.fromObject):[]};return fe(new le(X,t));}static fromString(e){let t={type:"error"},r=e.match(be);return r||V.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&pe(t.name),t.inputs=re(r[2],!1),fe(le.fromObject(t));}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type;}}function he(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e;}const de=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function pe(e){return e&&e.match(de)||V.throwArgumentError(`invalid identifier "${e}"`,"value",e),e;}const be=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const me=new A.b(M),ge=new RegExp(/^bytes([0-9]*)$/),ye=new RegExp(/^(u?int)([0-9]*)$/);class ve{constructor(e){me.checkNew(new.target,ve),Object(_.d)(this,"coerceFunc",e||null);}_getCoder(param){switch(param.baseType){case"address":return new C(param.name);case"bool":return new L(param.name);case"string":return new G(param.name);case"bytes":return new D(param.name);case"array":return new F(this._getCoder(param.arrayChildren),param.arrayLength,param.name);case"tuple":return new K((param.components||[]).map(component=>this._getCoder(component)),param.name);case"":return new U(param.name);}let e=param.type.match(ye);if(e){let t=parseInt(e[2]||"256");return(0===t||t>256||t%8!=0)&&me.throwArgumentError("invalid "+e[1]+" bit length","param",param),new H(t/8,"int"===e[1],param.name);}if(e=param.type.match(ge),e){let t=parseInt(e[1]);return(0===t||t>32)&&me.throwArgumentError("invalid bytes length","param",param),new j(t,param.name);}return me.throwArgumentError("invalid type","type",param.type);}_getWordSize(){return 32;}_getReader(data,e){return new k(data,this._getWordSize(),this.coerceFunc,e);}_getWriter(){return new x(this._getWordSize());}getDefaultValue(e){const t=e.map(e=>this._getCoder(te.from(e)));return new K(t,"_").defaultValue();}encode(e,t){e.length!==t.length&&me.throwError("types/values length mismatch",A.b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map(e=>this._getCoder(te.from(e))),n=new K(r,"_"),o=this._getWriter();return n.encode(o,t),o.data;}decode(e,data,t){const r=e.map(e=>this._getCoder(te.from(e)));return new K(r,"_").decode(this._getReader(Object(w.a)(data),t));}}const we=new ve();var _e=r(171),Ae=r(7);const Me=new A.b(M);class Ee extends _.a{}class Se extends _.a{}class Te extends _.a{}class xe extends _.a{static isIndexed(e){return!(!e||!e._isIndexed);}}const ke={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Ie(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r;}class Ce{constructor(e){Me.checkNew(new.target,Ce);let t=[];t="string"==typeof e?JSON.parse(e):e,Object(_.d)(this,"fragments",t.map(e=>ne.from(e)).filter(e=>null!=e)),Object(_.d)(this,"_abiCoder",Object(_.e)(new.target,"getAbiCoder")()),Object(_.d)(this,"functions",{}),Object(_.d)(this,"errors",{}),Object(_.d)(this,"events",{}),Object(_.d)(this,"structs",{}),this.fragments.forEach(e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void Me.warn("duplicate definition - constructor"):void Object(_.d)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return;}let r=e.format();t[r]?Me.warn("duplicate definition - "+r):t[r]=e;}),this.deploy||Object(_.d)(this,"deploy",ue.from({payable:!1,type:"constructor"})),Object(_.d)(this,"_isInterface",!0);}format(e){e||(e=$.full),e===$.sighash&&Me.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(t=>t.format(e));return e===$.json?JSON.stringify(t.map(e=>JSON.parse(e))):t;}static getAbiCoder(){return we;}static getAddress(address){return Object(I.a)(address);}static getSighash(e){return Object(w.e)(Object(_e.a)(e.format()),0,4);}static getEventTopic(e){return Object(_e.a)(e.format());}getFunction(e){if(Object(w.l)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];Me.throwArgumentError("no matching function","sighash",e);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter(e=>e.split("(")[0]===t);return 0===r.length?Me.throwArgumentError("no matching function","name",t):r.length>1&&Me.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]];}const t=this.functions[ce.fromString(e).format()];return t||Me.throwArgumentError("no matching function","signature",e),t;}getEvent(e){if(Object(w.l)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];Me.throwArgumentError("no matching event","topichash",t);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter(e=>e.split("(")[0]===t);return 0===r.length?Me.throwArgumentError("no matching event","name",t):r.length>1&&Me.throwArgumentError("multiple matching events","name",t),this.events[r[0]];}const t=this.events[ie.fromString(e).format()];return t||Me.throwArgumentError("no matching event","signature",e),t;}getError(e){if(Object(w.l)(e)){const t=Object(_.e)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r];}Me.throwArgumentError("no matching error","sighash",e);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter(e=>e.split("(")[0]===t);return 0===r.length?Me.throwArgumentError("no matching error","name",t):r.length>1&&Me.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]];}const t=this.errors[ce.fromString(e).format()];return t||Me.throwArgumentError("no matching error","signature",e),t;}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e);}catch(t){try{e=this.getError(e);}catch(e){throw t;}}return Object(_.e)(this.constructor,"getSighash")(e);}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),Object(_.e)(this.constructor,"getEventTopic")(e);}_decodeParams(e,data){return this._abiCoder.decode(e,data);}_encodeParams(e,t){return this._abiCoder.encode(e,t);}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[]);}decodeErrorResult(e,data){"string"==typeof e&&(e=this.getError(e));const t=Object(w.a)(data);return Object(w.i)(t.slice(0,4))!==this.getSighash(e)&&Me.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Object(w.i)(t)),this._decodeParams(e.inputs,t.slice(4));}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),Object(w.i)(Object(w.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]));}decodeFunctionData(e,data){"string"==typeof e&&(e=this.getFunction(e));const t=Object(w.a)(data);return Object(w.i)(t.slice(0,4))!==this.getSighash(e)&&Me.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Object(w.i)(t)),this._decodeParams(e.inputs,t.slice(4));}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(w.i)(Object(w.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]));}decodeFunctionResult(e,data){"string"==typeof e&&(e=this.getFunction(e));let t=Object(w.a)(data),r=null,n=null,o=null,c=null;switch(t.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,t);}catch(e){}break;case 4:{const e=Object(w.i)(t.slice(0,4)),f=ke[e];if(f)n=this._abiCoder.decode(f.inputs,t.slice(4)),o=f.name,c=f.signature,f.reason&&(r=n[0]);else try{const r=this.getError(e);n=this._abiCoder.decode(r.inputs,t.slice(4)),o=r.name,c=r.format();}catch(e){console.log(e);}break;}}return Me.throwError("call revert exception",A.b.errors.CALL_EXCEPTION,{method:e.format(),errorArgs:n,errorName:o,errorSignature:c,reason:r});}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(w.i)(this._abiCoder.encode(e.outputs,t||[]));}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Me.throwError("too many arguments for "+e.format(),A.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(param,e)=>"string"===param.type?Object(_e.a)(e):"bytes"===param.type?Object(Ae.a)(Object(w.i)(e)):("address"===param.type&&this._abiCoder.encode(["address"],[e]),Object(w.h)(Object(w.i)(e),32));for(t.forEach((t,o)=>{let param=e.inputs[o];param.indexed?null==t?r.push(null):"array"===param.baseType||"tuple"===param.baseType?Me.throwArgumentError("filtering with tuples or arrays not supported","contract."+param.name,t):Array.isArray(t)?r.push(t.map(e=>n(param,e))):r.push(n(param,t)):null!=t&&Me.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+param.name,t);});r.length&&null===r[r.length-1];)r.pop();return r;}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Me.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((param,e)=>{const c=t[e];if(param.indexed){if("string"===param.type)r.push(Object(_e.a)(c));else if("bytes"===param.type)r.push(Object(Ae.a)(c));else{if("tuple"===param.baseType||"array"===param.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([param.type],[c]));}}else n.push(param),o.push(c);}),{data:this._abiCoder.encode(n,o),topics:r};}decodeEventLog(e,data,t){if("string"==typeof e&&(e=this.getEvent(e)),null!=t&&!e.anonymous){let r=this.getEventTopic(e);Object(w.l)(t[0],32)&&t[0].toLowerCase()===r||Me.throwError("fragment/topic mismatch",A.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:r,value:t[0]}),t=t.slice(1);}let r=[],n=[],o=[];e.inputs.forEach((param,e)=>{param.indexed?"string"===param.type||"bytes"===param.type||"tuple"===param.baseType||"array"===param.baseType?(r.push(te.fromObject({type:"bytes32",name:param.name})),o.push(!0)):(r.push(param),o.push(!1)):(n.push(param),o.push(!1));});let c=null!=t?this._abiCoder.decode(r,Object(w.b)(t)):null,f=this._abiCoder.decode(n,data,!0),l=[],h=0,d=0;e.inputs.forEach((param,e)=>{if(param.indexed){if(null==c)l[e]=new xe({_isIndexed:!0,hash:null});else if(o[e])l[e]=new xe({_isIndexed:!0,hash:c[d++]});else try{l[e]=c[d++];}catch(t){l[e]=t;}}else try{l[e]=f[h++];}catch(t){l[e]=t;}if(param.name&&null==l[param.name]){const t=l[e];t instanceof Error?Object.defineProperty(l,param.name,{enumerable:!0,get:()=>{throw Ie(`property ${JSON.stringify(param.name)}`,t);}}):l[param.name]=t;}});for(let i=0;i{throw Ie(`index ${i}`,e);}});}return Object.freeze(l);}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Se({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:c.a.from(e.value||"0")}):null;}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Ee({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)});}parseError(data){const e=Object(w.i)(data);let t=this.getError(e.substring(0,10).toLowerCase());return t?new Te({args:this._abiCoder.decode(t.inputs,"0x"+e.substring(10)),errorFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t)}):null;}static isInterface(e){return!(!e||!e._isInterface);}}var Oe=r(128),Be=r(56),Re=r(543),Pe=r(545),Fe=r(544),Le=r(20),Ne=r(57),De=r(293);const je=new RegExp("^bytes([0-9]+)$"),Ue=new RegExp("^(u?int)([0-9]*)$"),Je=new RegExp("^(.*)\\[([0-9]*)\\]$");function He(e,t,r){switch(e){case"address":return r?Object(w.p)(t,32):Object(w.a)(t);case"string":return Object(z.f)(t);case"bytes":return Object(w.a)(t);case"bool":return t=t?"0x01":"0x00",r?Object(w.p)(t,32):Object(w.a)(t);}let n=e.match(Ue);if(n){let o=parseInt(n[2]||"256");if(n[2]&&String(o)!==n[2]||o%8!=0||0===o||o>256)throw new Error("invalid number type - "+e);return r&&(o=256),t=c.a.from(t).toTwos(o),Object(w.p)(t,o/8);}if(n=e.match(je),n){const o=parseInt(n[1]);if(String(o)!==n[1]||0===o||o>32)throw new Error("invalid bytes type - "+e);if(Object(w.a)(t).byteLength!==o)throw new Error("invalid value for "+e);return r?Object(w.a)((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t;}if(n=e.match(Je),n&&Array.isArray(t)){const r=n[1];if(parseInt(n[2]||String(t.length))!=t.length)throw new Error("invalid value for "+e);const o=[];return t.forEach(function(e){o.push(He(r,e,!0));}),Object(w.b)(o);}throw new Error("invalid type - "+e);}function ze(e,t){if(e.length!=t.length)throw new Error("type/value count mismatch");const r=[];return e.forEach(function(e,n){r.push(He(e,t[n]));}),Object(w.i)(Object(w.b)(r));}function Ge(e,t){return Object(Ae.a)(ze(e,t));}function Ke(e,t){return Object(De.c)(ze(e,t));}var Ve=r(123),Xe=r(546),qe=r(36),Qe=r(33),Ze=r(292),We=r(180);function Ye(text){const e=Object(z.f)(text);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(w.i)(Object(w.b)([e,We.a]).slice(0,32));}function $e(e){const data=Object(w.a)(e);if(32!==data.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==data[31])throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;0===data[t-1];)t--;return Object(z.h)(data.slice(0,t));}var et=r(15);const tt=new A.b("units/5.4.0"),nt=["wei","kwei","mwei","gwei","szabo","finney","ether"];function it(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&tt.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let o="";for(2===t.length&&(o="."+(t[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);const c=[];for(;r.length;){if(r.length<=3){c.unshift(r);break;}{const e=r.length-3;c.unshift(r.substring(e)),r=r.substring(0,e);}}return n+c.join(",")+o;}function ot(e,t){if("string"==typeof t){const e=nt.indexOf(t);-1!==e&&(t=3*e);}return Object(f.b)(e,null!=t?t:18);}function at(e,t){if("string"!=typeof e&&tt.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=nt.indexOf(t);-1!==e&&(t=3*e);}return Object(f.c)(e,null!=t?t:18);}function st(e){return ot(e,18);}function ut(e){return at(e,18);}var ct=r(21),ft=r(289),lt=r(117);const ht=new A.b(lt.a);},function(e,t,r){"use strict";r.d(t,"a",function(){return f;});var n=r(0),o=r(1);class c{constructor(e){Object(o.d)(this,"alphabet",e),Object(o.d)(this,"base",e.length),Object(o.d)(this,"_alphabetMap",{}),Object(o.d)(this,"_leader",e.charAt(0));for(let i=0;i0;)t.push(e%this.base),e=e/this.base|0;}let r="";for(let e=0;0===source[e]&&e=0;--q)r+=this.alphabet[t[q]];return r;}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let i=0;i>=8;for(;n>0;)t.push(255&n),n>>=8;}for(let r=0;e[r]===this._leader&&rthis.wordSize&&h.throwError("value out-of-bounds",f.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(n.b)([this._padding.slice(t.length%this.wordSize),t])),t;}writeValue(e){return this._writeData(this._getValue(e));}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t);};}}class y{constructor(data,e,t,r){Object(c.d)(this,"_data",Object(n.a)(data)),Object(c.d)(this,"wordSize",e||32),Object(c.d)(this,"_coerceFunc",t),Object(c.d)(this,"allowLoose",r),this._offset=0;}get data(){return Object(n.i)(this._data);}get consumed(){return this._offset;}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t;}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):y.coerce(e,t);}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:h.throwError("data out-of-bounds",f.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n);}subReader(e){return new y(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose);}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e);}readValue(){return o.a.from(this.readBytes(this.wordSize));}}var v=r(6),w=r(171),_=r(7);class A extends d{constructor(e){super("address","address",e,!1);}defaultValue(){return"0x0000000000000000000000000000000000000000";}encode(e,t){try{t=Object(v.a)(t);}catch(e){this._throwError(e.message,t);}return e.writeValue(t);}decode(e){return Object(v.a)(Object(n.h)(e.readValue().toHexString(),20));}}class M extends d{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e;}defaultValue(){return this.coder.defaultValue();}encode(e,t){return this.coder.encode(e,t);}decode(e){return this.coder.decode(e);}}const E=new f.b(l);function S(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map(t=>{const n=t.localName;return n||E.throwError("cannot encode object for signature with missing names",f.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&E.throwError("cannot encode object for signature with duplicate names",f.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n];});}else E.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&E.throwArgumentError("types/value length mismatch","tuple",r);let o=new m(e.wordSize),c=new m(e.wordSize),l=[];t.forEach((e,t)=>{let r=n[t];if(e.dynamic){let t=c.length;e.encode(c,r);let n=o.writeUpdatableValue();l.push(e=>{n(e+t);});}else e.encode(o,r);}),l.forEach(e=>{e(o.length);});let h=e.appendWriter(o);return h+=e.appendWriter(c),h;}function T(e,t){let r=[],n=e.subReader(0);t.forEach(t=>{let o=null;if(t.dynamic){let r=e.readValue(),c=n.subReader(r.toNumber());try{o=t.decode(c);}catch(e){if(e.code===f.b.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type;}}else try{o=t.decode(e);}catch(e){if(e.code===f.b.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type;}null!=o&&r.push(o);});const o=t.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e;},{});t.forEach((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const c=r[t];c instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw c;}}):r[n]=c;});for(let i=0;i{throw e;}});}return Object.freeze(r);}class x extends d{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t;}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let i=0;ie._data.length&&E.throwError("insufficient data length",f.b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let i=0;i{e.dynamic&&(r=!0),n.push(e.type);});super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e;}defaultValue(){const e=[];this.coders.forEach(t=>{e.push(t.defaultValue());});const t=this.coders.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e;},{});return this.coders.forEach((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]));}),Object.freeze(e);}encode(e,t){return S(e,this.coders,t);}decode(e){return e.coerce(this.name,T(e,this.coders));}}const D=new f.b(l),j={};let U={calldata:!0,memory:!0,storage:!0},J={calldata:!0,memory:!0};function H(e,t){if("bytes"===e||"string"===e){if(U[t])return!0;}else if("address"===e){if("payable"===t)return!0;}else if((e.indexOf("[")>=0||"tuple"===e)&&J[t])return!0;return(U[t]||"payable"===t)&&D.throwArgumentError("invalid modifier","name",t),!1;}function z(object,e){for(let t in e)Object(c.d)(object,t,e[t]);}const G=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),K=new RegExp(/^(.*)\[([0-9]*)\]$/);class V{constructor(e,t){e!==j&&D.throwError("use fromString",f.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),z(this,t);let r=this.type.match(K);z(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:V.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this);}format(e){if(e||(e=G.sighash),G[e]||D.throwArgumentError("invalid format type","format",e),e===G.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t);}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==G.sighash&&(t+=this.type),t+="("+this.components.map(t=>t.format(e)).join(e===G.full?", ":",")+")"):t+=this.type,e!==G.sighash&&(!0===this.indexed&&(t+=" indexed"),e===G.full&&this.name&&(t+=" "+this.name)),t;}static from(e,t){return"string"==typeof e?V.fromString(e,t):V.fromObject(e);}static fromObject(e){return V.isParamType(e)?e:new V(j,{name:e.name||null,type:ie(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(V.fromObject):null});}static fromString(e,t){return r=function(param,e){let t=param;function r(i){D.throwArgumentError(`unexpected character at position ${i}`,"param",param);}function n(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r;}param=param.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},c=o;for(let i=0;iV.fromString(param,t));}class Q{constructor(e,t){e!==j&&D.throwError("use a static from method",f.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),z(this,t),this._isFragment=!0,Object.freeze(this);}static from(e){return Q.isFragment(e)?e:"string"==typeof e?Q.fromString(e):Q.fromObject(e);}static fromObject(e){if(Q.isFragment(e))return e;switch(e.type){case"function":return te.fromObject(e);case"event":return Z.fromObject(e);case"constructor":return ee.fromObject(e);case"error":return ne.fromObject(e);case"fallback":case"receive":return null;}return D.throwArgumentError("invalid fragment object","value",e);}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Z.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?te.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?ee.fromString(e.trim()):"error"===e.split(" ")[0]?ne.fromString(e.substring(5).trim()):D.throwArgumentError("unsupported fragment","value",e);}static isFragment(e){return!(!e||!e._isFragment);}}class Z extends Q{format(e){if(e||(e=G.sighash),G[e]||D.throwArgumentError("invalid format type","format",e),e===G.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});let t="";return e!==G.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===G.full?", ":",")+") ",e!==G.sighash&&this.anonymous&&(t+="anonymous "),t.trim();}static from(e){return"string"==typeof e?Z.fromString(e):Z.fromObject(e);}static fromObject(e){if(Z.isEventFragment(e))return e;"event"!==e.type&&D.throwArgumentError("invalid event object","value",e);const t={name:ae(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(V.fromObject):[],type:"event"};return new Z(j,t);}static fromString(e){let t=e.match(se);t||D.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach(e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:D.warn("unknown modifier: "+e);}}),Z.fromObject({name:t[1].trim(),anonymous:r,inputs:X(t[2],!0),type:"event"});}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type;}}function W(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&D.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||D.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=o.a.from(r[1]),r[0]):e;}function Y(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach(e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e);}});}function $(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&D.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&D.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||D.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&D.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&D.throwArgumentError("unable to determine stateMutability","value",e),t;}class ee extends Q{format(e){if(e||(e=G.sighash),G[e]||D.throwArgumentError("invalid format type","format",e),e===G.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});e===G.sighash&&D.throwError("cannot format a constructor for sighash",f.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(input=>input.format(e)).join(e===G.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim();}static from(e){return"string"==typeof e?ee.fromString(e):ee.fromObject(e);}static fromObject(e){if(ee.isConstructorFragment(e))return e;"constructor"!==e.type&&D.throwArgumentError("invalid constructor object","value",e);let t=$(e);t.constant&&D.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(V.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?o.a.from(e.gas):null};return new ee(j,r);}static fromString(e){let t={type:"constructor"},r=(e=W(e,t)).match(se);return r&&"constructor"===r[1].trim()||D.throwArgumentError("invalid constructor string","value",e),t.inputs=X(r[2].trim(),!1),Y(r[3].trim(),t),ee.fromObject(t);}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type;}}class te extends ee{format(e){if(e||(e=G.sighash),G[e]||D.throwArgumentError("invalid format type","format",e),e===G.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(input=>JSON.parse(input.format(e))),outputs:this.outputs.map(output=>JSON.parse(output.format(e)))});let t="";return e!==G.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===G.full?", ":",")+") ",e!==G.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(output=>output.format(e)).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim();}static from(e){return"string"==typeof e?te.fromString(e):te.fromObject(e);}static fromObject(e){if(te.isFunctionFragment(e))return e;"function"!==e.type&&D.throwArgumentError("invalid function object","value",e);let t=$(e);const r={type:e.type,name:ae(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(V.fromObject):[],outputs:e.outputs?e.outputs.map(V.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?o.a.from(e.gas):null};return new te(j,r);}static fromString(e){let t={type:"function"},r=(e=W(e,t)).split(" returns ");r.length>2&&D.throwArgumentError("invalid function string","value",e);let n=r[0].match(se);if(n||D.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&ae(t.name),t.inputs=X(n[2],!1),Y(n[3].trim(),t),r.length>1){let n=r[1].match(se);""==n[1].trim()&&""==n[3].trim()||D.throwArgumentError("unexpected tokens","value",e),t.outputs=X(n[2],!1);}else t.outputs=[];return te.fromObject(t);}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type;}}function re(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||D.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e;}class ne extends Q{format(e){if(e||(e=G.sighash),G[e]||D.throwArgumentError("invalid format type","format",e),e===G.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});let t="";return e!==G.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===G.full?", ":",")+") ",t.trim();}static from(e){return"string"==typeof e?ne.fromString(e):ne.fromObject(e);}static fromObject(e){if(ne.isErrorFragment(e))return e;"error"!==e.type&&D.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:ae(e.name),inputs:e.inputs?e.inputs.map(V.fromObject):[]};return re(new ne(j,t));}static fromString(e){let t={type:"error"},r=e.match(se);return r||D.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&ae(t.name),t.inputs=X(r[2],!1),re(ne.fromObject(t));}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type;}}function ie(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e;}const oe=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function ae(e){return e&&e.match(oe)||D.throwArgumentError(`invalid identifier "${e}"`,"value",e),e;}const se=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const ue=new f.b(l),ce=new RegExp(/^bytes([0-9]*)$/),fe=new RegExp(/^(u?int)([0-9]*)$/);class le{constructor(e){ue.checkNew(new.target,le),Object(c.d)(this,"coerceFunc",e||null);}_getCoder(param){switch(param.baseType){case"address":return new A(param.name);case"bool":return new k(param.name);case"string":return new L(param.name);case"bytes":return new C(param.name);case"array":return new x(this._getCoder(param.arrayChildren),param.arrayLength,param.name);case"tuple":return new N((param.components||[]).map(component=>this._getCoder(component)),param.name);case"":return new B(param.name);}let e=param.type.match(fe);if(e){let t=parseInt(e[2]||"256");return(0===t||t>256||t%8!=0)&&ue.throwArgumentError("invalid "+e[1]+" bit length","param",param),new P(t/8,"int"===e[1],param.name);}if(e=param.type.match(ce),e){let t=parseInt(e[1]);return(0===t||t>32)&&ue.throwArgumentError("invalid bytes length","param",param),new O(t,param.name);}return ue.throwArgumentError("invalid type","type",param.type);}_getWordSize(){return 32;}_getReader(data,e){return new y(data,this._getWordSize(),this.coerceFunc,e);}_getWriter(){return new m(this._getWordSize());}getDefaultValue(e){const t=e.map(e=>this._getCoder(V.from(e)));return new N(t,"_").defaultValue();}encode(e,t){e.length!==t.length&&ue.throwError("types/values length mismatch",f.b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map(e=>this._getCoder(V.from(e))),n=new N(r,"_"),o=this._getWriter();return n.encode(o,t),o.data;}decode(e,data,t){const r=e.map(e=>this._getCoder(V.from(e)));return new N(r,"_").decode(this._getReader(Object(n.a)(data),t));}}const he=new le(),de=new f.b(l);class pe extends c.a{}class be extends c.a{}class me extends c.a{}class ge extends c.a{static isIndexed(e){return!(!e||!e._isIndexed);}}const ye={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ve(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r;}class we{constructor(e){de.checkNew(new.target,we);let t=[];t="string"==typeof e?JSON.parse(e):e,Object(c.d)(this,"fragments",t.map(e=>Q.from(e)).filter(e=>null!=e)),Object(c.d)(this,"_abiCoder",Object(c.e)(new.target,"getAbiCoder")()),Object(c.d)(this,"functions",{}),Object(c.d)(this,"errors",{}),Object(c.d)(this,"events",{}),Object(c.d)(this,"structs",{}),this.fragments.forEach(e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void de.warn("duplicate definition - constructor"):void Object(c.d)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return;}let r=e.format();t[r]?de.warn("duplicate definition - "+r):t[r]=e;}),this.deploy||Object(c.d)(this,"deploy",ee.from({payable:!1,type:"constructor"})),Object(c.d)(this,"_isInterface",!0);}format(e){e||(e=G.full),e===G.sighash&&de.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(t=>t.format(e));return e===G.json?JSON.stringify(t.map(e=>JSON.parse(e))):t;}static getAbiCoder(){return he;}static getAddress(address){return Object(v.a)(address);}static getSighash(e){return Object(n.e)(Object(w.a)(e.format()),0,4);}static getEventTopic(e){return Object(w.a)(e.format());}getFunction(e){if(Object(n.l)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];de.throwArgumentError("no matching function","sighash",e);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter(e=>e.split("(")[0]===t);return 0===r.length?de.throwArgumentError("no matching function","name",t):r.length>1&&de.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]];}const t=this.functions[te.fromString(e).format()];return t||de.throwArgumentError("no matching function","signature",e),t;}getEvent(e){if(Object(n.l)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];de.throwArgumentError("no matching event","topichash",t);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter(e=>e.split("(")[0]===t);return 0===r.length?de.throwArgumentError("no matching event","name",t):r.length>1&&de.throwArgumentError("multiple matching events","name",t),this.events[r[0]];}const t=this.events[Z.fromString(e).format()];return t||de.throwArgumentError("no matching event","signature",e),t;}getError(e){if(Object(n.l)(e)){const t=Object(c.e)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r];}de.throwArgumentError("no matching error","sighash",e);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter(e=>e.split("(")[0]===t);return 0===r.length?de.throwArgumentError("no matching error","name",t):r.length>1&&de.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]];}const t=this.errors[te.fromString(e).format()];return t||de.throwArgumentError("no matching error","signature",e),t;}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e);}catch(t){try{e=this.getError(e);}catch(e){throw t;}}return Object(c.e)(this.constructor,"getSighash")(e);}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),Object(c.e)(this.constructor,"getEventTopic")(e);}_decodeParams(e,data){return this._abiCoder.decode(e,data);}_encodeParams(e,t){return this._abiCoder.encode(e,t);}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[]);}decodeErrorResult(e,data){"string"==typeof e&&(e=this.getError(e));const t=Object(n.a)(data);return Object(n.i)(t.slice(0,4))!==this.getSighash(e)&&de.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Object(n.i)(t)),this._decodeParams(e.inputs,t.slice(4));}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),Object(n.i)(Object(n.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]));}decodeFunctionData(e,data){"string"==typeof e&&(e=this.getFunction(e));const t=Object(n.a)(data);return Object(n.i)(t.slice(0,4))!==this.getSighash(e)&&de.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Object(n.i)(t)),this._decodeParams(e.inputs,t.slice(4));}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(n.i)(Object(n.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]));}decodeFunctionResult(e,data){"string"==typeof e&&(e=this.getFunction(e));let t=Object(n.a)(data),r=null,o=null,c=null,l=null;switch(t.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,t);}catch(e){}break;case 4:{const e=Object(n.i)(t.slice(0,4)),f=ye[e];if(f)o=this._abiCoder.decode(f.inputs,t.slice(4)),c=f.name,l=f.signature,f.reason&&(r=o[0]);else try{const r=this.getError(e);o=this._abiCoder.decode(r.inputs,t.slice(4)),c=r.name,l=r.format();}catch(e){console.log(e);}break;}}return de.throwError("call revert exception",f.b.errors.CALL_EXCEPTION,{method:e.format(),errorArgs:o,errorName:c,errorSignature:l,reason:r});}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(n.i)(this._abiCoder.encode(e.outputs,t||[]));}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&de.throwError("too many arguments for "+e.format(),f.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const o=(param,e)=>"string"===param.type?Object(w.a)(e):"bytes"===param.type?Object(_.a)(Object(n.i)(e)):("address"===param.type&&this._abiCoder.encode(["address"],[e]),Object(n.h)(Object(n.i)(e),32));for(t.forEach((t,n)=>{let param=e.inputs[n];param.indexed?null==t?r.push(null):"array"===param.baseType||"tuple"===param.baseType?de.throwArgumentError("filtering with tuples or arrays not supported","contract."+param.name,t):Array.isArray(t)?r.push(t.map(e=>o(param,e))):r.push(o(param,t)):null!=t&&de.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+param.name,t);});r.length&&null===r[r.length-1];)r.pop();return r;}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&de.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((param,e)=>{const c=t[e];if(param.indexed){if("string"===param.type)r.push(Object(w.a)(c));else if("bytes"===param.type)r.push(Object(_.a)(c));else{if("tuple"===param.baseType||"array"===param.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([param.type],[c]));}}else n.push(param),o.push(c);}),{data:this._abiCoder.encode(n,o),topics:r};}decodeEventLog(e,data,t){if("string"==typeof e&&(e=this.getEvent(e)),null!=t&&!e.anonymous){let r=this.getEventTopic(e);Object(n.l)(t[0],32)&&t[0].toLowerCase()===r||de.throwError("fragment/topic mismatch",f.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:r,value:t[0]}),t=t.slice(1);}let r=[],o=[],c=[];e.inputs.forEach((param,e)=>{param.indexed?"string"===param.type||"bytes"===param.type||"tuple"===param.baseType||"array"===param.baseType?(r.push(V.fromObject({type:"bytes32",name:param.name})),c.push(!0)):(r.push(param),c.push(!1)):(o.push(param),c.push(!1));});let l=null!=t?this._abiCoder.decode(r,Object(n.b)(t)):null,h=this._abiCoder.decode(o,data,!0),d=[],m=0,y=0;e.inputs.forEach((param,e)=>{if(param.indexed){if(null==l)d[e]=new ge({_isIndexed:!0,hash:null});else if(c[e])d[e]=new ge({_isIndexed:!0,hash:l[y++]});else try{d[e]=l[y++];}catch(t){d[e]=t;}}else try{d[e]=h[m++];}catch(t){d[e]=t;}if(param.name&&null==d[param.name]){const t=d[e];t instanceof Error?Object.defineProperty(d,param.name,{enumerable:!0,get:()=>{throw ve(`property ${JSON.stringify(param.name)}`,t);}}):d[param.name]=t;}});for(let i=0;i{throw ve(`index ${i}`,e);}});}return Object.freeze(d);}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new be({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:o.a.from(e.value||"0")}):null;}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new pe({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)});}parseError(data){const e=Object(n.i)(data);let t=this.getError(e.substring(0,10).toLowerCase());return t?new me({args:this._abiCoder.decode(t.inputs,"0x"+e.substring(10)),errorFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t)}):null;}static isInterface(e){return!(!e||!e._isInterface);}}var _e=r(41),Ae=r(35),Me=r(15);var Ee=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const Se=new f.b("contracts/5.4.1"),Te={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};function xe(e,t){return Ee(this,void 0,void 0,function*(){const r=yield t;try{return Object(v.a)(r);}catch(e){}e||Se.throwError("a provider or signer is needed to resolve ENS names",f.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const address=yield e.resolveName(r);return null==address&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",r),address;});}function ke(e,t,r){return Ee(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((r,n)=>ke(e,Array.isArray(t)?t[n]:t[r.name],r))):"address"===r.type?yield xe(e,t):"tuple"===r.type?yield ke(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map(t=>ke(e,t,r.arrayChildren))):Promise.reject(new Error("invalid value for array")):t;});}function Ie(e,t,r){return Ee(this,void 0,void 0,function*(){let l={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(l=Object(c.g)(r.pop())),Se.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?l.from?l.from=Object(c.f)({override:xe(e.signer,l.from),signer:e.signer.getAddress()}).then(e=>Ee(this,void 0,void 0,function*(){return Object(v.a)(e.signer)!==e.override&&Se.throwError("Contract with a Signer cannot override from",f.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override;})):l.from=e.signer.getAddress():l.from&&(l.from=xe(e.provider,l.from));const h=yield Object(c.f)({args:ke(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:Object(c.f)(l)||{}}),data=e.interface.encodeFunctionData(t,h.args),d={data:data,to:h.address},m=h.overrides;if(null!=m.nonce&&(d.nonce=o.a.from(m.nonce).toNumber()),null!=m.gasLimit&&(d.gasLimit=o.a.from(m.gasLimit)),null!=m.gasPrice&&(d.gasPrice=o.a.from(m.gasPrice)),null!=m.maxFeePerGas&&(d.maxFeePerGas=o.a.from(m.maxFeePerGas)),null!=m.maxPriorityFeePerGas&&(d.maxPriorityFeePerGas=o.a.from(m.maxPriorityFeePerGas)),null!=m.from&&(d.from=m.from),null!=m.type&&(d.type=m.type),null!=m.accessList&&(d.accessList=Object(Me.b)(m.accessList)),null==d.gasLimit&&null!=t.gas){let e=21e3;const r=Object(n.a)(data);for(let i=0;inull!=l[e]);return y.length&&Se.throwError(`cannot override ${y.map(e=>JSON.stringify(e)).join(",")}`,f.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:y}),d;});}function Ce(e,t,r){const n=e.signer||e.provider;return function(...o){return Ee(this,void 0,void 0,function*(){let l;if(o.length===t.inputs.length+1&&"object"==typeof o[o.length-1]){const e=Object(c.g)(o.pop());null!=e.blockTag&&(l=yield e.blockTag),delete e.blockTag,o.push(e);}null!=e.deployTransaction&&(yield e._deployed(l));const h=yield Ie(e,t,o),d=yield n.call(h,l);try{let n=e.interface.decodeFunctionResult(t,d);return r&&1===t.outputs.length&&(n=n[0]),n;}catch(t){throw t.code===f.b.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=o,t.transaction=h),t;}});};}function Oe(e,t,r){return t.constant?Ce(e,t,r):function(e,t){return function(...r){return Ee(this,void 0,void 0,function*(){e.signer||Se.throwError("sending a transaction requires a signer",f.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield Ie(e,t,r),o=yield e.signer.sendTransaction(n),l=o.wait.bind(o);return o.wait=t=>l(t).then(t=>(t.events=t.logs.map(r=>{let n=Object(c.c)(r),o=null;try{o=e.interface.parseLog(r);}catch(e){}return o&&(n.args=o.args,n.decode=(data,t)=>e.interface.decodeEventLog(o.eventFragment,data,t),n.event=o.name,n.eventSignature=o.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n;}),t)),o;});};}(e,t);}function Be(filter){return!filter.address||null!=filter.topics&&0!==filter.topics.length?(filter.address||"*")+"@"+(filter.topics?filter.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):""):"*";}class Re{constructor(e,filter){Object(c.d)(this,"tag",e),Object(c.d)(this,"filter",filter),this._listeners=[];}addListener(e,t){this._listeners.push({listener:e,once:t});}removeListener(e){let t=!1;this._listeners=this._listeners.filter(r=>!(!t&&r.listener===e)||(t=!0,!1));}removeAllListeners(){this._listeners=[];}listeners(){return this._listeners.map(i=>i.listener);}listenerCount(){return this._listeners.length;}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter(t=>{const r=e.slice();return setTimeout(()=>{t.listener.apply(this,r);},0),!t.once;}),t;}prepareEvent(e){}getEmit(e){return[e];}}class Pe extends Re{constructor(){super("error",null);}}class Fe extends Re{constructor(address,e,t,r){const filter={address:address};let n=e.getEventTopic(t);r?(n!==r[0]&&Se.throwArgumentError("topic mismatch","topics",r),filter.topics=r.slice()):filter.topics=[n],super(Be(filter),filter),Object(c.d)(this,"address",address),Object(c.d)(this,"interface",e),Object(c.d)(this,"fragment",t);}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(data,e)=>this.interface.decodeEventLog(this.fragment,data,e);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics);}catch(t){e.args=null,e.decodeError=t;}}getEmit(e){const t=function(e){const t=[],r=function(path,object){if(Array.isArray(object))for(let e in object){const n=path.slice();n.push(e);try{r(n,object[e]);}catch(e){t.push({path:n,error:e});}}};return r([],e),t;}(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r;}}class Le extends Re{constructor(address,e){super("*",{address:address}),Object(c.d)(this,"address",address),Object(c.d)(this,"interface",e);}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(data,e)=>this.interface.decodeEventLog(t.eventFragment,data,e),e.args=t.args;}catch(e){}}}class Ne{constructor(e,t,r){Se.checkNew(new.target,De),Object(c.d)(this,"interface",Object(c.e)(new.target,"getInterface")(t)),null==r?(Object(c.d)(this,"provider",null),Object(c.d)(this,"signer",null)):Ae.a.isSigner(r)?(Object(c.d)(this,"provider",r.provider||null),Object(c.d)(this,"signer",r)):_e.b.isProvider(r)?(Object(c.d)(this,"provider",r),Object(c.d)(this,"signer",null)):Se.throwArgumentError("invalid signer or provider","signerOrProvider",r),Object(c.d)(this,"callStatic",{}),Object(c.d)(this,"estimateGas",{}),Object(c.d)(this,"functions",{}),Object(c.d)(this,"populateTransaction",{}),Object(c.d)(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach(t=>{const r=this.interface.events[t];Object(c.d)(this.filters,t,(...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)})),e[r.name]||(e[r.name]=[]),e[r.name].push(t);}),Object.keys(e).forEach(t=>{const r=e[t];1===r.length?Object(c.d)(this.filters,t,this.filters[r[0]]):Se.warn(`Duplicate definition of ${t} (${r.join(", ")})`);});}if(Object(c.d)(this,"_runningEvents",{}),Object(c.d)(this,"_wrappedEmits",{}),null==e&&Se.throwArgumentError("invalid contract address or ENS name","addressOrName",e),Object(c.d)(this,"address",e),this.provider)Object(c.d)(this,"resolvedAddress",xe(this.provider,e));else try{Object(c.d)(this,"resolvedAddress",Promise.resolve(Object(v.a)(e)));}catch(e){Se.throwError("provider is required to use ENS name as contract address",f.b.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"});}const n={},o={};Object.keys(this.interface.functions).forEach(e=>{const t=this.interface.functions[e];if(o[e])Se.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{o[e]=!0;{const r=t.name;n[r]||(n[r]=[]),n[r].push(e);}null==this[e]&&Object(c.d)(this,e,Oe(this,t,!0)),null==this.functions[e]&&Object(c.d)(this.functions,e,Oe(this,t,!1)),null==this.callStatic[e]&&Object(c.d)(this.callStatic,e,Ce(this,t,!0)),null==this.populateTransaction[e]&&Object(c.d)(this.populateTransaction,e,function(e,t){return function(...r){return Ie(e,t,r);};}(this,t)),null==this.estimateGas[e]&&Object(c.d)(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return Ee(this,void 0,void 0,function*(){r||Se.throwError("estimate require a provider or signer",f.b.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const o=yield Ie(e,t,n);return yield r.estimateGas(o);});};}(this,t));}}),Object.keys(n).forEach(e=>{const t=n[e];if(t.length>1)return;const r=t[0];try{null==this[e]&&Object(c.d)(this,e,this[r]);}catch(e){}null==this.functions[e]&&Object(c.d)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&Object(c.d)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&Object(c.d)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&Object(c.d)(this.estimateGas,e,this.estimateGas[r]);});}static getContractAddress(e){return Object(v.b)(e);}static getInterface(e){return we.isInterface(e)?e:new we(e);}deployed(){return this._deployed();}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(code=>("0x"===code&&Se.throwError("contract not deployed",f.b.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise;}fallback(e){this.signer||Se.throwError("sending a transactions require a signer",f.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=Object(c.g)(e||{});return["from","to"].forEach(function(e){null!=t[e]&&Se.throwError("cannot override "+e,f.b.errors.UNSUPPORTED_OPERATION,{operation:e});}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t));}connect(e){"string"==typeof e&&(e=new Ae.b(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&Object(c.d)(t,"deployTransaction",this.deployTransaction),t;}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider);}static isIndexed(e){return ge.isIndexed(e);}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e;}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new Pe());if("event"===e)return this._normalizeRunningEvent(new Re("event",null));if("*"===e)return this._normalizeRunningEvent(new Le(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Fe(this.address,this.interface,t));}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new Fe(this.address,this.interface,r,e.topics));}catch(e){}const filter={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Re(Be(filter),filter));}return this._normalizeRunningEvent(new Le(this.address,this.interface));}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag]);}}_wrapEvent(e,t,r){const n=Object(c.c)(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e));},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n;}_addEventListener(e,t,r){if(this.provider||Se.throwError("events require a provider or a signer with a provider",f.b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t);}catch(e){n.decodeError=e.error;}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n);};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r);}}queryFilter(e,t,r){const o=this._getRunningEvent(e),filter=Object(c.g)(o.filter);return"string"==typeof t&&Object(n.l)(t,32)?(null!=r&&Se.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),filter.blockHash=t):(filter.fromBlock=null!=t?t:0,filter.toBlock=null!=r?r:"latest"),this.provider.getLogs(filter).then(e=>e.map(e=>this._wrapEvent(o,e,null)));}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this;}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this;}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n;}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce((e,t)=>e+this._runningEvents[t].listenerCount(),0):this._getRunningEvent(e).listenerCount():0;}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach(t=>{e.push(t);});return e;}return this._getRunningEvent(e).listeners();}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t);}return this;}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this;}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this;}removeListener(e,t){return this.off(e,t);}}class De extends Ne{}class je{constructor(e,t,r){let o=null;o="string"==typeof t?t:Object(n.j)(t)?Object(n.i)(t):t&&"string"==typeof t.object?t.object:"!","0x"!==o.substring(0,2)&&(o="0x"+o),(!Object(n.l)(o)||o.length%2)&&Se.throwArgumentError("invalid bytecode","bytecode",t),r&&!Ae.a.isSigner(r)&&Se.throwArgumentError("invalid signer","signer",r),Object(c.d)(this,"bytecode",o),Object(c.d)(this,"interface",Object(c.e)(new.target,"getInterface")(e)),Object(c.d)(this,"signer",r||null);}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=Object(c.g)(e.pop());for(const e in t)if(!Te[e])throw new Error("unknown transaction override "+e);}if(["data","from","to"].forEach(e=>{null!=t[e]&&Se.throwError("cannot override "+e,f.b.errors.UNSUPPORTED_OPERATION,{operation:e});}),t.value){o.a.from(t.value).isZero()||this.interface.deploy.payable||Se.throwError("non-payable constructor cannot override value",f.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value});}return Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=Object(n.i)(Object(n.b)([this.bytecode,this.interface.encodeDeploy(e)])),t;}deploy(...e){return Ee(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Se.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield ke(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),o=yield this.signer.sendTransaction(n),address=Object(c.e)(this.constructor,"getContractAddress")(o),f=Object(c.e)(this.constructor,"getContract")(address,this.interface,this.signer);return Object(c.d)(f,"deployTransaction",o),f;});}attach(address){return this.constructor.getContract(address,this.interface,this.signer);}connect(e){return new this.constructor(this.interface,this.bytecode,e);}static fromSolidity(e,t){null==e&&Se.throwError("missing compiler output",f.b.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t);}static getInterface(e){return De.getInterface(e);}static getContractAddress(e){return Object(v.b)(e);}static getContract(address,e,t){return new De(address,e,t);}}},function(e,t,r){"use strict";r.r(t),r.d(t,"workerEvents",function(){return n;}),r.d(t,"numbers",function(){return o;});var n={INIT_WORKER:"initWorker",GET_COMMITMENT_EVENTS:"get_commitment_events",GET_UNSPENT_EVENTS:"get_unspent_events",GET_NULLIFIER_EVENT:"get_nullifier_event",GET_NULLIFIER_EVENTS_FROM_TX_HASH:"get_nullifier_events_from_tx_hash",UPDATE_NULLIFIER_EVENTS:"update_nullifier_events",GET_BATCH_EVENTS:"get_batch_events",GET_BATCH_COMMITMENTS_EVENTS:"get_batch_commitments_events",GET_EVENTS_FROM_TX_HASH:"get_events_from_tx_hash",SAVE_EVENTS:"save_events",GET_CACHED_EVENTS:"get_cached_events",GET_CACHED_COMMITMENTS_EVENTS:"get_cached_commitments_events",SAVE_LAST_SYNC_BLOCK:"save_last_sync_block"},o={ZERO:0,TWO:2,ONE:1,BYTES_31:31,BYTES_62:62,IS_SPENT_INDEX:1,OX_LENGTH:2,RECALL_DELAY:500,NULLIFIER_LENGTH:66,NONCE_BUF_LENGTH:24,COMMITMENTS_CHAIN:100,DEPLOYED_BLOCK:19097755,DECRYPT_WORKERS_COUNT:8,MIN_BLOCKS_INTERVAL_LINE:2e5,EPHEM_PUBLIC_KEY_BUF_LENGTH:56};},,function(e,t,r){var n;e.exports=(n=r(11),function(){var e=n,t=e.lib.WordArray;function r(e,r,n){for(var o=[],c=0,i=0;i>>6-i%4*2;o[c>>>2]|=f<<24-c%4*8,c++;}return t.create(o,c);}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,map=this._map;e.clamp();for(var n=[],i=0;i>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,c=0;c<4&&i+.75*c>>6*(3-c)&63));var f=map.charAt(64);if(f)for(;n.length%4;)n.push(f);return n.join("");},parse:function(e){var t=e.length,map=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>24)|4278255360&(n<<24|n>>>8);}var o=this._hash.words,c=e[t+0],f=e[t+1],h=e[t+2],w=e[t+3],_=e[t+4],A=e[t+5],M=e[t+6],E=e[t+7],S=e[t+8],T=e[t+9],x=e[t+10],k=e[t+11],I=e[t+12],C=e[t+13],O=e[t+14],B=e[t+15],a=o[0],b=o[1],R=o[2],P=o[3];a=d(a,b,R,P,c,7,l[0]),P=d(P,a,b,R,f,12,l[1]),R=d(R,P,a,b,h,17,l[2]),b=d(b,R,P,a,w,22,l[3]),a=d(a,b,R,P,_,7,l[4]),P=d(P,a,b,R,A,12,l[5]),R=d(R,P,a,b,M,17,l[6]),b=d(b,R,P,a,E,22,l[7]),a=d(a,b,R,P,S,7,l[8]),P=d(P,a,b,R,T,12,l[9]),R=d(R,P,a,b,x,17,l[10]),b=d(b,R,P,a,k,22,l[11]),a=d(a,b,R,P,I,7,l[12]),P=d(P,a,b,R,C,12,l[13]),R=d(R,P,a,b,O,17,l[14]),a=m(a,b=d(b,R,P,a,B,22,l[15]),R,P,f,5,l[16]),P=m(P,a,b,R,M,9,l[17]),R=m(R,P,a,b,k,14,l[18]),b=m(b,R,P,a,c,20,l[19]),a=m(a,b,R,P,A,5,l[20]),P=m(P,a,b,R,x,9,l[21]),R=m(R,P,a,b,B,14,l[22]),b=m(b,R,P,a,_,20,l[23]),a=m(a,b,R,P,T,5,l[24]),P=m(P,a,b,R,O,9,l[25]),R=m(R,P,a,b,w,14,l[26]),b=m(b,R,P,a,S,20,l[27]),a=m(a,b,R,P,C,5,l[28]),P=m(P,a,b,R,h,9,l[29]),R=m(R,P,a,b,E,14,l[30]),a=y(a,b=m(b,R,P,a,I,20,l[31]),R,P,A,4,l[32]),P=y(P,a,b,R,S,11,l[33]),R=y(R,P,a,b,k,16,l[34]),b=y(b,R,P,a,O,23,l[35]),a=y(a,b,R,P,f,4,l[36]),P=y(P,a,b,R,_,11,l[37]),R=y(R,P,a,b,E,16,l[38]),b=y(b,R,P,a,x,23,l[39]),a=y(a,b,R,P,C,4,l[40]),P=y(P,a,b,R,c,11,l[41]),R=y(R,P,a,b,w,16,l[42]),b=y(b,R,P,a,M,23,l[43]),a=y(a,b,R,P,T,4,l[44]),P=y(P,a,b,R,I,11,l[45]),R=y(R,P,a,b,B,16,l[46]),a=v(a,b=y(b,R,P,a,h,23,l[47]),R,P,c,6,l[48]),P=v(P,a,b,R,E,10,l[49]),R=v(R,P,a,b,O,15,l[50]),b=v(b,R,P,a,A,21,l[51]),a=v(a,b,R,P,I,6,l[52]),P=v(P,a,b,R,w,10,l[53]),R=v(R,P,a,b,x,15,l[54]),b=v(b,R,P,a,f,21,l[55]),a=v(a,b,R,P,S,6,l[56]),P=v(P,a,b,R,B,10,l[57]),R=v(R,P,a,b,M,15,l[58]),b=v(b,R,P,a,C,21,l[59]),a=v(a,b,R,P,_,6,l[60]),P=v(P,a,b,R,k,10,l[61]),R=v(R,P,a,b,h,15,l[62]),b=v(b,R,P,a,T,21,l[63]),o[0]=o[0]+a|0,o[1]=o[1]+b|0,o[2]=o[2]+R|0,o[3]=o[3]+P|0;},_doFinalize:function(){var data=this._data,t=data.words,r=8*this._nDataBytes,n=8*data.sigBytes;t[n>>>5]|=128<<24-n%32;var o=e.floor(r/4294967296),c=r;t[15+(n+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t[14+(n+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),data.sigBytes=4*(t.length+1),this._process();for(var f=this._hash,l=f.words,i=0;i<4;i++){var h=l[i];l[i]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8);}return f;},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e;}});function d(a,b,e,t,r,s,n){var o=a+(b&e|~b&t)+r+n;return(o<>>32-s)+b;}function m(a,b,e,t,r,s,n){var o=a+(b&t|e&~t)+r+n;return(o<>>32-s)+b;}function y(a,b,e,t,r,s,n){var o=a+(b^e^t)+r+n;return(o<>>32-s)+b;}function v(a,b,e,t,r,s,n){var o=a+(e^(b|~t))+r+n;return(o<>>32-s)+b;}t.MD5=c._createHelper(h),t.HmacMD5=c._createHmacHelper(h);}(Math),n.MD5);},function(e,t,r){"use strict";var n={};function o(code,e,t){t||(t=Error);var r=function(t){var r,n;function o(r,n,o){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n);}(r,n,o))||this;}return n=t,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,o;}(t);r.prototype.name=t.name,r.prototype.code=code,n[code]=r;}function c(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i);}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0]);}return"of ".concat(t," ").concat(String(e));}o("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"';},TypeError),o("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,o,f,l;if("string"==typeof t&&(o="not ",t.substr(!f||f<0?0:+f,o.length)===o)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t;}(e," argument"))l="The ".concat(e," ").concat(n," ").concat(c(t,"type"));else{var h=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r);}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(h," ").concat(n," ").concat(c(t,"type"));}return l+=". Received type ".concat(typeof r);},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented";}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed";}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e;},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n;},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t;};e.exports=d;var o=r(186),c=r(190);r(4)(d,o);for(var f=n(c.prototype),l=0;l=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4);}this._update(this._block);var c=this._hash();return e?c.toString(e):c;},o.prototype._update=function(){throw new Error("_update must be implemented by subclass");},e.exports=o;},function(e,t,r){"use strict";var n={};function o(code,e,t){t||(t=Error);var r=function(t){var r,n;function o(r,n,o){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n);}(r,n,o))||this;}return n=t,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,o;}(t);r.prototype.name=t.name,r.prototype.code=code,n[code]=r;}function c(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(i){return String(i);}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0]);}return"of ".concat(t," ").concat(String(e));}o("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"';},TypeError),o("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,o,f,l;if("string"==typeof t&&(o="not ",t.substr(!f||f<0?0:+f,o.length)===o)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t;}(e," argument"))l="The ".concat(e," ").concat(n," ").concat(c(t,"type"));else{var h=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r);}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(h," ").concat(n," ").concat(c(t,"type"));}return l+=". Received type ".concat(typeof r);},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented";}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed";}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e;},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n;},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t;};e.exports=d;var o=r(216),c=r(220);r(4)(d,o);for(var f=n(c.prototype),l=0;l2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0]);}return"of ".concat(t," ").concat(String(e));}o("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"';},TypeError),o("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,o,f,l;if("string"==typeof t&&(o="not ",t.substr(!f||f<0?0:+f,o.length)===o)?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t;}(e," argument"))l="The ".concat(e," ").concat(n," ").concat(c(t,"type"));else{var h=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r);}(e,".")?"property":"argument";l='The "'.concat(e,'" ').concat(h," ").concat(n," ").concat(c(t,"type"));}return l+=". Received type ".concat(typeof r);},TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented";}),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed";}),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e;},TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n;},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t;};e.exports=d;var o=r(253),c=r(257);r(4)(d,o);for(var f=n(c.prototype),l=0;l=0;});},intToBuffer:function(i){var e=f(i);return new t(c(e.slice(2)),"hex");},getBinarySize:function(e){if("string"!=typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return t.byteLength(e,"utf8");},isHexPrefixed:n,stripHexPrefix:o,padToEven:c,intToHex:f,fromAscii:function(e){for(var t="",i=0;i"+content+"";},w=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t;},_=function(){try{n=new ActiveXObject("htmlfile");}catch(e){}var e,iframe;_="undefined"!=typeof document?document.domain&&n?w(n):((iframe=h("iframe")).style.display="none",html.appendChild(iframe),iframe.src=String("javascript:"),(e=iframe.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F):w(n);for(var t=f.length;t--;)delete _.prototype[f[t]];return _();};l[m]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(y.prototype=o(e),r=new y(),y.prototype=null,r[m]=e):r=_(),void 0===t?r:c(r,t);};},function(e,t,r){"use strict";r.d(t,"a",function(){return x;}),r.d(t,"b",function(){return k;}),r.d(t,"c",function(){return I;});var n=r(6),o=r(41),c=r(35),f=r(0),l=r(543),h=r(544),d=r(20),m=r(7),y=r(1),v=r(123),w=r(33),_=r(82),A=r(121),M=r(15),E=r(2);var S=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const T=new E.b("wallet/5.4.0");class x extends c.a{constructor(e,t){if(T.checkNew(new.target,x),super(),null!=(r=e)&&Object(f.l)(r.privateKey,32)&&null!=r.address){const t=new w.a(e.privateKey);if(Object(y.d)(this,"_signingKey",()=>t),Object(y.d)(this,"address",Object(M.c)(this.publicKey)),this.address!==Object(n.a)(e.address)&&T.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase;}(e)){const t=e.mnemonic;Object(y.d)(this,"_mnemonic",()=>({phrase:t.phrase,path:t.path||d.b,locale:t.locale||"en"}));const r=this.mnemonic,n=d.a.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);Object(M.c)(n.privateKey)!==this.address&&T.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]");}else Object(y.d)(this,"_mnemonic",()=>null);}else{if(w.a.isSigningKey(e))"secp256k1"!==e.curve&&T.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),Object(y.d)(this,"_signingKey",()=>e);else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new w.a(e);Object(y.d)(this,"_signingKey",()=>t);}Object(y.d)(this,"_mnemonic",()=>null),Object(y.d)(this,"address",Object(M.c)(this.publicKey));}var r;t&&!o.b.isProvider(t)&&T.throwArgumentError("invalid provider","provider",t),Object(y.d)(this,"provider",t||null);}get mnemonic(){return this._mnemonic();}get privateKey(){return this._signingKey().privateKey;}get publicKey(){return this._signingKey().publicKey;}getAddress(){return Promise.resolve(this.address);}connect(e){return new x(this,e);}signTransaction(e){return Object(y.f)(e).then(t=>{null!=t.from&&(Object(n.a)(t.from)!==this.address&&T.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest(Object(m.a)(Object(M.f)(t)));return Object(M.f)(t,r);});}signMessage(e){return S(this,void 0,void 0,function*(){return Object(f.m)(this._signingKey().signDigest(Object(l.a)(e)));});}_signTypedData(e,t,r){return S(this,void 0,void 0,function*(){const n=yield h.a.resolveNames(e,t,r,e=>(null==this.provider&&T.throwError("cannot resolve ENS names without a provider",E.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e)));return Object(f.m)(this._signingKey().signDigest(h.a.hash(n.domain,t,n.value)));});}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),Object(_.c)(this,e,t,r);}static createRandom(e){let t=Object(v.a)(16);e||(e={}),e.extraEntropy&&(t=Object(f.a)(Object(f.e)(Object(m.a)(Object(f.b)([t,e.extraEntropy])),0,16)));const r=Object(d.c)(t,e.locale);return x.fromMnemonic(r,e.path,e.locale);}static fromEncryptedJson(e,t,r){return Object(A.a)(e,t,r).then(e=>new x(e));}static fromEncryptedJsonSync(e,t){return new x(Object(A.b)(e,t));}static fromMnemonic(e,path,t){return path||(path=d.b),new x(d.a.fromMnemonic(e,null,t).derivePath(path));}}function k(e,t){return Object(M.e)(Object(l.a)(e),t);}function I(e,t,r,n){return Object(M.e)(h.a.hash(e,t,r),n);}},function(e,t,r){"use strict";r.d(t,"b",function(){return R;}),r.d(t,"a",function(){return P;}),r.d(t,"c",function(){return F;});var n=r(42),o=r.n(n),c=r(122),f=r.n(c),l=r(6),h=r(0),d=r(20),m=r(7),y=r(540),v=r(123),w=r(1),_=r(15),A=r(9),M=r(2),E=r(120),S=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const T=new M.b(E.a);function x(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase;}class k extends w.a{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount);}}function I(data,e){const t=Object(A.b)(Object(A.c)(data,"crypto/ciphertext"));if(Object(h.i)(Object(m.a)(Object(h.b)([e.slice(16,32),t]))).substring(2)!==Object(A.c)(data,"crypto/mac").toLowerCase())throw new Error("invalid password");const r=function(data,e,t){if("aes-128-ctr"===Object(A.c)(data,"crypto/cipher")){const r=Object(A.b)(Object(A.c)(data,"crypto/cipherparams/iv")),n=new o.a.Counter(r),c=new o.a.ModeOfOperation.ctr(e,n);return Object(h.a)(c.decrypt(t));}return null;}(data,e.slice(0,16),t);r||T.throwError("unsupported cipher",M.b.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const n=e.slice(32,64),address=Object(_.c)(r);if(data.address){let e=data.address.toLowerCase();if("0x"!==e.substring(0,2)&&(e="0x"+e),Object(l.a)(e)!==address)throw new Error("address mismatch");}const c={_isKeystoreAccount:!0,address:address,privateKey:Object(h.i)(r)};if("0.1"===Object(A.c)(data,"x-ethers/version")){const e=Object(A.b)(Object(A.c)(data,"x-ethers/mnemonicCiphertext")),t=Object(A.b)(Object(A.c)(data,"x-ethers/mnemonicCounter")),r=new o.a.Counter(t),f=new o.a.ModeOfOperation.ctr(n,r),path=Object(A.c)(data,"x-ethers/path")||d.b,l=Object(A.c)(data,"x-ethers/locale")||"en",m=Object(h.a)(f.decrypt(e));try{const e=Object(d.c)(m,l),t=d.a.fromMnemonic(e,null,l).derivePath(path);if(t.privateKey!=c.privateKey)throw new Error("mnemonic mismatch");c.mnemonic=t.mnemonic;}catch(e){if(e.code!==M.b.errors.INVALID_ARGUMENT||"wordlist"!==e.argument)throw e;}}return new k(c);}function C(e,t,r,n,o){return Object(h.a)(Object(y.a)(e,t,r,n,o));}function O(e,t,r,n,o){return Promise.resolve(C(e,t,r,n,o));}function B(data,e,t,r,n){const o=Object(A.a)(e),c=Object(A.c)(data,"crypto/kdf");if(c&&"string"==typeof c){const e=function(e,t){return T.throwArgumentError("invalid key-derivation function parameters",e,t);};if("scrypt"===c.toLowerCase()){const t=Object(A.b)(Object(A.c)(data,"crypto/kdfparams/salt")),f=parseInt(Object(A.c)(data,"crypto/kdfparams/n")),l=parseInt(Object(A.c)(data,"crypto/kdfparams/r")),p=parseInt(Object(A.c)(data,"crypto/kdfparams/p"));f&&l&&p||e("kdf",c),0!=(f&f-1)&&e("N",f);const h=parseInt(Object(A.c)(data,"crypto/kdfparams/dklen"));return 32!==h&&e("dklen",h),r(o,t,f,l,p,64,n);}if("pbkdf2"===c.toLowerCase()){const r=Object(A.b)(Object(A.c)(data,"crypto/kdfparams/salt"));let n=null;const c=Object(A.c)(data,"crypto/kdfparams/prf");"hmac-sha256"===c?n="sha256":"hmac-sha512"===c?n="sha512":e("prf",c);const f=parseInt(Object(A.c)(data,"crypto/kdfparams/c")),l=parseInt(Object(A.c)(data,"crypto/kdfparams/dklen"));return 32!==l&&e("dklen",l),t(o,r,f,l,n);}}return T.throwArgumentError("unsupported key-derivation function","kdf",c);}function R(e,t){const data=JSON.parse(e);return I(data,B(data,t,C,f.a.syncScrypt));}function P(e,t,r){return S(this,void 0,void 0,function*(){const data=JSON.parse(e);return I(data,yield B(data,t,O,f.a.scrypt,r));});}function F(e,t,r,n){try{if(Object(l.a)(e.address)!==Object(_.c)(e.privateKey))throw new Error("address/privateKey mismatch");if(x(e)){const t=e.mnemonic;if(d.a.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||d.b).privateKey!=e.privateKey)throw new Error("mnemonic mismatch");}}catch(e){return Promise.reject(e);}"function"!=typeof r||n||(n=r,r={}),r||(r={});const c=Object(h.a)(e.privateKey),y=Object(A.a)(t);let w=null,path=null,M=null;if(x(e)){const t=e.mnemonic;w=Object(h.a)(Object(d.f)(t.phrase,t.locale||"en")),path=t.path||d.b,M=t.locale||"en";}let E=r.client;E||(E="ethers.js");let S=null;S=r.salt?Object(h.a)(r.salt):Object(v.a)(32);let T=null;if(r.iv){if(T=Object(h.a)(r.iv),16!==T.length)throw new Error("invalid iv");}else T=Object(v.a)(16);let k=null;if(r.uuid){if(k=Object(h.a)(r.uuid),16!==k.length)throw new Error("invalid uuid");}else k=Object(v.a)(16);let I=1<<17,C=8,p=1;return r.scrypt&&(r.scrypt.N&&(I=r.scrypt.N),r.scrypt.r&&(C=r.scrypt.r),r.scrypt.p&&(p=r.scrypt.p)),f.a.scrypt(y,S,I,C,p,64,n).then(t=>{const r=(t=Object(h.a)(t)).slice(0,16),n=t.slice(16,32),f=t.slice(32,64),l=new o.a.Counter(T),d=new o.a.ModeOfOperation.ctr(r,l),y=Object(h.a)(d.encrypt(c)),_=Object(m.a)(Object(h.b)([n,y])),data={address:e.address.substring(2).toLowerCase(),id:Object(A.d)(k),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:Object(h.i)(T).substring(2)},ciphertext:Object(h.i)(y).substring(2),kdf:"scrypt",kdfparams:{salt:Object(h.i)(S).substring(2),n:I,dklen:32,p:p,r:C},mac:_.substring(2)}};if(w){const e=Object(v.a)(16),t=new o.a.Counter(e),r=new o.a.ModeOfOperation.ctr(f,t),n=Object(h.a)(r.encrypt(w)),c=new Date(),l=c.getUTCFullYear()+"-"+Object(A.e)(c.getUTCMonth()+1,2)+"-"+Object(A.e)(c.getUTCDate(),2)+"T"+Object(A.e)(c.getUTCHours(),2)+"-"+Object(A.e)(c.getUTCMinutes(),2)+"-"+Object(A.e)(c.getUTCSeconds(),2)+".0Z";data["x-ethers"]={client:E,gethFilename:"UTC--"+l+"--"+data.address,mnemonicCounter:Object(h.i)(e).substring(2),mnemonicCiphertext:Object(h.i)(n).substring(2),path:path,locale:M,version:"0.1"};}return JSON.stringify(data);});}},,function(e,t,r){"use strict";var n=r(45),o=r(37);function c(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32;}t.BlockHash=c,c.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e;}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o0&&"0"===e.toString();)e=(a=a.slice(1))[0];return a;},t.stripZeros=t.unpad,t.toBuffer=function(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"==typeof t){if(!n.isHexString(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+t);t=e.from(n.padToEven(n.stripHexPrefix(t)),"hex");}else if("number"==typeof t)t=n.intToBuffer(t);else if(null==t)t=e.allocUnsafe(0);else if(o.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray());}return t;},t.bufferToInt=function(e){return new o(t.toBuffer(e)).toNumber();},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex");},t.fromSigned=function(e){return new o(e).fromTwos(256);},t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray());},t.addHexPrefix=function(e){return"string"!=typeof e||n.isHexPrefixed(e)?e:"0x"+e;},t.baToJSON=function(r){if(e.isBuffer(r))return"0x"+r.toString("hex");if(r instanceof Array){for(var n=[],i=0;ithis.data(e,!0)),type:L.allowNull(c),accessList:L.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:n,address:address,topics:L.arrayOf(n),data:data,logIndex:c,blockHash:n},e.receipt={to:L.allowNull(this.address,null),from:L.allowNull(this.address,null),contractAddress:L.allowNull(address,null),transactionIndex:c,root:L.allowNull(o),gasUsed:t,logsBloom:L.allowNull(data),blockHash:n,transactionHash:n,logs:L.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:L.allowNull(c,null),cumulativeGasUsed:t,effectiveGasPrice:L.allowNull(t),status:L.allowNull(c),type:f},e.block={hash:n,parentHash:n,number:c,timestamp:c,nonce:L.allowNull(o),difficulty:this.difficulty.bind(this),gasLimit:t,gasUsed:t,miner:address,extraData:data,transactions:L.allowNull(L.arrayOf(n)),baseFeePerGas:L.allowNull(t)},e.blockWithTransactions=Object(S.g)(e.block),e.blockWithTransactions.transactions=L.allowNull(L.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:L.allowNull(r,void 0),toBlock:L.allowNull(r,void 0),blockHash:L.allowNull(n,void 0),address:L.allowNull(address,void 0),topics:L.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:L.allowNull(c),blockHash:L.allowNull(n),transactionIndex:c,removed:L.allowNull(this.boolean.bind(this)),address:address,data:L.allowFalsish(data,"0x"),topics:L.arrayOf(n),transactionHash:n,logIndex:c},e;}accessList(e){return Object(P.b)(e||[]);}number(e){return"0x"===e?0:_.a.from(e).toNumber();}type(e){return"0x"===e||null==e?0:_.a.from(e).toNumber();}bigNumber(e){return _.a.from(e);}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1;}throw new Error("invalid boolean - "+e);}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),Object(A.l)(e))?e.toLowerCase():F.throwArgumentError("invalid hash","value",e);}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r;}address(e){return Object(B.a)(e);}callAddress(e){if(!Object(A.l)(e,32))return null;const address=Object(B.a)(Object(A.e)(e,12));return address===R.a?null:address;}contractAddress(e){return Object(B.b)(e);}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"==typeof e||Object(A.l)(e))return Object(A.g)(e);throw new Error("invalid blockTag");}hash(e,t){const r=this.hex(e,t);return 32!==Object(A.d)(r)?F.throwArgumentError("invalid hash","value",e):r;}difficulty(e){if(null==e)return null;const t=_.a.from(e);try{return t.toNumber();}catch(e){}return null;}uint256(e){if(!Object(A.l)(e))throw new Error("invalid uint256");return Object(A.h)(e,32);}_block(e,t){return null!=e.author&&null==e.miner&&(e.miner=e.author),L.check(t,e);}block(e){return this._block(e,this.formats.block);}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions);}transactionRequest(e){return L.check(this.formats.transactionRequest,e);}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&_.a.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=L.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;Object(A.l)(r)&&(r=_.a.from(r).toNumber()),t.chainId=r;}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),Object(A.l)(r)&&(r=_.a.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r;}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t;}transaction(e){return Object(P.d)(e);}receiptLog(e){return L.check(this.formats.receiptLog,e);}receipt(e){const t=L.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=_.a.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&F.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):F.throwArgumentError("invalid alt-root-status","value.root",t.root);}else 66!==t.root.length&&F.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t;}topics(e){return Array.isArray(e)?e.map(e=>this.topics(e)):null!=e?this.hash(e,!0):null;}filter(e){return L.check(this.formats.filter,e);}filterLog(e){return L.check(this.formats.filterLog,e);}static check(e,object){const t={};for(const r in e)try{const n=e[r](object[r]);void 0!==n&&(t[r]=n);}catch(e){throw e.checkKey=r,e.checkValue=object[r],e;}return t;}static allowNull(e,t){return function(r){return null==r?t:e(r);};}static allowFalsish(e,t){return function(r){return r?e(r):t;};}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach(function(t){r.push(e(t));}),r;};}}function N(e){return e&&"function"==typeof e.isCommunityResource;}function D(e){return N(e)&&e.isCommunityResource();}let j=!1;function U(){j||(j=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="));}var J=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const H=new o.b(O);function z(e){return null==e?"null":(32!==Object(A.d)(e)&&H.throwArgumentError("invalid topic","topic",e),e.toLowerCase());}function G(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map(e=>{if(Array.isArray(e)){const t={};e.forEach(e=>{t[z(e)]=!0;});const r=Object.keys(t);return r.sort(),r.join("|");}return z(e);}).join("&");}function K(e){if("string"==typeof e){if(e=e.toLowerCase(),32===Object(A.d)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e;}else{if(Array.isArray(e))return"filter:*:"+G(e);if(n.a.isForkEvent(e))throw H.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+G(e.topics||[]);}throw new Error("invalid event - "+e);}function V(){return new Date().getTime();}function X(e){return new Promise(t=>{setTimeout(t,e);});}const Q=["block","network","pending","poll"];class Z{constructor(e,t,r){Object(S.d)(this,"tag",e),Object(S.d)(this,"listener",t),Object(S.d)(this,"once",r);}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter;}return this.tag;}get type(){return this.tag.split(":")[0];}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1];}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const address=e[1],t=""===(data=e[2])?[]:data.split(/&/g).map(e=>{if(""===e)return[];const t=e.split("|").map(e=>"null"===e?null:e);return 1===t.length?t[0]:t;});var data;const filter={};return t.length>0&&(filter.topics=t),address&&"*"!==address&&(filter.address=address),filter;}pollable(){return this.tag.indexOf(":")>=0||Q.indexOf(this.tag)>=0;}}const W={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Y(e){return Object(A.h)(_.a.from(e).toHexString(),32);}function $(data){return w.a.encode(Object(A.b)([data,Object(A.e)(Object(T.c)(Object(T.c)(data)),0,4)]));}class ee{constructor(e,address,t){Object(S.d)(this,"provider",e),Object(S.d)(this,"name",t),Object(S.d)(this,"address",e.formatter.address(address));}_fetchBytes(e,t){return J(this,void 0,void 0,function*(){const r={to:this.address,data:Object(A.c)([e,Object(E.b)(this.name),t||"0x"])};try{const e=yield this.provider.call(r);if("0x"===e)return null;const t=_.a.from(Object(A.e)(e,0,32)).toNumber(),n=_.a.from(Object(A.e)(e,t,t+32)).toNumber();return Object(A.e)(e,t+32,t+32+n);}catch(e){return e.code,o.b.errors.CALL_EXCEPTION,null;}});}_getAddress(e,t){const r=W[String(e)];if(null==r&&H.throwError(`unsupported coin type: ${e}`,o.b.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=Object(A.a)(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return $(Object(A.b)([[r.p2pkh],"0x"+e[2]]));}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return $(Object(A.b)([[r.p2sh],"0x"+e[2]]));}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=C.a.toWords(n.slice(2));return e.unshift(t),C.a.encode(r.prefix,e);}}return null;}getAddress(e){return J(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{const e={to:this.address,data:"0x3b3b57de"+Object(E.b)(this.name).substring(2)},t=yield this.provider.call(e);return"0x"===t||t===M.a?null:this.provider.formatter.callAddress(t);}catch(e){if(e.code===o.b.errors.CALL_EXCEPTION)return null;throw e;}const t=yield this._fetchBytes("0xf1cb7e06",Y(e));if(null==t||"0x"===t)return null;const address=this._getAddress(e,t);return null==address&&H.throwError("invalid or unsupported coin data",o.b.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),address;});}getContentHash(){return J(this,void 0,void 0,function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+w.a.encode("0x"+t[1]);}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);return r&&64===r[1].length?"bzz://"+r[1]:H.throwError("invalid or unsupported content hash data",o.b.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e});});}getText(e){return J(this,void 0,void 0,function*(){let t=Object(x.f)(e);t=Object(A.b)([Y(64),Y(t.length),t]),t.length%32!=0&&(t=Object(A.b)([t,Object(A.h)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",Object(A.i)(t));return null==r||"0x"===r?null:Object(x.h)(r);});}}let te=null,re=1;class ne extends n.b{constructor(e){if(H.checkNew(new.target,n.b),super(),this._events=[],this._emitted={block:-2},this.formatter=new.target.getFormatter(),Object(S.d)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(e=>{}),this._ready().catch(e=>{});else{const t=Object(S.e)(new.target,"getNetwork")(e);t?(Object(S.d)(this,"_network",t),this.emit("network",t,null)):H.throwArgumentError("invalid network","network",e);}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._pollingInterval=4e3,this._fastQueryDate=0;}_ready(){return J(this,void 0,void 0,function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise;}catch(e){}null==e&&(e=yield this.detectNetwork()),e||H.throwError("no network detected",o.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:Object(S.d)(this,"_network",e),this.emit("network",e,null));}return this._network;});}get ready(){return Object(k.c)(()=>this._ready().then(e=>e,e=>{if(e.code!==o.b.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e;}));}static getFormatter(){return null==te&&(te=new L()),te;}static getNetwork(e){return v(null==e?"homestead":e);}_getInternalBlockNumber(e){return J(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(V()-r.respTime<=e)return r.blockNumber;break;}catch(e){if(this._internalBlockNumber===t)break;}}const t=V(),r=Object(S.f)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(e=>null,e=>e)}).then(({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const o=V();return(e=_.a.from(e).toNumber()){this._internalBlockNumber===r&&(this._internalBlockNumber=null);}),(yield r).blockNumber;});}poll(){return J(this,void 0,void 0,function*(){const e=re++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2);}catch(e){return void this.emit("error",e);}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)H.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",H.makeError("network block skew detected",o.b.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let i=this._emitted.block+1;i<=r;i++)this.emit("block",i);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach(e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e];})),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach(e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then(e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null).catch(e=>{this.emit("error",e);});t.push(n);break;}case"filter":{const filter=e.filter;filter.fromBlock=this._lastBlockNumber+1,filter.toBlock=r;const n=this.getLogs(filter).then(e=>{0!==e.length&&e.forEach(e=>{this._emitted["b:"+e.blockHash]=e.blockNumber,this._emitted["t:"+e.transactionHash]=e.blockNumber,this.emit(filter,e);});}).catch(e=>{this.emit("error",e);});t.push(n);break;}}}),this._lastBlockNumber=r,Promise.all(t).then(()=>{this.emit("didPoll",e);}).catch(e=>{this.emit("error",e);});}else this.emit("didPoll",e);});}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll();}get network(){return this._network;}detectNetwork(){return J(this,void 0,void 0,function*(){return H.throwError("provider does not support network detection",o.b.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"});});}getNetwork(){return J(this,void 0,void 0,function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield X(0),this._network;const r=H.makeError("underlying network changed",o.b.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r;}return e;});}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e);},e=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1;}get polling(){return null!=this._poller;}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll();},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null;},this.pollingInterval);},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null);}get pollingInterval(){return this._pollingInterval;}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll();},this._pollingInterval));}_getFastBlockNumber(){const e=V();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber))),this._fastBlockNumberPromise;}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)));}waitForTransaction(e,t,r){return J(this,void 0,void 0,function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null);});}_waitForTransaction(e,t,r,n){return J(this,void 0,void 0,function*(){const c=yield this.getTransactionReceipt(e);return(c?c.confirmations:0)>=t?c:new Promise((c,f)=>{const l=[];let h=!1;const d=function(){return!!h||(h=!0,l.forEach(e=>{e();}),!1);},m=e=>{e.confirmations{this.removeListener(e,m);}),n){let r=n.startBlock,c=null;const m=l=>J(this,void 0,void 0,function*(){h||(yield X(1e3),this.getTransactionCount(n.from).then(y=>J(this,void 0,void 0,function*(){if(!h){if(y<=n.nonce)r=l;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return;}for(null==c&&(c=r-3,c{h||this.once("block",m);}));});if(h)return;this.once("block",m),l.push(()=>{this.removeListener("block",m);});}if("number"==typeof r&&r>0){const e=setTimeout(()=>{d()||f(H.makeError("timeout exceeded",o.b.errors.TIMEOUT,{timeout:r}));},r);e.unref&&e.unref(),l.push(()=>{clearTimeout(e);});}});});}getBlockNumber(){return J(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0);});}getGasPrice(){return J(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return _.a.from(e);}catch(t){return H.throwError("bad result from backend",o.b.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t});}});}getBalance(e,t){return J(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Object(S.f)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return _.a.from(n);}catch(e){return H.throwError("bad result from backend",o.b.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e});}});}getTransactionCount(e,t){return J(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Object(S.f)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return _.a.from(n).toNumber();}catch(e){return H.throwError("bad result from backend",o.b.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e});}});}getCode(e,t){return J(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Object(S.f)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return Object(A.i)(n);}catch(e){return H.throwError("bad result from backend",o.b.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e});}});}getStorageAt(e,t,r){return J(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Object(S.f)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then(p=>Object(A.g)(p))}),c=yield this.perform("getStorageAt",n);try{return Object(A.i)(c);}catch(e){return H.throwError("bad result from backend",o.b.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:c,error:e});}});}_wrapTransaction(e,t,r){if(null!=t&&32!==Object(A.d)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&H.throwError("Transaction hash mismatch from Provider.sendTransaction.",o.b.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>J(this,void 0,void 0,function*(){let c;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(c={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const f=yield this._waitForTransaction(e.hash,t,n,c);return null==f&&0===t?null:(this._emitted["t:"+e.hash]=f.blockNumber,0===f.status&&H.throwError("transaction failed",o.b.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:f}),f);}),n;}sendTransaction(e){return J(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then(e=>Object(A.i)(e)),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n);}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e;}});}_getTransactionRequest(e){return J(this,void 0,void 0,function*(){const t=yield e,r={};return["from","to"].forEach(e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then(e=>e?this._getAddress(e):null));}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then(e=>e?_.a.from(e):null));}),["type"].forEach(e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then(e=>null!=e?e:null));}),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach(e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then(e=>e?Object(A.i)(e):null));}),this.formatter.transactionRequest(yield Object(S.f)(r));});}_getFilter(filter){return J(this,void 0,void 0,function*(){filter=yield filter;const e={};return null!=filter.address&&(e.address=this._getAddress(filter.address)),["blockHash","topics"].forEach(t=>{null!=filter[t]&&(e[t]=filter[t]);}),["fromBlock","toBlock"].forEach(t=>{null!=filter[t]&&(e[t]=this._getBlockTag(filter[t]));}),this.formatter.filter(yield Object(S.f)(e));});}call(e,t){return J(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Object(S.f)({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("call",r);try{return Object(A.i)(n);}catch(e){return H.throwError("bad result from backend",o.b.errors.SERVER_ERROR,{method:"call",params:r,result:n,error:e});}});}estimateGas(e){return J(this,void 0,void 0,function*(){yield this.getNetwork();const t=yield Object(S.f)({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return _.a.from(r);}catch(e){return H.throwError("bad result from backend",o.b.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e});}});}_getAddress(e){return J(this,void 0,void 0,function*(){const address=yield this.resolveName(e);return null==address&&H.throwError("ENS name not configured",o.b.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),address;});}_getBlock(e,t){return J(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let r=-128;const n={includeTransactions:!!t};if(Object(A.l)(e,32))n.blockHash=e;else try{n.blockTag=this.formatter.blockTag(yield this._getBlockTag(e)),Object(A.l)(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16));}catch(t){H.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e);}return Object(k.c)(()=>J(this,void 0,void 0,function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let i=0;ithis._wrapTransaction(e)),r;}return this.formatter.block(e);}),{oncePoll:this});});}getBlock(e){return this._getBlock(e,!1);}getBlockWithTransactions(e){return this._getBlock(e,!0);}getTransaction(e){return J(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Object(k.c)(()=>J(this,void 0,void 0,function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e;}return this._wrapTransaction(n);}),{oncePoll:this});});}getTransactionReceipt(e){return J(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return Object(k.c)(()=>J(this,void 0,void 0,function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e;}return n;}),{oncePoll:this});});}getLogs(filter){return J(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield Object(S.f)({filter:this._getFilter(filter)}),t=yield this.perform("getLogs",e);return t.forEach(e=>{null==e.removed&&(e.removed=!1);}),L.arrayOf(this.formatter.filterLog.bind(this.formatter))(t);});}getEtherPrice(){return J(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{});});}_getBlockTag(e){return J(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&H.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t);}return this.formatter.blockTag(e);});}getResolver(e){return J(this,void 0,void 0,function*(){try{const address=yield this._getResolver(e);return null==address?null:new ee(this,address,e);}catch(e){return e.code,o.b.errors.CALL_EXCEPTION,null;}});}_getResolver(e){return J(this,void 0,void 0,function*(){const t=yield this.getNetwork();t.ensAddress||H.throwError("network does not support ENS",o.b.errors.UNSUPPORTED_OPERATION,{operation:"ENS",network:t.name});const r={to:t.ensAddress,data:"0x0178b8bf"+Object(E.b)(e).substring(2)};try{return this.formatter.callAddress(yield this.call(r));}catch(e){if(e.code===o.b.errors.CALL_EXCEPTION)return null;throw e;}});}resolveName(e){return J(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e));}catch(t){if(Object(A.l)(e))throw t;}"string"!=typeof e&&H.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null;});}lookupAddress(address){return J(this,void 0,void 0,function*(){address=yield address;const e=(address=this.formatter.address(address)).substring(2).toLowerCase()+".addr.reverse",t=yield this._getResolver(e);if(!t)return null;let r=Object(A.a)(yield this.call({to:t,data:"0x691f3431"+Object(E.b)(e).substring(2)}));if(r.length<32||!_.a.from(r.slice(0,32)).eq(32))return null;if(r=r.slice(32),r.length<32)return null;const n=_.a.from(r.slice(0,32)).toNumber();if(r=r.slice(32),n>r.length)return null;const o=Object(x.h)(r.slice(0,n));return(yield this.resolveName(o))!=address?null:o;});}perform(e,t){return H.throwError(e+" not implemented",o.b.errors.NOT_IMPLEMENTED,{operation:e});}_startEvent(e){this.polling=this._events.filter(e=>e.pollable()).length>0;}_stopEvent(e){this.polling=this._events.filter(e=>e.pollable()).length>0;}_addEventListener(e,t,r){const n=new Z(K(e),t,r);return this._events.push(n),this._startEvent(n),this;}on(e,t){return this._addEventListener(e,t,!1);}once(e,t){return this._addEventListener(e,t,!0);}emit(e,...t){let r=!1,n=[],o=K(e);return this._events=this._events.filter(e=>e.tag!==o||(setTimeout(()=>{e.listener.apply(this,t);},0),r=!0,!e.once||(n.push(e),!1))),n.forEach(e=>{this._stopEvent(e);}),r;}listenerCount(e){if(!e)return this._events.length;let t=K(e);return this._events.filter(e=>e.tag===t).length;}listeners(e){if(null==e)return this._events.map(e=>e.listener);let t=K(e);return this._events.filter(e=>e.tag===t).map(e=>e.listener);}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,o=K(e);return this._events=this._events.filter(e=>e.tag!==o||e.listener!=t||!!n||(n=!0,r.push(e),!1)),r.forEach(e=>{this._stopEvent(e);}),this;}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=K(e);this._events=this._events.filter(e=>e.tag!==r||(t.push(e),!1));}return t.forEach(e=>{this._stopEvent(e);}),this;}}var ie=r(35),oe=r(544),ae=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const se=new o.b(O),ue=["call","estimateGas"];function ce(e,t,r){if("call"===e&&t.code===o.b.errors.SERVER_ERROR){const e=t.error;if(e&&e.message.match("reverted")&&Object(A.l)(e.data))return e.data;se.throwError("missing revert data in call exception",o.b.errors.CALL_EXCEPTION,{error:t,data:"0x"});}let n=t.message;t.code===o.b.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?n=t.error.message:"string"==typeof t.body?n=t.body:"string"==typeof t.responseText&&(n=t.responseText),n=(n||"").toLowerCase();const c=r.transaction||r.signedTransaction;throw n.match(/insufficient funds|base fee exceeds gas limit/)&&se.throwError("insufficient funds for intrinsic transaction cost",o.b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:c}),n.match(/nonce too low/)&&se.throwError("nonce has already been used",o.b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:c}),n.match(/replacement transaction underpriced/)&&se.throwError("replacement fee too low",o.b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:c}),n.match(/only replay-protected/)&&se.throwError("legacy pre-eip-155 transactions not supported",o.b.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:c}),ue.indexOf(e)>=0&&n.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&se.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",o.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:c}),t;}function fe(e){return new Promise(function(t){setTimeout(t,e);});}function le(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t;}return e.result;}function he(e){return e?e.toLowerCase():e;}const de={};class pe extends ie.a{constructor(e,t,r){if(se.checkNew(new.target,pe),super(),e!==de)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");Object(S.d)(this,"provider",t),null==r&&(r=0),"string"==typeof r?(Object(S.d)(this,"_address",this.provider.formatter.address(r)),Object(S.d)(this,"_index",null)):"number"==typeof r?(Object(S.d)(this,"_index",r),Object(S.d)(this,"_address",null)):se.throwArgumentError("invalid address or index","addressOrIndex",r);}connect(e){return se.throwError("cannot alter JSON-RPC Signer connection",o.b.errors.UNSUPPORTED_OPERATION,{operation:"connect"});}connectUnchecked(){return new be(de,this.provider,this._address||this._index);}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&se.throwError("unknown account #"+this._index,o.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])));}sendUncheckedTransaction(e){e=Object(S.g)(e);const t=this.getAddress().then(address=>(address&&(address=address.toLowerCase()),address));if(null==e.gasLimit){const r=Object(S.g)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r);}return null!=e.to&&(e.to=Promise.resolve(e.to).then(e=>ae(this,void 0,void 0,function*(){if(null==e)return null;const address=yield this.provider.resolveName(e);return null==address&&se.throwArgumentError("provided ENS name resolves to null","tx.to",e),address;}))),Object(S.f)({tx:Object(S.f)(e),sender:t}).then(({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&se.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then(e=>e,e=>ce("sendTransaction",e,n));});}signTransaction(e){return se.throwError("signing transactions is unsupported",o.b.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"});}sendTransaction(e){return ae(this,void 0,void 0,function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield Object(k.c)(()=>ae(this,void 0,void 0,function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t);}),{oncePoll:this.provider});}catch(e){throw e.transactionHash=r,e;}});}signMessage(e){return ae(this,void 0,void 0,function*(){const data="string"==typeof e?Object(x.f)(e):e,address=yield this.getAddress();return yield this.provider.send("eth_sign",[address.toLowerCase(),Object(A.i)(data)]);});}_signTypedData(e,t,r){return ae(this,void 0,void 0,function*(){const n=yield oe.a.resolveNames(e,t,r,e=>this.provider.resolveName(e)),address=yield this.getAddress();return yield this.provider.send("eth_signTypedData_v4",[address.toLowerCase(),JSON.stringify(oe.a.getPayload(n.domain,t,n.value))]);});}unlock(e){return ae(this,void 0,void 0,function*(){const t=this.provider,address=yield this.getAddress();return t.send("personal_unlockAccount",[address.toLowerCase(),e,null]);});}}class be extends pe{sendTransaction(e){return this.sendUncheckedTransaction(e).then(e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)}));}}const me={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class ge extends ne{constructor(e,t){se.checkNew(new.target,ge);let r=t;null==r&&(r=new Promise((e,t)=>{setTimeout(()=>{this.detectNetwork().then(t=>{e(t);},e=>{t(e);});},0);})),super(r),e||(e=Object(S.e)(this.constructor,"defaultUrl")()),"string"==typeof e?Object(S.d)(this,"connection",Object.freeze({url:e})):Object(S.d)(this,"connection",Object.freeze(Object(S.g)(e))),this._nextId=42;}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache;}static defaultUrl(){return"http://localhost:8545";}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null;},0)),this._cache.detectNetwork;}_uncachedDetectNetwork(){return ae(this,void 0,void 0,function*(){yield fe(0);let e=null;try{e=yield this.send("eth_chainId",[]);}catch(t){try{e=yield this.send("net_version",[]);}catch(e){}}if(null!=e){const t=Object(S.e)(this.constructor,"getNetwork");try{return t(_.a.from(e).toNumber());}catch(t){return se.throwError("could not detect network",o.b.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t});}}return se.throwError("could not detect network",o.b.errors.NETWORK_ERROR,{event:"noNetwork"});});}getSigner(e){return new pe(de,this,e);}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked();}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(a=>this.formatter.address(a)));}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:Object(S.c)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const o=Object(k.b)(this.connection,JSON.stringify(r),le).then(e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e),e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e;});return n&&(this._cache[e]=o,setTimeout(()=>{this._cache[e]=null;},0)),o;}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[he(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[he(t.address),t.blockTag]];case"getCode":return["eth_getCode",[he(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[he(t.address),t.position,t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[Object(S.e)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[Object(S.e)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=he(t.filter.address)),["eth_getLogs",[t.filter]];}return null;}perform(e,t){return ae(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&_.a.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=Object(S.g)(t)).transaction=Object(S.g)(e),delete t.transaction.type);}}const r=this.prepareRequest(e,t);null==r&&se.throwError(e+" not implemented",o.b.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1]);}catch(r){return ce(e,r,t);}});}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e);}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then(function(r){return function n(){e.send("eth_getFilterChanges",[r]).then(function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach(function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then(function(){return e.getTransaction(t).then(function(t){return e.emit("pending",t),null;});});}),n.then(function(){return fe(1e3);});}).then(function(){if(e._pendingFilter==t)return setTimeout(function(){n();},0),null;e.send("eth_uninstallFilter",[r]);}).catch(e=>{});}(),r;}).catch(e=>{});}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e);}static hexlifyTransaction(e,t){const r=Object(S.g)(me);if(t)for(const e in t)t[e]&&(r[e]=!0);Object(S.b)(e,r);const n={};return["gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(t){if(null==e[t])return;const r=Object(A.g)(e[t]);"gasLimit"===t&&(t="gas"),n[t]=r;}),["from","to","data"].forEach(function(t){null!=e[t]&&(n[t]=Object(A.i)(e[t]));}),e.accessList&&(n.accessList=Object(P.b)(e.accessList)),n;}}let ye=null;try{if(ye=WebSocket,null==ye)throw new Error("inject please");}catch(e){const t=new o.b(O);ye=function(){t.throwError("WebSockets not supported in this environment",o.b.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"});};}var ve=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const we=new o.b(O);let _e=1;class Ae extends ge{constructor(e,t){"any"===t&&we.throwError("WebSocketProvider does not support 'any' network yet",o.b.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super(e,t),this._pollingInterval=-1,this._wsReady=!1,Object(S.d)(this,"_websocket",new ye(this.connection.url)),Object(S.d)(this,"_requests",{}),Object(S.d)(this,"_subs",{}),Object(S.d)(this,"_subIds",{}),Object(S.d)(this,"_detectNetwork",super.detectNetwork()),this._websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach(e=>{this._websocket.send(this._requests[e].payload);});},this._websocket.onmessage=e=>{const data=e.data,t=JSON.parse(data);if(null!=t.id){const e=String(t.id),r=this._requests[e];if(delete this._requests[e],void 0!==t.result)r.callback(null,t.result),this.emit("debug",{action:"response",request:JSON.parse(r.payload),response:t.result,provider:this});else{let e=null;t.error?(e=new Error(t.error.message||"unknown error"),Object(S.d)(e,"code",t.error.code||null),Object(S.d)(e,"response",data)):e=new Error("unknown error"),r.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(r.payload),provider:this});}}else if("eth_subscription"===t.method){const sub=this._subs[t.params.subscription];sub&&sub.processFunc(t.params.result);}else console.warn("this should not happen");};const r=setInterval(()=>{this.emit("poll");},1e3);r.unref&&r.unref();}detectNetwork(){return this._detectNetwork;}get pollingInterval(){return 0;}resetEventsBlock(e){we.throwError("cannot reset events block on WebSocketProvider",o.b.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"});}set pollingInterval(e){we.throwError("cannot set polling interval on WebSocketProvider",o.b.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"});}poll(){return ve(this,void 0,void 0,function*(){return null;});}set polling(e){e&&we.throwError("cannot set polling on WebSocketProvider",o.b.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"});}send(e,t){const r=_e++;return new Promise((n,o)=>{const c=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(c),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?o(e):n(t);},payload:c},this._wsReady&&this._websocket.send(c);});}static defaultUrl(){return"ws://localhost:8546";}_subscribe(e,param,t){return ve(this,void 0,void 0,function*(){let r=this._subIds[e];null==r&&(r=Promise.all(param).then(param=>this.send("eth_subscribe",param)),this._subIds[e]=r);const n=yield r;this._subs[n]={tag:e,processFunc:t};});}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],e=>{const t=_.a.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t);});break;case"pending":this._subscribe("pending",["newPendingTransactions"],e=>{this.emit("pending",e);});break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t));});break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then(e=>{e&&this.emit(t,e);});};t(e),this._subscribe("tx",["newHeads"],e=>{this._events.filter(e=>"tx"===e.type).forEach(t);});break;}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e);}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter(e=>"tx"===e.type).length)return;t="tx";}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then(e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]));}));}destroy(){return ve(this,void 0,void 0,function*(){this._websocket.readyState===ye.CONNECTING&&(yield new Promise(e=>{this._websocket.onopen=function(){e(!0);},this._websocket.onerror=function(){e(!1);};})),this._websocket.close(1e3);});}}var Me=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const Ee=new o.b(O);class Se extends ge{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return Me(this,void 0,void 0,function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||Ee.throwError("no network detected",o.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(Object(S.d)(this,"_network",t),this.emit("network",t,null))),t;});}}class Te extends Se{constructor(e,t){Ee.checkAbstract(new.target,Te),e=Object(S.e)(new.target,"getNetwork")(e),t=Object(S.e)(new.target,"getApiKey")(t);super(Object(S.e)(new.target,"getUrl")(e,t),e),"string"==typeof t?Object(S.d)(this,"apiKey",t):null!=t&&Object.keys(t).forEach(e=>{Object(S.d)(this,e,t[e]);});}_startPending(){Ee.warn("WARNING: API provider does not support pending filters");}isCommunityResource(){return!1;}getSigner(address){return Ee.throwError("API provider does not support signing",o.b.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"});}listAccounts(){return Promise.resolve([]);}static getApiKey(e){return e;}static getUrl(e,t){return Ee.throwError("not implemented; sub-classes must override getUrl",o.b.errors.NOT_IMPLEMENTED,{operation:"getUrl"});}}const xe=new o.b(O),ke="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class Ie extends Ae{constructor(e,t){const r=new Ce(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),Object(S.d)(this,"apiKey",r.apiKey);}isCommunityResource(){return this.apiKey===ke;}}class Ce extends Te{static getWebSocketProvider(e,t){return new Ie(e,t);}static getApiKey(e){return null==e?ke:(e&&"string"!=typeof e&&xe.throwArgumentError("invalid apiKey","apiKey",e),e);}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"ropsten":r="eth-ropsten.alchemyapi.io/v2/";break;case"rinkeby":r="eth-rinkeby.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.alchemyapi.io/v2/";break;case"kovan":r="eth-kovan.alchemyapi.io/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;default:xe.throwArgumentError("unsupported network","network",arguments[0]);}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===ke&&U(),Promise.resolve(!0))};}isCommunityResource(){return this.apiKey===ke;}}var Oe=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const Be=new o.b(O);class Re extends Te{static getApiKey(e){return null!=e&&Be.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null;}static getUrl(e,t){let r=null;if("homestead"===e.name)r="https://cloudflare-eth.com/";else Be.throwArgumentError("unsupported network","network",arguments[0]);return r;}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return Oe(this,void 0,void 0,function*(){if("getBlockNumber"===e){return(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number;}return r.perform.call(this,e,t);});}}var Pe=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const Fe=new o.b(O);function Le(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?Object(A.g)(Object(A.i)(n)):"accessList"===r?"["+Object(P.b)(n).map(e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`).join(",")+"]":Object(A.i)(n),t[r]=n);}return t;}function Ne(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"OK"!=e.message){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t;}return e.result;}function De(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t;}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t;}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t;}return e.result;}function je(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16);}const Ue="9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB";function Je(e,t,r){if("call"===e&&t.code===o.b.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let data=e.data;if(data&&(data="0x"+data.replace(/^.*0x/i,"")),Object(A.l)(data))return data;Fe.throwError("missing revert data in call exception",o.b.errors.CALL_EXCEPTION,{error:t,data:"0x"});}}let n=t.message;throw t.code===o.b.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?n=t.error.message:"string"==typeof t.body?n=t.body:"string"==typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&Fe.throwError("insufficient funds for intrinsic transaction cost",o.b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Fe.throwError("nonce has already been used",o.b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&Fe.throwError("replacement fee too low",o.b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&Fe.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",o.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t;}class He extends ne{constructor(e,t){Fe.checkNew(new.target,He),super(e),Object(S.d)(this,"baseUrl",this.getBaseUrl()),Object(S.d)(this,"apiKey",t||Ue);}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"ropsten":return"https://api-ropsten.etherscan.io";case"rinkeby":return"https://api-rinkeby.etherscan.io";case"kovan":return"https://api-kovan.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";}return Fe.throwArgumentError("unsupported network","network",name);}getUrl(e,t){const r=Object.keys(t).reduce((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e;},""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${n}`;}getPostUrl(){return`${this.baseUrl}/api`;}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t;}fetch(e,t,r){return Pe(this,void 0,void 0,function*(){const n=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null,c="proxy"===e?De:Ne;this.emit("debug",{action:"request",request:n,provider:this});const f={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&U(),Promise.resolve(!0))};let l=null;o&&(f.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},l=Object.keys(o).map(e=>`${e}=${o[e]}`).join("&"));const h=yield Object(k.b)(f,l,c||De);return this.emit("debug",{action:"response",request:n,response:Object(S.c)(h),provider:this}),h;});}detectNetwork(){return Pe(this,void 0,void 0,function*(){return this.network;});}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return Pe(this,void 0,void 0,function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch(e=>Je("sendTransaction",e,t.signedTransaction));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=Le(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0);}catch(e){return Je("call",e,t.transaction);}}case"estimateGas":{const e=Le(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0);}catch(e){return Je("estimateGas",e,t.transaction);}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=je(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=je(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Fe.throwError("unsupported topic count",o.b.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"==typeof r&&66===r.length||Fe.throwError("unsupported topic format",o.b.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r;}const r=yield this.fetch("logs",e);let n={};for(let i=0;i{["contractAddress","to"].forEach(function(t){""==e[t]&&delete e[t];}),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t;});});}isCommunityResource(){return this.apiKey===Ue;}}var ze=r(546),Ge=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function f(e){try{h(n.next(e));}catch(e){c(e);}}function l(e){try{h(n.throw(e));}catch(e){c(e);}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(f,l);}h((n=n.apply(e,t||[])).next());});};const Ke=new o.b(O);function Ve(){return new Date().getTime();}function Xe(e){let t=null;for(let i=0;it?null:(a+b)/2;}function Qe(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(_.a.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map(i=>Qe(i)));if("object"==typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map(t=>{let r=e[t];return r="function"==typeof r?"[function]":Qe(r),JSON.stringify(t)+":"+r;}).join(",")+"}";}throw new Error("unknown value type: "+typeof e);}let Ze=1;function We(e){let t=null,r=null,n=new Promise(n=>{t=function(){r&&(clearTimeout(r),r=null),n();},r=setTimeout(t,e);});return{cancel:t,getPromise:function(){return n;},wait:e=>(n=n.then(e),n)};}const Ye=[o.b.errors.CALL_EXCEPTION,o.b.errors.INSUFFICIENT_FUNDS,o.b.errors.NONCE_EXPIRED,o.b.errors.REPLACEMENT_UNDERPRICED,o.b.errors.UNPREDICTABLE_GAS_LIMIT],$e=["address","args","errorArgs","errorSignature","method","transaction"];function et(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>e.provider}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r;}function tt(e,t,r){let n=Qe;switch(t){case"getBlockNumber":return function(t){const r=t.map(e=>e.result);let n=qe(t.map(e=>e.result),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber;};case"getGasPrice":return function(e){const t=e.map(e=>e.result);return t.sort(),t[Math.floor(t.length/2)];};case"getEtherPrice":return function(e){return qe(e.map(e=>e.result));};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=Object(S.g)(e)).confirmations=-1,Qe(e));};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=Object(S.g)(e)).transactions=e.transactions.map(e=>((e=Object(S.g)(e)).confirmations=-1,e)),Qe(e));}:function(e){return null==e?null:Qe(e);};break;default:throw new Error("unknown method: "+t);}return function(e,t){return function(r){const n={};r.forEach(t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++;});const o=Object.keys(n);for(let i=0;i=t)return e.result;}};}(n,e.quorum);}function nt(e,t){return Ge(this,void 0,void 0,function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:Object(k.c)(()=>new Promise((n,o)=>{setTimeout(function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0);},0);}),{oncePoll:r});});}function it(e,t,r,n){return Ge(this,void 0,void 0,function*(){let c=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return c[r]();case"getEtherPrice":if(c.getEtherPrice)return c.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&Object(A.l)(n.blockTag)&&(c=yield nt(e,t)),c[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&Object(A.l)(n.blockTag)&&(c=yield nt(e,t)),c.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&Object(A.l)(n.blockTag)&&(c=yield nt(e,t)),c[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&Object(A.l)(n.blockTag)&&(c=yield nt(e,t)),c[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return c[r](n.transactionHash);case"getLogs":{let filter=n.filter;return(filter.fromBlock&&Object(A.l)(filter.fromBlock)||filter.toBlock&&Object(A.l)(filter.toBlock))&&(c=yield nt(e,t)),c.getLogs(filter);}}return Ke.throwError("unknown method error",o.b.errors.UNKNOWN_ERROR,{method:r,params:n});});}class ot extends ne{constructor(e,t){Ke.checkNew(new.target,ot),0===e.length&&Ke.throwArgumentError("missing providers","providers",e);const r=e.map((e,t)=>{if(n.b.isProvider(e)){const t=D(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r});}const r=Object(S.g)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=D(e)?2e3:750),null==r.weight&&(r.weight=1);const o=r.weight;return(o%1||o>512||o<1)&&Ke.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,o),Object.freeze(r);}),o=r.reduce((e,t)=>e+t.weight,0);null==t?t=o/2:t>o&&Ke.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let c=Xe(r.map(e=>e.provider.network));null==c&&(c=new Promise((e,t)=>{setTimeout(()=>{this.detectNetwork().then(e,t);},0);})),super(c),Object(S.d)(this,"providerConfigs",Object.freeze(r)),Object(S.d)(this,"quorum",t),this._highestBlockNumber=-1;}detectNetwork(){return Ge(this,void 0,void 0,function*(){return Xe(yield Promise.all(this.providerConfigs.map(e=>e.provider.getNetwork())));});}perform(e,t){return Ge(this,void 0,void 0,function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map(e=>e.provider.sendTransaction(t.signedTransaction).then(e=>e.hash,e=>e)));for(let i=0;ia.priority-b.priority);const c=this._highestBlockNumber;let i=0,f=!0;for(;;){const o=Ve();let l=n.filter(e=>e.runner&&o-e.starte+t.weight,0);for(;l{r.staller=null;}),r.runner=it(r,c,e,t).then(n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:o,backend:et(r,Ve()),request:{method:e,params:Object(S.c)(t)},provider:this});},n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:o,backend:et(r,Ve()),request:{method:e,params:Object(S.c)(t)},provider:this});}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:o,backend:et(r,null),request:{method:e,params:Object(S.c)(t)},provider:this}),l+=r.weight;}const h=[];n.forEach(e=>{!e.done&&e.runner&&(h.push(e.runner),e.staller&&h.push(e.staller.getPromise()));}),h.length&&(yield Promise.race(h));const d=n.filter(e=>e.done&&null==e.error);if(d.length>=this.quorum){const e=r(d);if(void 0!==e)return n.forEach(e=>{e.staller&&e.staller.cancel(),e.cancelled=!0;}),e;f||(yield We(100).getPromise()),f=!1;}const m=n.reduce((e,t)=>{if(!t.done||null==t.error)return e;const code=t.error.code;return Ye.indexOf(code)>=0&&(e[code]||(e[code]={error:t.error,weight:0}),e[code].weight+=t.weight),e;},{});if(Object.keys(m).forEach(e=>{const t=m[e];if(t.weight{e.staller&&e.staller.cancel(),e.cancelled=!0;});const r=t.error,o={};$e.forEach(e=>{null!=r[e]&&(o[e]=r[e]);}),Ke.throwError(r.reason||r.message,e,o);}),0===n.filter(e=>!e.done).length)break;}return n.forEach(e=>{e.staller&&e.staller.cancel(),e.cancelled=!0;}),Ke.throwError("failed to meet quorum",o.b.errors.SERVER_ERROR,{method:e,params:t,results:n.map(e=>et(e)),provider:this});});}}const at=null,st=new o.b(O),ut="84842078b09946638c03157f83405213";class ct extends Ae{constructor(e,t){const r=new ft(e,t),n=r.connection;n.password&&st.throwError("INFURA WebSocket project secrets unsupported",o.b.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),Object(S.d)(this,"apiKey",r.projectId),Object(S.d)(this,"projectId",r.projectId),Object(S.d)(this,"projectSecret",r.projectSecret);}isCommunityResource(){return this.projectId===ut;}}class ft extends Te{static getWebSocketProvider(e,t){return new ct(e,t);}static getApiKey(e){const t={apiKey:ut,projectId:ut,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(st.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),st.assertArgument("string"==typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t;}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"ropsten":r="ropsten.infura.io";break;case"rinkeby":r="rinkeby.infura.io";break;case"kovan":r="kovan.infura.io";break;case"goerli":r="goerli.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;default:st.throwError("unsupported network",o.b.errors.INVALID_ARGUMENT,{argument:"network",value:e});}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===ut&&U(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n;}isCommunityResource(){return this.projectId===ut;}}class lt extends ge{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},o=new Promise((e,t)=>{n.resolve=e,n.reject=t;});return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout(()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map(e=>e.request);return this.emit("debug",{action:"requestBatch",request:Object(S.c)(t),provider:this}),Object(k.b)(this.connection,JSON.stringify(t)).then(r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t);}else e.resolve(n.result);});},r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach(e=>{e.reject(r);});});},10)),o;}}const ht=new o.b(O);class pt extends Te{static getApiKey(e){return e&&"string"!=typeof e&&ht.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED";}static getUrl(e,t){ht.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:ht.throwArgumentError("unsupported network","network",arguments[0]);}return r+"?apiKey="+t;}}const bt=new o.b(O),mt={homestead:"6004bcd10040261633ade990",ropsten:"6004bd4d0040261633ade991",rinkeby:"6004bda20040261633ade994",goerli:"6004bd860040261633ade992"};class gt extends Te{constructor(e,t){if(null==t){const r=Object(S.e)(new.target,"getNetwork")(e);if(r){const e=mt[r.name];e&&(t={applicationId:e,loadBalancer:!0});}null==t&&bt.throwError("unsupported network",o.b.errors.INVALID_ARGUMENT,{argument:"network",value:e});}super(e,t);}static getApiKey(e){null==e&&bt.throwArgumentError("PocketProvider.getApiKey does not support null apiKey","apiKey",e);const t={applicationId:null,loadBalancer:!1,applicationSecretKey:null};return"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(bt.assertArgument("string"==typeof e.applicationId,"applicationSecretKey requires an applicationId","applicationId",e.applicationId),bt.assertArgument("string"==typeof e.applicationSecretKey,"invalid applicationSecretKey","applicationSecretKey","[REDACTED]"),t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey,t.loadBalancer=!!e.loadBalancer):e.applicationId?(bt.assertArgument("string"==typeof e.applicationId,"apiKey.applicationId must be a string","apiKey.applicationId",e.applicationId),t.applicationId=e.applicationId,t.loadBalancer=!!e.loadBalancer):bt.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t;}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"goerli":r="eth-goerli.gateway.pokt.network";break;default:bt.throwError("unsupported network",o.b.errors.INVALID_ARGUMENT,{argument:"network",value:e});}let n=null;n=t.loadBalancer?`https://${r}/v1/lb/${t.applicationId}`:`https://${r}/v1/${t.applicationId}`;const c={url:n,headers:{}};return null!=t.applicationSecretKey&&(c.user="",c.password=t.applicationSecretKey),c;}isCommunityResource(){return this.applicationId===mt[this.network.name];}}const yt=new o.b(O);let vt=1;function wt(e,t){const r="Web3LegacyFetcher";return function(n,o){"eth_sign"==n&&(e.isMetaMask||e.isStatus)&&(n="personal_sign",o=[o[1],o[0]]);const c={method:n,params:o,id:vt++,jsonrpc:"2.0"};return new Promise((e,n)=>{this.emit("debug",{action:"request",fetcher:r,request:Object(S.c)(c),provider:this}),t(c,(t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:c,provider:this}),n(t);if(this.emit("debug",{action:"response",fetcher:r,request:c,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e);}e(o.result);});});};}class _t extends ge{constructor(e,t){yt.checkNew(new.target,_t),null==e&&yt.throwArgumentError("missing provider","provider",e);let path=null,r=null,n=null;"function"==typeof e?(path="unknown:",r=e):(path=e.host||e.path||"",!path&&e.isMetaMask&&(path="metamask"),n=e,e.request?(""===path&&(path="eip-1193:"),r=function(e){return function(t,r){null==r&&(r=[]),"eth_sign"==t&&(e.isMetaMask||e.isStatus)&&(t="personal_sign",r=[r[1],r[0]]);const n={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:Object(S.c)(n),provider:this}),e.request(n).then(e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e),e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e;});};}(e)):e.sendAsync?r=wt(e,e.sendAsync.bind(e)):e.send?r=wt(e,e.send.bind(e)):yt.throwArgumentError("unsupported provider","provider",e),path||(path="unknown:")),super(path,t),Object(S.d)(this,"jsonRpcFetchFunc",r),Object(S.d)(this,"provider",n);}send(e,t){return this.jsonRpcFetchFunc(e,t);}}const At=new o.b(O);function Mt(e,t){if(null==e&&(e="homestead"),"string"==typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1]){case"http":return new ge(e);case"ws":return new Ae(e);default:At.throwArgumentError("unsupported URL scheme","network",e);}}const r=v(e);return r&&r._defaultProvider||At.throwError("unsupported getDefaultProvider network",o.b.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:ot,AlchemyProvider:Ce,CloudflareProvider:Re,EtherscanProvider:He,InfuraProvider:ft,JsonRpcProvider:ge,NodesmithProvider:pt,PocketProvider:gt,Web3Provider:_t,IpcProvider:at},t);}},function(e,t,r){var n;e.exports=(n=r(11),function(e){var t=n,r=t.lib,o=r.Base,c=r.WordArray,f=t.x64={};f.Word=o.extend({init:function(e,t){this.high=e,this.low=t;}}),f.WordArray=o.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length;},toX32:function(){for(var e=this.words,t=e.length,r=[],i=0;i{let r;if(n.isZero(t))return e.zero;const c=n.naf(t);1==c[c.length-1]?r=base:-1==c[c.length-1]?r=e.neg(base):o(!1);for(let i=c.length-2;i>=0;i--)r=e.double(r),1==c[i]?r=e.add(r,base):-1==c[i]&&(r=e.sub(r,base));return r;},t.exp=(e,base,t)=>{if(n.isZero(t))return e.one;const r=n.bits(t);if(0==r.legth)return e.one;let o=base;for(let i=r.length-2;i>=0;i--)o=e.square(o),r[i]&&(o=e.mul(o,base));return o;};},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1;}catch(e){return!1;}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase();}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0;}return e.apply(this,arguments);};};}).call(this,r(18));},function(e,t,r){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var c,i,f=arguments.length;switch(f){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r);});case 3:return t.nextTick(function(){e.call(null,r,n);});case 4:return t.nextTick(function(){e.call(null,r,n,o);});default:for(c=new Array(f-1),i=0;i>>24]^m[_>>>16&255]^y[A>>>8&255]^v[255&M]^t[E++],f=d[_>>>24]^m[A>>>16&255]^y[M>>>8&255]^v[255&w]^t[E++],l=d[A>>>24]^m[M>>>16&255]^y[w>>>8&255]^v[255&_]^t[E++],h=d[M>>>24]^m[w>>>16&255]^y[_>>>8&255]^v[255&A]^t[E++],w=c,_=f,A=l,M=h;return c=(n[w>>>24]<<24|n[_>>>16&255]<<16|n[A>>>8&255]<<8|n[255&M])^t[E++],f=(n[_>>>24]<<24|n[A>>>16&255]<<16|n[M>>>8&255]<<8|n[255&w])^t[E++],l=(n[A>>>24]<<24|n[M>>>16&255]<<16|n[w>>>8&255]<<8|n[255&_])^t[E++],h=(n[M>>>24]<<24|n[w>>>16&255]<<16|n[_>>>8&255]<<8|n[255&A])^t[E++],[c>>>=0,f>>>=0,l>>>=0,h>>>=0];}var l=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],o=[[],[],[],[]],c=[[],[],[],[]],f=0,l=0,i=0;i<256;++i){var h=l^l<<1^l<<2^l<<3^l<<4;h=h>>>8^255&h^99,r[f]=h,n[h]=f;var d=e[f],m=e[d],y=e[m],v=257*e[h]^16843008*h;o[0][f]=v<<24|v>>>8,o[1][f]=v<<16|v>>>16,o[2][f]=v<<8|v>>>24,o[3][f]=v,v=16843009*y^65537*m^257*d^16843008*f,c[0][h]=v<<24|v>>>8,c[1][h]=v<<16|v>>>16,c[2][h]=v<<8|v>>>24,c[3][h]=v,0===f?f=l=1:(f=d^e[e[e[y^d]]],l^=e[e[l]]);}return{SBOX:r,INV_SBOX:n,SUB_MIX:o,INV_SUB_MIX:c};}();function d(e){this._key=o(e),this._reset();}d.blockSize=16,d.keySize=32,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),o=[],c=0;c>>24,f=h.SBOX[f>>>24]<<24|h.SBOX[f>>>16&255]<<16|h.SBOX[f>>>8&255]<<8|h.SBOX[255&f],f^=l[c/t|0]<<24):t>6&&c%t==4&&(f=h.SBOX[f>>>24]<<24|h.SBOX[f>>>16&255]<<16|h.SBOX[f>>>8&255]<<8|h.SBOX[255&f]),o[c]=o[c-t]^f;}for(var d=[],m=0;m>>24]]^h.INV_SUB_MIX[1][h.SBOX[v>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[v>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&v]];}this._nRounds=r,this._keySchedule=o,this._invKeySchedule=d;},d.prototype.encryptBlockRaw=function(e){return f(e=o(e),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds);},d.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r;},d.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var r=f(e,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),c=n.allocUnsafe(16);return c.writeUInt32BE(r[0],0),c.writeUInt32BE(r[3],4),c.writeUInt32BE(r[2],8),c.writeUInt32BE(r[1],12),c;},d.prototype.scrub=function(){c(this._keySchedule),c(this._invKeySchedule),c(this._key);},e.exports.AES=d;},function(e,t,r){var n=r(8).Buffer,o=r(130);e.exports=function(e,t,r,c){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var f=r/8,l=n.alloc(f),h=n.alloc(c||0),d=n.alloc(0);f>0||c>0;){var m=new o();m.update(d),m.update(e),t&&m.update(t),d=m.digest();var y=0;if(f>0){var v=l.length-f;y=Math.min(f,d.length),d.copy(l,v,0,y),f-=y;}if(y0){var w=h.length-c,_=Math.min(c,d.length-y);d.copy(h,w,y,y+_),c-=_;}}return d.fill(0),{key:l,iv:h};};},function(e,t,r){"use strict";var n=r(3),o=r(38),c=o.getNAF,f=o.getJSF,l=o.assert;function h(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red));}function d(e,t){this.curve=e,this.type=t,this.precomputed=null;}e.exports=h,h.prototype.point=function(){throw new Error("Not implemented");},h.prototype.validate=function(){throw new Error("Not implemented");},h.prototype._fixedNafMul=function(p,e){l(p.precomputed);var t=p._getDoubles(),r=c(e,1,this._bitLength),n=(1<=o;d--)f=(f<<1)+r[d];h.push(f);}for(var a=this.jpoint(null,null,null),b=this.jpoint(null,null,null),i=n;i>0;i--){for(o=0;o=0;i--){for(var h=0;i>=0&&0===o[i];i--)h++;if(i>=0&&h++,f=f.dblp(h),i<0)break;var d=o[i];l(0!==d),f="affine"===p.type?d>0?f.mixedAdd(n[d-1>>1]):f.mixedAdd(n[-d-1>>1].neg()):d>0?f.add(n[d-1>>1]):f.add(n[-d-1>>1].neg());}return"affine"===p.type?f.toP():f;},h.prototype._wnafMulAdd=function(e,t,r,n,o){var i,l,p,h=this._wnafT1,d=this._wnafT2,m=this._wnafT3,y=0;for(i=0;i=1;i-=2){var a=i-1,b=i;if(1===h[a]&&1===h[b]){var w=[t[a],null,null,t[b]];0===t[a].y.cmp(t[b].y)?(w[1]=t[a].add(t[b]),w[2]=t[a].toJ().mixedAdd(t[b].neg())):0===t[a].y.cmp(t[b].y.redNeg())?(w[1]=t[a].toJ().mixedAdd(t[b]),w[2]=t[a].add(t[b].neg())):(w[1]=t[a].toJ().mixedAdd(t[b]),w[2]=t[a].toJ().mixedAdd(t[b].neg()));var _=[-3,-1,-5,-7,0,7,5,1,3],A=f(r[a],r[b]);for(y=Math.max(A[0].length,y),m[a]=new Array(y),m[b]=new Array(y),l=0;l=0;i--){for(var x=0;i>=0;){var k=!0;for(l=0;l=0&&x++,S=S.dblp(x),i<0)break;for(l=0;l0?p=d[l][I-1>>1]:I<0&&(p=d[l][-I-1>>1].neg()),S="affine"===p.type?S.mixedAdd(p):S.add(p));}}for(i=0;i=Math.ceil((e.bitLength()+1)/t.step);},d.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;iinput.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(n=input.slice(r,d)).length)throw new Error("invalid rlp, List has a invalid length");for(;n.length;)c=f(n),l.push(c.data),n=c.remainder;return{data:l,remainder:input.slice(d)};}function l(e){return"0x"===e.slice(0,2);}function h(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t;}function d(t){if(!e.isBuffer(t)){if("string"==typeof t)return l(t)?e.from((a="string"!=typeof(o=t)?o:l(o)?o.slice(2):o).length%2?"0"+a:a,"hex"):e.from(t);if("number"==typeof t||"bigint"==typeof t)return t?(r=h(t),e.from(r,"hex")):e.from([]);if(null==t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(n.isBN(t))return e.from(t.toArray());throw new Error("invalid type");}var r,a,o;return t;}t.encode=function t(input){if(Array.isArray(input)){for(var output=[],i=0;i0?o(n(e),9007199254740991):0;};},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e);};},function(e,t,r){var n=r(157),o=r(26),c=r(89),f=r(28)("toStringTag"),l="Arguments"==c(function(){return arguments;}());e.exports=n?c:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t];}catch(e){}}(t=Object(e),f))?r:l?c(t):"Object"==(n=c(t))&&o(t.callee)?"Arguments":n;};},function(e,t){e.exports=!1;},function(e,t,r){var n=r(270),o=r(111);e.exports=function(e){var t=n(e,"string");return o(t)?t:String(t);};},function(e,t,r){var n=r(26),o=r(63),c=r(268);e.exports=c?function(e){return"symbol"==typeof e;}:function(e){var t=o("Symbol");return n(t)&&Object(e)instanceof t;};},function(e,t,r){var n=r(158),o=r(161),c=n("keys");e.exports=function(e){return c[e]||(c[e]=o(e));};},function(e,t){e.exports={};},function(e,t,r){var n=r(272),o=r(168).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,o);};},function(e,t,r){var n=r(272),o=r(168);e.exports=Object.keys||function(e){return n(e,o);};},function(e,t){e.exports={};},function(e,t,r){"use strict";r.d(t,"a",function(){return n;});const n="ethers/5.4.7";},function(e,t,r){"use strict";r.d(t,"a",function(){return n;});const n="bignumber/5.4.2";},function(e,t,r){"use strict";r.d(t,"a",function(){return n;});const n="hash/5.4.0";},function(e,t,r){"use strict";r.d(t,"a",function(){return n;});const n="json-wallets/5.4.0";},function(e,t,r){"use strict";r.d(t,"a",function(){return T;}),r.d(t,"b",function(){return x;});var n=r(42),o=r.n(n),c=r(6),f=r(0),l=r(7),h=r(540),d=r(30),m=r(1),y=r(2),v=r(120),w=r(9);const _=new y.b(v.a);class A extends m.a{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount);}}function M(e,t){const data=JSON.parse(e);t=Object(w.a)(t);const r=Object(c.a)(Object(w.c)(data,"ethaddr")),n=Object(w.b)(Object(w.c)(data,"encseed"));n&&n.length%16==0||_.throwArgumentError("invalid encseed","json",e);const m=Object(f.a)(Object(h.a)(t,t,2e3,32,"sha256")).slice(0,16),y=n.slice(0,16),v=n.slice(16),M=new o.a.ModeOfOperation.cbc(m,y),E=o.a.padding.pkcs7.strip(Object(f.a)(M.decrypt(v)));let S="";for(let i=0;i=64;){let u,i,f,l,h,a=r,b=h1,d=h2,m=h3,y=h4,v=h5,g=h6,w=n;for(i=0;i<16;i++)f=e+4*i,o[i]=(255&p[f])<<24|(255&p[f+1])<<16|(255&p[f+2])<<8|255&p[f+3];for(i=16;i<64;i++)u=o[i-2],l=(u>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,u=o[i-15],h=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3,o[i]=(l+o[i-7]|0)+(h+o[i-16]|0)|0;for(i=0;i<64;i++)l=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&v^~y&g)|0)+(w+(t[i]+o[i]|0)|0)|0,h=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&b^a&d^b&d)|0,w=g,g=v,v=y,y=m+l|0,m=d,d=b,b=a,a=l+h|0;r=r+a|0,h1=h1+b|0,h2=h2+d|0,h3=h3+m|0,h4=h4+y|0,h5=h5+v|0,h6=h6+g|0,n=n+w|0,e+=64,c-=64;}}c(e);let i,f=e.length%64,l=e.length/536870912|0,h=e.length<<3,d=f<56?56:120,p=e.slice(e.length-f,e.length);for(p.push(128),i=f+1;i>>24&255),p.push(l>>>16&255),p.push(l>>>8&255),p.push(l>>>0&255),p.push(h>>>24&255),p.push(h>>>16&255),p.push(h>>>8&255),p.push(h>>>0&255),c(p),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,h1>>>24&255,h1>>>16&255,h1>>>8&255,h1>>>0&255,h2>>>24&255,h2>>>16&255,h2>>>8&255,h2>>>0&255,h3>>>24&255,h3>>>16&255,h3>>>8&255,h3>>>0&255,h4>>>24&255,h4>>>16&255,h4>>>8&255,h4>>>0&255,h5>>>24&255,h5>>>16&255,h5>>>8&255,h5>>>0&255,h6>>>24&255,h6>>>16&255,h6>>>8&255,h6>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255];}function c(e,t,r){e=e.length<=64?e:o(e);const n=64+t.length+4,c=new Array(n),f=new Array(64);let i,l=[];for(i=0;i<64;i++)c[i]=54;for(i=0;i=n-4;i--){if(c[i]++,c[i]<=255)return;c[i]=0;}}for(;r>=32;)h(),l=l.concat(o(f.concat(o(c)))),r-=32;return r>0&&(h(),l=l.concat(o(f.concat(o(c))).slice(0,r))),l;}function f(e,t,r,n,o){let i;for(m(e,16*(2*r-1),o,0,16),i=0;i<2*r;i++)d(e,16*i,o,16),h(o,n),m(o,0,e,t+16*i,16);for(i=0;i>>32-b;}function h(e,t){m(e,0,t,0,16);for(let i=8;i>0;i-=2)t[4]^=l(t[0]+t[12],7),t[8]^=l(t[4]+t[0],9),t[12]^=l(t[8]+t[4],13),t[0]^=l(t[12]+t[8],18),t[9]^=l(t[5]+t[1],7),t[13]^=l(t[9]+t[5],9),t[1]^=l(t[13]+t[9],13),t[5]^=l(t[1]+t[13],18),t[14]^=l(t[10]+t[6],7),t[2]^=l(t[14]+t[10],9),t[6]^=l(t[2]+t[14],13),t[10]^=l(t[6]+t[2],18),t[3]^=l(t[15]+t[11],7),t[7]^=l(t[3]+t[15],9),t[11]^=l(t[7]+t[3],13),t[15]^=l(t[11]+t[7],18),t[1]^=l(t[0]+t[3],7),t[2]^=l(t[1]+t[0],9),t[3]^=l(t[2]+t[1],13),t[0]^=l(t[3]+t[2],18),t[6]^=l(t[5]+t[4],7),t[7]^=l(t[6]+t[5],9),t[4]^=l(t[7]+t[6],13),t[5]^=l(t[4]+t[7],18),t[11]^=l(t[10]+t[9],7),t[8]^=l(t[11]+t[10],9),t[9]^=l(t[8]+t[11],13),t[10]^=l(t[9]+t[8],18),t[12]^=l(t[15]+t[14],7),t[13]^=l(t[12]+t[15],9),t[14]^=l(t[13]+t[12],13),t[15]^=l(t[14]+t[13],18);for(let i=0;i<16;++i)e[i]+=t[i];}function d(e,t,r,n){for(let i=0;i=256)return!1;}return!0;}function v(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e;}function w(e,r,o,l,p,h,w){if(o=v(o,"N"),l=v(l,"r"),p=v(p,"p"),h=v(h,"dkLen"),0===o||0!=(o&o-1))throw new Error("N must be power of 2");if(o>n/128/l)throw new Error("N too large");if(l>n/128/p)throw new Error("r too large");if(!y(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!y(r))throw new Error("salt must be an array or buffer");r=Array.prototype.slice.call(r);let b=c(e,r,128*p*l);const _=new Uint32Array(32*p*l);for(let i=0;i<_.length;i++){const e=4*i;_[i]=(255&b[e+3])<<24|(255&b[e+2])<<16|(255&b[e+1])<<8|(255&b[e+0])<<0;}const A=new Uint32Array(64*l),M=new Uint32Array(32*l*o),E=32*l,S=new Uint32Array(16),T=new Uint32Array(16),x=p*o*2;let k,I,C=0,O=null,B=!1,R=0,P=0;const F=w?parseInt(1e3/l):4294967295,L=void 0!==t?t:setTimeout,N=function(){if(B)return w(new Error("cancelled"),C/x);let t;switch(R){case 0:I=32*P*l,m(_,I,A,0,E),R=1,k=0;case 1:t=o-k,t>F&&(t=F);for(let i=0;iF&&(t=F);for(let i=0;i>0&255),b.push(_[i]>>8&255),b.push(_[i]>>16&255),b.push(_[i]>>24&255);const r=c(e,b,h);return w&&w(null,1,r),r;}w&&L(N);};if(!w)for(;;){const e=N();if(null!=e)return e;}N();}const _={scrypt:function(e,t,r,n,p,o,c){return new Promise(function(f,l){let h=0;c&&c(0),w(e,t,r,n,p,o,function(e,progress,t){if(e)l(e);else if(t)c&&1!==h&&c(1),f(new Uint8Array(t));else if(c&&progress!==h)return h=progress,c(progress);});});},syncScrypt:function(e,t,r,n,p,o){return new Uint8Array(w(e,t,r,n,p,o));}};e.exports=_;}();}).call(this,r(332).setImmediate);},function(e,t,r){"use strict";(function(e){r.d(t,"a",function(){return d;});var n=r(0),o=r(2),c=r(290);const f=new o.b(c.a);let l=null;try{if(l=window,null==l)throw new Error("try next");}catch(t){try{if(l=e,null==l)throw new Error("try next");}catch(e){l={};}}let h=l.crypto||l.msCrypto;function d(e){(e<=0||e>1024||e%1)&&f.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return h.getRandomValues(t),Object(n.a)(t);}h&&h.getRandomValues||(f.warn("WARNING: Missing strong random number source"),h={getRandomValues:function(e){return f.throwError("no secure random source avaialble",o.b.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"});}});}).call(this,r(18));},,function(e,t,r){var n,o,c,f,l,h,d,m;e.exports=(m=r(11),o=(n=m).lib,c=o.WordArray,f=o.Hasher,l=n.algo,h=[],d=l.SHA1=f.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(e,t){for(var r=this._hash.words,a=r[0],b=r[1],n=r[2],o=r[3],c=r[4],i=0;i<80;i++){if(i<16)h[i]=0|e[t+i];else{var f=h[i-3]^h[i-8]^h[i-14]^h[i-16];h[i]=f<<1|f>>>31;}var l=(a<<5|a>>>27)+c+h[i];l+=i<20?1518500249+(b&n|~b&o):i<40?1859775393+(b^n^o):i<60?(b&n|b&o|n&o)-1894007588:(b^n^o)-899497514,c=o,o=n,n=b<<30|b>>>2,b=a,a=l;}r[0]=r[0]+a|0,r[1]=r[1]+b|0,r[2]=r[2]+n|0,r[3]=r[3]+o|0,r[4]=r[4]+c|0;},_doFinalize:function(){var data=this._data,e=data.words,t=8*this._nDataBytes,r=8*data.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),e[15+(r+64>>>9<<4)]=t,data.sigBytes=4*e.length,this._process(),this._hash;},clone:function(){var e=f.clone.call(this);return e._hash=this._hash.clone(),e;}}),n.SHA1=f._createHelper(d),n.HmacSHA1=f._createHmacHelper(d),m.SHA1);},function(e,t,r){var n,o,c,f;e.exports=(n=r(11),c=(o=n).lib.Base,f=o.enc.Utf8,void(o.algo.HMAC=c.extend({init:function(e,t){e=this._hasher=new e.init(),"string"==typeof t&&(t=f.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),c=this._iKey=t.clone(),l=o.words,h=c.words,i=0;i0?Math.floor(e):Math.ceil(e);}function E(a,b){var e,i,r=a.length,n=b.length,o=new Array(r),c=0,base=t;for(i=0;i=base?1:0,o[i]=e-c*base;for(;i0&&o.push(c),o;}function S(a,b){return a.length>=b.length?E(a,b):E(b,a);}function T(a,e){var r,i,n=a.length,o=new Array(n),base=t;for(i=0;i0;)o[i++]=e%base,e=Math.floor(e/base);return o;}function x(a,b){var i,e,r=a.length,n=b.length,o=new Array(r),c=0,base=t;for(i=0;i0;)n[i++]=o%base,o=Math.floor(o/base);return n;}function O(e,t){for(var r=[];t-->0;)r.push(0);return r.concat(e);}function B(e,t){var r=Math.max(e.length,t.length);if(r<=30)return I(e,t);r=Math.ceil(r/2);var b=e.slice(r),a=e.slice(0,r),n=t.slice(r),o=t.slice(0,r),c=B(a,o),f=B(b,n),l=B(S(a,b),S(o,n)),h=S(S(c,O(x(x(l,c),f),r)),O(f,2*r));return _(h),h;}function R(a,b,e){return new h(a=0;--i)r=(n=1e7*r+e[i])-(q=M(n/t))*t,c[i]=0|q;return[c,0|r];}function L(e,r){var n,o=ne(r);if(f)return[new m(e.value/o.value),new m(e.value%o.value)];var c,a=e.value,b=o.value;if(0===b)throw new Error("Cannot divide by zero");if(e.isSmall)return o.isSmall?[new d(M(a/b)),new d(a%b)]:[l[0],e];if(o.isSmall){if(1===b)return[e,l[0]];if(-1==b)return[e.negate(),l[0]];var y=Math.abs(b);if(y=0;r--){for(e=base-1,y[r+l]!==d&&(e=Math.floor((y[r+l]*base+y[r+l-1])/d)),n=0,o=0,c=v.length,i=0;il&&(n=(n+1)*base),e=Math.ceil(n/o);do{if(N(c=C(b,e),d)<=0)break;e--;}while(e);h.push(e),d=x(d,c);}return h.reverse(),[w(h),w(d)];}(a,b),c=n[0];var T=e.sign!==o.sign,k=n[1],I=e.sign;return"number"==typeof c?(T&&(c=-c),c=new d(c)):c=new h(c,T),"number"==typeof k?(I&&(k=-k),k=new d(k)):k=new h(k,I),[c,k];}function N(a,b){if(a.length!==b.length)return a.length>b.length?1:-1;for(var i=a.length-1;i>=0;i--)if(a[i]!==b[i])return a[i]>b[i]?1:-1;return 0;}function D(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0));}function j(e,a){for(var t,i,r,n=e.prev(),b=n,c=0;b.isEven();)b=b.divide(2),c++;e:for(i=0;i=0?t=x(a,b):(t=x(b,a),e=!e),"number"==typeof(t=w(t))?(e&&(t=-t),new d(t)):new h(t,e);}(a,b,this.sign);},h.prototype.minus=h.prototype.subtract,d.prototype.subtract=function(e){var t=ne(e),a=this.value;if(a<0!==t.sign)return this.add(t.negate());var b=t.value;return t.isSmall?new d(a-b):k(b,Math.abs(a),a>=0);},d.prototype.minus=d.prototype.subtract,m.prototype.subtract=function(e){return new m(this.value-ne(e).value);},m.prototype.minus=m.prototype.subtract,h.prototype.negate=function(){return new h(this.value,!this.sign);},d.prototype.negate=function(){var e=this.sign,small=new d(-this.value);return small.sign=!e,small;},m.prototype.negate=function(){return new m(-this.value);},h.prototype.abs=function(){return new h(this.value,!1);},d.prototype.abs=function(){return new d(Math.abs(this.value));},m.prototype.abs=function(){return new m(this.value>=0?this.value:-this.value);},h.prototype.multiply=function(e){var r,n,o,c=ne(e),a=this.value,b=c.value,f=this.sign!==c.sign;if(c.isSmall){if(0===b)return l[0];if(1===b)return this;if(-1===b)return this.negate();if((r=Math.abs(b))0?B(a,b):I(a,b),f);},h.prototype.times=h.prototype.multiply,d.prototype._multiplyBySmall=function(a){return y(a.value*this.value)?new d(a.value*this.value):R(Math.abs(a.value),v(Math.abs(this.value)),this.sign!==a.sign);},h.prototype._multiplyBySmall=function(a){return 0===a.value?l[0]:1===a.value?this:-1===a.value?this.negate():R(Math.abs(a.value),this.value,this.sign!==a.sign);},d.prototype.multiply=function(e){return ne(e)._multiplyBySmall(this);},d.prototype.times=d.prototype.multiply,m.prototype.multiply=function(e){return new m(this.value*ne(e).value);},m.prototype.times=m.prototype.multiply,h.prototype.square=function(){return new h(P(this.value),!1);},d.prototype.square=function(){var e=this.value*this.value;return y(e)?new d(e):new h(P(v(Math.abs(this.value))),!1);},m.prototype.square=function(e){return new m(this.value*this.value);},h.prototype.divmod=function(e){var t=L(this,e);return{quotient:t[0],remainder:t[1]};},m.prototype.divmod=d.prototype.divmod=h.prototype.divmod,h.prototype.divide=function(e){return L(this,e)[0];},m.prototype.over=m.prototype.divide=function(e){return new m(this.value/ne(e).value);},d.prototype.over=d.prototype.divide=h.prototype.over=h.prototype.divide,h.prototype.mod=function(e){return L(this,e)[1];},m.prototype.mod=m.prototype.remainder=function(e){return new m(this.value%ne(e).value);},d.prototype.remainder=d.prototype.mod=h.prototype.remainder=h.prototype.mod,h.prototype.pow=function(e){var t,r,n,o=ne(e),a=this.value,b=o.value;if(0===b)return l[1];if(0===a)return l[0];if(1===a)return l[1];if(-1===a)return o.isEven()?l[1]:l[-1];if(o.sign)return l[0];if(!o.isSmall)throw new Error("The exponent "+o.toString()+" is too large.");if(this.isSmall&&y(t=Math.pow(a,b)))return new d(M(t));for(r=this,n=l[1];!0&b&&(n=n.times(r),--b),0!==b;)b/=2,r=r.square();return n;},d.prototype.pow=h.prototype.pow,m.prototype.pow=function(e){var t=ne(e),a=this.value,b=t.value,r=BigInt(0),n=BigInt(1),o=BigInt(2);if(b===r)return l[1];if(a===r)return l[0];if(a===n)return l[1];if(a===BigInt(-1))return t.isEven()?l[1]:l[-1];if(t.isNegative())return new m(r);for(var c=this,f=l[1];(b&n)===n&&(f=f.times(c),--b),b!==r;)b/=o,c=c.square();return f;},h.prototype.modPow=function(e,t){if(e=ne(e),(t=ne(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=l[1],base=this.mod(t);for(e.isNegative()&&(e=e.multiply(l[-1]),base=base.modInv(t));e.isPositive();){if(base.isZero())return l[0];e.isOdd()&&(r=r.multiply(base).mod(t)),e=e.divide(2),base=base.square().mod(t);}return r;},m.prototype.modPow=d.prototype.modPow=h.prototype.modPow,h.prototype.compareAbs=function(e){var t=ne(e),a=this.value,b=t.value;return t.isSmall?1:N(a,b);},d.prototype.compareAbs=function(e){var t=ne(e),a=Math.abs(this.value),b=t.value;return t.isSmall?a===(b=Math.abs(b))?0:a>b?1:-1:-1;},m.prototype.compareAbs=function(e){var a=this.value,b=ne(e).value;return(a=a>=0?a:-a)===(b=b>=0?b:-b)?0:a>b?1:-1;},h.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=ne(e),a=this.value,b=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:N(a,b)*(this.sign?-1:1);},h.prototype.compareTo=h.prototype.compare,d.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=ne(e),a=this.value,b=t.value;return t.isSmall?a==b?0:a>b?1:-1:a<0!==t.sign?a<0?-1:1:a<0?1:-1;},d.prototype.compareTo=d.prototype.compare,m.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=this.value,b=ne(e).value;return a===b?0:a>b?1:-1;},m.prototype.compareTo=m.prototype.compare,h.prototype.equals=function(e){return 0===this.compare(e);},m.prototype.eq=m.prototype.equals=d.prototype.eq=d.prototype.equals=h.prototype.eq=h.prototype.equals,h.prototype.notEquals=function(e){return 0!==this.compare(e);},m.prototype.neq=m.prototype.notEquals=d.prototype.neq=d.prototype.notEquals=h.prototype.neq=h.prototype.notEquals,h.prototype.greater=function(e){return this.compare(e)>0;},m.prototype.gt=m.prototype.greater=d.prototype.gt=d.prototype.greater=h.prototype.gt=h.prototype.greater,h.prototype.lesser=function(e){return this.compare(e)<0;},m.prototype.lt=m.prototype.lesser=d.prototype.lt=d.prototype.lesser=h.prototype.lt=h.prototype.lesser,h.prototype.greaterOrEquals=function(e){return this.compare(e)>=0;},m.prototype.geq=m.prototype.greaterOrEquals=d.prototype.geq=d.prototype.greaterOrEquals=h.prototype.geq=h.prototype.greaterOrEquals,h.prototype.lesserOrEquals=function(e){return this.compare(e)<=0;},m.prototype.leq=m.prototype.lesserOrEquals=d.prototype.leq=d.prototype.lesserOrEquals=h.prototype.leq=h.prototype.lesserOrEquals,h.prototype.isEven=function(){return 0==(1&this.value[0]);},d.prototype.isEven=function(){return 0==(1&this.value);},m.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0);},h.prototype.isOdd=function(){return 1==(1&this.value[0]);},d.prototype.isOdd=function(){return 1==(1&this.value);},m.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1);},h.prototype.isPositive=function(){return!this.sign;},d.prototype.isPositive=function(){return this.value>0;},m.prototype.isPositive=d.prototype.isPositive,h.prototype.isNegative=function(){return this.sign;},d.prototype.isNegative=function(){return this.value<0;},m.prototype.isNegative=d.prototype.isNegative,h.prototype.isUnit=function(){return!1;},d.prototype.isUnit=function(){return 1===Math.abs(this.value);},m.prototype.isUnit=function(){return this.abs().value===BigInt(1);},h.prototype.isZero=function(){return!1;},d.prototype.isZero=function(){return 0===this.value;},m.prototype.isZero=function(){return this.value===BigInt(0);},h.prototype.isDivisibleBy=function(e){var t=ne(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()));},m.prototype.isDivisibleBy=d.prototype.isDivisibleBy=h.prototype.isDivisibleBy,h.prototype.isPrime=function(t){var r=D(this);if(r!==e)return r;var n=this.abs(),c=n.bitLength();if(c<=64)return j(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var f=Math.log(2)*c.toJSNumber(),l=Math.ceil(!0===t?2*Math.pow(f,2):f),a=[],i=0;i-r?new d(e-1):new h(n,!0);},m.prototype.prev=function(){return new m(this.value-BigInt(1));};for(var U=[1];2*U[U.length-1]<=t;)U.push(2*U[U.length-1]);var J=U.length,H=U[J-1];function z(e){return Math.abs(e)<=t;}function G(e,t,r){t=ne(t);for(var n=e.isNegative(),c=t.isNegative(),f=n?e.not():e,l=c?t.not():t,h=0,d=0,m=null,y=null,v=[];!f.isZero()||!l.isZero();)h=(m=L(f,H))[1].toJSNumber(),n&&(h=H-1-h),d=(y=L(l,H))[1].toJSNumber(),c&&(d=H-1-d),f=m[0],l=y[0],v.push(r(h,d));for(var w=0!==r(n?1:0,c?1:0)?o(-1):o(0),i=v.length-1;i>=0;i-=1)w=w.multiply(H).add(o(v[i]));return w;}h.prototype.shiftLeft=function(e){var t=ne(e).toJSNumber();if(!z(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=J;)r=r.multiply(H),t-=J-1;return r.multiply(U[t]);},m.prototype.shiftLeft=d.prototype.shiftLeft=h.prototype.shiftLeft,h.prototype.shiftRight=function(e){var t,r=ne(e).toJSNumber();if(!z(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=J;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=L(n,H))[1].isNegative()?t[0].prev():t[0],r-=J-1;}return(t=L(n,U[r]))[1].isNegative()?t[0].prev():t[0];},m.prototype.shiftRight=d.prototype.shiftRight=h.prototype.shiftRight,h.prototype.not=function(){return this.negate().prev();},m.prototype.not=d.prototype.not=h.prototype.not,h.prototype.and=function(e){return G(this,e,function(a,b){return a&b;});},m.prototype.and=d.prototype.and=h.prototype.and,h.prototype.or=function(e){return G(this,e,function(a,b){return a|b;});},m.prototype.or=d.prototype.or=h.prototype.or,h.prototype.xor=function(e){return G(this,e,function(a,b){return a^b;});},m.prototype.xor=d.prototype.xor=h.prototype.xor;var K=1<<30;function V(e){var r=e.value,n="number"==typeof r?r|K:"bigint"==typeof r?r|BigInt(K):r[0]+r[1]*t|1073758208;return n&-n;}function X(e,base){if(base.compareTo(e)<=0){var t=X(e,base.square(base)),p=t.p,r=t.e,n=p.multiply(base);return n.compareTo(e)<=0?{p:n,e:2*r+1}:{p:p,e:2*r};}return{p:o(1),e:0};}function Q(a,b){return a=ne(a),b=ne(b),a.greater(b)?a:b;}function Z(a,b){return a=ne(a),b=ne(b),a.lesser(b)?a:b;}function W(a,b){if(a=ne(a).abs(),b=ne(b).abs(),a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;for(var e,t,r=l[1];a.isEven()&&b.isEven();)e=Z(V(a),V(b)),a=a.divide(e),b=b.divide(e),r=r.multiply(e);for(;a.isEven();)a=a.divide(V(a));do{for(;b.isEven();)b=b.divide(V(b));a.greater(b)&&(t=b,b=a,a=t),b=b.subtract(a);}while(!b.isZero());return r.isUnit()?a:a.multiply(r);}h.prototype.bitLength=function(){var e=this;return e.compareTo(o(0))<0&&(e=e.negate().subtract(o(1))),0===e.compareTo(o(0))?o(0):o(X(e,o(2)).e).add(o(1));},m.prototype.bitLength=d.prototype.bitLength=h.prototype.bitLength;var Y=function(text,base,e,t){e=e||c,text=String(text),t||(text=text.toLowerCase(),e=e.toLowerCase());var i,r=text.length,n=Math.abs(base),o={};for(i=0;i=n){if("1"===h&&1===n)continue;throw new Error(h+" is not a valid digit in base "+base+".");}}base=ne(base);var f=[],l="-"===text[0];for(i=l?1:0;i"!==text[i]&&i=0;i--)r=r.add(e[i].times(n)),n=n.times(base);return t?r.negate():r;}function ee(e,base){if((base=o(base)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.");}if(base.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var t=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return t.unshift([1]),{value:[].concat.apply([],t),isNegative:!1};}var r=!1;if(e.isNegative()&&base.isPositive()&&(r=!0,e=e.abs()),base.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:r};for(var n,c=[],f=e;f.isNegative()||f.compareAbs(base)>=0;){n=f.divmod(base),f=n.quotient;var l=n.remainder;l.isNegative()&&(l=base.minus(l).abs(),f=f.next()),c.push(l.toJSNumber());}return c.push(f.toJSNumber()),{value:c.reverse(),isNegative:r};}function te(e,base,t){var r=ee(e,base);return(r.isNegative?"-":"")+r.value.map(function(e){return function(e,t){return e<(t=t||c).length?t[e]:"<"+e+">";}(e,t);}).join("");}function re(e){if(y(+e)){var t=+e;if(t===M(t))return f?new m(BigInt(t)):new d(t);throw new Error("Invalid integer: "+e);}var r="-"===e[0];r&&(e=e.slice(1));var n=e.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var o=n[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==M(o)||!y(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var text=n[0],c=text.indexOf(".");if(c>=0&&(o-=text.length-c-1,text=text.slice(0,c)+text.slice(c+1)),o<0)throw new Error("Cannot include negative exponent part for integers");e=text+=new Array(o+1).join("0");}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(f)return new m(BigInt(r?"-"+e:e));for(var l=[],v=e.length,w=v-7;v>0;)l.push(+e.slice(w,v)),(w-=7)<0&&(w=0),v-=7;return _(l),new h(l,r);}function ne(e){return"number"==typeof e?function(e){if(f)return new m(BigInt(e));if(y(e)){if(e!==M(e))throw new Error(e+" is not an integer.");return new d(e);}return re(e.toString());}(e):"string"==typeof e?re(e):"bigint"==typeof e?new m(e):e;}h.prototype.toArray=function(e){return ee(this,e);},d.prototype.toArray=function(e){return ee(this,e);},m.prototype.toArray=function(e){return ee(this,e);},h.prototype.toString=function(t,r){if(t===e&&(t=10),10!==t)return te(this,t,r);for(var n,o=this.value,c=o.length,f=String(o[--c]);--c>=0;)n=String(o[c]),f+="0000000".slice(n.length)+n;return(this.sign?"-":"")+f;},d.prototype.toString=function(t,r){return t===e&&(t=10),10!=t?te(this,t,r):String(this.value);},m.prototype.toString=d.prototype.toString,m.prototype.toJSON=h.prototype.toJSON=d.prototype.toJSON=function(){return this.toString();},h.prototype.valueOf=function(){return parseInt(this.toString(),10);},h.prototype.toJSNumber=h.prototype.valueOf,d.prototype.valueOf=function(){return this.value;},d.prototype.toJSNumber=d.prototype.valueOf,m.prototype.valueOf=m.prototype.toJSNumber=function(){return parseInt(this.toString(),10);};for(var i=0;i<1e3;i++)l[i]=ne(i),i>0&&(l[-i]=ne(-i));return l.one=l[1],l.zero=l[0],l.minusOne=l[-1],l.max=Q,l.min=Z,l.gcd=W,l.lcm=function(a,b){return a=ne(a).abs(),b=ne(b).abs(),a.divide(W(a,b)).multiply(b);},l.isInstance=function(e){return e instanceof h||e instanceof d||e instanceof m;},l.randBetween=function(a,b,e){a=ne(a),b=ne(b);var r=e||Math.random,n=Z(a,b),o=Q(a,b).subtract(n).add(1);if(o.isSmall)return n.add(Math.floor(r()*o));for(var c=ee(o,t).value,f=[],h=!0,i=0;i>>32-t;}function d(a,b,e,t,r,n,s){return h(a+(b&e|~b&t)+r+n|0,s)+b|0;}function m(a,b,e,t,r,n,s){return h(a+(b&t|e&~t)+r+n|0,s)+b|0;}function y(a,b,e,t,r,n,s){return h(a+(b^e^t)+r+n|0,s)+b|0;}function v(a,b,e,t,r,n,s){return h(a+(e^(b|~t))+r+n|0,s)+b|0;}n(l,o),l.prototype._update=function(){for(var e=f,i=0;i<16;++i)e[i]=this._block.readInt32LE(4*i);var a=this._a,b=this._b,t=this._c,r=this._d;a=d(a,b,t,r,e[0],3614090360,7),r=d(r,a,b,t,e[1],3905402710,12),t=d(t,r,a,b,e[2],606105819,17),b=d(b,t,r,a,e[3],3250441966,22),a=d(a,b,t,r,e[4],4118548399,7),r=d(r,a,b,t,e[5],1200080426,12),t=d(t,r,a,b,e[6],2821735955,17),b=d(b,t,r,a,e[7],4249261313,22),a=d(a,b,t,r,e[8],1770035416,7),r=d(r,a,b,t,e[9],2336552879,12),t=d(t,r,a,b,e[10],4294925233,17),b=d(b,t,r,a,e[11],2304563134,22),a=d(a,b,t,r,e[12],1804603682,7),r=d(r,a,b,t,e[13],4254626195,12),t=d(t,r,a,b,e[14],2792965006,17),a=m(a,b=d(b,t,r,a,e[15],1236535329,22),t,r,e[1],4129170786,5),r=m(r,a,b,t,e[6],3225465664,9),t=m(t,r,a,b,e[11],643717713,14),b=m(b,t,r,a,e[0],3921069994,20),a=m(a,b,t,r,e[5],3593408605,5),r=m(r,a,b,t,e[10],38016083,9),t=m(t,r,a,b,e[15],3634488961,14),b=m(b,t,r,a,e[4],3889429448,20),a=m(a,b,t,r,e[9],568446438,5),r=m(r,a,b,t,e[14],3275163606,9),t=m(t,r,a,b,e[3],4107603335,14),b=m(b,t,r,a,e[8],1163531501,20),a=m(a,b,t,r,e[13],2850285829,5),r=m(r,a,b,t,e[2],4243563512,9),t=m(t,r,a,b,e[7],1735328473,14),a=y(a,b=m(b,t,r,a,e[12],2368359562,20),t,r,e[5],4294588738,4),r=y(r,a,b,t,e[8],2272392833,11),t=y(t,r,a,b,e[11],1839030562,16),b=y(b,t,r,a,e[14],4259657740,23),a=y(a,b,t,r,e[1],2763975236,4),r=y(r,a,b,t,e[4],1272893353,11),t=y(t,r,a,b,e[7],4139469664,16),b=y(b,t,r,a,e[10],3200236656,23),a=y(a,b,t,r,e[13],681279174,4),r=y(r,a,b,t,e[0],3936430074,11),t=y(t,r,a,b,e[3],3572445317,16),b=y(b,t,r,a,e[6],76029189,23),a=y(a,b,t,r,e[9],3654602809,4),r=y(r,a,b,t,e[12],3873151461,11),t=y(t,r,a,b,e[15],530742520,16),a=v(a,b=y(b,t,r,a,e[2],3299628645,23),t,r,e[0],4096336452,6),r=v(r,a,b,t,e[7],1126891415,10),t=v(t,r,a,b,e[14],2878612391,15),b=v(b,t,r,a,e[5],4237533241,21),a=v(a,b,t,r,e[12],1700485571,6),r=v(r,a,b,t,e[3],2399980690,10),t=v(t,r,a,b,e[10],4293915773,15),b=v(b,t,r,a,e[1],2240044497,21),a=v(a,b,t,r,e[8],1873313359,6),r=v(r,a,b,t,e[15],4264355552,10),t=v(t,r,a,b,e[6],2734768916,15),b=v(b,t,r,a,e[13],1309151649,21),a=v(a,b,t,r,e[4],4149444226,6),r=v(r,a,b,t,e[11],3174756917,10),t=v(t,r,a,b,e[2],718787259,15),b=v(b,t,r,a,e[9],3951481745,21),this._a=this._a+a|0,this._b=this._b+b|0,this._c=this._c+t|0,this._d=this._d+r|0;},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=c.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e;},e.exports=l;},function(e,t,r){"use strict";var n=r(69).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,c){if("function"==typeof r)return e(t,null,r);r||(r={}),c=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o>>32-t;}function _(a,b,e,t,r,n,o,s){return w(a+(b^e^t)+n+o|0,s)+r|0;}function A(a,b,e,t,r,n,o,s){return w(a+(b&e|~b&t)+n+o|0,s)+r|0;}function M(a,b,e,t,r,n,o,s){return w(a+((b|~e)^t)+n+o|0,s)+r|0;}function E(a,b,e,t,r,n,o,s){return w(a+(b&t|e&~t)+n+o|0,s)+r|0;}function S(a,b,e,t,r,n,o,s){return w(a+(b^(e|~t))+n+o|0,s)+r|0;}o(v,c),v.prototype._update=function(){for(var e=f,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,o=0|this._c,dl=0|this._d,c=0|this._e,v=0|this._a,br=0|this._b,T=0|this._c,x=0|this._d,k=0|this._e,i=0;i<80;i+=1){var I,tr;i<16?(I=_(r,n,o,dl,c,e[l[i]],y[0],d[i]),tr=S(v,br,T,x,k,e[h[i]],hr[0],m[i])):i<32?(I=A(r,n,o,dl,c,e[l[i]],y[1],d[i]),tr=E(v,br,T,x,k,e[h[i]],hr[1],m[i])):i<48?(I=M(r,n,o,dl,c,e[l[i]],y[2],d[i]),tr=M(v,br,T,x,k,e[h[i]],hr[2],m[i])):i<64?(I=E(r,n,o,dl,c,e[l[i]],y[3],d[i]),tr=A(v,br,T,x,k,e[h[i]],hr[3],m[i])):(I=S(r,n,o,dl,c,e[l[i]],y[4],d[i]),tr=_(v,br,T,x,k,e[h[i]],hr[4],m[i])),r=c,c=dl,dl=w(o,10),o=n,n=I,v=k,k=x,x=w(T,10),T=br,br=tr;}var C=this._b+o+x|0;this._b=this._c+dl+k|0,this._c=this._d+c+v|0,this._d=this._e+r+br|0,this._e=this._a+n+T|0,this._a=C;},v.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e;},e.exports=v;},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r();}).sha=r(352),t.sha1=r(353),t.sha224=r(354),t.sha256=r(192),t.sha384=r(355),t.sha512=r(193);},function(e,t,r){(t=e.exports=r(195)).Stream=t,t.Readable=t,t.Writable=r(136),t.Duplex=r(61),t.Transform=r(198),t.PassThrough=r(359);},function(e,t,r){var n=r(5),o=n.Buffer;function c(e,t){for(var r in e)t[r]=e[r];}function f(e,t,r){return o(e,t,r);}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(c(n,t),t.Buffer=f),c(o,f),f.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r);},f.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n;},f.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e);},f.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e);};},function(e,t,r){"use strict";(function(t){var n=r(99);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next;}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e;}(t,e);};}e.exports=M;var c,f=n.nextTick;M.WritableState=A;var l=Object.create(r(85));l.inherits=r(4);var h={deprecate:r(98)},d=r(196),m=r(135).Buffer,y=t.Uint8Array||function(){};var v,w=r(197);function _(){}function A(e,t){c=c||r(61),e=e||{};var l=t instanceof c;this.objectMode=!!e.objectMode,l&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var h=e.highWaterMark,d=e.writableHighWaterMark,m=this.objectMode?16:16384;this.highWaterMark=h||0===h?h:l&&(d||0===d)?d:m,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var y=!1===e.decodeStrings;this.decodeStrings=!y,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,o=r.sync,c=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0;}(r),t)!function(e,t,r,o,c){--t.pendingcb,r?(n.nextTick(c,o),n.nextTick(I,e,t),e._writableState.errorEmitted=!0,e.emit("error",o)):(c(o),e._writableState.errorEmitted=!0,e.emit("error",o),I(e,t));}(e,r,o,t,c);else{var l=x(r);l||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),o?f(S,e,r,l,c):S(e,r,l,c);}}(t,e);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this);}function M(e){if(c=c||r(61),!(v.call(M,this)||this instanceof c))return new M(e);this._writableState=new A(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this);}function E(e,t,r,n,o,c,f){t.writelen=n,t.writecb=f,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,c,t.onwrite),t.sync=!1;}function S(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));}(e,t),t.pendingcb--,n(),I(e,t);}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,c=new Array(n),f=t.corkedRequestsFree;f.entry=r;for(var l=0,h=!0;r;)c[l]=r,r.isBuf||(h=!1),r=r.next,l+=1;c.allBuffers=h,E(e,t,!0,t.length,c,"",f.finish),t.pendingcb++,t.lastBufferedRequest=null,f.next?(t.corkedRequestsFree=f.next,f.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0;}else{for(;r;){var d=r.chunk,m=r.encoding,y=r.callback;if(E(e,t,!1,t.objectMode?1:d.length,d,m,y),r=r.next,t.bufferedRequestCount--,t.writing)break;}null===r&&(t.lastBufferedRequest=null);}t.bufferedRequest=r,t.bufferProcessing=!1;}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing;}function k(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),I(e,t);});}function I(e,t){var r=x(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")));}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r;}l.inherits(M,d),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t;},function(){try{Object.defineProperty(A.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer();},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(v=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(object){return!!v.call(this,object)||this===M&&object&&object._writableState instanceof A;}})):v=function(object){return object instanceof this;},M.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));},M.prototype.write=function(e,t,r){var o,c=this._writableState,f=!1,l=!c.objectMode&&(o=e,m.isBuffer(o)||o instanceof y);return l&&!m.isBuffer(e)&&(e=function(e){return m.from(e);}(e)),"function"==typeof t&&(r=t,t=null),l?t="buffer":t||(t=c.defaultEncoding),"function"!=typeof r&&(r=_),c.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r);}(this,r):(l||function(e,t,r,o){var c=!0,f=!1;return null===r?f=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(f=new TypeError("Invalid non-string/buffer chunk")),f&&(e.emit("error",f),n.nextTick(o,f),c=!1),c;}(this,c,e,r))&&(c.pendingcb++,f=function(e,t,r,n,o,c){if(!r){var f=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=m.from(t,r));return t;}(t,n,o);n!==f&&(r=!0,o="buffer",n=f);}var l=t.objectMode?1:n.length;t.length+=l;var h=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark;}}),M.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"));},M.prototype._writev=null,M.prototype.end=function(e,t,r){var o=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(e,t,r){t.ending=!0,I(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1;}(this,o,r);},Object.defineProperty(M.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed;},set:function(e){this._writableState&&(this._writableState.destroyed=e);}}),M.prototype.destroy=w.destroy,M.prototype._undestroy=w.undestroy,M.prototype._destroy=function(e,t){this.end(),t(e);};}).call(this,r(18));},function(e,t,r){"use strict";var n=r(37);function o(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0;}e.exports=o,o.prototype._init=function(){},o.prototype.update=function(data){return 0===data.length?[]:"decrypt"===this.type?this._updateDecrypt(data):this._updateEncrypt(data);},o.prototype._buffer=function(data,e){for(var t=Math.min(this.buffer.length-this.bufferOff,data.length-e),i=0;i0;r--)e+=this._buffer(data,e),t+=this._flushBuffer(n,t);return e+=this._buffer(data,e),n;},o.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r;},o.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t;}function f(e,r){var o=function(e){var t=c(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)};}(r),f=r.modulus.byteLength(),l=new n(e).mul(o.blinder).umod(r.modulus),h=l.toRed(n.mont(r.prime1)),d=l.toRed(n.mont(r.prime2)),m=r.coefficient,p=r.prime1,q=r.prime2,y=h.redPow(r.exponent1).fromRed(),v=d.redPow(r.exponent2).fromRed(),w=y.isub(v).imul(m).umod(p).imul(q);return v.iadd(w).imul(o.unblinder).umod(r.modulus).toArrayLike(t,"be",f);}f.getr=c,e.exports=f;}).call(this,r(5).Buffer);},function(e,t,r){"use strict";var pre,n=t,o=r(24),c=r(223),f=r(38).assert;function l(e){"short"===e.type?this.curve=new c.short(e):"edwards"===e.type?this.curve=new c.edwards(e):this.curve=new c.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,f(this.g.validate(),"Invalid curve"),f(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O");}function h(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new l(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r;}});}n.PresetCurve=l,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{pre=r(402);}catch(e){pre=void 0;}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]});},function(e,t,r){"use strict";(function(t){var n,o=r(5),c=o.Buffer,f={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(f[n]=o[n]);var l=f.Buffer={};for(n in c)c.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(l[n]=c[n]);if(f.Buffer.prototype=c.prototype,l.from&&l.from!==Uint8Array.from||(l.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return c(e,t,r);}),l.alloc||(l.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=c(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n;}),!f.kStringMaxLength)try{f.kStringMaxLength=t.binding("buffer").kStringMaxLength;}catch(e){}f.constants||(f.constants={MAX_LENGTH:f.kMaxLength},f.kStringMaxLength&&(f.constants.MAX_STRING_LENGTH=f.kStringMaxLength)),e.exports=f;}).call(this,r(17));},function(e,t,r){"use strict";const n=r(146).Reporter,o=r(87).EncoderBuffer,c=r(87).DecoderBuffer,f=r(37),l=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(l);function d(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap());}e.exports=d;const m=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];d.prototype.clone=function(){const e=this._baseState,t={};m.forEach(function(r){t[r]=e[r];});const r=new this.constructor(t.parent);return r._baseState=t,r;},d.prototype._wrap=function(){const e=this._baseState;h.forEach(function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments);};},this);},d.prototype._init=function(body){const e=this._baseState;f(null===e.parent),body.call(this),e.children=e.children.filter(function(e){return e._baseState.parent===this;},this),f.equal(e.children.length,1,"Root node can have only one child");},d.prototype._useArgs=function(e){const t=this._baseState,r=e.filter(function(e){return e instanceof this.constructor;},this);e=e.filter(function(e){return!(e instanceof this.constructor);},this),0!==r.length&&(f(null===t.children),t.children=r,r.forEach(function(e){e._baseState.parent=this;},this)),0!==e.length&&(f(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach(function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r;}),t;}));},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(e){d.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc);};}),l.forEach(function(e){d.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return f(null===t.tag),t.tag=e,this._useArgs(r),this;};}),d.prototype.use=function(e){f(e);const t=this._baseState;return f(null===t.use),t.use=e,this;},d.prototype.optional=function(){return this._baseState.optional=!0,this;},d.prototype.def=function(e){const t=this._baseState;return f(null===t.default),t.default=e,t.optional=!0,this;},d.prototype.explicit=function(e){const t=this._baseState;return f(null===t.explicit&&null===t.implicit),t.explicit=e,this;},d.prototype.implicit=function(e){const t=this._baseState;return f(null===t.explicit&&null===t.implicit),t.implicit=e,this;},d.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this;},d.prototype.key=function(e){const t=this._baseState;return f(null===t.key),t.key=e,this;},d.prototype.any=function(){return this._baseState.any=!0,this;},d.prototype.choice=function(e){const t=this._baseState;return f(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t];})),this;},d.prototype.contains=function(e){const t=this._baseState;return f(null===t.use),t.contains=e,this;},d.prototype._decode=function(input,e){const t=this._baseState;if(null===t.parent)return input.wrapResult(t.children[0]._decode(input,e));let r,n=t.default,o=!0,f=null;if(null!==t.key&&(f=input.enterKey(t.key)),t.optional){let r=null;if(null!==t.explicit?r=t.explicit:null!==t.implicit?r=t.implicit:null!==t.tag&&(r=t.tag),null!==r||t.any){if(o=this._peekTag(input,r,t.any),input.isError(o))return o;}else{const r=input.save();try{null===t.choice?this._decodeGeneric(t.tag,input,e):this._decodeChoice(input,e),o=!0;}catch(e){o=!1;}input.restore(r);}}if(t.obj&&o&&(r=input.enterObject()),o){if(null!==t.explicit){const e=this._decodeTag(input,t.explicit);if(input.isError(e))return e;input=e;}const r=input.offset;if(null===t.use&&null===t.choice){let e;t.any&&(e=input.save());const body=this._decodeTag(input,null!==t.implicit?t.implicit:t.tag,t.any);if(input.isError(body))return body;t.any?n=input.raw(e):input=body;}if(e&&e.track&&null!==t.tag&&e.track(input.path(),r,input.length,"tagged"),e&&e.track&&null!==t.tag&&e.track(input.path(),input.offset,input.length,"content"),t.any||(n=null===t.choice?this._decodeGeneric(t.tag,input,e):this._decodeChoice(input,e)),input.isError(n))return n;if(t.any||null!==t.choice||null===t.children||t.children.forEach(function(t){t._decode(input,e);}),t.contains&&("octstr"===t.tag||"bitstr"===t.tag)){const data=new c(n);n=this._getUse(t.contains,input._reporterState.obj)._decode(data,e);}}return t.obj&&o&&(n=input.leaveObject(r)),null===t.key||null===n&&!0!==o?null!==f&&input.exitKey(f):input.leaveKey(f,t.key,n),n;},d.prototype._decodeGeneric=function(e,input,t){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(input,e,r.args[0],t):/str$/.test(e)?this._decodeStr(input,e,t):"objid"===e&&r.args?this._decodeObjid(input,r.args[0],r.args[1],t):"objid"===e?this._decodeObjid(input,null,null,t):"gentime"===e||"utctime"===e?this._decodeTime(input,e,t):"null_"===e?this._decodeNull(input,t):"bool"===e?this._decodeBool(input,t):"objDesc"===e?this._decodeStr(input,e,t):"int"===e||"enum"===e?this._decodeInt(input,r.args&&r.args[0],t):null!==r.use?this._getUse(r.use,input._reporterState.obj)._decode(input,t):input.error("unknown tag: "+e);},d.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),f(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder;},d.prototype._decodeChoice=function(input,e){const t=this._baseState;let r=null,n=!1;return Object.keys(t.choice).some(function(o){const c=input.save(),f=t.choice[o];try{const t=f._decode(input,e);if(input.isError(t))return!1;r={type:o,value:t},n=!0;}catch(e){return input.restore(c),!1;}return!0;},this),n?r:input.error("Choice not matched");},d.prototype._createEncoderBuffer=function(data){return new o(data,this.reporter);},d.prototype._encode=function(data,e,t){const r=this._baseState;if(null!==r.default&&r.default===data)return;const n=this._encodeValue(data,e,t);return void 0===n||this._skipDefault(n,e,t)?void 0:n;},d.prototype._encodeValue=function(data,e,t){const r=this._baseState;if(null===r.parent)return r.children[0]._encode(data,e||new n());let o=null;if(this.reporter=e,r.optional&&void 0===data){if(null===r.default)return;data=r.default;}let content=null,c=!1;if(r.any)o=this._createEncoderBuffer(data);else if(r.choice)o=this._encodeChoice(data,e);else if(r.contains)content=this._getUse(r.contains,t)._encode(data,e),c=!0;else if(r.children)content=r.children.map(function(t){if("null_"===t._baseState.tag)return t._encode(null,e,data);if(null===t._baseState.key)return e.error("Child should have a key");const r=e.enterKey(t._baseState.key);if("object"!=typeof data)return e.error("Child expected, but input is not object");const n=t._encode(data[t._baseState.key],e,data);return e.leaveKey(r),n;},this).filter(function(e){return e;}),content=this._createEncoderBuffer(content);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return e.error("Too many args for : "+r.tag);if(!Array.isArray(data))return e.error("seqof/setof, but data is not Array");const t=this.clone();t._baseState.implicit=null,content=this._createEncoderBuffer(data.map(function(t){const r=this._baseState;return this._getUse(r.args[0],data)._encode(t,e);},t));}else null!==r.use?o=this._getUse(r.use,t)._encode(data,e):(content=this._encodePrimitive(r.tag,data),c=!0);if(!r.any&&null===r.choice){const t=null!==r.implicit?r.implicit:r.tag,n=null===r.implicit?"universal":"context";null===t?null===r.use&&e.error("Tag could be omitted only for .use()"):null===r.use&&(o=this._encodeComposite(t,c,n,content));}return null!==r.explicit&&(o=this._encodeComposite(r.explicit,!1,"context",o)),o;},d.prototype._encodeChoice=function(data,e){const t=this._baseState,r=t.choice[data.type];return r||f(!1,data.type+" not found in "+JSON.stringify(Object.keys(t.choice))),r._encode(data.value,e);},d.prototype._encodePrimitive=function(e,data){const t=this._baseState;if(/str$/.test(e))return this._encodeStr(data,e);if("objid"===e&&t.args)return this._encodeObjid(data,t.reverseArgs[0],t.args[1]);if("objid"===e)return this._encodeObjid(data,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(data,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(data,t.args&&t.reverseArgs[0]);if("bool"===e)return this._encodeBool(data);if("objDesc"===e)return this._encodeStr(data,e);throw new Error("Unsupported tag: "+e);},d.prototype._isNumstr=function(e){return /^[0-9 ]*$/.test(e);},d.prototype._isPrintstr=function(e){return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(e);};},function(e,t,r){"use strict";const n=r(4);function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]};}function c(path,e){this.path=path,this.rethrow(e);}t.Reporter=o,o.prototype.isError=function(e){return e instanceof c;},o.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length};},o.prototype.restore=function(data){const e=this._reporterState;e.obj=data.obj,e.path=e.path.slice(0,data.pathLen);},o.prototype.enterKey=function(e){return this._reporterState.path.push(e);},o.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1);},o.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r);},o.prototype.path=function(){return this._reporterState.path.join("/");},o.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t;},o.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r;},o.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof c;if(t=n?e:new c(r.path.map(function(e){return"["+JSON.stringify(e)+"]";}).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t;},o.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e;},n(c,Error),c.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,c),!this.stack)try{throw new Error(this.message);}catch(e){this.stack=e.stack;}return this;};},function(e,t,r){"use strict";function n(map){const e={};return Object.keys(map).forEach(function(t){(0|t)==t&&(t|=0);const r=map[t];e[r]=t;}),e;}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n(t.tag);},function(e,t,r){const n=r(43),o=r(23).Scalar,c=r(23).ZqField,{unstringifyBigInts:f}=r(23).utils,l=new c(o.fromString("21888242871839275222246405745257275088548364400416034343698204186575808495617")),{C:h,M:d}=f(r(432)),m=a=>l.mul(a,l.square(l.square(a,a)));e.exports=function(e){n(e.length>0),n(e.length<5);const t=e.length+1;let r=[...e.map(a=>l.e(a)),l.zero];for(let e=0;e<43;e++)r=r.map((a,i)=>l.add(a,BigInt(h[t-2][e*t+i]))),e<4||e>=39?r=r.map(a=>m(a)):r[0]=m(r[0]),e<42&&(r=r.map((e,i)=>r.reduce((e,a,r)=>l.add(e,l.mul(BigInt(d[t-2][r][i]),a)),l.zero)));return l.normalize(r[0]);};},function(e,t,r){(function(e){const n=r(23).F1Field,o=r(23).Scalar,c=r(23).utils;t.addPoint=l,t.mulPointEscalar=h,t.inCurve=d,t.inSubgroup=function(e){if(!d(e))return!1;const r=h(e,t.subOrder);return f.isZero(r[0])&&f.eq(r[1],f.one);},t.packPoint=function(e){const t=c.leInt2Buff(e[1],32);f.lt(e[0],f.zero)&&(t[31]=128|t[31]);return t;},t.unpackPoint=function(r){const n=e.from(r);let l=!1;const h=new Array(2);128&n[31]&&(l=!0,n[31]=127&n[31]);if(h[1]=c.leBuff2int(n),o.gt(h[1],t.p))return null;const d=f.square(h[1]);let m=f.sqrt(f.div(f.sub(f.one,d),f.sub(t.A,f.mul(t.D,d))));if(null==m)return null;l&&(m=f.neg(m));return h[0]=m,h;},t.p=o.fromString("21888242871839275222246405745257275088548364400416034343698204186575808495617");const f=new n(t.p);function l(a,b){const e=[],r=f.mul(a[0],b[1]),n=f.mul(a[1],b[0]),o=f.mul(f.sub(a[1],f.mul(t.A,a[0])),f.add(b[0],b[1])),c=f.mul(r,n),l=f.mul(t.D,c);return e[0]=f.div(f.add(r,n),f.add(f.one,l)),e[1]=f.div(f.add(o,f.sub(f.mul(t.A,r),n)),f.sub(f.one,l)),e;}function h(base,e){let t=[f.e("0"),f.e("1")],r=e,n=base;for(;!o.isZero(r);)o.isOdd(r)&&(t=l(t,n)),n=l(n,n),r=o.shiftRight(r,1);return t;}function d(e){const r=f.square(e[0]),n=f.square(e[1]);return!!f.eq(f.add(f.mul(t.A,r),n),f.add(f.one,f.mul(f.mul(r,n),t.D)));}t.F=f,t.Generator=[f.e("995203441582195749578291179787384436505546430278305826713579947235728471134"),f.e("5472060717959818805561601436314318772137091100104008585924551046643952123905")],t.Base8=[f.e("5299619240641551281634865583518297030282874472190772894086521144482721001553"),f.e("16950150798460657717958625567821834550301663161624707787222815936182638968203")],t.order=o.fromString("21888242871839275222246405745257275088614511777268538073601725287587578984328"),t.subOrder=o.shiftRight(t.order,3),t.A=f.e("168700"),t.D=f.e("168696");}).call(this,r(5).Buffer);},function(e,t,r){"use strict";var n=r(75).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,r,c){if("function"==typeof r)return e(t,null,r);r||(r={}),c=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o=0;--i){var c=this.tryEntries[i],f=c.completion;if("root"===c.tryLoc)return o("end");if(c.tryLoc<=this.prev){var l=n.call(c,"catchLoc"),h=n.call(c,"finallyLoc");if(l&&h){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--i){var t=this.tryEntries[i];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),P(t),A;}},catch:function(e){for(var i=this.tryEntries.length-1;i>=0;--i){var t=this.tryEntries[i];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var n=r.arg;P(t);}return n;}}throw new Error("illegal catch attempt");},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),A;}},e;}(e.exports);try{regeneratorRuntime=n;}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n);}},function(e,t,r){var n=r(31),o=r(44),c=n.document,f=o(c)&&o(c.createElement);e.exports=function(e){return f?c.createElement(e):{};};},function(e,t,r){var n=r(261),o=r(263),c=r(62),f=r(106),l=r(264),h=[].push,d=function(e){var t=1==e,r=2==e,d=3==e,m=4==e,y=6==e,v=7==e,w=5==e||y;return function(_,A,M,E){for(var S,T,x=c(_),k=o(x),I=n(A,M,3),C=f(k.length),O=0,B=E||l,R=t?B(_,C):r||v?B(_,0):void 0;C>O;O++)if((w||O in k)&&(T=I(S=k[O],O,x),e))if(t)R[O]=T;else if(T)switch(e){case 3:return!0;case 5:return S;case 6:return O;case 2:h.call(R,S);}else switch(e){case 4:return!1;case 7:h.call(R,S);}return y?-1:d||m?m:R;};};e.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(7)};},function(e,t,r){var n=r(32),o=r(26),c=r(108),f=r(63),l=r(163),h=[],d=f("Reflect","construct"),m=/^\s*(?:class|function)\b/,y=m.exec,v=!m.exec(function(){}),w=function(e){if(!o(e))return!1;try{return d(Object,h,e),!0;}catch(e){return!1;}};e.exports=!d||n(function(){var e;return w(w.call)||!w(Object)||!w(function(){e=!0;})||e;})?function(e){if(!o(e))return!1;switch(c(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1;}return v||!!y.call(m,l(e));}:w;},function(e,t,r){var n={};n[r(28)("toStringTag")]="z",e.exports="[object z]"===String(n);},function(e,t,r){var n=r(109),o=r(159);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{});})("versions",[]).push({version:"3.18.0",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});},function(e,t,r){var n=r(31),o=r(160),c="__core-js_shared__",f=n[c]||o(c,{});e.exports=f;},function(e,t,r){var n=r(31);e.exports=function(e,t){try{Object.defineProperty(n,e,{value:t,configurable:!0,writable:!0});}catch(r){n[e]=t;}return t;};},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+n).toString(36);};},function(e,t,r){var n=r(266),o=r(32);e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var symbol=Symbol();return!String(symbol)||!(Object(symbol)instanceof Symbol)||!Symbol.sham&&n&&n<41;});},function(e,t,r){var n=r(26),o=r(159),c=Function.toString;n(o.inspectSource)||(o.inspectSource=function(e){return c.call(e);}),e.exports=o.inspectSource;},function(e,t,r){var n=r(105);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r);};},function(e,t,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,c=o&&!n.call({1:2},1);t.f=c?function(e){var t=o(this,e);return!!t&&t.enumerable;}:n;},function(e,t,r){var n,o,c,f=r(494),l=r(31),h=r(44),d=r(91),m=r(39),y=r(159),v=r(112),w=r(113),_="Object already initialized",A=l.WeakMap;if(f||y.state){var M=y.state||(y.state=new A()),E=M.get,S=M.has,T=M.set;n=function(e,t){if(S.call(M,e))throw new TypeError(_);return t.facade=e,T.call(M,e,t),t;},o=function(e){return E.call(M,e)||{};},c=function(e){return S.call(M,e);};}else{var x=v("state");w[x]=!0,n=function(e,t){if(m(e,x))throw new TypeError(_);return t.facade=e,d(e,x,t),t;},o=function(e){return m(e,x)?e[x]:{};},c=function(e){return m(e,x);};}e.exports={set:n,get:o,has:c,enforce:function(e){return c(e)?o(e):n(e,{});},getterFor:function(e){return function(t){var r;if(!h(t)||(r=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r;};}};},function(e,t,r){var n=r(40),o=r(39),c=Function.prototype,f=n&&Object.getOwnPropertyDescriptor,l=o(c,"name"),h=l&&"something"===function(){}.name,d=l&&(!n||n&&f(c,"name").configurable);e.exports={EXISTS:l,PROPER:h,CONFIGURABLE:d};},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];},function(e,t,r){var n=r(46).f,o=r(39),c=r(28)("toStringTag");e.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,c)&&n(e,c,{configurable:!0,value:t});};},function(e,t,r){"use strict";var n=r(110),o=r(46),c=r(92);e.exports=function(object,e,t){var r=n(e);r in object?o.f(object,r,c(0,t)):object[r]=t;};},function(e,t,r){"use strict";r.d(t,"a",function(){return c;});var n=r(7),o=r(30);function c(text){return Object(n.a)(Object(o.f)(text));}},function(e,t,r){"use strict";for(var n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",o={},c=0;c>25;return(33554431&pre)<<5^996825010&-(b>>0&1)^642813549&-(b>>1&1)^513874426&-(b>>2&1)^1027748829&-(b>>3&1)^705979059&-(b>>4&1);}function h(e){for(var t=1,i=0;i126)return"Invalid prefix ("+e+")";t=l(t)^r>>5;}for(t=l(t),i=0;it)return"Exceeds length limit";var r=e.toLowerCase(),n=e.toUpperCase();if(e!==r&&e!==n)return"Mixed-case string "+e;var c=(e=r).lastIndexOf("1");if(-1===c)return"No separator character for "+e;if(0===c)return"Missing prefix for "+e;var f=e.slice(0,c),d=e.slice(c+1);if(d.length<6)return"Data too short";var m=h(f);if("string"==typeof m)return m;for(var y=[],i=0;i=d.length||y.push(w);}return 1!==m?"Invalid checksum for "+e:{prefix:f,words:y};}function m(data,e,t,r){for(var n=0,o=0,c=(1<=t;)o-=t,f.push(n>>o&c);if(r)o>0&&f.push(n<=e)return"Excess padding";if(n<r)throw new TypeError("Exceeds length limit");var o=h(e=e.toLowerCase());if("string"==typeof o)throw new Error(o);for(var c=e+"1",i=0;i>5!=0)throw new Error("Non 5-bit word");o=l(o)^f,c+=n.charAt(f);}for(i=0;i<6;++i)o=l(o);for(o^=1,i=0;i<6;++i){c+=n.charAt(o>>5*(5-i)&31);}return c;},toWordsUnsafe:function(e){var t=m(e,8,5,!0);if(Array.isArray(t))return t;},toWords:function(e){var t=m(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t);},fromWordsUnsafe:function(e){var t=m(e,5,8,!1);if(Array.isArray(t))return t;},fromWords:function(e){var t=m(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t);}};},,function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e);};},function(e,t,r){var n;e.exports=(n=r(11),function(e){var t=n,r=t.lib,o=r.WordArray,c=r.Hasher,f=t.algo,l=[],h=[];!function(){function t(t){for(var r=e.sqrt(t),n=2;n<=r;n++)if(!(t%n))return!1;return!0;}function r(e){return 4294967296*(e-(0|e))|0;}for(var n=2,o=0;o<64;)t(n)&&(o<8&&(l[o]=r(e.pow(n,.5))),h[o]=r(e.pow(n,1/3)),o++),n++;}();var d=[],m=f.SHA256=c.extend({_doReset:function(){this._hash=new o.init(l.slice(0));},_doProcessBlock:function(e,t){for(var r=this._hash.words,a=r[0],b=r[1],n=r[2],o=r[3],c=r[4],f=r[5],g=r[6],l=r[7],i=0;i<64;i++){if(i<16)d[i]=0|e[t+i];else{var m=d[i-15],y=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,v=d[i-2],w=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;d[i]=y+d[i-7]+w+d[i-16];}var _=a&b^a&n^b&n,A=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),M=l+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&f^~c&g)+h[i]+d[i];l=g,g=f,f=c,c=o+M|0,o=n,n=b,b=a,a=M+(A+_)|0;}r[0]=r[0]+a|0,r[1]=r[1]+b|0,r[2]=r[2]+n|0,r[3]=r[3]+o|0,r[4]=r[4]+c|0,r[5]=r[5]+f|0,r[6]=r[6]+g|0,r[7]=r[7]+l|0;},_doFinalize:function(){var data=this._data,t=data.words,r=8*this._nDataBytes,n=8*data.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=e.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,data.sigBytes=4*t.length,this._process(),this._hash;},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e;}});t.SHA256=c._createHelper(m),t.HmacSHA256=c._createHmacHelper(m);}(Math),n.SHA256);},function(e,t,r){var n;e.exports=(n=r(11),r(95),function(){var e=n,t=e.lib.Hasher,r=e.x64,o=r.Word,c=r.WordArray,f=e.algo;function l(){return o.create.apply(o,arguments);}var h=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],d=[];!function(){for(var i=0;i<80;i++)d[i]=l();}();var m=f.SHA512=t.extend({_doReset:function(){this._hash=new c.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)]);},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],o=r[1],c=r[2],f=r[3],l=r[4],m=r[5],y=r[6],v=r[7],w=n.high,_=n.low,A=o.high,M=o.low,E=c.high,S=c.low,T=f.high,x=f.low,k=l.high,I=l.low,C=m.high,O=m.low,B=y.high,R=y.low,P=v.high,F=v.low,L=w,N=_,D=A,j=M,U=E,J=S,H=T,dl=x,z=k,G=I,K=C,V=O,X=B,Q=R,Z=P,W=F,i=0;i<80;i++){var Y,$,ee=d[i];if(i<16)$=ee.high=0|e[t+2*i],Y=ee.low=0|e[t+2*i+1];else{var te=d[i-15],re=te.high,ne=te.low,ie=(re>>>1|ne<<31)^(re>>>8|ne<<24)^re>>>7,oe=(ne>>>1|re<<31)^(ne>>>8|re<<24)^(ne>>>7|re<<25),ae=d[i-2],se=ae.high,ue=ae.low,ce=(se>>>19|ue<<13)^(se<<3|ue>>>29)^se>>>6,fe=(ue>>>19|se<<13)^(ue<<3|se>>>29)^(ue>>>6|se<<26),le=d[i-7],he=le.high,de=le.low,pe=d[i-16],be=pe.high,me=pe.low;$=($=($=ie+he+((Y=oe+de)>>>0>>0?1:0))+ce+((Y+=fe)>>>0>>0?1:0))+be+((Y+=me)>>>0>>0?1:0),ee.high=$,ee.low=Y;}var ge,ye=z&K^~z&X,ve=G&V^~G&Q,we=L&D^L&U^D&U,_e=N&j^N&J^j&J,Ae=(L>>>28|N<<4)^(L<<30|N>>>2)^(L<<25|N>>>7),Me=(N>>>28|L<<4)^(N<<30|L>>>2)^(N<<25|L>>>7),Ee=(z>>>14|G<<18)^(z>>>18|G<<14)^(z<<23|G>>>9),Se=(G>>>14|z<<18)^(G>>>18|z<<14)^(G<<23|z>>>9),Te=h[i],xe=Te.high,ke=Te.low,Ie=Z+Ee+((ge=W+Se)>>>0>>0?1:0),Ce=Me+_e;Z=X,W=Q,X=K,Q=V,K=z,V=G,z=H+(Ie=(Ie=(Ie=Ie+ye+((ge+=ve)>>>0>>0?1:0))+xe+((ge+=ke)>>>0>>0?1:0))+$+((ge+=Y)>>>0>>0?1:0))+((G=dl+ge|0)>>>0
>>0?1:0)|0,H=U,dl=J,U=D,J=j,D=L,j=N,L=Ie+(Ae+we+(Ce>>>0>>0?1:0))+((N=ge+Ce|0)>>>0>>0?1:0)|0;}_=n.low=_+N,n.high=w+L+(_>>>0>>0?1:0),M=o.low=M+j,o.high=A+D+(M>>>0>>0?1:0),S=c.low=S+J,c.high=E+U+(S>>>0>>0?1:0),x=f.low=x+dl,f.high=T+H+(x>>>0
>>0?1:0),I=l.low=I+G,l.high=k+z+(I>>>0>>0?1:0),O=m.low=O+V,m.high=C+K+(O>>>0>>0?1:0),R=y.low=R+Q,y.high=B+X+(R>>>0>>0?1:0),F=v.low=F+W,v.high=P+Z+(F>>>0>>0?1:0);},_doFinalize:function(){var data=this._data,e=data.words,t=8*this._nDataBytes,r=8*data.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(t/4294967296),e[31+(r+128>>>10<<5)]=t,data.sigBytes=4*e.length,this._process(),this._hash.toX32();},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e;},blockSize:32});e.SHA512=t._createHelper(m),e.HmacSHA512=t._createHmacHelper(m);}(),n.SHA512);},function(e,t,r){"use strict";var n=r(45).rotr32;function o(e,t,r){return e&t^~e&r;}function c(e,t,r){return e&t^e&r^t&r;}function f(e,t,r){return e^t^r;}t.ft_1=function(s,e,t,r){return 0===s?o(e,t,r):1===s||3===s?f(e,t,r):2===s?c(e,t,r):void 0;},t.ch32=o,t.maj32=c,t.p32=f,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22);},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25);},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3;},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10;};},function(e,t,r){"use strict";var n=r(45),o=r(84),c=r(177),f=r(37),l=n.sum32,h=n.sum32_4,d=n.sum32_5,m=c.ch32,y=c.maj32,v=c.s0_256,w=c.s1_256,_=c.g0_256,A=c.g1_256,M=o.BlockHash,E=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function S(){if(!(this instanceof S))return new S();M.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=E,this.W=new Array(64);}n.inherits(S,M),e.exports=S,S.blockSize=512,S.outSize=256,S.hmacStrength=192,S.padLength=64,S.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;i=0;e--){let t,r;const n=h.siblings[e];w[e]?(t=[n,y],r=[n,v]):(t=[y,n],r=[v,n]),y=c(t[0],t[1]),v=c(r[0],r[1]),m.push(y),ins.push([v,r]);}return d.newRoot=v,await this.db.multiDel(m),await this.db.multiIns(ins),await this.db.setRoot(v),this.root=v,d;}async delete(e){const t=n.e(e),r=await this.find(t);if(!r.found)throw new Error("Key does not exists");const o={siblings:[],delKey:t,delValue:r.foundValue},h=[],ins=[];let d,m,y=f(t,r.foundValue);if(h.push(y),r.siblings.length>0){const e=await this.db.get(r.siblings[r.siblings.length-1]);if(3==e.length&&l.eq(e[0],l.one))m=!1,o.oldKey=e[1],o.oldValue=e[2],o.isOld0=!1,d=r.siblings[r.siblings.length-1];else{if(2!=e.length)throw new Error("Invalid node. Database corrupted");m=!0,o.oldKey=t,o.oldValue=l.zero,o.isOld0=!0,d=l.zero;}}else d=l.zero,o.oldKey=t,o.oldValue=l.zero,o.isOld0=!0;const v=this._splitBits(t);for(let e=r.siblings.length-1;e>=0;e--){let t=r.siblings[e];e!=r.siblings.length-1||o.isOld0||(t=l.zero);const n=r.siblings[e];if(y=v[e]?c(n,y):c(y,n),h.push(y),l.isZero(t)||(m=!0),m){let n;o.siblings.unshift(r.siblings[e]),n=v[e]?[t,d]:[d,t],d=c(n[0],n[1]),ins.push([d,n]);}}return await this.db.multiIns(ins),await this.db.setRoot(d),this.root=d,await this.db.multiDel(h),o.newRoot=d,o.oldRoot=y,o;}async insert(e,t){const r=n.e(e),o=l.e(t);let h=!1;const d={};d.oldRoot=this.root;const m=this._splitBits(r);let y;const v=await this.find(r);if(v.found)throw new Error("Key already exists");let w;if(d.siblings=v.siblings,v.isOld0)d.siblings.length>0&&(w=!0,y=l.zero);else{const e=this._splitBits(v.notFoundKey);for(let i=d.siblings.length;e[i]==m[i];i++)d.siblings.push(l.zero);y=f(v.notFoundKey,v.notFoundValue),d.siblings.push(y),h=!0,w=!1;}const _=[],A=[];let rt=f(r,o);_.push([rt,[1,r,o]]);for(let i=d.siblings.length-1;i>=0;i--){if(i0&&l.isZero(d.siblings[d.siblings.length-1]);)d.siblings.pop();return d.oldKey=v.notFoundKey,d.oldValue=v.notFoundValue,d.newRoot=rt,d.isOld0=v.isOld0,await this.db.multiIns(_),await this.db.setRoot(rt),this.root=rt,await this.db.multiDel(A),d;}async find(e){const t=this._splitBits(e);return await this._find(e,t,this.root,0);}async _find(e,t,r,n){let o;if(void 0===r&&(r=this.root),l.isZero(r))return o={found:!1,siblings:[],notFoundKey:e,notFoundValue:l.zero,isOld0:!0},o;const c=await this.db.get(r);return 3==c.length&&l.eq(c[0],l.one)?o=l.eq(c[1],e)?{found:!0,siblings:[],foundValue:c[2],isOld0:!1}:{found:!1,siblings:[],notFoundKey:c[1],notFoundValue:c[2],isOld0:!1}:0==t[n]?(o=await this._find(e,t,c[0],n+1),o.siblings.unshift(c[1])):(o=await this._find(e,t,c[1],n+1),o.siblings.unshift(c[0])),o;}}e.exports.loadFromFile=async function(e){},e.exports.newMemEmptyTrie=async function(){const e=new o(),rt=await e.getRoot();return new h(e,rt);},e.exports.SMT=h,e.exports.SMTMemDB=o;},function(e,t,r){const n="function"==typeof BigInt;e.exports=r(n?343:426);},function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(51),t.createHash=t.Hash=r(60),t.createHmac=t.Hmac=r(199);var n=r(365),o=Object.keys(n),c=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(o);t.getHashes=function(){return c;};var p=r(202);t.pbkdf2=p.pbkdf2,t.pbkdf2Sync=p.pbkdf2Sync;var f=r(367);t.Cipher=f.Cipher,t.createCipher=f.createCipher,t.Cipheriv=f.Cipheriv,t.createCipheriv=f.createCipheriv,t.Decipher=f.Decipher,t.createDecipher=f.createDecipher,t.Decipheriv=f.Decipheriv,t.createDecipheriv=f.createDecipheriv,t.getCiphers=f.getCiphers,t.listCiphers=f.listCiphers;var l=r(382);t.DiffieHellmanGroup=l.DiffieHellmanGroup,t.createDiffieHellmanGroup=l.createDiffieHellmanGroup,t.getDiffieHellman=l.getDiffieHellman,t.createDiffieHellman=l.createDiffieHellman,t.DiffieHellman=l.DiffieHellman;var h=r(386);t.createSign=h.createSign,t.Sign=h.Sign,t.createVerify=h.createVerify,t.Verify=h.Verify,t.createECDH=r(421);var d=r(422);t.publicEncrypt=d.publicEncrypt,t.privateEncrypt=d.privateEncrypt,t.publicDecrypt=d.publicDecrypt,t.privateDecrypt=d.privateDecrypt;var m=r(425);t.randomFill=m.randomFill,t.randomFillSync=m.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"));},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6};},function(e,t,r){"use strict";var n=r(8).Buffer,o=r(344).Transform;function c(e){o.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1;}r(4)(c,o),c.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t);}catch(e){n=e;}r(n);},c.prototype._flush=function(e){var t=null;try{this.push(this.digest());}catch(e){t=e;}e(t);},c.prototype.update=function(data,e){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer");}(data,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(data)||(data=n.from(data,e));for(var t=this._block,r=0;this._blockOffset+data.length-r>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=c,(c=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*c);return this;},c.prototype._update=function(){throw new Error("_update is not implemented");},c.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return t;},c.prototype._digest=function(){throw new Error("_digest is not implemented");},e.exports=c;},function(e,t,r){"use strict";(function(t,n){var o;e.exports=B,B.ReadableState=O;r(49).EventEmitter;var c=function(e,t){return e.listeners(t).length;},f=r(187),l=r(5).Buffer,h=t.Uint8Array||function(){};var d,m=r(345);d=m&&m.debuglog?m.debuglog("stream"):function(){};var y,v,w,_=r(346),A=r(188),M=r(189).getHighWaterMark,E=r(69).codes,S=E.ERR_INVALID_ARG_TYPE,T=E.ERR_STREAM_PUSH_AFTER_EOF,x=E.ERR_METHOD_NOT_IMPLEMENTED,k=E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(B,f);var I=A.errorOrDestroy,C=["error","close","destroy","pause","resume"];function O(e,t,n){o=o||r(70),e=e||{},"boolean"!=typeof n&&(n=t instanceof o),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=M(this,e,"readableHighWaterMark",n),this.buffer=new _(),this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||(y=r(50).StringDecoder),this.decoder=new y(e.encoding),this.encoding=e.encoding);}function B(e){if(o=o||r(70),!(this instanceof B))return new B(e);var t=this instanceof o;this._readableState=new O(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this);}function R(e,t,r,n,o){d("readableAddChunk",t);var c,f=e._readableState;if(null===t)f.reading=!1,function(e,t){if(d("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length);}t.ended=!0,t.sync?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,D(e)));}(e,f);else if(o||(c=function(e,t){var r;n=t,l.isBuffer(n)||n instanceof h||"string"==typeof t||void 0===t||e.objectMode||(r=new S("chunk",["string","Buffer","Uint8Array"],t));var n;return r;}(f,t)),c)I(e,c);else if(f.objectMode||t&&t.length>0){if("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e);}(t)),n)f.endEmitted?I(e,new k()):P(e,f,t,!0);else if(f.ended)I(e,new T());else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?P(e,f,t,!1):j(e,f)):P(e,f,t,!1);}}else n||(f.reading=!1,j(e,f));return!f.ended&&(f.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=F?e=F:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e;}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));}function N(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(D,e));}function D(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,G(e);}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(U,e,t));}function U(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume();}function H(e){d("readable nexttick read 0"),e.read(0);}function z(e,t){d("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),G(e),t.flowing&&!t.reading&&e.read(0);}function G(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function K(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r;}function V(e){var t=e._readableState;d("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(X,t,e));}function X(e,t){if(d("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy();}}function Q(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):N(this),null;if(0===(e=L(e,t))&&t.ended)return 0===t.length&&V(this),null;var n,o=t.needReadable;return d("need readable",o),(0===t.length||t.length-e0?K(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&V(this)),null!==n&&this.emit("data",n),n;},B.prototype._read=function(e){I(this,new x("_read()"));},B.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e);}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?h:M;function l(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",_),e.removeListener("finish",A),e.removeListener("drain",m),e.removeListener("error",w),e.removeListener("unpipe",l),r.removeListener("end",h),r.removeListener("end",M),r.removeListener("data",v),y=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||m());}function h(){d("onend"),e.end();}o.endEmitted?n.nextTick(f):r.once("end",f),e.on("unpipe",l);var m=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&c(e,"data")&&(t.flowing=!0,G(e));};}(r);e.on("drain",m);var y=!1;function v(t){d("ondata");var n=e.write(t);d("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==Q(o.pipes,e))&&!y&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause());}function w(t){d("onerror",t),M(),e.removeListener("error",w),0===c(e,"error")&&I(e,t);}function _(){e.removeListener("finish",A),M();}function A(){d("onfinish"),e.removeListener("close",_),M();}function M(){d("unpipe"),r.unpipe(e);}return r.on("data",v),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r);}(e,"error",w),e.once("close",_),e.once("finish",A),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),e;},B.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,d("on readable",o.length,o.reading),o.length?N(this):o.reading||n.nextTick(H,this))),r;},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(e,t){var r=f.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(J,this),r;},B.prototype.removeAllListeners=function(e){var t=f.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(J,this),t;},B.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(z,e,t));}(this,e)),e.paused=!1,this;},B.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this;},B.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e);}t.push(null);}),e.on("data",function(o){(d("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()));}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments);};}(i));for(var o=0;o-1))throw new k(e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer();}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark;}}),B.prototype._write=function(e,t,r){r(new A("_write()"));},B.prototype._writev=null,B.prototype.end=function(e,t,r){var o=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,r){t.ending=!0,D(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1;}(this,o,r),this;},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length;}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed;},set:function(e){this._writableState&&(this._writableState.destroyed=e);}}),B.prototype.destroy=y.destroy,B.prototype._undestroy=y.undestroy,B.prototype._destroy=function(e,t){t(e);};}).call(this,r(18),r(17));},function(e,t,r){"use strict";e.exports=m;var n=r(69).codes,o=n.ERR_METHOD_NOT_IMPLEMENTED,c=n.ERR_MULTIPLE_CALLBACK,f=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=n.ERR_TRANSFORM_WITH_LENGTH_0,h=r(70);function d(e,data){var t=this._transformState;t.transforming=!1;var r=t.writecb;if(null===r)return this.emit("error",new c());t.writechunk=null,t.writecb=null,null!=data&&this.push(data),r(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);}function v(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7);}function w(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3;}n(h,o),h.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this;},h.prototype._update=function(e){for(var t,r=this._w,a=0|this._a,b=0|this._b,n=0|this._c,o=0|this._d,c=0|this._e,l=0|this._f,g=0|this._g,h=0|this._h,i=0;i<16;++i)r[i]=e.readInt32BE(4*i);for(;i<64;++i)r[i]=0|(((t=r[i-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[i-7]+w(r[i-15])+r[i-16];for(var _=0;_<64;++_){var A=h+v(c)+d(c,l,g)+f[_]+r[_]|0,M=y(a)+m(a,b,n)|0;h=g,g=l,l=c,c=o+A|0,o=n,n=b,b=a,a=A+M|0;}this._a=a+this._a|0,this._b=b+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=l+this._f|0,this._g=g+this._g|0,this._h=h+this._h|0;},h.prototype._hash=function(){var e=c.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e;},e.exports=h;},function(e,t,r){var n=r(4),o=r(71),c=r(8).Buffer,f=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160);function h(){this.init(),this._w=l,o.call(this,128,112);}function d(e,t,r){return r^e&(t^r);}function m(e,t,r){return e&t|r&(e|t);}function y(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25);}function v(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23);}function w(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7;}function _(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25);}function A(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6;}function M(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26);}function E(a,b){return a>>>0>>0?1:0;}n(h,o),h.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this;},h.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,o=0|this._ch,c=0|this._dh,l=0|this._eh,h=0|this._fh,S=0|this._gh,T=0|this._hh,x=0|this._al,k=0|this._bl,I=0|this._cl,dl=0|this._dl,C=0|this._el,O=0|this._fl,B=0|this._gl,R=0|this._hl,i=0;i<32;i+=2)t[i]=e.readInt32BE(4*i),t[i+1]=e.readInt32BE(4*i+4);for(;i<160;i+=2){var P=t[i-30],F=t[i-30+1],L=w(P,F),N=_(F,P),D=A(P=t[i-4],F=t[i-4+1]),j=M(F,P),U=t[i-14],J=t[i-14+1],H=t[i-32],z=t[i-32+1],G=N+J|0,K=L+U+E(G,N)|0;K=(K=K+D+E(G=G+j|0,j)|0)+H+E(G=G+z|0,z)|0,t[i]=K,t[i+1]=G;}for(var V=0;V<160;V+=2){K=t[V],G=t[V+1];var X=m(r,n,o),Q=m(x,k,I),Z=y(r,x),W=y(x,r),Y=v(l,C),$=v(C,l),ee=f[V],te=f[V+1],re=d(l,h,S),ne=d(C,O,B),ie=R+$|0,oe=T+Y+E(ie,R)|0;oe=(oe=(oe=oe+re+E(ie=ie+ne|0,ne)|0)+ee+E(ie=ie+te|0,te)|0)+K+E(ie=ie+G|0,G)|0;var ae=W+Q|0,se=Z+X+E(ae,W)|0;T=S,R=B,S=h,B=O,h=l,O=C,l=c+oe+E(C=dl+ie|0,dl)|0,c=o,dl=I,o=n,I=k,n=r,k=x,r=oe+se+E(x=ie+ae|0,ie)|0;}this._al=this._al+x|0,this._bl=this._bl+k|0,this._cl=this._cl+I|0,this._dl=this._dl+dl|0,this._el=this._el+C|0,this._fl=this._fl+O|0,this._gl=this._gl+B|0,this._hl=this._hl+R|0,this._ah=this._ah+r+E(this._al,x)|0,this._bh=this._bh+n+E(this._bl,k)|0,this._ch=this._ch+o+E(this._cl,I)|0,this._dh=this._dh+c+E(this._dl,dl)|0,this._eh=this._eh+l+E(this._el,C)|0,this._fh=this._fh+h+E(this._fl,O)|0,this._gh=this._gh+S+E(this._gl,B)|0,this._hh=this._hh+T+E(this._hl,R)|0;},h.prototype._hash=function(){var e=c.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4);}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e;},e.exports=h;},function(e,t,r){e.exports=o;var n=r(49).EventEmitter;function o(){n.call(this);}r(4)(o,n),o.Readable=r(134),o.Writable=r(360),o.Duplex=r(361),o.Transform=r(362),o.PassThrough=r(363),o.Stream=o,o.prototype.pipe=function(e,t){var source=this;function r(t){e.writable&&!1===e.write(t)&&source.pause&&source.pause();}function o(){source.readable&&source.resume&&source.resume();}source.on("data",r),e.on("drain",o),e._isStdio||t&&!1===t.end||(source.on("end",f),source.on("close",l));var c=!1;function f(){c||(c=!0,e.end());}function l(){c||(c=!0,"function"==typeof e.destroy&&e.destroy());}function h(e){if(d(),0===n.listenerCount(this,"error"))throw e;}function d(){source.removeListener("data",r),e.removeListener("drain",o),source.removeListener("end",f),source.removeListener("close",l),source.removeListener("error",h),e.removeListener("error",h),source.removeListener("end",d),source.removeListener("close",d),e.removeListener("close",d);}return source.on("error",h),e.on("error",h),source.on("end",d),source.on("close",d),e.on("close",d),e.emit("pipe",source),e;};},function(e,t,r){"use strict";(function(t,n){var o=r(99);e.exports=T;var c,f=r(174);T.ReadableState=S;r(49).EventEmitter;var l=function(e,t){return e.listeners(t).length;},h=r(196),d=r(135).Buffer,m=t.Uint8Array||function(){};var y=Object.create(r(85));y.inherits=r(4);var v=r(356),w=void 0;w=v&&v.debuglog?v.debuglog("stream"):function(){};var _,A=r(357),M=r(197);y.inherits(T,h);var E=["error","close","destroy","pause","resume"];function S(e,t){e=e||{};var n=t instanceof(c=c||r(61));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,f=e.readableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(f||0===f)?f:l,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new A(),this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(_||(_=r(50).StringDecoder),this.decoder=new _(e.encoding),this.encoding=e.encoding);}function T(e){if(c=c||r(61),!(this instanceof T))return new T(e);this._readableState=new S(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),h.call(this);}function x(e,t,r,n,o){var c,f=e._readableState;null===t?(f.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length);}t.ended=!0,O(e);}(e,f)):(o||(c=function(e,t){var r;n=t,d.isBuffer(n)||n instanceof m||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r;}(f,t)),c?e.emit("error",c):f.objectMode||t&&t.length>0?("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=function(e){return d.from(e);}(t)),n?f.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):k(e,f,t,!0):f.ended?e.emit("error",new Error("stream.push() after EOF")):(f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?k(e,f,t,!1):R(e,f)):k(e,f,t,!1))):n||(f.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e;}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));}function O(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(w("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(B,e):B(e));}function B(e){w("emit readable"),e.emit("readable"),N(e);}function R(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(P,e,t));}function P(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;eo.length?o.length:e;if(c===o.length?n+=o:n+=o.slice(0,e),0===(e-=c)){c===o.length?(++r,p.next?t.head=p.next:t.head=t.tail=null):(t.head=p,p.data=o.slice(c));break;}++r;}return t.length-=r,n;}(e,t):function(e,t){var r=d.allocUnsafe(e),p=t.head,n=1;p.data.copy(r),e-=p.data.length;for(;p=p.next;){var o=p.data,c=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,c),0===(e-=c)){c===o.length?(++n,p.next?t.head=p.next:t.head=t.tail=null):(t.head=p,p.data=o.slice(c));break;}++n;}return t.length-=n,r;}(e,t);return n;}(e,t.buffer,t.decoder),r);var r;}function j(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(U,t,e));}function U(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"));}function J(e,t){for(var i=0,r=e.length;i=t.highWaterMark||t.ended))return w("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):O(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&j(this),null;var n,o=t.needReadable;return w("need readable",o),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==n&&this.emit("data",n),n;},T.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"));},T.prototype.pipe=function(e,t){var r=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=e;break;case 1:c.pipes=[c.pipes,e];break;default:c.pipes.push(e);}c.pipesCount+=1,w("pipe count=%d opts=%j",c.pipesCount,t);var h=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?m:T;function d(t,n){w("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,w("cleanup"),e.removeListener("close",E),e.removeListener("finish",S),e.removeListener("drain",y),e.removeListener("error",M),e.removeListener("unpipe",d),r.removeListener("end",m),r.removeListener("end",T),r.removeListener("data",A),v=!0,!c.awaitDrain||e._writableState&&!e._writableState.needDrain||y());}function m(){w("onend"),e.end();}c.endEmitted?o.nextTick(h):r.once("end",h),e.on("unpipe",d);var y=function(e){return function(){var t=e._readableState;w("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&l(e,"data")&&(t.flowing=!0,N(e));};}(r);e.on("drain",y);var v=!1;var _=!1;function A(t){w("ondata"),_=!1,!1!==e.write(t)||_||((1===c.pipesCount&&c.pipes===e||c.pipesCount>1&&-1!==J(c.pipes,e))&&!v&&(w("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,_=!0),r.pause());}function M(t){w("onerror",t),T(),e.removeListener("error",M),0===l(e,"error")&&e.emit("error",t);}function E(){e.removeListener("finish",S),T();}function S(){w("onfinish"),e.removeListener("close",E),T();}function T(){w("unpipe"),r.unpipe(e);}return r.on("data",A),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?f(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r);}(e,"error",M),e.once("close",E),e.once("finish",S),e.emit("pipe",r),c.flowing||(w("pipe resume"),r.resume()),e;},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;ir)?t=("rmd160"===e?new h():d(e)).update(t).digest():t.lengthr||t!=t)throw new TypeError("Bad key length");};},function(e,t,r){(function(t,r){var n;if(t.process&&t.process.browser)n="utf-8";else if(t.process&&t.process.version){n=parseInt(r.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";}else n="utf-8";e.exports=n;}).call(this,r(18),r(17));},function(e,t,r){var n=r(200),o=r(132),c=r(133),f=r(8).Buffer,l=r(203),h=r(204),d=r(206),m=f.alloc(128),y={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function v(e,t,r){var l=function(e){function t(data){return c(e).update(data).digest();}function r(data){return new o().update(data).digest();}return"rmd160"===e||"ripemd160"===e?r:"md5"===e?n:t;}(e),h="sha512"===e||"sha384"===e?128:64;t.length>h?t=l(t):t.length>>0;},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t;},t.ip=function(e,t,r,n){for(var o=0,c=0,i=6;i>=0;i-=2){for(var f=0;f<=24;f+=8)o<<=1,o|=t>>>f+i&1;for(f=0;f<=24;f+=8)o<<=1,o|=e>>>f+i&1;}for(i=6;i>=0;i-=2){for(f=1;f<=25;f+=8)c<<=1,c|=t>>>f+i&1;for(f=1;f<=25;f+=8)c<<=1,c|=e>>>f+i&1;}r[n+0]=o>>>0,r[n+1]=c>>>0;},t.rip=function(e,t,r,n){for(var o=0,c=0,i=0;i<4;i++)for(var f=24;f>=0;f-=8)o<<=1,o|=t>>>f+i&1,o<<=1,o|=e>>>f+i&1;for(i=4;i<8;i++)for(f=24;f>=0;f-=8)c<<=1,c|=t>>>f+i&1,c<<=1,c|=e>>>f+i&1;r[n+0]=o>>>0,r[n+1]=c>>>0;},t.pc1=function(e,t,r,n){for(var o=0,c=0,i=7;i>=5;i--){for(var f=0;f<=24;f+=8)o<<=1,o|=t>>f+i&1;for(f=0;f<=24;f+=8)o<<=1,o|=e>>f+i&1;}for(f=0;f<=24;f+=8)o<<=1,o|=t>>f+i&1;for(i=1;i<=3;i++){for(f=0;f<=24;f+=8)c<<=1,c|=t>>f+i&1;for(f=0;f<=24;f+=8)c<<=1,c|=e>>f+i&1;}for(f=0;f<=24;f+=8)c<<=1,c|=e>>f+i&1;r[n+0]=o>>>0,r[n+1]=c>>>0;},t.r28shl=function(e,t){return e<>>28-t;};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,r,o){for(var c=0,f=0,l=n.length>>>1,i=0;i>>n[i]&1;for(i=l;i>>n[i]&1;r[o+0]=c>>>0,r[o+1]=f>>>0;},t.expand=function(e,t,r){var n=0,o=0;n=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)n<<=6,n|=e>>>i&63;for(i=11;i>=3;i-=4)o|=e>>>i&63,o<<=6;o|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=o>>>0;};var o=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++){r<<=4,r|=o[64*i+(e>>>18-6*i&63)];}for(i=0;i<4;i++){r<<=4,r|=o[256+64*i+(t>>>18-6*i&63)];}return r>>>0;};var c=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,i=0;i>>c[i]&1;return t>>>0;},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length>>1];r=c.r28shl(r,f),o=c.r28shl(o,f),c.pc2(r,o,e.keys,i);}},h.prototype._update=function(e,t,r,n){var o=this._desState,f=c.readUInt32BE(e,t),l=c.readUInt32BE(e,t+4);c.ip(f,l,o.tmp,0),f=o.tmp[0],l=o.tmp[1],"encrypt"===this.type?this._encrypt(o,f,l,o.tmp,0):this._decrypt(o,f,l,o.tmp,0),f=o.tmp[0],l=o.tmp[1],c.writeUInt32BE(r,f,n),c.writeUInt32BE(r,l,n+4);},h.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i>>0,f=m;}c.rip(l,f,n,o);},h.prototype._decrypt=function(e,t,r,n,o){for(var f=r,l=t,i=e.keys.length-2;i>=0;i-=2){var h=e.keys[i],d=e.keys[i+1];c.expand(f,e.tmp,0),h^=e.tmp[0],d^=e.tmp[1];var s=c.substitute(h,d),m=f;f=(l^c.permute(s))>>>0,l=m;}c.rip(f,l,n,o);};},function(e,t,r){var n=r(86),o=r(8).Buffer,c=r(210);function f(e){var t=e._cipher.encryptBlockRaw(e._prev);return c(e._prev),t;}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),c=e._cache.length;e._cache=o.concat([e._cache,o.allocUnsafe(16*r)]);for(var i=0;ie;)r.ishrn(1);if(r.isEven()&&r.iadd(l),r.testn(1)||r.iadd(h),t.cmp(h)){if(!t.cmp(d))for(;r.mod(m).cmp(y);)r.iadd(w);}else for(;r.mod(c).cmp(v);)r.iadd(w);if(M(_=r.shrn(1))&&M(r)&&E(_)&&E(r)&&f.test(_)&&f.test(r))return r;}}},function(e,t,r){var n=r(3),o=r(140);function c(e){this.rand=e||new o.Rand();}e.exports=c,c.create=function(e){return new c(e);},c.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var a=new n(this.rand.generate(r));}while(a.cmp(e)>=0);return a;},c.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r));},c.prototype.test=function(e,t,r){var o=e.bitLength(),c=n.mont(e),f=new n(1).toRed(c);t||(t=Math.max(1,o/48|0));for(var l=e.subn(1),s=0;!l.testn(s);s++);for(var h=e.shrn(s),d=l.toRed(c);t>0;t--){var a=this._randrange(new n(2),l);r&&r(a);var m=a.toRed(c).redPow(h);if(0!==m.cmp(f)&&0!==m.cmp(d)){for(var i=1;i0;t--){var a=this._randrange(new n(2),f),g=e.gcd(a);if(0!==g.cmpn(1))return g;var d=a.toRed(o).redPow(l);if(0!==d.cmp(c)&&0!==d.cmp(h)){for(var i=1;i0){if("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e);}(t)),n)f.endEmitted?I(e,new k()):P(e,f,t,!0);else if(f.ended)I(e,new T());else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?P(e,f,t,!1):j(e,f)):P(e,f,t,!1);}}else n||(f.reading=!1,j(e,f));return!f.ended&&(f.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=F?e=F:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e;}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));}function N(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(D,e));}function D(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,G(e);}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(U,e,t));}function U(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume();}function H(e){d("readable nexttick read 0"),e.read(0);}function z(e,t){d("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),G(e),t.flowing&&!t.reading&&e.read(0);}function G(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function K(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r;}function V(e){var t=e._readableState;d("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(X,t,e));}function X(e,t){if(d("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy();}}function Q(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):N(this),null;if(0===(e=L(e,t))&&t.ended)return 0===t.length&&V(this),null;var n,o=t.needReadable;return d("need readable",o),(0===t.length||t.length-e0?K(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&V(this)),null!==n&&this.emit("data",n),n;},B.prototype._read=function(e){I(this,new x("_read()"));},B.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e);}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?h:M;function l(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",_),e.removeListener("finish",A),e.removeListener("drain",m),e.removeListener("error",w),e.removeListener("unpipe",l),r.removeListener("end",h),r.removeListener("end",M),r.removeListener("data",v),y=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||m());}function h(){d("onend"),e.end();}o.endEmitted?n.nextTick(f):r.once("end",f),e.on("unpipe",l);var m=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&c(e,"data")&&(t.flowing=!0,G(e));};}(r);e.on("drain",m);var y=!1;function v(t){d("ondata");var n=e.write(t);d("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==Q(o.pipes,e))&&!y&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause());}function w(t){d("onerror",t),M(),e.removeListener("error",w),0===c(e,"error")&&I(e,t);}function _(){e.removeListener("finish",A),M();}function A(){d("onfinish"),e.removeListener("close",_),M();}function M(){d("unpipe"),r.unpipe(e);}return r.on("data",v),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r);}(e,"error",w),e.once("close",_),e.once("finish",A),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),e;},B.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,d("on readable",o.length,o.reading),o.length?N(this):o.reading||n.nextTick(H,this))),r;},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(e,t){var r=f.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(J,this),r;},B.prototype.removeAllListeners=function(e){var t=f.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(J,this),t;},B.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(z,e,t));}(this,e)),e.paused=!1,this;},B.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this;},B.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e);}t.push(null);}),e.on("data",function(o){(d("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()));}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments);};}(i));for(var o=0;o-1))throw new k(e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer();}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark;}}),B.prototype._write=function(e,t,r){r(new A("_write()"));},B.prototype._writev=null,B.prototype.end=function(e,t,r){var o=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,r){t.ending=!0,D(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1;}(this,o,r),this;},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length;}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed;},set:function(e){this._writableState&&(this._writableState.destroyed=e);}}),B.prototype.destroy=y.destroy,B.prototype._undestroy=y.undestroy,B.prototype._destroy=function(e,t){t(e);};}).call(this,r(18),r(17));},function(e,t,r){"use strict";e.exports=m;var n=r(72).codes,o=n.ERR_METHOD_NOT_IMPLEMENTED,c=n.ERR_MULTIPLE_CALLBACK,f=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=n.ERR_TRANSFORM_WITH_LENGTH_0,h=r(73);function d(e,data){var t=this._transformState;t.transforming=!1;var r=t.writecb;if(null===r)return this.emit("error",new c());t.writechunk=null,t.writecb=null,null!=data&&this.push(data),r(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length>8,c=255&n;o?r.push(o,c):r.push(c);}return r;},n.zero2=o,n.toHex=c,n.encode=function(e,t){return"hex"===t?c(e):e;};},function(e,t,r){"use strict";var n=t;n.base=r(102),n.short=r(399),n.mont=r(400),n.edwards=r(401);},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed");}function o(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r(),e.prototype.constructor=e;}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"));}var f;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{f="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(410).Buffer;}catch(e){}function l(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e);}function h(e,t,r){var n=l(e,r);return r-1>=t&&(n|=l(e,r-1)<<4),n;}function d(e,t,r,o){for(var c=0,b=0,f=Math.min(e.length,r),i=t;i=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&b0?e:t;},c.min=function(e,t){return e.cmp(t)<0?e:t;},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),n(base===(0|base)&&base>=2&&base<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[r]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);else if("le"===t)for(i=0,r=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);return this._strip();},c.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)n=h(e,t,i)<=18?(o-=18,c+=1,this.words[c]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,c+=1,this.words[c]|=n>>>26):o+=8;this._strip();},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=base)r++;r--,n=n/base|0;for(var o=e.length-t,c=o%r,f=Math.min(o,o-c)+t,l=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign();},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this;},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=y;}catch(e){c.prototype.inspect=y;}else c.prototype.inspect=y;function y(){return(this.red?"";}var v=["","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"],w=[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],_=[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];c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var r=0,o=0,i=0;i>>24-r&16777215)||i!==this.length-1?v[6-f.length]+f+t:f+t,(r+=2)>=26&&(r-=26,i--);}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}if(base===(0|base)&&base>=2&&base<=36){var l=w[base],h=_[base];t="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(h).toString(base);t=(d=d.idivn(h)).isZero()?m+t:v[l-m.length]+m+t;}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}n(!1,"Base should be between 2 and 36");},c.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e;},c.prototype.toJSON=function(){return this.toString(16,2);},f&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(f,e,t);}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);};function A(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,f=o/67108864|0;r.words[0]=c;for(var l=1;l>>26,d=67108863&f,m=Math.min(l,t.length-1),y=Math.max(0,l-e.length+1);y<=m;y++){var i=l-y|0;h+=(o=(a=0|e.words[i])*(b=0|t.words[y])+d)/67108864|0,d=67108863&o;}r.words[l]=0|d,f=0|h;}return 0!==f?r.words[l]=0|f:r.length--,r._strip();}c.prototype.toArrayLike=function(e,t,r){this._strip();var o=this.byteLength(),c=r||Math.max(1,o);n(o<=c,"byte array longer than desired length"),n(c>0,"Requested array length <= 0");var f=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t);}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](f,o),f;},c.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=c>>>24,o+=2);}if(r=0&&(e[r--]=c>>8&255),r>=0&&(e[r--]=c>>16&255),6===o?(r>=0&&(e[r--]=c>>24&255),n=0,o=0):(n=c>>>24,o+=2);}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0;},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e);}:c.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t;},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r;},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t;},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this);},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this);},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this);},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this);},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this);},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this);},c.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip();},c.prototype.notn=function(e){return this.clone().inotn(e);},c.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this);},c.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 a,b,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==n&&i>26,this.words[i]=67108863&t;if(0===n&&i>>13,y=0|a[1],v=8191&y,w=y>>>13,_=0|a[2],A=8191&_,M=_>>>13,E=0|a[3],S=8191&E,T=E>>>13,x=0|a[4],k=8191&x,I=x>>>13,C=0|a[5],O=8191&C,B=C>>>13,R=0|a[6],P=8191&R,F=R>>>13,L=0|a[7],N=8191&L,D=L>>>13,j=0|a[8],U=8191&j,J=j>>>13,H=0|a[9],z=8191&H,G=H>>>13,K=0|b[0],V=8191&K,X=K>>>13,Q=0|b[1],Z=8191&Q,W=Q>>>13,Y=0|b[2],$=8191&Y,ee=Y>>>13,te=0|b[3],re=8191&te,ne=te>>>13,ie=0|b[4],oe=8191&ie,ae=ie>>>13,se=0|b[5],ue=8191&se,ce=se>>>13,fe=0|b[6],le=8191&fe,he=fe>>>13,de=0|b[7],pe=8191&de,be=de>>>13,me=0|b[8],ge=8191&me,ye=me>>>13,ve=0|b[9],we=8191&ve,_e=ve>>>13;r.negative=e.negative^t.negative,r.length=19;var Ae=(l+(n=Math.imul(d,V))|0)+((8191&(o=(o=Math.imul(d,X))+Math.imul(m,V)|0))<<13)|0;l=((c=Math.imul(m,X))+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(v,V),o=(o=Math.imul(v,X))+Math.imul(w,V)|0,c=Math.imul(w,X);var Me=(l+(n=n+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,W)|0)+Math.imul(m,Z)|0))<<13)|0;l=((c=c+Math.imul(m,W)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(A,V),o=(o=Math.imul(A,X))+Math.imul(M,V)|0,c=Math.imul(M,X),n=n+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,W)|0)+Math.imul(w,Z)|0,c=c+Math.imul(w,W)|0;var Ee=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(m,$)|0))<<13)|0;l=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(S,V),o=(o=Math.imul(S,X))+Math.imul(T,V)|0,c=Math.imul(T,X),n=n+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,W)|0)+Math.imul(M,Z)|0,c=c+Math.imul(M,W)|0,n=n+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0;var Se=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(m,re)|0))<<13)|0;l=((c=c+Math.imul(m,ne)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(k,V),o=(o=Math.imul(k,X))+Math.imul(I,V)|0,c=Math.imul(I,X),n=n+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(T,Z)|0,c=c+Math.imul(T,W)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(M,$)|0,c=c+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,o=(o=o+Math.imul(v,ne)|0)+Math.imul(w,re)|0,c=c+Math.imul(w,ne)|0;var Te=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(m,oe)|0))<<13)|0;l=((c=c+Math.imul(m,ae)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,V),o=(o=Math.imul(O,X))+Math.imul(B,V)|0,c=Math.imul(B,X),n=n+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,W)|0)+Math.imul(I,Z)|0,c=c+Math.imul(I,W)|0,n=n+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(T,$)|0,c=c+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(M,re)|0,c=c+Math.imul(M,ne)|0,n=n+Math.imul(v,oe)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,c=c+Math.imul(w,ae)|0;var xe=(l+(n=n+Math.imul(d,ue)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(m,ue)|0))<<13)|0;l=((c=c+Math.imul(m,ce)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(P,V),o=(o=Math.imul(P,X))+Math.imul(F,V)|0,c=Math.imul(F,X),n=n+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,W)|0)+Math.imul(B,Z)|0,c=c+Math.imul(B,W)|0,n=n+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(I,$)|0,c=c+Math.imul(I,ee)|0,n=n+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ne)|0)+Math.imul(T,re)|0,c=c+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,o=(o=o+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,c=c+Math.imul(M,ae)|0,n=n+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,c=c+Math.imul(w,ce)|0;var ke=(l+(n=n+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,he)|0)+Math.imul(m,le)|0))<<13)|0;l=((c=c+Math.imul(m,he)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,V),o=(o=Math.imul(N,X))+Math.imul(D,V)|0,c=Math.imul(D,X),n=n+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,W)|0)+Math.imul(F,Z)|0,c=c+Math.imul(F,W)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(B,$)|0,c=c+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,o=(o=o+Math.imul(k,ne)|0)+Math.imul(I,re)|0,c=c+Math.imul(I,ne)|0,n=n+Math.imul(S,oe)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(T,oe)|0,c=c+Math.imul(T,ae)|0,n=n+Math.imul(A,ue)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(M,ue)|0,c=c+Math.imul(M,ce)|0,n=n+Math.imul(v,le)|0,o=(o=o+Math.imul(v,he)|0)+Math.imul(w,le)|0,c=c+Math.imul(w,he)|0;var Ie=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,be)|0)+Math.imul(m,pe)|0))<<13)|0;l=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,V),o=(o=Math.imul(U,X))+Math.imul(J,V)|0,c=Math.imul(J,X),n=n+Math.imul(N,Z)|0,o=(o=o+Math.imul(N,W)|0)+Math.imul(D,Z)|0,c=c+Math.imul(D,W)|0,n=n+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(F,$)|0,c=c+Math.imul(F,ee)|0,n=n+Math.imul(O,re)|0,o=(o=o+Math.imul(O,ne)|0)+Math.imul(B,re)|0,c=c+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(I,oe)|0,c=c+Math.imul(I,ae)|0,n=n+Math.imul(S,ue)|0,o=(o=o+Math.imul(S,ce)|0)+Math.imul(T,ue)|0,c=c+Math.imul(T,ce)|0,n=n+Math.imul(A,le)|0,o=(o=o+Math.imul(A,he)|0)+Math.imul(M,le)|0,c=c+Math.imul(M,he)|0,n=n+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,be)|0)+Math.imul(w,pe)|0,c=c+Math.imul(w,be)|0;var Ce=(l+(n=n+Math.imul(d,ge)|0)|0)+((8191&(o=(o=o+Math.imul(d,ye)|0)+Math.imul(m,ge)|0))<<13)|0;l=((c=c+Math.imul(m,ye)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(z,V),o=(o=Math.imul(z,X))+Math.imul(G,V)|0,c=Math.imul(G,X),n=n+Math.imul(U,Z)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(J,Z)|0,c=c+Math.imul(J,W)|0,n=n+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,o=(o=o+Math.imul(P,ne)|0)+Math.imul(F,re)|0,c=c+Math.imul(F,ne)|0,n=n+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(B,oe)|0,c=c+Math.imul(B,ae)|0,n=n+Math.imul(k,ue)|0,o=(o=o+Math.imul(k,ce)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,ce)|0,n=n+Math.imul(S,le)|0,o=(o=o+Math.imul(S,he)|0)+Math.imul(T,le)|0,c=c+Math.imul(T,he)|0,n=n+Math.imul(A,pe)|0,o=(o=o+Math.imul(A,be)|0)+Math.imul(M,pe)|0,c=c+Math.imul(M,be)|0,n=n+Math.imul(v,ge)|0,o=(o=o+Math.imul(v,ye)|0)+Math.imul(w,ge)|0,c=c+Math.imul(w,ye)|0;var Oe=(l+(n=n+Math.imul(d,we)|0)|0)+((8191&(o=(o=o+Math.imul(d,_e)|0)+Math.imul(m,we)|0))<<13)|0;l=((c=c+Math.imul(m,_e)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(z,Z),o=(o=Math.imul(z,W))+Math.imul(G,Z)|0,c=Math.imul(G,W),n=n+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(J,$)|0,c=c+Math.imul(J,ee)|0,n=n+Math.imul(N,re)|0,o=(o=o+Math.imul(N,ne)|0)+Math.imul(D,re)|0,c=c+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(F,oe)|0,c=c+Math.imul(F,ae)|0,n=n+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,ce)|0)+Math.imul(B,ue)|0,c=c+Math.imul(B,ce)|0,n=n+Math.imul(k,le)|0,o=(o=o+Math.imul(k,he)|0)+Math.imul(I,le)|0,c=c+Math.imul(I,he)|0,n=n+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,be)|0)+Math.imul(T,pe)|0,c=c+Math.imul(T,be)|0,n=n+Math.imul(A,ge)|0,o=(o=o+Math.imul(A,ye)|0)+Math.imul(M,ge)|0,c=c+Math.imul(M,ye)|0;var Be=(l+(n=n+Math.imul(v,we)|0)|0)+((8191&(o=(o=o+Math.imul(v,_e)|0)+Math.imul(w,we)|0))<<13)|0;l=((c=c+Math.imul(w,_e)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),n=n+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ne)|0)+Math.imul(J,re)|0,c=c+Math.imul(J,ne)|0,n=n+Math.imul(N,oe)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,c=c+Math.imul(D,ae)|0,n=n+Math.imul(P,ue)|0,o=(o=o+Math.imul(P,ce)|0)+Math.imul(F,ue)|0,c=c+Math.imul(F,ce)|0,n=n+Math.imul(O,le)|0,o=(o=o+Math.imul(O,he)|0)+Math.imul(B,le)|0,c=c+Math.imul(B,he)|0,n=n+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,be)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,be)|0,n=n+Math.imul(S,ge)|0,o=(o=o+Math.imul(S,ye)|0)+Math.imul(T,ge)|0,c=c+Math.imul(T,ye)|0;var Re=(l+(n=n+Math.imul(A,we)|0)|0)+((8191&(o=(o=o+Math.imul(A,_e)|0)+Math.imul(M,we)|0))<<13)|0;l=((c=c+Math.imul(M,_e)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(z,re),o=(o=Math.imul(z,ne))+Math.imul(G,re)|0,c=Math.imul(G,ne),n=n+Math.imul(U,oe)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(J,oe)|0,c=c+Math.imul(J,ae)|0,n=n+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,ce)|0)+Math.imul(D,ue)|0,c=c+Math.imul(D,ce)|0,n=n+Math.imul(P,le)|0,o=(o=o+Math.imul(P,he)|0)+Math.imul(F,le)|0,c=c+Math.imul(F,he)|0,n=n+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(B,pe)|0,c=c+Math.imul(B,be)|0,n=n+Math.imul(k,ge)|0,o=(o=o+Math.imul(k,ye)|0)+Math.imul(I,ge)|0,c=c+Math.imul(I,ye)|0;var Pe=(l+(n=n+Math.imul(S,we)|0)|0)+((8191&(o=(o=o+Math.imul(S,_e)|0)+Math.imul(T,we)|0))<<13)|0;l=((c=c+Math.imul(T,_e)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,oe),o=(o=Math.imul(z,ae))+Math.imul(G,oe)|0,c=Math.imul(G,ae),n=n+Math.imul(U,ue)|0,o=(o=o+Math.imul(U,ce)|0)+Math.imul(J,ue)|0,c=c+Math.imul(J,ce)|0,n=n+Math.imul(N,le)|0,o=(o=o+Math.imul(N,he)|0)+Math.imul(D,le)|0,c=c+Math.imul(D,he)|0,n=n+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,be)|0)+Math.imul(F,pe)|0,c=c+Math.imul(F,be)|0,n=n+Math.imul(O,ge)|0,o=(o=o+Math.imul(O,ye)|0)+Math.imul(B,ge)|0,c=c+Math.imul(B,ye)|0;var Fe=(l+(n=n+Math.imul(k,we)|0)|0)+((8191&(o=(o=o+Math.imul(k,_e)|0)+Math.imul(I,we)|0))<<13)|0;l=((c=c+Math.imul(I,_e)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(z,ue),o=(o=Math.imul(z,ce))+Math.imul(G,ue)|0,c=Math.imul(G,ce),n=n+Math.imul(U,le)|0,o=(o=o+Math.imul(U,he)|0)+Math.imul(J,le)|0,c=c+Math.imul(J,he)|0,n=n+Math.imul(N,pe)|0,o=(o=o+Math.imul(N,be)|0)+Math.imul(D,pe)|0,c=c+Math.imul(D,be)|0,n=n+Math.imul(P,ge)|0,o=(o=o+Math.imul(P,ye)|0)+Math.imul(F,ge)|0,c=c+Math.imul(F,ye)|0;var Le=(l+(n=n+Math.imul(O,we)|0)|0)+((8191&(o=(o=o+Math.imul(O,_e)|0)+Math.imul(B,we)|0))<<13)|0;l=((c=c+Math.imul(B,_e)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(z,le),o=(o=Math.imul(z,he))+Math.imul(G,le)|0,c=Math.imul(G,he),n=n+Math.imul(U,pe)|0,o=(o=o+Math.imul(U,be)|0)+Math.imul(J,pe)|0,c=c+Math.imul(J,be)|0,n=n+Math.imul(N,ge)|0,o=(o=o+Math.imul(N,ye)|0)+Math.imul(D,ge)|0,c=c+Math.imul(D,ye)|0;var Ne=(l+(n=n+Math.imul(P,we)|0)|0)+((8191&(o=(o=o+Math.imul(P,_e)|0)+Math.imul(F,we)|0))<<13)|0;l=((c=c+Math.imul(F,_e)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(z,pe),o=(o=Math.imul(z,be))+Math.imul(G,pe)|0,c=Math.imul(G,be),n=n+Math.imul(U,ge)|0,o=(o=o+Math.imul(U,ye)|0)+Math.imul(J,ge)|0,c=c+Math.imul(J,ye)|0;var De=(l+(n=n+Math.imul(N,we)|0)|0)+((8191&(o=(o=o+Math.imul(N,_e)|0)+Math.imul(D,we)|0))<<13)|0;l=((c=c+Math.imul(D,_e)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(z,ge),o=(o=Math.imul(z,ye))+Math.imul(G,ge)|0,c=Math.imul(G,ye);var je=(l+(n=n+Math.imul(U,we)|0)|0)+((8191&(o=(o=o+Math.imul(U,_e)|0)+Math.imul(J,we)|0))<<13)|0;l=((c=c+Math.imul(J,_e)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863;var Ue=(l+(n=Math.imul(z,we))|0)+((8191&(o=(o=Math.imul(z,_e))+Math.imul(G,we)|0))<<13)|0;return l=((c=Math.imul(G,_e))+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,f[0]=Ae,f[1]=Me,f[2]=Ee,f[3]=Se,f[4]=Te,f[5]=xe,f[6]=ke,f[7]=Ie,f[8]=Ce,f[9]=Oe,f[10]=Be,f[11]=Re,f[12]=Pe,f[13]=Fe,f[14]=Le,f[15]=Ne,f[16]=De,f[17]=je,f[18]=Ue,0!==l&&(f[19]=l,r.length++),r;};function E(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,c=0;c>>26)|0)>>>26,f&=67108863;}r.words[c]=l,n=f,f=o;}return 0!==n?r.words[c]=n:r.length--,r._strip();}function S(e,t,r){return E(e,t,r);}function T(e,t){this.x=e,this.y=t;}Math.imul||(M=A),c.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?M(this,e,t):r<63?A(this,e,t):r<1024?E(this,e,t):S(this,e,t);},T.prototype.makeRBT=function(e){for(var t=new Array(e),r=c.prototype._countBits(e)-1,i=0;i>=1;return n;},T.prototype.permute=function(e,t,r,n,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,r[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,r+=o/67108864|0,r+=c>>>26,this.words[i]=67108863&c;}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this;},c.prototype.muln=function(e){return this.clone().imuln(e);},c.prototype.sqr=function(){return this.mul(this);},c.prototype.isqr=function(){return this.imul(this.clone());},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>o&1;}return t;}(e);if(0===t.length)return new c(1);for(var r=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,r=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t;}o&&(this.words[i]=o,this.length++);}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==l||i>=o);i--){var h=0|this.words[i];this.words[i]=l<<26-c|h>>>c,l=h&mask;}return f&&0!==l&&(f.words[f.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip();},c.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r);},c.prototype.shln=function(e){return this.clone().ishln(e);},c.prototype.ushln=function(e){return this.clone().iushln(e);},c.prototype.shrn=function(e){return this.clone().ishrn(e);},c.prototype.ushrn=function(e){return this.clone().iushrn(e);},c.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this;},c.prototype.isubn=function(e){if(n("number"==typeof e),n(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 i=0;i>26)-(l/67108864|0),this.words[i+r]=67108863&o;}for(;i>26,this.words[i+r]=67108863&o;if(0===f)return this._strip();for(n(-1===f),f=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip();},c.prototype._wordDiv=function(e,t){var r=(this.length,e.length),a=this.clone(),b=e,n=0|b.words[b.length-1];0!==(r=26-this._countBits(n))&&(b=b.ushln(r),a.iushln(r),n=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;l--){var h=67108864*(0|a.words[b.length+l])+(0|a.words[b.length+l-1]);for(h=Math.min(h/n|0,67108863),a._ishlnsubmul(b,h,l);0!==a.negative;)h--,a.negative=0,a._ishlnsubmul(b,1,l),a.isZero()||(a.negative^=1);q&&(q.words[l]=h);}return q&&q._strip(),a._strip(),"div"!==t&&0!==r&&a.iushrn(r),{div:q||null,mod:a};},c.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(f=this.neg().divmod(e,t),"mod"!==t&&(div=f.div.neg()),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(f=this.divmod(e.neg(),t),"mod"!==t&&(div=f.div.neg()),{div:div,mod:f.mod}):0!=(this.negative&e.negative)?(f=this.neg().divmod(e.neg(),t),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:f.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var div,o,f;},c.prototype.div=function(e){return this.divmod(e,"div",!1).div;},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod;},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod;},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),c=r.cmp(n);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1);},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var p=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(p*r+(0|this.words[i]))%e;return t?-r:r;},c.prototype.modn=function(e){return this.modrn(e);},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e;}return this._strip(),t?this.ineg():this;},c.prototype.divn=function(e){return this.clone().idivn(e);},c.prototype.egcd=function(p){n(0===p.negative),n(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var r=new c(1),o=new c(0),f=new c(0),l=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var h=t.clone(),d=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-->0;)(r.isOdd()||o.isOdd())&&(r.iadd(h),o.isub(d)),r.iushrn(1),o.iushrn(1);for(var y=0,v=1;0==(t.words[0]&v)&&y<26;++y,v<<=1);if(y>0)for(t.iushrn(y);y-->0;)(f.isOdd()||l.isOdd())&&(f.iadd(h),l.isub(d)),f.iushrn(1),l.iushrn(1);e.cmp(t)>=0?(e.isub(t),r.isub(f),o.isub(l)):(t.isub(e),f.isub(r),l.isub(o));}return{a:f,b:l,gcd:t.iushln(g)};},c.prototype._invmp=function(p){n(0===p.negative),n(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),r=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,f=1;0==(a.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(a.iushrn(i);i-->0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var l=0,h=1;0==(b.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(b.iushrn(l);l-->0;)r.isOdd()&&r.iadd(o),r.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(r)):(b.isub(a),r.isub(t));}return(e=0===a.cmpn(1)?t:r).cmpn(0)<0&&e.iadd(p),e;},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var n=a;a=b,b=n;}else if(0===r||0===b.cmpn(1))break;a.isub(b);}return b.iushln(t);},c.prototype.invm=function(e){return this.egcd(e).a.umod(e);},c.prototype.isEven=function(){return 0==(1&this.words[0]);},c.prototype.isOdd=function(){return 1==(1&this.words[0]);},c.prototype.andln=function(e){return this.words[0]&e;},c.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o;}return 0!==r&&(this.words[i]=r,this.length++),this;},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},c.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break;}}return t;},c.prototype.gtn=function(e){return 1===this.cmpn(e);},c.prototype.gt=function(e){return 1===this.cmp(e);},c.prototype.gten=function(e){return this.cmpn(e)>=0;},c.prototype.gte=function(e){return this.cmp(e)>=0;},c.prototype.ltn=function(e){return-1===this.cmpn(e);},c.prototype.lt=function(e){return-1===this.cmp(e);},c.prototype.lten=function(e){return this.cmpn(e)<=0;},c.prototype.lte=function(e){return this.cmp(e)<=0;},c.prototype.eqn=function(e){return 0===this.cmpn(e);},c.prototype.eq=function(e){return 0===this.cmp(e);},c.red=function(e){return new R(e);},c.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this);},c.prototype._forceRed=function(e){return this.red=e,this;},c.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e);},c.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},c.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},c.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},c.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},c.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},c.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},c.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},c.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var x={k256:null,p224:null,p192:null,p25519:null};function k(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function I(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function C(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function O(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function B(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function R(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t;}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function P(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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);}k.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e;},k.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r;},k.prototype.split=function(input,e){input.iushrn(this.n,0,e);},k.prototype.imulK=function(e){return e.imul(this.k);},o(I,k),I.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=r;}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9;},I.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;},c._prime=function(e){if(x[e])return x[e];var t;if("k256"===e)t=new I();else if("p224"===e)t=new C();else if("p192"===e)t=new O();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new B();}return x[e]=t,t;},R.prototype._verify1=function(a){n(0===a.negative,"red works only with positives"),n(a.red,"red works only with red numbers");},R.prototype._verify2=function(a,b){n(0==(a.negative|b.negative),"red works only with positives"),n(a.red&&a.red===b.red,"red works only with red numbers");},R.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(m(a,a.umod(this.m)._forceRed(this)),a);},R.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this);},R.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this);},R.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e;},R.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this);},R.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e;},R.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e));},R.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b));},R.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b));},R.prototype.isqr=function(a){return this.imul(a,a.clone());},R.prototype.sqr=function(a){return this.mul(a,a);},R.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t);}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);n(!q.isZero());var r=new c(1).toRed(this),o=r.redNeg(),f=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new c(2*l*l).toRed(this);0!==this.pow(l,f).cmp(o);)l.redIAdd(o);for(var h=this.pow(l,q),d=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),y=s;0!==m.cmp(r);){for(var v=m,i=0;0!==v.cmp(r);i++)v=v.redSqr();n(i=0;i--){for(var l=e.words[i],h=f-1;h>=0;h--){var d=l>>h&1;r!==t[0]&&(r=this.sqr(r)),0!==d||0!==n?(n<<=1,n|=d,(4===++o||0===i&&0===h)&&(r=this.mul(r,t[n]),o=0,n=0)):o=0;}f=26;}return r;},R.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},R.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},c.mont=function(e){return new P(e);},o(P,R),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},P.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},P.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},P.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this);};}(e,this);}).call(this,r(59)(e));},function(e,t,r){"use strict";const n=t;n.bignum=r(3),n.define=r(412).define,n.base=r(415),n.constants=r(416),n.decoders=r(228),n.encoders=r(226);},function(e,t,r){"use strict";const n=t;n.der=r(227),n.pem=r(413);},function(e,t,r){"use strict";const n=r(4),o=r(144).Buffer,c=r(145),f=r(147);function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new h(),this.tree._init(e.body);}function h(e){c.call(this,"der",e);}function d(e){return e<10?"0"+e:e;}e.exports=l,l.prototype.encode=function(data,e){return this.tree._encode(data,e).join();},n(h,c),h.prototype._encodeComposite=function(e,t,r,content){const n=function(e,t,r,n){let o;"seqof"===e?e="seq":"setof"===e&&(e="set");if(f.tagByName.hasOwnProperty(e))o=f.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);o=e;}if(o>=31)return n.error("Multi-octet tag encoding unsupported");t||(o|=32);return o|=f.tagClassByName[r||"universal"]<<6,o;}(e,t,r,this.reporter);if(content.length<128){const header=o.alloc(2);return header[0]=n,header[1]=content.length,this._createEncoderBuffer([header,content]);}let c=1;for(let i=content.length;i>=256;i>>=8)c++;const header=o.alloc(2+c);header[0]=n,header[1]=128|c;for(let i=1+c,e=content.length;e>0;i--,e>>=8)header[i]=255&e;return this._createEncoderBuffer([header,content]);},h.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=o.alloc(2*e.length);for(let i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1]);}let n=0;for(let i=0;i=128;t>>=7)n++;}const c=o.alloc(n);let f=c.length-1;for(let i=e.length-1;i>=0;i--){let t=e[i];for(c[f--]=127&t;(t>>=7)>0;)c[f--]=128|127&t;}return this._createEncoderBuffer(c);},h.prototype._encodeTime=function(time,e){let t;const r=new Date(time);return"gentime"===e?t=[d(r.getUTCFullYear()),d(r.getUTCMonth()+1),d(r.getUTCDate()),d(r.getUTCHours()),d(r.getUTCMinutes()),d(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?t=[d(r.getUTCFullYear()%100),d(r.getUTCMonth()+1),d(r.getUTCDate()),d(r.getUTCHours()),d(r.getUTCMinutes()),d(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(t,"octstr");},h.prototype._encodeNull=function(){return this._createEncoderBuffer("");},h.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e];}if("number"!=typeof e&&!o.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=o.from(t);}if(o.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=o.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r);}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let i=e;i>=256;i>>=8)r++;const n=new Array(r);for(let i=n.length-1;i>=0;i--)n[i]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(o.from(n));},h.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0);},h.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree;},h.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const data=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),data.length!==n.defaultBuffer.length)return!1;for(i=0;i>6],o=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n;}}else r&=31;return{cls:n,primitive:o,tag:r,tagStr:l.tag[r]};}function y(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const o=127&n;if(o>4)return e.error("length octect is too long");n=0;for(let i=0;i=0;i--)if(r.eq(e[t[i]][2],r.zero))n[i]=n[i+1],e[t[i]]=this.zero;else{const o=r.mul(n[i],n[i+1]);n[i]=r.mul(e[t[i]][2],n[i+1]);const c=r.square(o),f=r.mul(c,o);e[t[i]][0]=r.mul(e[t[i]][0],c),e[t[i]][1]=r.mul(e[t[i]][1],f),e[t[i]][2]=r.one;}}eq(e,t){const r=this.F;if(this.F.eq(e[2],this.F.zero))return this.F.eq(t[2],this.F.zero);if(this.F.eq(t[2],this.F.zero))return!1;const n=r.square(e[2]),o=r.square(t[2]),c=r.mul(e[0],o),f=r.mul(t[0],n),l=r.mul(e[2],n),h=r.mul(t[2],o),d=r.mul(e[1],h),m=r.mul(t[1],l);return r.eq(c,f)&&r.eq(d,m);}toString(p){const e=this.affine(p);return`[ ${this.F.toString(e[0])} , ${this.F.toString(e[1])} ]`;}};},function(e,t,r){const n=r(23).Scalar,o=new(0,r(23).ZqField)(n.fromString("21888242871839275222246405745257275088548364400416034343698204186575808495617"));e.exports=class{constructor(){this.nodes={},this.root=o.zero;}async getRoot(){return this.root;}_key2str(e){return e.toString();}_normalize(e){for(let i=0;i>>t)>>>0;}function g(e,t,i,a,b,r,n,c){var f=o.sigma,h=o.u256;e[a]=e[a]+((t[f[i][c]]^h[f[i][c+1]])>>>0)+e[b]>>>0,e[n]=l(e[n]^e[a],16),e[r]=e[r]+e[n]>>>0,e[b]=l(e[b]^e[r],12),e[a]=e[a]+((t[f[i][c+1]]^h[f[i][c]])>>>0)+e[b]>>>0,e[n]=l(e[n]^e[a],8),e[r]=e[r]+e[n]>>>0,e[b]=l(e[b]^e[r],7);}function h(){o.call(this),this._h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this._s=[0,0,0,0],this._block=t.alloc(64),this._blockOffset=0,this._length=[0,0],this._nullt=!1,this._zo=c,this._oo=f;}n(h,o),h.prototype._compress=function(){var i,e=o.u256,t=new Array(16),r=new Array(16);for(i=0;i<16;++i)r[i]=this._block.readUInt32BE(4*i);for(i=0;i<8;++i)t[i]=this._h[i]>>>0;for(i=8;i<12;++i)t[i]=(this._s[i-8]^e[i-8])>>>0;for(i=12;i<16;++i)t[i]=e[i-8];for(this._nullt||(t[12]=(t[12]^this._length[0])>>>0,t[13]=(t[13]^this._length[0])>>>0,t[14]=(t[14]^this._length[1])>>>0,t[15]=(t[15]^this._length[1])>>>0),i=0;i<14;++i)g(t,r,i,0,4,8,12,0),g(t,r,i,1,5,9,13,2),g(t,r,i,2,6,10,14,4),g(t,r,i,3,7,11,15,6),g(t,r,i,0,5,10,15,8),g(t,r,i,1,6,11,12,10),g(t,r,i,2,7,8,13,12),g(t,r,i,3,4,9,14,14);for(i=0;i<16;++i)this._h[i%8]=(this._h[i%8]^t[i])>>>0;for(i=0;i<8;++i)this._h[i]=(this._h[i]^this._s[i%4])>>>0;},h.prototype._padding=function(){var e=this._length[0]+8*this._blockOffset,r=this._length[1];e>=4294967296&&(e-=4294967296,r+=1);var n=t.alloc(8);n.writeUInt32BE(r,0),n.writeUInt32BE(e,4),55===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<55?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(55-this._blockOffset),this.update(o.padding.slice(0,55-this._blockOffset))):(this._length[0]-=8*(64-this._blockOffset),this.update(o.padding.slice(0,64-this._blockOffset)),this._length[0]-=440,this.update(o.padding.slice(1,56)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=64,this.update(n);},h.prototype.digest=function(){this._padding();for(var e=t.alloc(32),i=0;i<8;++i)e.writeUInt32BE(this._h[i],4*i);return e;},e.exports=h;}).call(this,r(5).Buffer);},function(e,t,r){"use strict";(function(t){function r(){}r.sigma=[[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],[14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],[11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4],[7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8],[9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13],[2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9],[12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11],[13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10],[6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5],[10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0],[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],[14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3],[11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4],[7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8],[9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13],[2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]],r.u256=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479],r.u512=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731,3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113],r.padding=t.from([128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),r.prototype._length_carry=function(e){for(var t=0;t=e.length;){for(var i=this._blockOffset;i=32&&(o^=n,o^=n^=o,r-=32),0===r?(e[2*i]=n>>>0,e[2*i+1]=o>>>0):(e[2*i]=(n>>>r|o<<32-r)>>>0,e[2*i+1]=(o>>>r|n<<32-r)>>>0);}function g(e,t,i,a,b,r,n,c){var f,h=o.sigma,d=o.u512;f=e[2*a+1]+((t[2*h[i][c]+1]^d[2*h[i][c+1]+1])>>>0)+e[2*b+1],e[2*a]=e[2*a]+((t[2*h[i][c]]^d[2*h[i][c+1]])>>>0)+e[2*b]+~~(f/4294967296)>>>0,e[2*a+1]=f>>>0,l(e,n,a,32),f=e[2*r+1]+e[2*n+1],e[2*r]=e[2*r]+e[2*n]+~~(f/4294967296)>>>0,e[2*r+1]=f>>>0,l(e,b,r,25),f=e[2*a+1]+((t[2*h[i][c+1]+1]^d[2*h[i][c]+1])>>>0)+e[2*b+1],e[2*a]=e[2*a]+((t[2*h[i][c+1]]^d[2*h[i][c]])>>>0)+e[2*b]+~~(f/4294967296)>>>0,e[2*a+1]=f>>>0,l(e,n,a,16),f=e[2*r+1]+e[2*n+1],e[2*r]=e[2*r]+e[2*n]+~~(f/4294967296)>>>0,e[2*r+1]=f>>>0,l(e,b,r,11);}function h(){o.call(this),this._h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this._s=[0,0,0,0,0,0,0,0],this._block=t.alloc(128),this._blockOffset=0,this._length=[0,0,0,0],this._nullt=!1,this._zo=c,this._oo=f;}n(h,o),h.prototype._compress=function(){var i,e=o.u512,t=new Array(32),r=new Array(32);for(i=0;i<32;++i)r[i]=this._block.readUInt32BE(4*i);for(i=0;i<16;++i)t[i]=this._h[i]>>>0;for(i=16;i<24;++i)t[i]=(this._s[i-16]^e[i-16])>>>0;for(i=24;i<32;++i)t[i]=e[i-16];for(this._nullt||(t[24]=(t[24]^this._length[1])>>>0,t[25]=(t[25]^this._length[0])>>>0,t[26]=(t[26]^this._length[1])>>>0,t[27]=(t[27]^this._length[0])>>>0,t[28]=(t[28]^this._length[3])>>>0,t[29]=(t[29]^this._length[2])>>>0,t[30]=(t[30]^this._length[3])>>>0,t[31]=(t[31]^this._length[2])>>>0),i=0;i<16;++i)g(t,r,i,0,4,8,12,0),g(t,r,i,1,5,9,13,2),g(t,r,i,2,6,10,14,4),g(t,r,i,3,7,11,15,6),g(t,r,i,0,5,10,15,8),g(t,r,i,1,6,11,12,10),g(t,r,i,2,7,8,13,12),g(t,r,i,3,4,9,14,14);for(i=0;i<16;++i)this._h[i%8*2]=(this._h[i%8*2]^t[2*i])>>>0,this._h[i%8*2+1]=(this._h[i%8*2+1]^t[2*i+1])>>>0;for(i=0;i<8;++i)this._h[2*i]=(this._h[2*i]^this._s[i%4*2])>>>0,this._h[2*i+1]=(this._h[2*i+1]^this._s[i%4*2+1])>>>0;},h.prototype._padding=function(){var e=this._length.slice();e[0]+=8*this._blockOffset,this._length_carry(e);for(var r=t.alloc(16),i=0;i<4;++i)r.writeUInt32BE(e[3-i],4*i);111===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<111?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(111-this._blockOffset),this.update(o.padding.slice(0,111-this._blockOffset))):(this._length[0]-=8*(128-this._blockOffset),this.update(o.padding.slice(0,128-this._blockOffset)),this._length[0]-=888,this.update(o.padding.slice(1,112)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=128,this.update(r);},h.prototype.digest=function(){this._padding();for(var e=t.alloc(64),i=0;i<16;++i)e.writeUInt32BE(this._h[i],4*i);return e;},e.exports=h;}).call(this,r(5).Buffer);},function(e,t,r){(function(e){const n=r(149),o=r(238),c=r(439),f=r(23).Scalar;function l(t,r){return"blake"==t?o("blake256").update(r).digest():"blake2b"==t?e.from(c(32).update(e.from(r)).digest()):void 0;}t.hash=function(e,t){(t=t||{}).baseHash=t.baseHash||"blake";const r=function(e){const t=new Array(8*e.length);for(let i=0;i{void 0===e&&(e=l);const t=c.keccak256(e+"_iv");return n.FromString(c.toBN(t).toString()).mod(f.p);},t.getConstants=(e,t)=>{void 0===e&&(e=l),void 0===t&&(t=91);const r=new Array(t);let o=c.keccak256(l);for(let i=1;i{const r=f.e(e),n=f.e(t);let o;for(let i=0;i<91;i++){const e=h[i],t=0==i?f.add(r,n):f.add(f.add(o,n),e);o=f.pow(t,7);}return f.add(o,n);},t.multiHash=(e,r)=>{let n;n=void 0===r?f.zero:r;for(let i=0;i=0&&(t=param.type.substring(n));var o=h(e,param.components);Array.isArray(o)&&e?r.push("tuple("+o.join(",")+")"+t):e?r.push("("+o+")"):r.push("("+o.join(",")+")"+t);}else r.push(param.type);}),r;},d=function(e){if(!o.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.");var t="",i=0,r=e.length;for("0x"===e.substring(0,2)&&(i=2);i7?t+=address[i].toUpperCase():t+=address[i];return t;},toHex:o.toHex,toBN:o.toBN,bytesToHex:o.bytesToHex,hexToBytes:o.hexToBytes,hexToNumberString:o.hexToNumberString,hexToNumber:o.hexToNumber,toDecimal:o.hexToNumber,numberToHex:o.numberToHex,fromDecimal:o.numberToHex,hexToUtf8:o.hexToUtf8,hexToString:o.hexToUtf8,toUtf8:o.hexToUtf8,stripHexPrefix:o.stripHexPrefix,utf8ToHex:o.utf8ToHex,stringToHex:o.utf8ToHex,fromUtf8:o.utf8ToHex,hexToAscii:d,toAscii:d,asciiToHex:m,fromAscii:m,unitMap:n.unitMap,toWei:function(e,t){if(t=y(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?n.toWei(e,t):n.toWei(e,t).toString(10);},fromWei:function(e,t){if(t=y(t),!o.isBN(e)&&"string"!=typeof e)throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.");return o.isBN(e)?n.fromWei(e,t):n.fromWei(e,t).toString(10);},padLeft:o.leftPad,leftPad:o.leftPad,padRight:o.rightPad,rightPad:o.rightPad,toTwosComplement:o.toTwosComplement,isBloom:o.isBloom,isUserEthereumAddressInBloom:o.isUserEthereumAddressInBloom,isContractAddressInBloom:o.isContractAddressInBloom,isTopic:o.isTopic,isTopicInBloom:o.isTopicInBloom,isInBloom:o.isInBloom,compareBlockNumbers:function(a,b){if(a==b)return 0;if("genesis"!=a&&"earliest"!=a&&0!=a||"genesis"!=b&&"earliest"!=b&&0!=b){if("genesis"==a||"earliest"==a)return-1;if("genesis"==b||"earliest"==b)return 1;if("latest"==a)return"pending"==b?-1:1;if("latest"===b)return"pending"==a?1:-1;if("pending"==a)return 1;if("pending"==b)return-1;{let e=new l(a),t=new l(b);return e.lt(t)?-1:e.eq(t)?0:1;}}return 0;},toNumber:o.toNumber};},function(e,t,r){var n=r(444),o=r(247);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new n(1),r=String(e).toLowerCase().trim(),c="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),f=o(r);if("-"===f.substr(0,1)&&(f=o(f.slice(1)),t=new n(-1,10)),!(f=""===f?"0":f).match(/^-?[0-9]+$/)&&f.match(/^[0-9A-Fa-f]+$/)||f.match(/^[a-fA-F]+$/)||!0===c&&f.match(/^[0-9A-Fa-f]+$/))return new n(f,16).mul(t);if((f.match(/^-?[0-9]+$/)||""===f)&&!1===c)return new n(f,10).mul(t);}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new n(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.");};},function(e,t,r){var n=r(248);e.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e;};},function(e,t){e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2);};},function(e,t,r){(function(t){var n=r(3),o=r(246),c=r(445),f=r(446),l=r(447),h=function(object){return n.isBN(object);},d=function(object){return object&&object.constructor&&"BigNumber"===object.constructor.name;},m=function(e){try{return o.apply(null,arguments);}catch(t){throw new Error(t+' Given value: "'+e+'"');}},y=function(address){return!!/^(0x)?[0-9a-f]{40}$/i.test(address)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(address)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(address))||v(address));},v=function(address){address=address.replace(/^0x/i,"");for(var e=k(address.toLowerCase()).replace(/^0x/i,""),i=0;i<40;i++)if(parseInt(e[i],16)>7&&address[i].toUpperCase()!==address[i]||parseInt(e[i],16)<=7&&address[i].toLowerCase()!==address[i])return!1;return!0;},w=function(e){var t="";e=(e=(e=(e=(e=c.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("");for(var i=0;i>>4).toString(16)),t.push((15&e[i]).toString(16));return"0x"+t.join("");},isHex:T,isHexStrict:S,stripHexPrefix:function(e){return 0!==e&&T(e)?e.replace(/^(-)?0x/i,"$1"):e;},leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,o=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+new Array(o).join(r||"0")+e;},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,o=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(n?"0x":"")+e+new Array(o).join(r||"0");},toTwosComplement:function(e){return"0x"+m(e).toTwos(256).toString(16,64);},sha3:k,sha3Raw:function(e){return null===(e=k(e))?x:e;},toNumber:function(e){return"number"==typeof e?e:_(E(e));}};}).call(this,r(5).Buffer);},function(e,t,r){const n=r(23).Scalar,o=r(245),c=new(0,r(23).ZqField)(n.fromString("21888242871839275222246405745257275088548364400416034343698204186575808495617")),f="mimcsponge",l=220;t.getIV=e=>{void 0===e&&(e=f);const t=o.keccak256(e+"_iv");return n.fromString(o.toBN(t).toString()).mod(c.p);},t.getConstants=(e,t)=>{void 0===e&&(e=f),void 0===t&&(t=l);const r=new Array(t);let n=o.keccak256(f);for(let i=1;i{let n=c.e(e),o=c.e(t);const f=c.e(r);for(let i=0;i{void 0===n&&(n=1),void 0===r&&(r=c.zero);let o=c.zero,f=c.zero;for(let i=0;ic.normalize(e));};},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(454),o=r(455);t.keccak224=n.createHashFunction(function(){return o("keccak224");}),t.keccak256=n.createHashFunction(function(){return o("keccak256");}),t.keccak384=n.createHashFunction(function(){return o("keccak384");}),t.keccak512=n.createHashFunction(function(){return o("keccak512");});},function(e,t,r){(t=e.exports=r(253)).Stream=t,t.Readable=t,t.Writable=r(257),t.Duplex=r(76),t.Transform=r(258),t.PassThrough=r(463),t.finished=r(150),t.pipeline=r(464);},function(e,t,r){"use strict";(function(t,n){var o;e.exports=B,B.ReadableState=O;r(49).EventEmitter;var c=function(e,t){return e.listeners(t).length;},f=r(254),l=r(5).Buffer,h=t.Uint8Array||function(){};var d,m=r(458);d=m&&m.debuglog?m.debuglog("stream"):function(){};var y,v,w,_=r(459),A=r(255),M=r(256).getHighWaterMark,E=r(75).codes,S=E.ERR_INVALID_ARG_TYPE,T=E.ERR_STREAM_PUSH_AFTER_EOF,x=E.ERR_METHOD_NOT_IMPLEMENTED,k=E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(B,f);var I=A.errorOrDestroy,C=["error","close","destroy","pause","resume"];function O(e,t,n){o=o||r(76),e=e||{},"boolean"!=typeof n&&(n=t instanceof o),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=M(this,e,"readableHighWaterMark",n),this.buffer=new _(),this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(y||(y=r(50).StringDecoder),this.decoder=new y(e.encoding),this.encoding=e.encoding);}function B(e){if(o=o||r(76),!(this instanceof B))return new B(e);var t=this instanceof o;this._readableState=new O(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this);}function R(e,t,r,n,o){d("readableAddChunk",t);var c,f=e._readableState;if(null===t)f.reading=!1,function(e,t){if(d("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length);}t.ended=!0,t.sync?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,D(e)));}(e,f);else if(o||(c=function(e,t){var r;n=t,l.isBuffer(n)||n instanceof h||"string"==typeof t||void 0===t||e.objectMode||(r=new S("chunk",["string","Buffer","Uint8Array"],t));var n;return r;}(f,t)),c)I(e,c);else if(f.objectMode||t&&t.length>0){if("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e);}(t)),n)f.endEmitted?I(e,new k()):P(e,f,t,!0);else if(f.ended)I(e,new T());else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?P(e,f,t,!1):j(e,f)):P(e,f,t,!1);}}else n||(f.reading=!1,j(e,f));return!f.ended&&(f.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=F?e=F:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e;}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));}function N(e){var t=e._readableState;d("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(D,e));}function D(e){var t=e._readableState;d("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,G(e);}function j(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(U,e,t));}function U(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume();}function H(e){d("readable nexttick read 0"),e.read(0);}function z(e,t){d("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),G(e),t.flowing&&!t.reading&&e.read(0);}function G(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function K(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r;}function V(e){var t=e._readableState;d("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(X,t,e));}function X(e,t){if(d("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy();}}function Q(e,t){for(var i=0,r=e.length;i=t.highWaterMark:t.length>0)||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?V(this):N(this),null;if(0===(e=L(e,t))&&t.ended)return 0===t.length&&V(this),null;var n,o=t.needReadable;return d("need readable",o),(0===t.length||t.length-e0?K(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&V(this)),null!==n&&this.emit("data",n),n;},B.prototype._read=function(e){I(this,new x("_read()"));},B.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e);}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var f=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?h:M;function l(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",_),e.removeListener("finish",A),e.removeListener("drain",m),e.removeListener("error",w),e.removeListener("unpipe",l),r.removeListener("end",h),r.removeListener("end",M),r.removeListener("data",v),y=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||m());}function h(){d("onend"),e.end();}o.endEmitted?n.nextTick(f):r.once("end",f),e.on("unpipe",l);var m=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&c(e,"data")&&(t.flowing=!0,G(e));};}(r);e.on("drain",m);var y=!1;function v(t){d("ondata");var n=e.write(t);d("dest.write",n),!1===n&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==Q(o.pipes,e))&&!y&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause());}function w(t){d("onerror",t),M(),e.removeListener("error",w),0===c(e,"error")&&I(e,t);}function _(){e.removeListener("finish",A),M();}function A(){d("onfinish"),e.removeListener("close",_),M();}function M(){d("unpipe"),r.unpipe(e);}return r.on("data",v),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r);}(e,"error",w),e.once("close",_),e.once("finish",A),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),e;},B.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,d("on readable",o.length,o.reading),o.length?N(this):o.reading||n.nextTick(H,this))),r;},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(e,t){var r=f.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(J,this),r;},B.prototype.removeAllListeners=function(e){var t=f.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(J,this),t;},B.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(z,e,t));}(this,e)),e.paused=!1,this;},B.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this;},B.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e);}t.push(null);}),e.on("data",function(o){(d("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()));}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments);};}(i));for(var o=0;o-1))throw new k(e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer();}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark;}}),B.prototype._write=function(e,t,r){r(new A("_write()"));},B.prototype._writev=null,B.prototype.end=function(e,t,r){var o=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,r){t.ending=!0,D(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1;}(this,o,r),this;},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length;}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed;},set:function(e){this._writableState&&(this._writableState.destroyed=e);}}),B.prototype.destroy=y.destroy,B.prototype._undestroy=y.undestroy,B.prototype._destroy=function(e,t){t(e);};}).call(this,r(18),r(17));},function(e,t,r){"use strict";e.exports=m;var n=r(75).codes,o=n.ERR_METHOD_NOT_IMPLEMENTED,c=n.ERR_MULTIPLE_CALLBACK,f=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=n.ERR_TRANSFORM_WITH_LENGTH_0,h=r(76);function d(e,data){var t=this._transformState;t.transforming=!1;var r=t.writecb;if(null===r)return this.emit("error",new c());t.writechunk=null,t.writecb=null,null!=data&&this.push(data),r(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length0&&n[n.length-1])||6!==c[0]&&2!==c[0])){o=0;continue;}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]=74)&&(n=f.match(/Chrome\/(\d+)/))&&(o=n[1]),e.exports=o&&+o;},function(e,t,r){var n=r(63);e.exports=n("navigator","userAgent")||"";},function(e,t,r){var n=r(162);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator;},function(e,t,r){var n=r(40),o=r(32),c=r(154);e.exports=!n&&!o(function(){return 7!=Object.defineProperty(c("div"),"a",{get:function(){return 7;}}).a;});},function(e,t,r){var n=r(44),o=r(111),c=r(164),f=r(492),l=r(28)("toPrimitive");e.exports=function(input,e){if(!n(input)||o(input))return input;var t,r=c(input,l);if(r){if(void 0===e&&(e="default"),t=r.call(input,e),!n(t)||o(t))return t;throw TypeError("Can't convert object to primitive value");}return void 0===e&&(e="number"),f(input,e);};},function(e,t,r){var n=r(63),o=r(114),c=r(275),f=r(47);e.exports=n("Reflect","ownKeys")||function(e){var t=o.f(f(e)),r=c.f;return r?t.concat(r(e)):t;};},function(e,t,r){var n=r(39),o=r(53),c=r(273).indexOf,f=r(113);e.exports=function(object,e){var t,r=o(object),i=0,l=[];for(t in r)!n(f,t)&&n(r,t)&&l.push(t);for(;e.length>i;)n(r,t=e[i++])&&(~c(l,t)||l.push(t));return l;};},function(e,t,r){var n=r(53),o=r(106),c=r(274),f=function(e){return function(t,r,f){var l,h=n(t),d=o(h.length),m=c(f,d);if(e&&r!=r){for(;d>m;)if((l=h[m++])!=l)return!0;}else for(;d>m;m++)if((e||m in h)&&h[m]===r)return e||m||0;return!e&&-1;};};e.exports={includes:f(!0),indexOf:f(!1)};},function(e,t,r){var n=r(107),o=Math.max,c=Math.min;e.exports=function(e,t){var r=n(e);return r<0?o(r+t,0):c(r,t);};},function(e,t){t.f=Object.getOwnPropertySymbols;},function(e,t,r){var n=r(32),o=r(26),c=/#|\.prototype\./,f=function(e,t){var r=data[l(e)];return r==d||r!=h&&(o(t)?n(t):!!t);},l=f.normalize=function(e){return String(e).replace(c,".").toLowerCase();},data=f.data={},h=f.NATIVE="N",d=f.POLYFILL="P";e.exports=f;},function(e,t,r){"use strict";var n=r(34),o=r(273).includes,c=r(498);n({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0);}}),c("includes");},function(e,t,r){"use strict";var n=r(34),o=r(501),c=r(90),f=r(93);n({target:"String",proto:!0,forced:!r(503)("includes")},{includes:function(e){return!!~f(c(this)).indexOf(f(o(e)),arguments.length>1?arguments[1]:void 0);}});},function(e,t,r){var n=r(28);t.f=n;},function(e,t,r){var n=r(32),o=r(28),c=r(266),f=o("species");e.exports=function(e){return c>=51||!n(function(){var t=[];return(t.constructor={})[f]=function(){return{foo:1};},1!==t[e](Boolean).foo;});};},function(e,t,r){var n=r(108),o=r(164),c=r(116),f=r(28)("iterator");e.exports=function(e){if(null!=e)return o(e,f)||o(e,"@@iterator")||c[n(e)];};},function(e,t,r){"use strict";var n,o,c,f=r(32),l=r(26),h=r(80),d=r(283),m=r(79),y=r(28),v=r(109),w=y("iterator"),_=!1;[].keys&&("next"in(c=[].keys())?(o=d(d(c)))!==Object.prototype&&(n=o):_=!0),null==n||f(function(){var e={};return n[w].call(e)!==e;})?n={}:v&&(n=h(n)),l(n[w])||m(n,w,function(){return this;}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:_};},function(e,t,r){var n=r(39),o=r(26),c=r(62),f=r(112),l=r(525),h=f("IE_PROTO"),d=Object.prototype;e.exports=l?Object.getPrototypeOf:function(e){var object=c(e);if(n(object,h))return object[h];var t=object.constructor;return o(t)&&object instanceof t?t.prototype:object instanceof Object?d:null;};},function(e,t,r){var n=r(47),o=r(526);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array;}catch(e){}return function(r,c){return n(r),o(c),t?e.call(r,c):r.__proto__=c,r;};}():void 0);},function(e,t,r){var n=r(157),o=r(79),c=r(531);n||o(Object.prototype,"toString",c,{unsafe:!0});},function(e,t,r){var n=r(34),o=r(31),c=r(26),f=r(267),l=[].slice,h=function(e){return function(t,r){var n=arguments.length>2,o=n?l.call(arguments,2):void 0;return e(n?function(){(c(t)?t:Function(t)).apply(this,o);}:t,r);};};n({global:!0,bind:!0,forced:/MSIE .\./.test(f)},{setTimeout:h(o.setTimeout),setInterval:h(o.setInterval)});},function(e,t,r){"use strict";(function(e){r.d(t,"a",function(){return Q;});var n=r(3),o=r.n(n),c=r(24),f=r.n(c);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self;function l(e,t,r){return r={path:t,exports:{},require:function(path,base){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");}(null==base&&r.path);}},e(r,r.exports),r.exports;}var h=d;function d(e,t){if(!e)throw new Error(t||"Assertion failed");}d.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t);};var m=l(function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e;}function o(e){for(var t="",i=0;i>8,c=255&n;o?r.push(o,c):r.push(c);}return r;},r.zero2=n,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e;};}),y=l(function(e,t){var r=t;r.assert=h,r.toArray=m.toArray,r.zero2=m.zero2,r.toHex=m.toHex,r.encode=m.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var o=1<(o>>1)-1?(o>>1)-l:l,c.isubn(f)):f=0,n[i]=f,c.iushrn(1);}return n;},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,o=0,c=0;e.cmpn(-o)>0||t.cmpn(-c)>0;){var f,l,h=e.andln(3)+o&3,d=t.andln(3)+c&3;3===h&&(h=-1),3===d&&(d=-1),f=0==(1&h)?0:3!==(n=e.andln(7)+o&7)&&5!==n||2!==d?h:-h,r[0].push(f),l=0==(1&d)?0:3!==(n=t.andln(7)+c&7)&&5!==n||2!==h?d:-d,r[1].push(l),2*o===f+1&&(o=1-o),2*c===l+1&&(c=1-c),e.iushrn(1),t.iushrn(1);}return r;},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this);};},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e;},r.intFromLE=function(e){return new o.a(e,"hex","le");};}),v=y.getNAF,w=y.getJSF,_=y.assert;function A(e,t){this.type=e,this.p=new o.a(t.p,16),this.red=t.prime?o.a.red(t.prime):o.a.mont(this.p),this.zero=new o.a(0).toRed(this.red),this.one=new o.a(1).toRed(this.red),this.two=new o.a(2).toRed(this.red),this.n=t.n&&new o.a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red));}var base=A;function M(e,t){this.curve=e,this.type=t,this.precomputed=null;}A.prototype.point=function(){throw new Error("Not implemented");},A.prototype.validate=function(){throw new Error("Not implemented");},A.prototype._fixedNafMul=function(p,e){_(p.precomputed);var t=p._getDoubles(),r=v(e,1,this._bitLength),n=(1<=o;l--)c=(c<<1)+r[l];f.push(c);}for(var a=this.jpoint(null,null,null),b=this.jpoint(null,null,null),i=n;i>0;i--){for(o=0;o=0;i--){for(var f=0;i>=0&&0===o[i];i--)f++;if(i>=0&&f++,c=c.dblp(f),i<0)break;var l=o[i];_(0!==l),c="affine"===p.type?l>0?c.mixedAdd(n[l-1>>1]):c.mixedAdd(n[-l-1>>1].neg()):l>0?c.add(n[l-1>>1]):c.add(n[-l-1>>1].neg());}return"affine"===p.type?c.toP():c;},A.prototype._wnafMulAdd=function(e,t,r,n,o){var i,c,p,f=this._wnafT1,l=this._wnafT2,h=this._wnafT3,d=0;for(i=0;i=1;i-=2){var a=i-1,b=i;if(1===f[a]&&1===f[b]){var y=[t[a],null,null,t[b]];0===t[a].y.cmp(t[b].y)?(y[1]=t[a].add(t[b]),y[2]=t[a].toJ().mixedAdd(t[b].neg())):0===t[a].y.cmp(t[b].y.redNeg())?(y[1]=t[a].toJ().mixedAdd(t[b]),y[2]=t[a].add(t[b].neg())):(y[1]=t[a].toJ().mixedAdd(t[b]),y[2]=t[a].toJ().mixedAdd(t[b].neg()));var _=[-3,-1,-5,-7,0,7,5,1,3],A=w(r[a],r[b]);for(d=Math.max(A[0].length,d),h[a]=new Array(d),h[b]=new Array(d),c=0;c=0;i--){for(var x=0;i>=0;){var k=!0;for(c=0;c=0&&x++,S=S.dblp(x),i<0)break;for(c=0;c0?p=l[c][I-1>>1]:I<0&&(p=l[c][-I-1>>1].neg()),S="affine"===p.type?S.mixedAdd(p):S.add(p));}}for(i=0;i=Math.ceil((e.bitLength()+1)/t.step);},M.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i=0&&(f=t,l=r),n.negative&&(n=n.neg(),c=c.neg()),f.negative&&(f=f.neg(),l=l.neg()),[{a:n,b:c},{a:f,b:l}];},T.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],o=n.b.mul(e).divRound(this.n),c=r.b.neg().mul(e).divRound(this.n),f=o.mul(r.a),l=c.mul(n.a),h=o.mul(r.b),d=c.mul(n.b);return{k1:e.sub(f).sub(l),k2:h.add(d).neg()};},T.prototype.pointFromX=function(e,t){(e=new o.a(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var c=n.fromRed().isOdd();return(t&&!c||!t&&c)&&(n=n.redNeg()),this.point(e,n);},T.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0);},T.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i":"";},k.prototype.isInfinity=function(){return this.inf;},k.prototype.add=function(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(0===this.x.cmp(p.x))return this.curve.point(null,null);var e=this.y.redSub(p.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(p.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(p.x),r=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,r);},k.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,t=this.x.redSqr(),r=e.redInvm(),n=t.redAdd(t).redIAdd(t).redIAdd(a).redMul(r),o=n.redSqr().redISub(this.x.redAdd(this.x)),c=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,c);},k.prototype.getX=function(){return this.x.fromRed();},k.prototype.getY=function(){return this.y.fromRed();},k.prototype.mul=function(e){return e=new o.a(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e);},k.prototype.mulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2);},k.prototype.jmulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0);},k.prototype.eq=function(p){return this===p||this.inf===p.inf&&(this.inf||0===this.x.cmp(p.x)&&0===this.y.cmp(p.y));},k.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var pre=this.precomputed,r=function(p){return p.neg();};t.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(r)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(r)}};}return t;},k.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one);},E(I,base.BasePoint),T.prototype.jpoint=function(e,t,r){return new I(this,e,t,r);},I.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n);},I.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z);},I.prototype.add=function(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var e=p.z.redSqr(),t=this.z.redSqr(),r=this.x.redMul(e),n=p.x.redMul(t),o=this.y.redMul(e.redMul(p.z)),c=p.y.redMul(t.redMul(this.z)),f=r.redSub(n),l=o.redSub(c);if(0===f.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=f.redSqr(),h3=h2.redMul(f),h=r.redMul(h2),d=l.redSqr().redIAdd(h3).redISub(h).redISub(h),m=l.redMul(h.redISub(d)).redISub(o.redMul(h3)),y=this.z.redMul(p.z).redMul(f);return this.curve.jpoint(d,m,y);},I.prototype.mixedAdd=function(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var e=this.z.redSqr(),t=this.x,r=p.x.redMul(e),n=this.y,o=p.y.redMul(e).redMul(this.z),c=t.redSub(r),f=n.redSub(o);if(0===c.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=c.redSqr(),h3=h2.redMul(c),l=t.redMul(h2),h=f.redSqr().redIAdd(h3).redISub(l).redISub(l),d=f.redMul(l.redISub(h)).redISub(n.redMul(h3)),m=this.z.redMul(c);return this.curve.jpoint(h,d,m);},I.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var i;if(this.curve.zeroA||this.curve.threeA){var t=this;for(i=0;i=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0;}},I.prototype.inspect=function(){return this.isInfinity()?"":"";},I.prototype.isInfinity=function(){return 0===this.z.cmpn(0);};var C=l(function(e,t){var r=t;r.base=base,r.short=x,r.mont=null,r.edwards=null;}),O=l(function(e,t){var pre,r=t,n=y.assert;function o(e){"short"===e.type?this.curve=new C.short(e):"edwards"===e.type?this.curve=new C.edwards(e):this.curve=new C.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O");}function c(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new o(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n;}});}r.PresetCurve=o,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:f.a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:f.a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:f.a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:f.a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:f.a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f.a.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f.a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{pre=null.crash();}catch(e){pre=void 0;}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:f.a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]});});function B(e){if(!(this instanceof B))return new B(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=m.toArray(e.entropy,e.entropyEnc||"hex"),r=m.toArray(e.nonce,e.nonceEnc||"hex"),n=m.toArray(e.pers,e.persEnc||"hex");h(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n);}var R=B;B.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1;},B.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=m.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length";};var N=y.assert;function D(e,t){if(e instanceof D)return e;this._importDER(e,t)||(N(e.r&&e.s,"Signature without r or s"),this.r=new o.a(e.r,16),this.s=new o.a(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam);}var j=D;function U(){this.place=0;}function J(e,p){var t=e[p.place++];if(!(128&t))return t;var r=15&t;if(0===r||r>4)return!1;for(var n=0,i=0,o=p.place;i>>=0;return!(n<=127)&&(p.place=o,n);}function H(e){for(var i=0,t=e.length-1;!e[i]&&!(128&e[i+1])&&i>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t);}}D.prototype._importDER=function(data,e){data=y.toArray(data,e);var p=new U();if(48!==data[p.place++])return!1;var t=J(data,p);if(!1===t)return!1;if(t+p.place!==data.length)return!1;if(2!==data[p.place++])return!1;var r=J(data,p);if(!1===r)return!1;var n=data.slice(p.place,r+p.place);if(p.place+=r,2!==data[p.place++])return!1;var c=J(data,p);if(!1===c)return!1;if(data.length!==c+p.place)return!1;var s=data.slice(p.place,c+p.place);if(0===n[0]){if(!(128&n[1]))return!1;n=n.slice(1);}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1);}return this.r=new o.a(n),this.s=new o.a(s),this.recoveryParam=null,!0;},D.prototype.toDER=function(e){var t=this.r.toArray(),s=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&s[0]&&(s=[0].concat(s)),t=H(t),s=H(s);!(s[0]||128&s[1]);)s=s.slice(1);var r=[2];z(r,t.length),(r=r.concat(t)).push(2),z(r,s.length);var n=r.concat(s),o=[48];return z(o,n.length),o=o.concat(n),y.encode(o,e);};var G=function(){throw new Error("unsupported");},K=y.assert;function V(e){if(!(this instanceof V))return new V(e);"string"==typeof e&&(K(Object.prototype.hasOwnProperty.call(O,e),"Unknown curve "+e),e=O[e]),e instanceof O.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash;}var X=V;V.prototype.keyPair=function(e){return new L(this,e);},V.prototype.keyFromPrivate=function(e,t){return L.fromPrivate(this,e,t);},V.prototype.keyFromPublic=function(e,t){return L.fromPublic(this,e,t);},V.prototype.genKeyPair=function(e){e||(e={});for(var t=new R({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||G(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new o.a(2));;){var c=new o.a(t.generate(r));if(!(c.cmp(n)>0))return c.iaddn(1),this.keyFromPrivate(c);}},V.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e;},V.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new o.a(e,16));for(var c=this.n.byteLength(),f=t.getPrivate().toArray("be",c),l=e.toArray("be",c),h=new R({hash:this.hash,entropy:f,nonce:l,pers:n.pers,persEnc:n.persEnc||"utf8"}),d=this.n.sub(new o.a(1)),m=0;;m++){var y=n.k?n.k(m):new o.a(h.generate(this.n.byteLength()));if(!((y=this._truncateToN(y,!0)).cmpn(1)<=0||y.cmp(d)>=0)){var v=this.g.mul(y);if(!v.isInfinity()){var w=v.getX(),_=w.umod(this.n);if(0!==_.cmpn(0)){var s=y.invm(this.n).mul(_.mul(t.getPrivate()).iadd(e));if(0!==(s=s.umod(this.n)).cmpn(0)){var A=(v.getY().isOdd()?1:0)|(0!==w.cmp(_)?2:0);return n.canonical&&s.cmp(this.nh)>0&&(s=this.n.sub(s),A^=1),new j({r:_,s:s,recoveryParam:A});}}}}}},V.prototype.verify=function(e,t,r,n){e=this._truncateToN(new o.a(e,16)),r=this.keyFromPublic(r,n);var c=(t=new j(t,"hex")).r,s=t.s;if(c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var p,f=s.invm(this.n),l=f.mul(e).umod(this.n),h=f.mul(c).umod(this.n);return this.curve._maxwellTrick?!(p=this.g.jmulAdd(l,r.getPublic(),h)).isInfinity()&&p.eqXToP(c):!(p=this.g.mulAdd(l,r.getPublic(),h)).isInfinity()&&0===p.getX().umod(this.n).cmp(c);},V.prototype.recoverPubKey=function(e,t,r,n){K((3&r)===r,"The recovery param is more than two bits"),t=new j(t,n);var c=this.n,f=new o.a(e),l=t.r,s=t.s,h=1&r,d=r>>1;if(l.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");l=d?this.curve.pointFromX(l.add(this.curve.n),h):this.curve.pointFromX(l,h);var m=t.r.invm(c),y=c.sub(f).mul(m).umod(c),v=s.mul(m).umod(c);return this.g.mulAdd(y,l,v);},V.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new j(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i);}catch(e){continue;}if(o.eq(r))return i;}throw new Error("Unable to find valid recovery factor");};var Q=l(function(e,t){var r=t;r.version="6.5.4",r.utils=y,r.rand=function(){throw new Error("unsupported");},r.curve=C,r.curves=O,r.ec=X,r.eddsa=null;}).ec;}).call(this,r(18));},function(e,t,r){(function(t,r){!function(){"use strict";var n="object"==typeof window?window:{};!n.JS_SHA3_NO_NODE_JS&&"object"==typeof t&&t.versions&&t.versions.node&&(n=r);for(var o=!n.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,c="0123456789abcdef".split(""),f=[0,8,16,24],l=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],h=[224,256,384,512],d=["hex","buffer","arrayBuffer","array"],m=function(e,t,r){return function(n){return new x(e,t,e).update(n)[r]();};},y=function(e,t,r){return function(n,o){return new x(e,t,o).update(n)[r]();};},v=function(e,t){var r=m(e,t,"hex");r.create=function(){return new x(e,t,e);},r.update=function(e){return r.create().update(e);};for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var i=0;i<50;++i)this.s[i]=0;}x.prototype.update=function(e){var t="string"!=typeof e;t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e));for(var i,code,r=e.length,n=this.blocks,o=this.byteCount,c=this.blockCount,l=0,s=this.s;l>2]|=e[l]<>2]|=code<>2]|=(192|code>>6)<>2]|=(128|63&code)<=57344?(n[i>>2]|=(224|code>>12)<>2]|=(128|code>>6&63)<>2]|=(128|63&code)<>2]|=(240|code>>18)<>2]|=(128|code>>12&63)<>2]|=(128|code>>6&63)<>2]|=(128|63&code)<=o){for(this.start=i-o,this.block=n[c],i=0;i>2]|=this.padding[3&i],this.lastByteIndex===this.byteCount)for(e[0]=e[t],i=1;i>4&15]+c[15&e]+c[e>>12&15]+c[e>>8&15]+c[e>>20&15]+c[e>>16&15]+c[e>>28&15]+c[e>>24&15];o%t==0&&(k(s),i=0);}return n&&(e=s[i],n>0&&(f+=c[e>>4&15]+c[15&e]),n>1&&(f+=c[e>>12&15]+c[e>>8&15]),n>2&&(f+=c[e>>20&15]+c[e>>16&15])),f;},x.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,s=this.s,r=this.outputBlocks,n=this.extraBytes,i=0,o=0,c=this.outputBits>>3;e=n?new ArrayBuffer(r+1<<2):new ArrayBuffer(c);for(var f=new Uint32Array(e);o>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;c%r==0&&k(s);}return o&&(e=c<<2,t=s[i],o>0&&(f[e]=255&t),o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f;};var k=function(s){var e,t,r,n,o,c,f,h,d,m,y,v,w,_,A,M,E,S,T,x,k,I,C,O,B,R,P,F,L,N,D,j,U,J,H,z,G,K,V,X,Q,Z,W,Y,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe,le,he,de,pe,be,me,ge;for(r=0;r<48;r+=2)n=s[0]^s[10]^s[20]^s[30]^s[40],o=s[1]^s[11]^s[21]^s[31]^s[41],c=s[2]^s[12]^s[22]^s[32]^s[42],f=s[3]^s[13]^s[23]^s[33]^s[43],h=s[4]^s[14]^s[24]^s[34]^s[44],d=s[5]^s[15]^s[25]^s[35]^s[45],m=s[6]^s[16]^s[26]^s[36]^s[46],y=s[7]^s[17]^s[27]^s[37]^s[47],e=(v=s[8]^s[18]^s[28]^s[38]^s[48])^(c<<1|f>>>31),t=(w=s[9]^s[19]^s[29]^s[39]^s[49])^(f<<1|c>>>31),s[0]^=e,s[1]^=t,s[10]^=e,s[11]^=t,s[20]^=e,s[21]^=t,s[30]^=e,s[31]^=t,s[40]^=e,s[41]^=t,e=n^(h<<1|d>>>31),t=o^(d<<1|h>>>31),s[2]^=e,s[3]^=t,s[12]^=e,s[13]^=t,s[22]^=e,s[23]^=t,s[32]^=e,s[33]^=t,s[42]^=e,s[43]^=t,e=c^(m<<1|y>>>31),t=f^(y<<1|m>>>31),s[4]^=e,s[5]^=t,s[14]^=e,s[15]^=t,s[24]^=e,s[25]^=t,s[34]^=e,s[35]^=t,s[44]^=e,s[45]^=t,e=h^(v<<1|w>>>31),t=d^(w<<1|v>>>31),s[6]^=e,s[7]^=t,s[16]^=e,s[17]^=t,s[26]^=e,s[27]^=t,s[36]^=e,s[37]^=t,s[46]^=e,s[47]^=t,e=m^(n<<1|o>>>31),t=y^(o<<1|n>>>31),s[8]^=e,s[9]^=t,s[18]^=e,s[19]^=t,s[28]^=e,s[29]^=t,s[38]^=e,s[39]^=t,s[48]^=e,s[49]^=t,_=s[0],A=s[1],ee=s[11]<<4|s[10]>>>28,te=s[10]<<4|s[11]>>>28,F=s[20]<<3|s[21]>>>29,L=s[21]<<3|s[20]>>>29,pe=s[31]<<9|s[30]>>>23,be=s[30]<<9|s[31]>>>23,Z=s[40]<<18|s[41]>>>14,W=s[41]<<18|s[40]>>>14,J=s[2]<<1|s[3]>>>31,H=s[3]<<1|s[2]>>>31,M=s[13]<<12|s[12]>>>20,E=s[12]<<12|s[13]>>>20,re=s[22]<<10|s[23]>>>22,ne=s[23]<<10|s[22]>>>22,N=s[33]<<13|s[32]>>>19,D=s[32]<<13|s[33]>>>19,me=s[42]<<2|s[43]>>>30,ge=s[43]<<2|s[42]>>>30,ue=s[5]<<30|s[4]>>>2,ce=s[4]<<30|s[5]>>>2,z=s[14]<<6|s[15]>>>26,G=s[15]<<6|s[14]>>>26,S=s[25]<<11|s[24]>>>21,T=s[24]<<11|s[25]>>>21,ie=s[34]<<15|s[35]>>>17,oe=s[35]<<15|s[34]>>>17,j=s[45]<<29|s[44]>>>3,U=s[44]<<29|s[45]>>>3,O=s[6]<<28|s[7]>>>4,B=s[7]<<28|s[6]>>>4,fe=s[17]<<23|s[16]>>>9,le=s[16]<<23|s[17]>>>9,K=s[26]<<25|s[27]>>>7,V=s[27]<<25|s[26]>>>7,x=s[36]<<21|s[37]>>>11,k=s[37]<<21|s[36]>>>11,ae=s[47]<<24|s[46]>>>8,se=s[46]<<24|s[47]>>>8,Y=s[8]<<27|s[9]>>>5,$=s[9]<<27|s[8]>>>5,R=s[18]<<20|s[19]>>>12,P=s[19]<<20|s[18]>>>12,he=s[29]<<7|s[28]>>>25,de=s[28]<<7|s[29]>>>25,X=s[38]<<8|s[39]>>>24,Q=s[39]<<8|s[38]>>>24,I=s[48]<<14|s[49]>>>18,C=s[49]<<14|s[48]>>>18,s[0]=_^~M&S,s[1]=A^~E&T,s[10]=O^~R&F,s[11]=B^~P&L,s[20]=J^~z&K,s[21]=H^~G&V,s[30]=Y^~ee&re,s[31]=$^~te&ne,s[40]=ue^~fe&he,s[41]=ce^~le&de,s[2]=M^~S&x,s[3]=E^~T&k,s[12]=R^~F&N,s[13]=P^~L&D,s[22]=z^~K&X,s[23]=G^~V&Q,s[32]=ee^~re&ie,s[33]=te^~ne&oe,s[42]=fe^~he&pe,s[43]=le^~de&be,s[4]=S^~x&I,s[5]=T^~k&C,s[14]=F^~N&j,s[15]=L^~D&U,s[24]=K^~X&Z,s[25]=V^~Q&W,s[34]=re^~ie&ae,s[35]=ne^~oe&se,s[44]=he^~pe&me,s[45]=de^~be&ge,s[6]=x^~I&_,s[7]=k^~C&A,s[16]=N^~j&O,s[17]=D^~U&B,s[26]=X^~Z&J,s[27]=Q^~W&H,s[36]=ie^~ae&Y,s[37]=oe^~se&$,s[46]=pe^~me&ue,s[47]=be^~ge&ce,s[8]=I^~_&M,s[9]=C^~A&E,s[18]=j^~O&R,s[19]=U^~B&P,s[28]=Z^~J&z,s[29]=W^~H&G,s[38]=ae^~Y&ee,s[39]=se^~$&te,s[48]=me^~ue&fe,s[49]=ge^~ce&le,s[0]^=l[r],s[1]^=l[r+1];};if(o)e.exports=_;else for(i=0;i{let o=n.split(":");t+=parseInt(o[0],16),r[t]=e(o[1]);}),r;}function c(data){let e=0;return data.split(",").map(t=>{let r=t.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=e+parseInt(r[0],16);return e=parseInt(r[1],16),{l:n,h:e};});}function f(e,t){let r=0;for(let i=0;i=r&&e<=r+n.h&&(e-r)%(n.d||1)==0){if(n.e&&-1!==n.e.indexOf(e-r))continue;return n;}}return null;}const l=c("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),h="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(e=>parseInt(e,16)),d=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],m=o("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),y=o("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),v=o("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",function(data){if(data.length%4!=0)throw new Error("bad data");let e=[];for(let i=0;i{if(h.indexOf(code)>=0)return[];if(code>=65024&&code<=65039)return[];let e=function(e){let t=f(e,d);if(t)return[e+t.s];let r=m[e];if(r)return r;let n=y[e];return n?[e+n[0]]:v[e]||null;}(code);return e||[code];}),t=r.reduce((e,t)=>(t.forEach(t=>{e.push(t);}),e),[]),t=Object(n.g)(Object(n.e)(t),n.a.NFKC),t.forEach(code=>{if(f(code,w))throw new Error("STRINGPREP_CONTAINS_PROHIBITED");}),t.forEach(code=>{if(f(code,l))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED");});let o=Object(n.e)(t);if("-"===o.substring(0,1)||"--"===o.substring(2,4)||"-"===o.substring(o.length-1))throw new Error("invalid hyphen");if(o.length>63)throw new Error("too long");return o;}},function(e,t,r){"use strict";r.d(t,"b",function(){return d;}),r.d(t,"c",function(){return m;}),r.d(t,"d",function(){return y;}),r.d(t,"a",function(){return v;});var n=r(24),o=r.n(n),c=r(0),f=r(289),l=r(2);const h=new l.b("sha2/5.4.0");function d(data){return"0x"+o.a.ripemd160().update(Object(c.a)(data)).digest("hex");}function m(data){return"0x"+o.a.sha256().update(Object(c.a)(data)).digest("hex");}function y(data){return"0x"+o.a.sha512().update(Object(c.a)(data)).digest("hex");}function v(e,t,data){return f.a[e]||h.throwError("unsupported algorithm "+e,l.b.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+o.a.hmac(o.a[e],Object(c.a)(t)).update(Object(c.a)(data)).digest("hex");}},function(e,t,r){(function(e){const{AES:t,HmacSHA256:n,enc:o}=r(298),{isEmpty:c}=r(324),{BigNumber:f}=r(29),{poseidon:l}=r(335),{decrypt:h}=r(452),{IndexedDB:d}=r(539),{sleep:m}=r(512),{workerEvents:y,numbers:v}=r(65),{ExtendedProvider:w}=r(538),{POOL_CONTRACT:_,RPC_LIST:A,FALLBACK_RPC_LIST:M}=r(535),{TornadoPool__factory:E}=r(536),S=e=>{self.chainId=e;const t=(e=>new w(A[e],e,M[e]))(e);T(e,t);},T=(e,t)=>{self.poolContract=E.connect(_[e],t);},x=async({blockFrom:e,blockTo:t,cachedEvents:r,withCache:n})=>{const filter=self.poolContract.filters.NewCommitment();return(await self.poolContract.queryFilter(filter,e,t)).map(({blockNumber:e,transactionHash:t,args:r})=>({blockNumber:e,transactionHash:t,index:Number(r.index),commitment:r.commitment,encryptedOutput:r.encryptedOutput})).filter(e=>!(!n&&r&&r.length)||r.find(t=>e.transactionHash===t.transactionHash&&e.index===t.index));},k=async({withCache:e,lastSyncBlock:t})=>{try{let r=v.DEPLOYED_BLOCK;self.$indexedDB||(await m(v.RECALL_DELAY));let n=await self.$indexedDB.getAll({storeName:"commitment_events_100"});n||(n=[]),t||(t=await R());const o=await self.poolContract.provider.getBlockNumber();if(t&&n.length){const e=Number(t)+v.ONE;if(Number(t)===o)return{commitmentEvents:n};r=e>o?o:e;}const c=await x({blockFrom:r,blockTo:o,cachedEvents:n,withCache:e});return{newCommitmentEvents:c,commitmentEvents:e?n.concat(c):c};}catch(e){throw new Error(`Method NEW getCommitmentEvents has error: ${e.message}`);}},I=({commitmentEvent:e,privateKey:t,bgPublicKey:r})=>{const n=N(e.encryptedOutput,t),o=f.from(e.index).toNumber(),c=f.from("0x"+j(n,v.ZERO,v.BYTES_31)),l=f.from("0x"+j(n,v.BYTES_31,v.BYTES_62)),{commitment:h,nullifier:d}=D({index:o,amount:c,blinding:l,privateKey:t,publicKey:r}),m=d._hex.slice(v.TWO).padStart(v.NULLIFIER_LENGTH,"0x00000");return{index:o,amount:c,blinding:l,nullifier:d,commitment:h,nullifierHash:m,blockNumber:e.blockNumber,transactionHash:e.transactionHash};},C=({publicKey:e,privateKey:t,commitmentEvents:r})=>{try{const n=[],o=[],c=f.from(e);for(const e of r)try{const r=I({commitmentEvent:e,privateKey:t,bgPublicKey:c});n.push(r),o.push(e);}catch(e){continue;}return{decrypted:n,commitments:o};}catch(e){throw new Error(e.message);}},O=async({key:e,indexName:t,storeName:r})=>{try{return await self.$indexedDB.getAllFromIndex({key:e,indexName:t,storeName:r});}catch(e){throw new Error(`getEvents has error: ${e.message}`);}},B=async({events:e,storeName:t})=>{try{if((await P())||!F()||c(e))return;self.$indexedDB.createMultipleTransactions({storeName:t,data:e});}catch(e){console.error(`saveEvents has error: ${e.message}`);}},R=async()=>{try{const[e]=await O({indexName:"name",key:"commitment_events_100",storeName:"last_sync_event"});return e?e.blockNumber:v.DEPLOYED_BLOCK;}catch(e){return console.error("getLastSyncBlock has error:",e.message),v.DEPLOYED_BLOCK;}},P=async()=>(self.$indexedDB||(await m(v.RECALL_DELAY)),!self.$indexedDB||self.$indexedDB.isBlocked),F=()=>!!self.location.host.includes("compassionate-payne-b9dc6b.netlify.app")||["localhost:3000","nova.tornadocash.eth","nova.tornadocash.eth.link","nova.tornadocash.eth.limo"].includes(self.location.host),L=e=>f.from(l(e).toString()),N=(data,t)=>e.from(h((t=>{"0x"===t.slice(v.ZERO,v.TWO)&&(t=t.slice(v.TWO));const r=e.from(t,"hex"),n=r.slice(v.ZERO,v.NONCE_BUF_LENGTH),o=r.slice(v.EPHEM_PUBLIC_KEY_BUF_LENGTH),c=r.slice(v.NONCE_BUF_LENGTH,v.EPHEM_PUBLIC_KEY_BUF_LENGTH);return{version:"x25519-xsalsa20-poly1305",nonce:n.toString("base64"),ciphertext:o.toString("base64"),ephemPublicKey:c.toString("base64")};})(data),t.slice(v.TWO)),"base64"),D=({amount:e,privateKey:t,publicKey:r,blinding:n,index:o})=>{if(e.gt(v.ZERO)&&(null==o||null==t))throw new Error("Can not compute nullifier without utxo index or shielded key");const c=L([e,r,n]),f=t?((e,t,r)=>L([e,t,r]))(t,c,o||v.ZERO):v.ZERO;return{commitment:c,nullifier:L([c,o||v.ZERO,f])};},j=(data,e,t)=>data.slice(e,t).toString("hex"),U=(e,r,o)=>({hash:t.encrypt(e,o).toString(),id:n(r,o).toString()}),J=(e,r)=>{const n=t.decrypt(e,r).toString(o.Utf8);return JSON.parse(n);};(async()=>{try{const e=new d({stores:[{keyPath:"index",name:"commitment_events_100",indexes:[{name:"transactionHash",unique:!1},{name:"commitment",unique:!0}]},{keyPath:"id",name:"decrypted_events_100",indexes:[{name:"hash",unique:!0}]},{keyPath:"name",name:"last_sync_event",indexes:[{name:"name",unique:!1}]}],dbName:"tornado_pool_events"});await e.initDB(),self.$indexedDB=e;}catch(e){console.log("err",e.message);}})(),self.addEventListener("message",({data:data,ports:e})=>{switch(self.postMessage(data),data.eventName){case y.GET_COMMITMENT_EVENTS:(async({publicKey:e,lastSyncBlock:t,withCache:r=!0},[n])=>{try{const{commitmentEvents:e,newCommitmentEvents:o}=await k({withCache:r,lastSyncBlock:t});n.postMessage({result:e}),B({events:o,storeName:"commitment_events_100"});}catch(e){n.postMessage({errorMessage:e.message});}})(data.payload,e);break;case y.INIT_WORKER:S(data.payload);break;case y.GET_BATCH_EVENTS:(async({blockFrom:e,blockTo:t,publicKey:r,privateKey:n,cachedEvents:o,withCache:c=!0},[f])=>{try{const l=await x({blockFrom:e,blockTo:t,publicKey:r,cachedEvents:o,withCache:c}),{decrypted:h,commitments:d}=C({publicKey:r,privateKey:n,commitmentEvents:l}),m=h.map(e=>U(JSON.stringify(e),e.commitment._hex,n));f.postMessage({result:{decrypted:h,commitments:l,userCommitments:d,decryptedHashes:m}});}catch(e){f.postMessage({errorMessage:e.message});}})(data.payload,e);break;case y.GET_BATCH_COMMITMENTS_EVENTS:(async({blockFrom:e,blockTo:t,publicKey:r,privateKey:n,cachedEvents:o,withCache:c=!0},[f])=>{try{const n=await x({blockFrom:e,blockTo:t,publicKey:r,cachedEvents:o,withCache:c});f.postMessage({result:n}),B({events:n,storeName:"commitment_events_100"});}catch(e){f.postMessage({errorMessage:e.message});}})(data.payload,e);break;case y.GET_EVENTS_FROM_TX_HASH:(async({txHash:e,publicKey:t,privateKey:r},[n])=>{try{const o=await O({key:e.toLowerCase(),indexName:"transactionHash",storeName:"commitment_events_100"});if(o&&o.length){const e=C({publicKey:t,privateKey:r,commitmentEvents:o});return void n.postMessage({result:e.decrypted});}const{commitmentEvents:c}=await k({withCache:!0}),{decrypted:f}=C({publicKey:t,privateKey:r,commitmentEvents:c}),l=f.find(t=>t.transactionHash.toLowerCase()===e.toLowerCase());n.postMessage({result:l});}catch(e){n.postMessage({errorMessage:e.message});}})(data.payload,e);break;case y.GET_CACHED_EVENTS:(async({storeName:e,publicKey:t,privateKey:r},[n])=>{try{if(!(await P())){const t=await self.$indexedDB.getAll({storeName:e}),o=[];for(const e of t)try{const t=J(e.hash,r);o.find(e=>e.index===t.index)||o.push(t);}catch{continue;}const[c]=o.sort((a,b)=>b.blockNumber-a.blockNumber);return void n.postMessage({result:{decrypted:o,lastSyncBlock:c?c.blockNumber:v.DEPLOYED_BLOCK}});}n.postMessage({result:[]});}catch(e){n.postMessage({errorMessage:e.message});}})(data.payload,e);break;case y.GET_CACHED_COMMITMENTS_EVENTS:(async({storeName:e,publicKey:t,privateKey:r},[n])=>{try{if(!(await P())){const t=(await self.$indexedDB.getAll({storeName:e})).reduce((e,t)=>(e.find(e=>e.index===t.index)||e.push(t),e),[]),[r]=t.sort((a,b)=>b.blockNumber-a.blockNumber);return void n.postMessage({result:{commitments:t,lastSyncBlock:r?r.blockNumber:v.DEPLOYED_BLOCK}});}n.postMessage({result:[]});}catch(e){n.postMessage({errorMessage:e.message});}})(data.payload,e);break;case y.SAVE_EVENTS:(({data:data,storeName:e},[t])=>{try{B({events:data,storeName:e}),t.postMessage({result:"success"});}catch(e){t.postMessage({errorMessage:e.message});}})(data.payload,e);break;case y.SAVE_LAST_SYNC_BLOCK:(async({lastSyncBlock:e},[t])=>{try{await self.$indexedDB.putItem({data:{blockNumber:e,name:"commitment_events_100"},storeName:"last_sync_event"}),t.postMessage({result:"success"});}catch(e){t.postMessage({errorMessage:e.message});}})(data.payload,e);}},!1);}).call(this,r(5).Buffer);},,function(e,t,r){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return 3*(r+n)/4-n;},t.toByteArray=function(e){var t,i,r=l(e),n=r[0],f=r[1],h=new c(function(e,t,r){return 3*(t+r)/4-r;}(0,n,f)),d=0,m=f>0?n-4:n;for(i=0;i>16&255,h[d++]=t>>8&255,h[d++]=255&t;2===f&&(t=o[e.charCodeAt(i)]<<2|o[e.charCodeAt(i+1)]>>4,h[d++]=255&t);1===f&&(t=o[e.charCodeAt(i)]<<10|o[e.charCodeAt(i+1)]<<4|o[e.charCodeAt(i+2)]>>2,h[d++]=t>>8&255,h[d++]=255&t);return h;},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,c=[],f=16383,i=0,l=r-o;il?l:i+f));1===o?(t=e[r-1],c.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],c.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return c.join("");};for(var n=[],o=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,f=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4];}function h(e,t,r){for(var o,c,output=[],i=t;i>18&63]+n[c>>12&63]+n[c>>6&63]+n[63&c]);return output.join("");}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;},function(e,t){t.read=function(e,t,r,n,o){var c,f,l=8*o-n-1,h=(1<>1,m=-7,i=r?o-1:0,y=r?-1:1,s=e[t+i];for(i+=y,c=s&(1<<-m)-1,s>>=-m,m+=l;m>0;c=256*c+e[t+i],i+=y,m-=8);for(f=c&(1<<-m)-1,c>>=-m,m+=n;m>0;f=256*f+e[t+i],i+=y,m-=8);if(0===c)c=1-d;else{if(c===h)return f?NaN:1/0*(s?-1:1);f+=Math.pow(2,n),c-=d;}return(s?-1:1)*f*Math.pow(2,c-n);},t.write=function(e,t,r,n,o,c){var f,l,h,d=8*c-o-1,m=(1<>1,rt=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,i=n?0:c-1,v=n?1:-1,s=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,f=m):(f=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-f))<1&&(f--,h*=2),(t+=f+y>=1?rt/h:rt*Math.pow(2,1-y))*h>=2&&(f++,h/=2),f+y>=m?(l=0,f=m):f+y>=1?(l=(t*h-1)*Math.pow(2,o),f+=y):(l=t*Math.pow(2,y-1)*Math.pow(2,o),f=0));o>=8;e[r+i]=255&l,i+=v,l/=256,o-=8);for(f=f<0;e[r+i]=255&f,i+=v,f/=256,d-=8);e[r+i-v]|=128*s;};},function(e,t,r){var n;e.exports=(n=r(11),r(95),r(300),r(301),r(67),r(302),r(68),r(125),r(175),r(303),r(176),r(304),r(305),r(306),r(126),r(307),r(58),r(27),r(308),r(309),r(310),r(311),r(312),r(313),r(314),r(315),r(316),r(317),r(318),r(319),r(320),r(321),r(322),r(323),n);},function(e,t){},function(e,t,r){var n;e.exports=(n=r(11),function(){if("function"==typeof ArrayBuffer){var e=n.lib.WordArray,t=e.init,r=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var r=e.byteLength,n=[],i=0;i>>2]|=e[i]<<24-i%4*8;t.call(this,n,r);}else t.apply(this,arguments);};r.prototype=e;}}(),n.lib.WordArray);},function(e,t,r){var n;e.exports=(n=r(11),function(){var e=n,t=e.lib.WordArray,r=e.enc;function o(e){return e<<8&4278255360|e>>>8&16711935;}r.Utf16=r.Utf16BE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535;n.push(String.fromCharCode(o));}return n.join("");},parse:function(e){for(var r=e.length,n=[],i=0;i>>1]|=e.charCodeAt(i)<<16-i%2*16;return t.create(n,2*r);}},r.Utf16LE={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;i>>2]>>>16-i%4*8&65535);n.push(String.fromCharCode(c));}return n.join("");},parse:function(e){for(var r=e.length,n=[],i=0;i>>1]|=o(e.charCodeAt(i)<<16-i%2*16);return t.create(n,2*r);}};}(),n.enc.Utf16);},function(e,t,r){var n;e.exports=(n=r(11),function(){var e=n,t=e.lib.WordArray;function r(e,r,n){for(var o=[],c=0,i=0;i>>6-i%4*2;o[c>>>2]|=f<<24-c%4*8,c++;}return t.create(o,c);}e.enc.Base64url={stringify:function(e,t=!0){var r=e.words,n=e.sigBytes,map=t?this._safe_map:this._map;e.clamp();for(var o=[],i=0;i>>2]>>>24-i%4*8&255)<<16|(r[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|r[i+2>>>2]>>>24-(i+2)%4*8&255,f=0;f<4&&i+.75*f>>6*(3-f)&63));var l=map.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("");},parse:function(e,t=!0){var n=e.length,map=t?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var c=0;c>>24)|4278255360&(o<<24|o>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),(P=r[i]).high^=c,P.low^=o;}for(var f=0;f<24;f++){for(var l=0;l<5;l++){for(var v=0,w=0,_=0;_<5;_++)v^=(P=r[l+5*_]).high,w^=P.low;var A=y[l];A.high=v,A.low=w;}for(l=0;l<5;l++){var M=y[(l+4)%5],E=y[(l+1)%5],S=E.high,T=E.low;for(v=M.high^(S<<1|T>>>31),w=M.low^(T<<1|S>>>31),_=0;_<5;_++)(P=r[l+5*_]).high^=v,P.low^=w;}for(var x=1;x<25;x++){var k=(P=r[x]).high,I=P.low,C=h[x];C<32?(v=k<>>32-C,w=I<>>32-C):(v=I<>>64-C,w=k<>>64-C);var O=y[d[x]];O.high=v,O.low=w;}var B=y[0],R=r[0];for(B.high=R.high,B.low=R.low,l=0;l<5;l++)for(_=0;_<5;_++){var P=r[x=l+5*_],F=y[x],L=y[(l+1)%5+5*_],N=y[(l+2)%5+5*_];P.high=F.high^~L.high&N.high,P.low=F.low^~L.low&N.low;}P=r[0];var D=m[f];P.high^=D.high,P.low^=D.low;}},_doFinalize:function(){var data=this._data,t=data.words,r=(this._nDataBytes,8*data.sigBytes),n=32*this.blockSize;t[r>>>5]|=1<<24-r%32,t[(e.ceil((r+1)/n)*n>>>5)-1]|=128,data.sigBytes=4*t.length,this._process();for(var c=this._state,f=this.cfg.outputLength/8,l=f/8,h=[],i=0;i>>24)|4278255360&(m<<24|m>>>8),y=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),h.push(y),h.push(m);}return new o.init(h,f);},clone:function(){for(var e=c.clone.call(this),t=e._state=this._state.slice(0),i=0;i<25;i++)t[i]=t[i].clone();return e;}});t.SHA3=c._createHelper(v),t.HmacSHA3=c._createHmacHelper(v);}(Math),n.SHA3);},function(e,t,r){var n;e.exports=(n=r(11),function(e){var t=n,r=t.lib,o=r.WordArray,c=r.Hasher,f=t.algo,l=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),h=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),d=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),m=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=o.create([0,1518500249,1859775393,2400959708,2840853838]),v=o.create([1352829926,1548603684,1836072691,2053994217,0]),w=f.RIPEMD160=c.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var r=t+i,n=e[r];e[r]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8);}var o,c,f,dl,w,x,br,k,I,C,O,B=this._hash.words,R=y.words,hr=v.words,P=l.words,F=h.words,L=d.words,N=m.words;for(x=o=B[0],br=c=B[1],k=f=B[2],I=dl=B[3],C=w=B[4],i=0;i<80;i+=1)O=o+e[t+P[i]]|0,O+=i<16?_(c,f,dl)+R[0]:i<32?A(c,f,dl)+R[1]:i<48?M(c,f,dl)+R[2]:i<64?E(c,f,dl)+R[3]:S(c,f,dl)+R[4],O=(O=T(O|=0,L[i]))+w|0,o=w,w=dl,dl=T(f,10),f=c,c=O,O=x+e[t+F[i]]|0,O+=i<16?S(br,k,I)+hr[0]:i<32?E(br,k,I)+hr[1]:i<48?M(br,k,I)+hr[2]:i<64?A(br,k,I)+hr[3]:_(br,k,I)+hr[4],O=(O=T(O|=0,N[i]))+C|0,x=C,C=I,I=T(k,10),k=br,br=O;O=B[1]+f+I|0,B[1]=B[2]+dl+C|0,B[2]=B[3]+w+x|0,B[3]=B[4]+o+br|0,B[4]=B[0]+c+k|0,B[0]=O;},_doFinalize:function(){var data=this._data,e=data.words,t=8*this._nDataBytes,r=8*data.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8),data.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,i=0;i<5;i++){var c=o[i];o[i]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8);}return n;},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e;}});function _(e,t,r){return e^t^r;}function A(e,t,r){return e&t|~e&r;}function M(e,t,r){return(e|~t)^r;}function E(e,t,r){return e&r|t&~r;}function S(e,t,r){return e^(t|~r);}function T(e,t){return e<>>32-t;}t.RIPEMD160=c._createHelper(w),t.HmacRIPEMD160=c._createHmacHelper(w);}(Math),n.RIPEMD160);},function(e,t,r){var n,o,c,f,l,h,d,m,y;e.exports=(y=r(11),r(125),r(126),o=(n=y).lib,c=o.Base,f=o.WordArray,l=n.algo,h=l.SHA1,d=l.HMAC,m=l.PBKDF2=c.extend({cfg:c.extend({keySize:4,hasher:h,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e);},compute:function(e,t){for(var r=this.cfg,n=d.create(r.hasher,e),o=f.create(),c=f.create([1]),l=o.words,h=c.words,m=r.keySize,y=r.iterations;l.length>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n;}else e+=1<<24;return e;}function r(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e;}var o=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,o=n.blockSize,c=this._iv,f=this._counter;c&&(f=this._counter=c.slice(0),this._iv=void 0),r(f);var l=f.slice(0);n.encryptBlock(l,0);for(var i=0;i>>2]|=n<<24-o%4*8,data.sigBytes+=n;},unpad:function(data){var e=255&data.words[data.sigBytes-1>>>2];data.sigBytes-=e;}},n.pad.Ansix923);},function(e,t,r){var n;e.exports=(n=r(11),r(27),n.pad.Iso10126={pad:function(data,e){var t=4*e,r=t-data.sigBytes%t;data.concat(n.lib.WordArray.random(r-1)).concat(n.lib.WordArray.create([r<<24],1));},unpad:function(data){var e=255&data.words[data.sigBytes-1>>>2];data.sigBytes-=e;}},n.pad.Iso10126);},function(e,t,r){var n;e.exports=(n=r(11),r(27),n.pad.Iso97971={pad:function(data,e){data.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(data,e);},unpad:function(data){n.pad.ZeroPadding.unpad(data),data.sigBytes--;}},n.pad.Iso97971);},function(e,t,r){var n;e.exports=(n=r(11),r(27),n.pad.ZeroPadding={pad:function(data,e){var t=4*e;data.clamp(),data.sigBytes+=t-(data.sigBytes%t||t);},unpad:function(data){var e=data.words,i=data.sigBytes-1;for(i=data.sigBytes-1;i>=0;i--)if(e[i>>>2]>>>24-i%4*8&255){data.sigBytes=i+1;break;}}},n.pad.ZeroPadding);},function(e,t,r){var n;e.exports=(n=r(11),r(27),n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding);},function(e,t,r){var n,o,c,f;e.exports=(f=r(11),r(27),o=(n=f).lib.CipherParams,c=n.enc.Hex,n.format.Hex={stringify:function(e){return e.ciphertext.toString(c);},parse:function(input){var e=c.parse(input);return o.create({ciphertext:e});}},f.format.Hex);},function(e,t,r){var n;e.exports=(n=r(11),r(67),r(68),r(58),r(27),function(){var e=n,t=e.lib.BlockCipher,r=e.algo,o=[],c=[],f=[],l=[],h=[],d=[],m=[],y=[],v=[],w=[];!function(){for(var e=[],i=0;i<256;i++)e[i]=i<128?i<<1:i<<1^283;var t=0,r=0;for(i=0;i<256;i++){var n=r^r<<1^r<<2^r<<3^r<<4;n=n>>>8^255&n^99,o[t]=n,c[n]=t;var _=e[t],A=e[_],M=e[A],E=257*e[n]^16843008*n;f[t]=E<<24|E>>>8,l[t]=E<<16|E>>>16,h[t]=E<<8|E>>>24,d[t]=E,E=16843009*M^65537*A^257*_^16843008*t,m[n]=E<<24|E>>>8,y[n]=E<<16|E>>>16,v[n]=E<<8|E>>>24,w[n]=E,t?(t=_^e[e[e[M^_]]],r^=e[e[r]]):t=r=1;}}();var _=[0,1,2,4,8,16,32,64,128,27,54],A=r.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),c=this._keySchedule=[],f=0;f6&&f%r==4&&(d=o[d>>>24]<<24|o[d>>>16&255]<<16|o[d>>>8&255]<<8|o[255&d]):(d=o[(d=d<<8|d>>>24)>>>24]<<24|o[d>>>16&255]<<16|o[d>>>8&255]<<8|o[255&d],d^=_[f/r|0]<<24),c[f]=c[f-r]^d);for(var l=this._invKeySchedule=[],h=0;h>>24]]^y[o[d>>>16&255]]^v[o[d>>>8&255]]^w[o[255&d]];}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,f,l,h,d,o);},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,m,y,v,w,c),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r;},_doCryptBlock:function(e,t,r,n,o,c,f,l){for(var h=this._nRounds,d=e[t]^r[0],m=e[t+1]^r[1],y=e[t+2]^r[2],v=e[t+3]^r[3],w=4,_=1;_>>24]^o[m>>>16&255]^c[y>>>8&255]^f[255&v]^r[w++],M=n[m>>>24]^o[y>>>16&255]^c[v>>>8&255]^f[255&d]^r[w++],E=n[y>>>24]^o[v>>>16&255]^c[d>>>8&255]^f[255&m]^r[w++],S=n[v>>>24]^o[d>>>16&255]^c[m>>>8&255]^f[255&y]^r[w++];d=A,m=M,y=E,v=S;}A=(l[d>>>24]<<24|l[m>>>16&255]<<16|l[y>>>8&255]<<8|l[255&v])^r[w++],M=(l[m>>>24]<<24|l[y>>>16&255]<<16|l[v>>>8&255]<<8|l[255&d])^r[w++],E=(l[y>>>24]<<24|l[v>>>16&255]<<16|l[d>>>8&255]<<8|l[255&m])^r[w++],S=(l[v>>>24]<<24|l[d>>>16&255]<<16|l[m>>>8&255]<<8|l[255&y])^r[w++],e[t]=A,e[t+1]=M,e[t+2]=E,e[t+3]=S;},keySize:8});e.AES=t._createHelper(A);}(),n.AES);},function(e,t,r){var n;e.exports=(n=r(11),r(67),r(68),r(58),r(27),function(){var e=n,t=e.lib,r=t.WordArray,o=t.BlockCipher,c=e.algo,f=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],y=c.DES=o.extend({_doReset:function(){for(var e=this._key.words,t=[],i=0;i<56;i++){var r=f[i]-1;t[i]=e[r>>>5]>>>31-r%32&1;}for(var n=this._subKeys=[],o=0;o<16;o++){var c=n[o]=[],d=h[o];for(i=0;i<24;i++)c[i/6|0]|=t[(l[i]-1+d)%28]<<31-i%6,c[4+(i/6|0)]|=t[28+(l[i+24]-1+d)%28]<<31-i%6;for(c[0]=c[0]<<1|c[0]>>>31,i=1;i<7;i++)c[i]=c[i]>>>4*(i-1)+3;c[7]=c[7]<<5|c[7]>>>27;}var m=this._invSubKeys=[];for(i=0;i<16;i++)m[i]=n[15-i];},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys);},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys);},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],v.call(this,4,252645135),v.call(this,16,65535),w.call(this,2,858993459),w.call(this,8,16711935),v.call(this,1,1431655765);for(var n=0;n<16;n++){for(var o=r[n],c=this._lBlock,f=this._rBlock,l=0,i=0;i<8;i++)l|=d[i][((f^o[i])&m[i])>>>0];this._lBlock=f,this._rBlock=c^l;}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,v.call(this,1,1431655765),w.call(this,8,16711935),w.call(this,2,858993459),v.call(this,16,65535),v.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock;},keySize:2,ivSize:2,blockSize:2});function v(e,mask){var t=(this._lBlock>>>e^this._rBlock)&mask;this._rBlock^=t,this._lBlock^=t<>>e^this._lBlock)&mask;this._lBlock^=t,this._rBlock^=t<192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),o=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=y.createEncryptor(r.create(t)),this._des2=y.createEncryptor(r.create(n)),this._des3=y.createEncryptor(r.create(o));},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t);},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t);},keySize:6,ivSize:2,blockSize:2});e.TripleDES=o._createHelper(_);}(),n.TripleDES);},function(e,t,r){var n;e.exports=(n=r(11),r(67),r(68),r(58),r(27),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,o=r.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var c=i%r,f=t[c>>>2]>>>24-c%4*8&255;o=(o+n[i]+f)%256;var l=n[i];n[i]=n[o],n[o]=l;}this._i=this._j=0;},_doProcessBlock:function(e,t){e[t]^=c.call(this);},keySize:8,ivSize:0});function c(){for(var e=this._S,i=this._i,t=this._j,r=0,n=0;n<4;n++){t=(t+e[i=(i+1)%256])%256;var o=e[i];e[i]=e[t],e[t]=o,r|=e[(e[i]+e[t])%256]<<24-8*n;}return this._i=i,this._j=t,r;}e.RC4=t._createHelper(o);var f=r.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var i=this.cfg.drop;i>0;i--)c.call(this);}});e.RC4Drop=t._createHelper(f);}(),n.RC4);},function(e,t,r){var n;e.exports=(n=r(11),r(67),r(68),r(58),r(27),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,o=[],c=[],f=[],l=r.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,i=0;i<4;i++)e[i]=16711935&(e[i]<<8|e[i]>>>24)|4278255360&(e[i]<<24|e[i]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,i=0;i<4;i++)h.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,c=o[0],f=o[1],l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),d=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),m=l>>>16|4294901760&d,y=d<<16|65535&l;for(n[0]^=l,n[1]^=m,n[2]^=d,n[3]^=y,n[4]^=l,n[5]^=m,n[6]^=d,n[7]^=y,i=0;i<4;i++)h.call(this);}},_doProcessBlock:function(e,t){var r=this._X;h.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i];},blockSize:4,ivSize:2});function h(){for(var e=this._X,t=this._C,i=0;i<8;i++)c[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,i=0;i<8;i++){var r=e[i]+t[i],n=65535&r,o=r>>>16,l=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&r)*r|0)+((65535&r)*r|0);f[i]=l^h;}e[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,e[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,e[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,e[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,e[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,e[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,e[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,e[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0;}e.Rabbit=t._createHelper(l);}(),n.Rabbit);},function(e,t,r){var n;e.exports=(n=r(11),r(67),r(68),r(58),r(27),function(){var e=n,t=e.lib.StreamCipher,r=e.algo,o=[],c=[],f=[],l=r.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)h.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,c=o[0],f=o[1],l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),d=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),m=l>>>16|4294901760&d,y=d<<16|65535&l;for(n[0]^=l,n[1]^=m,n[2]^=d,n[3]^=y,n[4]^=l,n[5]^=m,n[6]^=d,n[7]^=y,i=0;i<4;i++)h.call(this);}},_doProcessBlock:function(e,t){var r=this._X;h.call(this),o[0]=r[0]^r[5]>>>16^r[3]<<16,o[1]=r[2]^r[7]>>>16^r[5]<<16,o[2]=r[4]^r[1]>>>16^r[7]<<16,o[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i];},blockSize:4,ivSize:2});function h(){for(var e=this._X,t=this._C,i=0;i<8;i++)c[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,i=0;i<8;i++){var r=e[i]+t[i],n=65535&r,o=r>>>16,l=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&r)*r|0)+((65535&r)*r|0);f[i]=l^h;}e[0]=f[0]+(f[7]<<16|f[7]>>>16)+(f[6]<<16|f[6]>>>16)|0,e[1]=f[1]+(f[0]<<8|f[0]>>>24)+f[7]|0,e[2]=f[2]+(f[1]<<16|f[1]>>>16)+(f[0]<<16|f[0]>>>16)|0,e[3]=f[3]+(f[2]<<8|f[2]>>>24)+f[1]|0,e[4]=f[4]+(f[3]<<16|f[3]>>>16)+(f[2]<<16|f[2]>>>16)|0,e[5]=f[5]+(f[4]<<8|f[4]>>>24)+f[3]|0,e[6]=f[6]+(f[5]<<16|f[5]>>>16)+(f[4]<<16|f[4]>>>16)|0,e[7]=f[7]+(f[6]<<8|f[6]>>>24)+f[5]|0;}e.RabbitLegacy=t._createHelper(l);}(),n.RabbitLegacy);},function(e,t,r){(function(e,n){var o;(function(){var c,f="Expected a function",l="__lodash_hash_undefined__",h="__lodash_placeholder__",d=16,m=32,y=64,v=128,w=256,_=1/0,A=9007199254740991,M=NaN,E=4294967295,S=[["ary",v],["bind",1],["bindKey",2],["curry",8],["curryRight",d],["flip",512],["partial",m],["partialRight",y],["rearg",w]],T="[object Arguments]",x="[object Array]",k="[object Boolean]",I="[object Date]",C="[object Error]",O="[object Function]",B="[object GeneratorFunction]",R="[object Map]",P="[object Number]",F="[object Object]",L="[object Promise]",N="[object RegExp]",D="[object Set]",j="[object String]",U="[object Symbol]",J="[object WeakMap]",H="[object ArrayBuffer]",z="[object DataView]",G="[object Float32Array]",K="[object Float64Array]",V="[object Int8Array]",X="[object Int16Array]",Q="[object Int32Array]",Z="[object Uint8Array]",W="[object Uint8ClampedArray]",Y="[object Uint16Array]",$="[object Uint32Array]",ee=/\b__p \+= '';/g,te=/\b(__p \+=) '' \+/g,re=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ne=/&(?:amp|lt|gt|quot|#39);/g,ie=/[&<>"']/g,oe=RegExp(ne.source),ae=RegExp(ie.source),se=/<%-([\s\S]+?)%>/g,ue=/<%([\s\S]+?)%>/g,ce=/<%=([\s\S]+?)%>/g,fe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,le=/^\w*$/,he=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,de=/[\\^$.*+?()[\]{}|]/g,pe=RegExp(de.source),be=/^\s+/,me=/\s/,ge=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ye=/\{\n\/\* \[wrapped with (.+)\] \*/,ve=/,? & /,we=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_e=/[()=,{}\[\]\/\s]/,Ae=/\\(\\)?/g,Me=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ee=/\w*$/,Se=/^[-+]0x[0-9a-f]+$/i,Te=/^0b[01]+$/i,xe=/^\[object .+?Constructor\]$/,ke=/^0o[0-7]+$/i,Ie=/^(?:0|[1-9]\d*)$/,Ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Oe=/($^)/,Be=/['\n\r\u2028\u2029\\]/g,Re="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Pe="\\u2700-\\u27bf",Fe="a-z\\xdf-\\xf6\\xf8-\\xff",Le="A-Z\\xc0-\\xd6\\xd8-\\xde",Ne="\\ufe0e\\ufe0f",De="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",je="['’]",Ue="[\\ud800-\\udfff]",Je="["+De+"]",He="["+Re+"]",ze="\\d+",Ge="[\\u2700-\\u27bf]",Ke="["+Fe+"]",Ve="[^\\ud800-\\udfff"+De+ze+Pe+Fe+Le+"]",Xe="\\ud83c[\\udffb-\\udfff]",qe="[^\\ud800-\\udfff]",Qe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ze="[\\ud800-\\udbff][\\udc00-\\udfff]",We="["+Le+"]",Ye="(?:"+Ke+"|"+Ve+")",$e="(?:"+We+"|"+Ve+")",et="(?:['’](?:d|ll|m|re|s|t|ve))?",tt="(?:['’](?:D|LL|M|RE|S|T|VE))?",nt="(?:"+He+"|"+Xe+")"+"?",it="[\\ufe0e\\ufe0f]?",ot=it+nt+("(?:\\u200d(?:"+[qe,Qe,Ze].join("|")+")"+it+nt+")*"),at="(?:"+[Ge,Qe,Ze].join("|")+")"+ot,st="(?:"+[qe+He+"?",He,Qe,Ze,Ue].join("|")+")",ut=RegExp(je,"g"),ct=RegExp(He,"g"),ft=RegExp(Xe+"(?="+Xe+")|"+st+ot,"g"),lt=RegExp([We+"?"+Ke+"+"+et+"(?="+[Je,We,"$"].join("|")+")",$e+"+"+tt+"(?="+[Je,We+Ye,"$"].join("|")+")",We+"?"+Ye+"+"+et,We+"+"+tt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ze,at].join("|"),"g"),ht=RegExp("[\\u200d\\ud800-\\udfff"+Re+Ne+"]"),pt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,bt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],mt=-1,gt={};gt[G]=gt[K]=gt[V]=gt[X]=gt[Q]=gt[Z]=gt[W]=gt[Y]=gt[$]=!0,gt[T]=gt[x]=gt[H]=gt[k]=gt[z]=gt[I]=gt[C]=gt[O]=gt[R]=gt[P]=gt[F]=gt[N]=gt[D]=gt[j]=gt[J]=!1;var yt={};yt[T]=yt[x]=yt[H]=yt[z]=yt[k]=yt[I]=yt[G]=yt[K]=yt[V]=yt[X]=yt[Q]=yt[R]=yt[P]=yt[F]=yt[N]=yt[D]=yt[j]=yt[U]=yt[Z]=yt[W]=yt[Y]=yt[$]=!0,yt[C]=yt[O]=yt[J]=!1;var vt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wt=parseFloat,_t=parseInt,At="object"==typeof e&&e&&e.Object===Object&&e,Mt="object"==typeof self&&self&&self.Object===Object&&self,Et=At||Mt||Function("return this")(),St=t&&!t.nodeType&&t,Tt=St&&"object"==typeof n&&n&&!n.nodeType&&n,xt=Tt&&Tt.exports===St,kt=xt&&At.process,It=function(){try{var e=Tt&&Tt.require&&Tt.require("util").types;return e||kt&&kt.binding&&kt.binding("util");}catch(e){}}(),Ct=It&&It.isArrayBuffer,Ot=It&&It.isDate,Bt=It&&It.isMap,Rt=It&&It.isRegExp,Pt=It&&It.isSet,Ft=It&&It.isTypedArray;function Lt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2]);}return e.apply(t,r);}function Nt(e,t,r,n){for(var o=-1,c=null==e?0:e.length;++o-1;}function zt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r;}function pr(e,t){for(var r=e.length;r--&&Yt(t,e[r],0)>-1;);return r;}function mr(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n;}var gr=ir({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),yr=ir({"&":"&","<":"<",">":">",'"':""","'":"'"});function vr(e){return"\\"+vt[e];}function wr(e){return ht.test(e);}function _r(map){var e=-1,t=Array(map.size);return map.forEach(function(r,n){t[++e]=[n,r];}),t;}function Ar(e,t){return function(r){return e(t(r));};}function Mr(e,t){for(var r=-1,n=e.length,o=0,c=[];++r",""":'"',"'":"'"});var Cr=function e(t){var r,n=(t=null==t?Et:Cr.defaults(Et.Object(),t,Cr.pick(Et,bt))).Array,o=t.Date,me=t.Error,Re=t.Function,Pe=t.Math,Fe=t.Object,Le=t.RegExp,Ne=t.String,De=t.TypeError,je=n.prototype,Ue=Re.prototype,Je=Fe.prototype,He=t["__core-js_shared__"],ze=Ue.toString,Ge=Je.hasOwnProperty,Ke=0,Ve=(r=/[^.]+$/.exec(He&&He.keys&&He.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Xe=Je.toString,qe=ze.call(Fe),Qe=Et._,Ze=Le("^"+ze.call(Ge).replace(de,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=xt?t.Buffer:c,Ye=t.Symbol,$e=t.Uint8Array,et=We?We.allocUnsafe:c,tt=Ar(Fe.getPrototypeOf,Fe),nt=Fe.create,it=Je.propertyIsEnumerable,ot=je.splice,at=Ye?Ye.isConcatSpreadable:c,st=Ye?Ye.iterator:c,ft=Ye?Ye.toStringTag:c,ht=function(){try{var e=ko(Fe,"defineProperty");return e({},"",{}),e;}catch(e){}}(),vt=t.clearTimeout!==Et.clearTimeout&&t.clearTimeout,At=o&&o.now!==Et.Date.now&&o.now,Mt=t.setTimeout!==Et.setTimeout&&t.setTimeout,St=Pe.ceil,Tt=Pe.floor,kt=Fe.getOwnPropertySymbols,It=We?We.isBuffer:c,Qt=t.isFinite,ir=je.join,Or=Ar(Fe.keys,Fe),Br=Pe.max,Rr=Pe.min,Pr=o.now,Fr=t.parseInt,Lr=Pe.random,Nr=je.reverse,Dr=ko(t,"DataView"),jr=ko(t,"Map"),Ur=ko(t,"Promise"),Jr=ko(t,"Set"),Hr=ko(t,"WeakMap"),zr=ko(Fe,"create"),Gr=Hr&&new Hr(),Kr={},Vr=ta(Dr),Xr=ta(jr),qr=ta(Ur),Qr=ta(Jr),Zr=ta(Hr),Wr=Ye?Ye.prototype:c,Yr=Wr?Wr.valueOf:c,$r=Wr?Wr.toString:c;function en(e){if(ms(e)&&!os(e)&&!(e instanceof on)){if(e instanceof nn)return e;if(Ge.call(e,"__wrapped__"))return ra(e);}return new nn(e);}var tn=function(){function object(){}return function(e){if(!bs(e))return{};if(nt)return nt(e);object.prototype=e;var t=new object();return object.prototype=c,t;};}();function rn(){}function nn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=c;}function on(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=E,this.__views__=[];}function an(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e;}function Mn(e,t,r,n,object,o){var f,l=1&t,h=2&t,d=4&t;if(r&&(f=object?r(e,n,object,o):r(e)),f!==c)return f;if(!bs(e))return e;var m=os(e);if(m){if(f=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ge.call(e,"index")&&(r.index=e.index,r.input=e.input);return r;}(e),!l)return Ki(e,f);}else{var y=Oo(e),v=y==O||y==B;if(cs(e))return ji(e,l);if(y==F||y==T||v&&!object){if(f=h||v?{}:Ro(e),!l)return h?function(source,object){return Vi(source,Co(source),object);}(e,function(object,source){return object&&Vi(source,Xs(source),object);}(f,e)):function(source,object){return Vi(source,Io(source),object);}(e,vn(f,e));}else{if(!yt[y])return object?e:{};f=function(object,e,t){var r=object.constructor;switch(e){case H:return Ui(object);case k:case I:return new r(+object);case z:return function(e,t){var r=t?Ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength);}(object,t);case G:case K:case V:case X:case Q:case Z:case W:case Y:case $:return Ji(object,t);case R:return new r();case P:case j:return new r(object);case N:return function(e){var t=new e.constructor(e.source,Ee.exec(e));return t.lastIndex=e.lastIndex,t;}(object);case D:return new r();case U:return symbol=object,Yr?Fe(Yr.call(symbol)):{};}var symbol;}(e,y,l);}}o||(o=new fn());var w=o.get(e);if(w)return w;o.set(e,f),_s(e)?e.forEach(function(n){f.add(Mn(n,t,r,n,e,o));}):gs(e)&&e.forEach(function(n,c){f.set(c,Mn(n,t,r,c,e,o));});var _=m?c:(d?h?_o:wo:h?Xs:Vs)(e);return Dt(_||e,function(n,c){_&&(n=e[c=n]),mn(f,c,Mn(n,t,r,c,e,o));}),f;}function En(object,source,e){var t=e.length;if(null==object)return!t;for(object=Fe(object);t--;){var r=e[t],n=source[r],o=object[r];if(o===c&&!(r in object)||!n(o))return!1;}return!0;}function Sn(e,t,r){if("function"!=typeof e)throw new De(f);return qo(function(){e.apply(c,r);},t);}function Tn(e,t,r,n){var o=-1,c=Ht,f=!0,l=e.length,h=[],d=t.length;if(!l)return h;r&&(t=Gt(t,cr(r))),n?(c=zt,f=!1):t.length>=200&&(c=lr,f=!1,t=new cn(t));e:for(;++o-1;},sn.prototype.set=function(e,t){var data=this.__data__,r=gn(data,e);return r<0?(++this.size,data.push([e,t])):data[r][1]=t,this;},un.prototype.clear=function(){this.size=0,this.__data__={hash:new an(),map:new(jr||sn)(),string:new an()};},un.prototype.delete=function(e){var t=To(this,e).delete(e);return this.size-=t?1:0,t;},un.prototype.get=function(e){return To(this,e).get(e);},un.prototype.has=function(e){return To(this,e).has(e);},un.prototype.set=function(e,t){var data=To(this,e),r=data.size;return data.set(e,t),this.size+=data.size==r?0:1,this;},cn.prototype.add=cn.prototype.push=function(e){return this.__data__.set(e,l),this;},cn.prototype.has=function(e){return this.__data__.has(e);},fn.prototype.clear=function(){this.__data__=new sn(),this.size=0;},fn.prototype.delete=function(e){var data=this.__data__,t=data.delete(e);return this.size=data.size,t;},fn.prototype.get=function(e){return this.__data__.get(e);},fn.prototype.has=function(e){return this.__data__.has(e);},fn.prototype.set=function(e,t){var data=this.__data__;if(data instanceof sn){var r=data.__data__;if(!jr||r.length<199)return r.push([e,t]),this.size=++data.size,this;data=this.__data__=new un(r);}return data.set(e,t),this.size=data.size,this;};var xn=Qi(Fn),kn=Qi(Ln,!0);function In(e,t){var r=!0;return xn(e,function(e,n,o){return r=!!t(e,n,o);}),r;}function Cn(e,t,r){for(var n=-1,o=e.length;++n0&&r(l)?t>1?Bn(l,t-1,r,n,o):Kt(o,l):n||(o[o.length]=l);}return o;}var Rn=Zi(),Pn=Zi(!0);function Fn(object,e){return object&&Rn(object,e,Vs);}function Ln(object,e){return object&&Pn(object,e,Vs);}function Nn(object,e){return Jt(e,function(e){return hs(object[e]);});}function Dn(object,path){for(var e=0,t=(path=Fi(path,object)).length;null!=object&&et;}function Hn(object,e){return null!=object&&Ge.call(object,e);}function zn(object,e){return null!=object&&e in Fe(object);}function Gn(e,t,r){for(var o=r?zt:Ht,f=e[0].length,l=e.length,h=l,d=n(l),m=1/0,y=[];h--;){var v=e[h];h&&t&&(v=Gt(v,cr(t))),m=Rr(v.length,m),d[h]=!r&&(t||f>=120&&v.length>=120)?new cn(h&&v):c;}v=e[0];var w=-1,_=d[0];e:for(;++w=f?l:l*("desc"==t[r]?-1:1);}return object.index-e.index;}(object,e,r);});}function ai(object,e,t){for(var r=-1,n=e.length,o={};++r-1;)l!==e&&ot.call(l,h,1),ot.call(e,h,1);return e;}function ui(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==c){var c=o;Fo(o)?ot.call(e,o,1):xi(e,o);}}return e;}function ci(e,t){return e+Tt(Lr()*(t-e+1));}function fi(e,t){var r="";if(!e||t<1||t>A)return r;do{t%2&&(r+=e),(t=Tt(t/2))&&(e+=e);}while(t);return r;}function hi(e,t){return Qo(zo(e,t,yu),e+"");}function di(e){return hn(tu(e));}function pi(e,t){var r=tu(e);return Yo(r,An(t,0,r.length));}function bi(object,path,e,t){if(!bs(object))return object;for(var r=-1,n=(path=Fi(path,object)).length,o=n-1,f=object;null!=f&&++rc?0:c+t),(r=r>c?c:r)<0&&(r+=c),c=t>r?0:r-t>>>0,t>>>=0;for(var f=n(c);++o>>1,f=e[c];null!==f&&!Ms(f)&&(r?f<=t:f=200){var d=t?null:lo(e);if(d)return Er(d);f=!1,o=lr,h=new cn();}else h=t?[]:l;e:for(;++n=n?e:vi(e,t,r);}var Di=vt||function(e){return Et.clearTimeout(e);};function ji(e,t){if(t)return e.slice();var r=e.length,n=et?et(r):new e.constructor(r);return e.copy(n),n;}function Ui(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t;}function Ji(e,t){var r=t?Ui(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length);}function Hi(e,t){if(e!==t){var r=e!==c,n=null===e,o=e==e,f=Ms(e),l=t!==c,h=null===t,d=t==t,m=Ms(t);if(!h&&!m&&!f&&e>t||f&&l&&d&&!h&&!m||n&&l&&d||!r&&d||!o)return 1;if(!n&&!f&&!m&&e1?t[n-1]:c,f=n>2?t[2]:c;for(o=e.length>3&&"function"==typeof o?(n--,o):c,f&&Lo(t[0],t[1],f)&&(o=n<3?c:o,n=1),object=Fe(object);++r-1?o[f?t[l]:l]:c;};}function to(e){return vo(function(t){var r=t.length,n=r,o=nn.prototype.thru;for(e&&t.reverse();n--;){var l=t[n];if("function"!=typeof l)throw new De(f);if(o&&!h&&"wrapper"==Mo(l))var h=new nn([],!0);}for(n=h?n:r;++n1&&T.reverse(),w&&mh))return!1;var m=f.get(e),y=f.get(t);if(m&&y)return m==t&&y==e;var v=-1,w=!0,_=2&r?new cn():c;for(f.set(e,t),f.set(t,e);++v-1&&e%1==0&&e1?"& ":"")+details[t],details=details.join(e>2?", ":" "),source.replace(ge,"{\n/* [wrapped with "+details+"] */\n");}(source,function(details,e){return Dt(S,function(t){var r="_."+t[0];e&t[1]&&!Ht(details,r)&&details.push(r);}),details.sort();}(function(source){var e=source.match(ye);return e?e[1].split(ve):[];}(source),r)));}function Wo(e){var t=0,r=0;return function(){var n=Pr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0];}else t=0;return e.apply(c,arguments);};}function Yo(e,t){var r=-1,n=e.length,o=n-1;for(t=t===c?n:t;++r1?e[t-1]:c;return r="function"==typeof r?(e.pop(),r):c,_a(e,r);});function ka(e){var t=en(e);return t.__chain__=!0,t;}function Ia(e,t){return t(e);}var Ca=vo(function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(object){return _n(object,e);};return!(t>1||this.__actions__.length)&&n instanceof on&&Fo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:Ia,args:[o],thisArg:c}),new nn(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push(c),e;})):this.thru(o);});var Oa=Xi(function(e,t,r){Ge.call(e,r)?++e[r]:wn(e,r,1);});var Ba=eo(aa),Ra=eo(sa);function Pa(e,t){return(os(e)?Dt:xn)(e,So(t,3));}function Fa(e,t){return(os(e)?jt:kn)(e,So(t,3));}var La=Xi(function(e,t,r){Ge.call(e,r)?e[r].push(t):wn(e,r,[t]);});var Na=hi(function(e,path,t){var r=-1,o="function"==typeof path,c=ss(e)?n(e.length):[];return xn(e,function(e){c[++r]=o?Lt(path,e,t):Kn(e,path,t);}),c;}),Da=Xi(function(e,t,r){wn(e,r,t);});function map(e,t){return(os(e)?Gt:ei)(e,So(t,3));}var ja=Xi(function(e,t,r){e[r?0:1].push(t);},function(){return[[],[]];});var Ua=hi(function(e,t){if(null==e)return[];var r=t.length;return r>1&&Lo(e,t[0],t[1])?t=[]:r>2&&Lo(t[0],t[1],t[2])&&(t=[t[0]]),oi(e,Bn(t,1),[]);}),Ja=At||function(){return Et.Date.now();};function Ha(e,t,r){return t=r?c:t,t=e&&null==t?e.length:t,po(e,v,c,c,c,c,t);}function za(e,t){var r;if("function"!=typeof t)throw new De(f);return e=Is(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=c),r;};}var Ga=hi(function(e,t,r){var n=1;if(r.length){var o=Mr(r,Eo(Ga));n|=m;}return po(e,n,t,r,o);}),Ka=hi(function(object,e,t){var r=3;if(t.length){var n=Mr(t,Eo(Ka));r|=m;}return po(e,r,object,t,n);});function Va(e,t,r){var n,o,l,h,d,m,y=0,v=!1,w=!1,_=!0;if("function"!=typeof e)throw new De(f);function A(time){var t=n,r=o;return n=o=c,y=time,h=e.apply(r,t);}function M(time){return y=time,d=qo(S,t),v?A(time):h;}function E(time){var e=time-m;return m===c||e>=t||e<0||w&&time-y>=l;}function S(){var time=Ja();if(E(time))return T(time);d=qo(S,function(time){var e=t-(time-m);return w?Rr(e,l-(time-y)):e;}(time));}function T(time){return d=c,_&&n?A(time):(n=o=c,h);}function x(){var time=Ja(),e=E(time);if(n=arguments,o=this,m=time,e){if(d===c)return M(m);if(w)return Di(d),d=qo(S,t),A(m);}return d===c&&(d=qo(S,t)),h;}return t=Os(t)||0,bs(r)&&(v=!!r.leading,l=(w="maxWait"in r)?Br(Os(r.maxWait)||0,t):l,_="trailing"in r?!!r.trailing:_),x.cancel=function(){d!==c&&Di(d),y=0,n=m=o=d=c;},x.flush=function(){return d===c?h:T(Ja());},x;}var Xa=hi(function(e,t){return Sn(e,1,t);}),qa=hi(function(e,t,r){return Sn(e,Os(t)||0,r);});function Qa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new De(f);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],c=r.cache;if(c.has(o))return c.get(o);var f=e.apply(this,n);return r.cache=c.set(o,f)||c,f;};return r.cache=new(Qa.Cache||un)(),r;}function Za(e){if("function"!=typeof e)throw new De(f);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2]);}return!e.apply(this,t);};}Qa.Cache=un;var Wa=Li(function(e,t){var r=(t=1==t.length&&os(t[0])?Gt(t[0],cr(So())):Gt(Bn(t,1),cr(So()))).length;return hi(function(n){for(var o=-1,c=Rr(n.length,r);++o=t;}),is=Vn(function(){return arguments;}())?Vn:function(e){return ms(e)&&Ge.call(e,"callee")&&!it.call(e,"callee");},os=n.isArray,as=Ct?cr(Ct):function(e){return ms(e)&&Un(e)==H;};function ss(e){return null!=e&&ps(e.length)&&!hs(e);}function us(e){return ms(e)&&ss(e);}var cs=It||Ou,fs=Ot?cr(Ot):function(e){return ms(e)&&Un(e)==I;};function ls(e){if(!ms(e))return!1;var t=Un(e);return t==C||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!vs(e);}function hs(e){if(!bs(e))return!1;var t=Un(e);return t==O||t==B||"[object AsyncFunction]"==t||"[object Proxy]"==t;}function ds(e){return"number"==typeof e&&e==Is(e);}function ps(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=A;}function bs(e){var t=typeof e;return null!=e&&("object"==t||"function"==t);}function ms(e){return null!=e&&"object"==typeof e;}var gs=Bt?cr(Bt):function(e){return ms(e)&&Oo(e)==R;};function ys(e){return"number"==typeof e||ms(e)&&Un(e)==P;}function vs(e){if(!ms(e)||Un(e)!=F)return!1;var t=tt(e);if(null===t)return!0;var r=Ge.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ze.call(r)==qe;}var ws=Rt?cr(Rt):function(e){return ms(e)&&Un(e)==N;};var _s=Pt?cr(Pt):function(e){return ms(e)&&Oo(e)==D;};function As(e){return"string"==typeof e||!os(e)&&ms(e)&&Un(e)==j;}function Ms(e){return"symbol"==typeof e||ms(e)&&Un(e)==U;}var Es=Ft?cr(Ft):function(e){return ms(e)&&ps(e.length)&&!!gt[Un(e)];};var Ss=uo($n),Ts=uo(function(e,t){return e<=t;});function xs(e){if(!e)return[];if(ss(e))return As(e)?xr(e):Ki(e);if(st&&e[st])return function(e){for(var data,t=[];!(data=e.next()).done;)t.push(data.value);return t;}(e[st]());var t=Oo(e);return(t==R?_r:t==D?Er:tu)(e);}function ks(e){return e?(e=Os(e))===_||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0;}function Is(e){var t=ks(e),r=t%1;return t==t?r?t-r:t:0;}function Cs(e){return e?An(Is(e),0,E):0;}function Os(e){if("number"==typeof e)return e;if(Ms(e))return M;if(bs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=bs(t)?t+"":t;}if("string"!=typeof e)return 0===e?e:+e;e=ur(e);var r=Te.test(e);return r||ke.test(e)?_t(e.slice(2),r?2:8):Se.test(e)?M:+e;}function Bs(e){return Vi(e,Xs(e));}function Rs(e){return null==e?"":Si(e);}var Ps=qi(function(object,source){if(Uo(source)||ss(source))Vi(source,Vs(source),object);else for(var e in source)Ge.call(source,e)&&mn(object,e,source[e]);}),Fs=qi(function(object,source){Vi(source,Xs(source),object);}),Ls=qi(function(object,source,e,t){Vi(source,Xs(source),object,t);}),Ns=qi(function(object,source,e,t){Vi(source,Vs(source),object,t);}),Ds=vo(_n);var js=hi(function(object,e){object=Fe(object);var t=-1,r=e.length,n=r>2?e[2]:c;for(n&&Lo(e[0],e[1],n)&&(r=1);++t1),path;}),Vi(object,_o(object),t),r&&(t=Mn(t,7,go));for(var n=e.length;n--;)xi(t,e[n]);return t;});var Ws=vo(function(object,e){return null==object?{}:function(object,e){return ai(object,e,function(e,path){return Hs(object,path);});}(object,e);});function Ys(object,e){if(null==object)return{};var t=Gt(_o(object),function(e){return[e];});return e=So(e),ai(object,t,function(t,path){return e(t,path[0]);});}var $s=ho(Vs),eu=ho(Xs);function tu(object){return null==object?[]:fr(object,Vs(object));}var ru=Yi(function(e,t,r){return t=t.toLowerCase(),e+(r?nu(t):t);});function nu(e){return lu(Rs(e).toLowerCase());}function iu(e){return(e=Rs(e))&&e.replace(Ce,gr).replace(ct,"");}var ou=Yi(function(e,t,r){return e+(r?"-":"")+t.toLowerCase();}),au=Yi(function(e,t,r){return e+(r?" ":"")+t.toLowerCase();}),su=Wi("toLowerCase");var uu=Yi(function(e,t,r){return e+(r?"_":"")+t.toLowerCase();});var cu=Yi(function(e,t,r){return e+(r?" ":"")+lu(t);});var fu=Yi(function(e,t,r){return e+(r?" ":"")+t.toUpperCase();}),lu=Wi("toUpperCase");function hu(e,pattern,t){return e=Rs(e),(pattern=t?c:pattern)===c?function(e){return pt.test(e);}(e)?function(e){return e.match(lt)||[];}(e):function(e){return e.match(we)||[];}(e):e.match(pattern)||[];}var du=hi(function(e,t){try{return Lt(e,c,t);}catch(e){return ls(e)?e:new me(e);}}),pu=vo(function(object,e){return Dt(e,function(e){e=ea(e),wn(object,e,Ga(object[e],object));}),object;});function bu(e){return function(){return e;};}var mu=to(),gu=to(!0);function yu(e){return e;}function vu(e){return Zn("function"==typeof e?e:Mn(e,1));}var wu=hi(function(path,e){return function(object){return Kn(object,path,e);};}),_u=hi(function(object,e){return function(path){return Kn(object,path,e);};});function Au(object,source,e){var t=Vs(source),r=Nn(source,t);null!=e||bs(source)&&(r.length||!t.length)||(e=source,source=object,object=this,r=Nn(source,Vs(source)));var n=!(bs(e)&&"chain"in e&&!e.chain),o=hs(object);return Dt(r,function(e){var t=source[e];object[e]=t,o&&(object.prototype[e]=function(){var e=this.__chain__;if(n||e){var r=object(this.__wrapped__),o=r.__actions__=Ki(this.__actions__);return o.push({func:t,args:arguments,thisArg:object}),r.__chain__=e,r;}return t.apply(object,Kt([this.value()],arguments));});}),object;}function Mu(){}var Eu=oo(Gt),Su=oo(Ut),Tu=oo(qt);function xu(path){return No(path)?nr(ea(path)):function(path){return function(object){return Dn(object,path);};}(path);}var ku=so(),Iu=so(!0);function Cu(){return[];}function Ou(){return!1;}var Bu=io(function(e,t){return e+t;},0),Ru=fo("ceil"),Pu=io(function(e,t){return e/t;},1),Fu=fo("floor");var source,Lu=io(function(e,t){return e*t;},1),Nu=fo("round"),Du=io(function(e,t){return e-t;},0);return en.after=function(e,t){if("function"!=typeof t)throw new De(f);return e=Is(e),function(){if(--e<1)return t.apply(this,arguments);};},en.ary=Ha,en.assign=Ps,en.assignIn=Fs,en.assignInWith=Ls,en.assignWith=Ns,en.at=Ds,en.before=za,en.bind=Ga,en.bindAll=pu,en.bindKey=Ka,en.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return os(e)?e:[e];},en.chain=ka,en.chunk=function(e,t,r){t=(r?Lo(e,t,r):t===c)?1:Br(Is(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var f=0,l=0,h=n(St(o/t));fo?0:o+r),(n=n===c||n>o?o:Is(n))<0&&(n+=o),n=r>n?0:Cs(n);r>>0)?(e=Rs(e))&&("string"==typeof t||null!=t&&!ws(t))&&!(t=Si(t))&&wr(e)?Ni(xr(e),0,r):e.split(t,r):[];},en.spread=function(e,t){if("function"!=typeof e)throw new De(f);return t=null==t?0:Br(Is(t),0),hi(function(r){var n=r[t],o=Ni(r,0,t);return n&&Kt(o,n),Lt(e,this,o);});},en.tail=function(e){var t=null==e?0:e.length;return t?vi(e,1,t):[];},en.take=function(e,t,r){return e&&e.length?vi(e,0,(t=r||t===c?1:Is(t))<0?0:t):[];},en.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?vi(e,(t=n-(t=r||t===c?1:Is(t)))<0?0:t,n):[];},en.takeRightWhile=function(e,t){return e&&e.length?Ii(e,So(t,3),!1,!0):[];},en.takeWhile=function(e,t){return e&&e.length?Ii(e,So(t,3)):[];},en.tap=function(e,t){return t(e),e;},en.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new De(f);return bs(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Va(e,t,{leading:n,maxWait:t,trailing:o});},en.thru=Ia,en.toArray=xs,en.toPairs=$s,en.toPairsIn=eu,en.toPath=function(e){return os(e)?Gt(e,ea):Ms(e)?[e]:Ki($o(Rs(e)));},en.toPlainObject=Bs,en.transform=function(object,e,t){var r=os(object),n=r||cs(object)||Es(object);if(e=So(e,4),null==t){var o=object&&object.constructor;t=n?r?new o():[]:bs(object)&&hs(o)?tn(tt(object)):{};}return(n?Dt:Fn)(object,function(r,n,object){return e(t,r,n,object);}),t;},en.unary=function(e){return Ha(e,1);},en.union=ga,en.unionBy=ya,en.unionWith=va,en.uniq=function(e){return e&&e.length?Ti(e):[];},en.uniqBy=function(e,t){return e&&e.length?Ti(e,So(t,2)):[];},en.uniqWith=function(e,t){return t="function"==typeof t?t:c,e&&e.length?Ti(e,c,t):[];},en.unset=function(object,path){return null==object||xi(object,path);},en.unzip=wa,en.unzipWith=_a,en.update=function(object,path,e){return null==object?object:ki(object,path,Pi(e));},en.updateWith=function(object,path,e,t){return t="function"==typeof t?t:c,null==object?object:ki(object,path,Pi(e),t);},en.values=tu,en.valuesIn=function(object){return null==object?[]:fr(object,Xs(object));},en.without=Aa,en.words=hu,en.wrap=function(e,t){return Ya(Pi(t),e);},en.xor=Ma,en.xorBy=Ea,en.xorWith=Sa,en.zip=Ta,en.zipObject=function(e,t){return Bi(e||[],t||[],mn);},en.zipObjectDeep=function(e,t){return Bi(e||[],t||[],bi);},en.zipWith=xa,en.entries=$s,en.entriesIn=eu,en.extend=Fs,en.extendWith=Ls,Au(en,en),en.add=Bu,en.attempt=du,en.camelCase=ru,en.capitalize=nu,en.ceil=Ru,en.clamp=function(e,t,r){return r===c&&(r=t,t=c),r!==c&&(r=(r=Os(r))==r?r:0),t!==c&&(t=(t=Os(t))==t?t:0),An(Os(e),t,r);},en.clone=function(e){return Mn(e,4);},en.cloneDeep=function(e){return Mn(e,5);},en.cloneDeepWith=function(e,t){return Mn(e,5,t="function"==typeof t?t:c);},en.cloneWith=function(e,t){return Mn(e,4,t="function"==typeof t?t:c);},en.conformsTo=function(object,source){return null==source||En(object,source,Vs(source));},en.deburr=iu,en.defaultTo=function(e,t){return null==e||e!=e?t:e;},en.divide=Pu,en.endsWith=function(e,t,r){e=Rs(e),t=Si(t);var n=e.length,o=r=r===c?n:An(Is(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t;},en.eq=ts,en.escape=function(e){return(e=Rs(e))&&ae.test(e)?e.replace(ie,yr):e;},en.escapeRegExp=function(e){return(e=Rs(e))&&pe.test(e)?e.replace(de,"\\$&"):e;},en.every=function(e,t,r){var n=os(e)?Ut:In;return r&&Lo(e,t,r)&&(t=c),n(e,So(t,3));},en.find=Ba,en.findIndex=aa,en.findKey=function(object,e){return Zt(object,So(e,3),Fn);},en.findLast=Ra,en.findLastIndex=sa,en.findLastKey=function(object,e){return Zt(object,So(e,3),Ln);},en.floor=Fu,en.forEach=Pa,en.forEachRight=Fa,en.forIn=function(object,e){return null==object?object:Rn(object,So(e,3),Xs);},en.forInRight=function(object,e){return null==object?object:Pn(object,So(e,3),Xs);},en.forOwn=function(object,e){return object&&Fn(object,So(e,3));},en.forOwnRight=function(object,e){return object&&Ln(object,So(e,3));},en.get=Js,en.gt=rs,en.gte=ns,en.has=function(object,path){return null!=object&&Bo(object,path,Hn);},en.hasIn=Hs,en.head=head,en.identity=yu,en.includes=function(e,t,r,n){e=ss(e)?e:tu(e),r=r&&!n?Is(r):0;var o=e.length;return r<0&&(r=Br(o+r,0)),As(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Yt(e,t,r)>-1;},en.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:Is(r);return o<0&&(o=Br(n+o,0)),Yt(e,t,o);},en.inRange=function(e,t,r){return t=ks(t),r===c?(r=t,t=0):r=ks(r),function(e,t,r){return e>=Rr(t,r)&&e=-9007199254740991&&e<=A;},en.isSet=_s,en.isString=As,en.isSymbol=Ms,en.isTypedArray=Es,en.isUndefined=function(e){return e===c;},en.isWeakMap=function(e){return ms(e)&&Oo(e)==J;},en.isWeakSet=function(e){return ms(e)&&"[object WeakSet]"==Un(e);},en.join=function(e,t){return null==e?"":ir.call(e,t);},en.kebabCase=ou,en.last=ha,en.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==c&&(o=(o=Is(r))<0?Br(n+o,0):Rr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n;}(e,t,o):Wt(e,er,o,!0);},en.lowerCase=au,en.lowerFirst=su,en.lt=Ss,en.lte=Ts,en.max=function(e){return e&&e.length?Cn(e,yu,Jn):c;},en.maxBy=function(e,t){return e&&e.length?Cn(e,So(t,2),Jn):c;},en.mean=function(e){return rr(e,yu);},en.meanBy=function(e,t){return rr(e,So(t,2));},en.min=function(e){return e&&e.length?Cn(e,yu,$n):c;},en.minBy=function(e,t){return e&&e.length?Cn(e,So(t,2),$n):c;},en.stubArray=Cu,en.stubFalse=Ou,en.stubObject=function(){return{};},en.stubString=function(){return"";},en.stubTrue=function(){return!0;},en.multiply=Lu,en.nth=function(e,t){return e&&e.length?ii(e,Is(t)):c;},en.noConflict=function(){return Et._===this&&(Et._=Qe),this;},en.noop=Mu,en.now=Ja,en.pad=function(e,t,r){e=Rs(e);var n=(t=Is(t))?Tr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return ao(Tt(o),r)+e+ao(St(o),r);},en.padEnd=function(e,t,r){e=Rs(e);var n=(t=Is(t))?Tr(e):0;return t&&nt){var n=e;e=t,t=n;}if(r||e%1||t%1){var o=Lr();return Rr(e+o*(t-e+wt("1e-"+((o+"").length-1))),t);}return ci(e,t);},en.reduce=function(e,t,r){var n=os(e)?Vt:or,o=arguments.length<3;return n(e,So(t,4),r,o,xn);},en.reduceRight=function(e,t,r){var n=os(e)?Xt:or,o=arguments.length<3;return n(e,So(t,4),r,o,kn);},en.repeat=function(e,t,r){return t=(r?Lo(e,t,r):t===c)?1:Is(t),fi(Rs(e),t);},en.replace=function(){var e=arguments,t=Rs(e[0]);return e.length<3?t:t.replace(e[1],e[2]);},en.result=function(object,path,e){var t=-1,r=(path=Fi(path,object)).length;for(r||(r=1,object=c);++tA)return[];var r=E,n=Rr(e,E);t=So(t),e-=E;for(var o=sr(n,t);++r=f)return e;var h=r-Tr(n);if(h<1)return n;var d=l?Ni(l,0,h).join(""):e.slice(0,h);if(o===c)return d+n;if(l&&(h+=d.length-h),ws(o)){if(e.slice(h).search(o)){var m,y=d;for(o.global||(o=Le(o.source,Rs(Ee.exec(o))+"g")),o.lastIndex=0;m=o.exec(y);)var v=m.index;d=d.slice(0,v===c?h:v);}}else if(e.indexOf(Si(o),h)!=h){var w=d.lastIndexOf(o);w>-1&&(d=d.slice(0,w));}return d+n;},en.unescape=function(e){return(e=Rs(e))&&oe.test(e)?e.replace(ne,Ir):e;},en.uniqueId=function(e){var t=++Ke;return Rs(e)+t;},en.upperCase=fu,en.upperFirst=lu,en.each=Pa,en.eachRight=Fa,en.first=head,Au(en,(source={},Fn(en,function(e,t){Ge.call(en.prototype,t)||(source[t]=e);}),source),{chain:!1}),en.VERSION="4.17.21",Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){en[e].placeholder=en;}),Dt(["drop","take"],function(e,t){on.prototype[e]=function(r){r=r===c?1:Br(Is(r),0);var n=this.__filtered__&&!t?new on(this):this.clone();return n.__filtered__?n.__takeCount__=Rr(r,n.__takeCount__):n.__views__.push({size:Rr(r,E),type:e+(n.__dir__<0?"Right":"")}),n;},on.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse();};}),Dt(["filter","map","takeWhile"],function(e,t){var r=t+1,n=1==r||3==r;on.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:So(e,3),type:r}),t.__filtered__=t.__filtered__||n,t;};}),Dt(["head","last"],function(e,t){var r="take"+(t?"Right":"");on.prototype[e]=function(){return this[r](1).value()[0];};}),Dt(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");on.prototype[e]=function(){return this.__filtered__?new on(this):this[r](1);};}),on.prototype.compact=function(){return this.filter(yu);},on.prototype.find=function(e){return this.filter(e).head();},on.prototype.findLast=function(e){return this.reverse().find(e);},on.prototype.invokeMap=hi(function(path,e){return"function"==typeof path?new on(this):this.map(function(t){return Kn(t,path,e);});}),on.prototype.reject=function(e){return this.filter(Za(So(e)));},on.prototype.slice=function(e,t){e=Is(e);var r=this;return r.__filtered__&&(e>0||t<0)?new on(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==c&&(r=(t=Is(t))<0?r.dropRight(-t):r.take(t-e)),r);},on.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse();},on.prototype.toArray=function(){return this.take(E);},Fn(on.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=en[n?"take"+("last"==t?"Right":""):t],f=n||/^find/.test(t);o&&(en.prototype[t]=function(){var t=this.__wrapped__,l=n?[1]:arguments,h=t instanceof on,d=l[0],m=h||os(t),y=function(e){var t=o.apply(en,Kt([e],l));return n&&v?t[0]:t;};m&&r&&"function"==typeof d&&1!=d.length&&(h=m=!1);var v=this.__chain__,w=!!this.__actions__.length,_=f&&!v,A=h&&!w;if(!f&&m){t=A?t:new on(this);var M=e.apply(t,l);return M.__actions__.push({func:Ia,args:[y],thisArg:c}),new nn(M,v);}return _&&A?e.apply(this,l):(M=this.thru(y),_?n?M.value()[0]:M.value():M);});}),Dt(["pop","push","shift","sort","splice","unshift"],function(e){var t=je[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);en.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(os(o)?o:[],e);}return this[r](function(r){return t.apply(os(r)?r:[],e);});};}),Fn(on.prototype,function(e,t){var r=en[t];if(r){var n=r.name+"";Ge.call(Kr,n)||(Kr[n]=[]),Kr[n].push({name:t,func:r});}}),Kr[ro(c,2).name]=[{name:"wrapper",func:c}],on.prototype.clone=function(){var e=new on(this.__wrapped__);return e.__actions__=Ki(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ki(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ki(this.__views__),e;},on.prototype.reverse=function(){if(this.__filtered__){var e=new on(this);e.__dir__=-1,e.__filtered__=!0;}else(e=this.clone()).__dir__*=-1;return e;},on.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=os(e),n=t<0,o=r?e.length:0,view=function(e,t,r){var n=-1,o=r.length;for(;++n=this.__values__.length;return{done:e,value:e?c:this.__values__[this.__index__++]};},en.prototype.plant=function(e){for(var t,r=this;r instanceof rn;){var n=ra(r);n.__index__=0,n.__values__=c,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__;}return o.__wrapped__=e,t;},en.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof on){var t=e;return this.__actions__.length&&(t=new on(this)),(t=t.reverse()).__actions__.push({func:Ia,args:[ma],thisArg:c}),new nn(t,this.__chain__);}return this.thru(ma);},en.prototype.toJSON=en.prototype.valueOf=en.prototype.value=function(){return Ci(this.__wrapped__,this.__actions__);},en.prototype.first=en.prototype.head,st&&(en.prototype[st]=function(){return this;}),en;}();Et._=Cr,(o=function(){return Cr;}.call(t,r,t,n))===c||(n.exports=o);}).call(this);}).call(this,r(18),r(59)(e));},function(e,t){},function(e,t,r){"use strict";t.sha1=r(327),t.sha224=r(328),t.sha256=r(178),t.sha384=r(329),t.sha512=r(179);},function(e,t,r){"use strict";var n=r(45),o=r(84),c=r(177),f=n.rotl32,l=n.sum32,h=n.sum32_5,d=c.ft_1,m=o.BlockHash,y=[1518500249,1859775393,2400959708,3395469782];function v(){if(!(this instanceof v))return new v();m.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80);}n.inherits(v,m),e.exports=v,v.blockSize=512,v.outSize=160,v.hmacStrength=80,v.padLength=64,v.prototype._update=function(e,t){for(var r=this.W,i=0;i<16;i++)r[i]=e[t+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),o(e.length<=this.blockSize);for(var i=e.length;i=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout();},t));},r(333),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate;}).call(this,r(18));},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,html,o,c,f,l=1,h={},d=!1,m=e.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(e);y=y&&y.setTimeout?y:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick(function(){w(e);});}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1;},e.postMessage("","*"),e.onmessage=r,t;}}()?e.MessageChannel?((o=new MessageChannel()).port1.onmessage=function(e){w(e.data);},n=function(e){o.port2.postMessage(e);}):m&&"onreadystatechange"in m.createElement("script")?(html=m.documentElement,n=function(e){var script=m.createElement("script");script.onreadystatechange=function(){w(e),script.onreadystatechange=null,html.removeChild(script),script=null;},html.appendChild(script);}):n=function(e){setTimeout(w,0,e);}:(c="setImmediate$"+Math.random()+"$",f=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(c)&&w(+t.data.slice(c.length));},e.addEventListener?e.addEventListener("message",f,!1):e.attachEvent("onmessage",f),n=function(t){e.postMessage(c+t,"*");}),y.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i=0&&e<=256&&!(e%1)?"1"+v.substring(0,e):l.throwArgumentError("invalid decimal size","decimals",e);}function _(e,t){null==t&&(t=0);const r=w(t),n=(e=f.a.from(e)).lt(d);n&&(e=e.mul(m));let o=e.mod(r).toString();for(;o.length2&&l.throwArgumentError("too many decimal points","value",e);let c=o[0],h=o[1];for(c||(c="0"),h||(h="0");"0"===h[h.length-1];)h=h.substring(0,h.length-1);for(h.length>r.length-1&&y("fractional component exceeds decimals","underflow","parseFixed"),""===h&&(h="0");h.lengthnull==e[t]?n:(typeof e[t]!==r&&l.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=o("signed","boolean",t),r=o("width","number",r),n=o("decimals","number",n);}return r%8&&l.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&l.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new M(h,t,r,n);}}class E{constructor(e,t,r,n){l.checkNew(new.target,E),e!==h&&l.throwError("cannot use FixedNumber constructor; use FixedNumber.from",o.b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this);}_checkFormat(e){this.format.name!==e.format.name&&l.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e);}addUnsafe(e){this._checkFormat(e);const a=A(this._value,this.format.decimals),b=A(e._value,e.format.decimals);return E.fromValue(a.add(b),this.format.decimals,this.format);}subUnsafe(e){this._checkFormat(e);const a=A(this._value,this.format.decimals),b=A(e._value,e.format.decimals);return E.fromValue(a.sub(b),this.format.decimals,this.format);}mulUnsafe(e){this._checkFormat(e);const a=A(this._value,this.format.decimals),b=A(e._value,e.format.decimals);return E.fromValue(a.mul(b).div(this.format._multiplier),this.format.decimals,this.format);}divUnsafe(e){this._checkFormat(e);const a=A(this._value,this.format.decimals),b=A(e._value,e.format.decimals);return E.fromValue(a.mul(this.format._multiplier).div(b),this.format.decimals,this.format);}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=E.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(S.toFormat(t.format))),t;}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=E.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(S.toFormat(t.format))),t;}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&l.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=E.from("1"+v.substring(0,e),this.format),n=T.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r);}isZero(){return"0.0"===this._value||"0"===this._value;}isNegative(){return"-"===this._value[0];}toString(){return this._value;}toHexString(e){if(null==e)return this._hex;e%8&&l.throwArgumentError("invalid byte width","width",e);const t=f.a.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Object(n.h)(t,e/8);}toUnsafeFloat(){return parseFloat(this.toString());}toFormat(e){return E.fromString(this._value,e);}static fromValue(e,t,r){return null!=r||null==t||Object(f.d)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),E.fromString(_(e,t),M.from(r));}static fromString(e,t){null==t&&(t="fixed");const r=M.from(t),o=A(e,r.decimals);!r.signed&&o.lt(d)&&y("unsigned value cannot be negative","overflow","value",e);let c=null;r.signed?c=o.toTwos(r.width).toHexString():(c=o.toHexString(),c=Object(n.h)(c,r.width/8));const f=_(o,r.decimals);return new E(h,c,f,r);}static fromBytes(e,t){null==t&&(t="fixed");const r=M.from(t);if(Object(n.a)(e).length>r.width/8)throw new Error("overflow");let o=f.a.from(e);r.signed&&(o=o.fromTwos(r.width));const c=o.toTwos((r.signed?0:1)+r.width).toHexString(),l=_(o,r.decimals);return new E(h,c,l,r);}static from(e,t){if("string"==typeof e)return E.fromString(e,t);if(Object(n.j)(e))return E.fromBytes(e,t);try{return E.fromValue(e,0,t);}catch(e){if(e.code!==o.b.errors.INVALID_ARGUMENT)throw e;}return l.throwArgumentError("invalid FixedNumber value","value",e);}static isFixedNumber(e){return!(!e||!e._isFixedNumber);}}const S=E.from(1),T=E.from("0.5");},function(e,t,r){t.smt=r(182),t.eddsa=r(433),t.mimc7=r(244),t.mimcsponge=r(250),t.babyJub=r(149),t.pedersenHash=r(242),t.SMT=r(182).SMT,t.SMTMemDB=r(237),t.poseidon=r(148);},function(e,t,r){const n=r(43),o=[0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4];e.exports.fromString=function(s,e){return e&&10!=e?16==e?BigInt("0x"+s):void 0:BigInt(s);},e.exports.fromArray=function(a,e){let t=0n;e=BigInt(e);for(let i=0;i>BigInt(e);},e.exports.shl=e.exports.shiftLeft,e.exports.shr=e.exports.shiftRight,e.exports.isOdd=function(a){return 1n==(1n&BigInt(a));},e.exports.naf=function(e){let t=BigInt(e);const r=[];for(;t;){if(1n&t){const e=2-Number(t%4n);r.push(e),t-=BigInt(e);}else r.push(0);t>>=1n;}return r;},e.exports.bits=function(e){let t=BigInt(e);const r=[];for(;t;)1n&t?r.push(1):r.push(0),t>>=1n;return r;},e.exports.toNumber=function(s){return n(s<0x100000000n),Number(s);},e.exports.toArray=function(s,e){const t=[];let r=BigInt(s);for(e=BigInt(e);r;)t.unshift(Number(r%e)),r/=e;return t;},e.exports.e=function(a){return BigInt(a);},e.exports.add=function(a,b){return BigInt(a)+BigInt(b);},e.exports.sub=function(a,b){return BigInt(a)-BigInt(b);},e.exports.neg=function(a){return-BigInt(a);},e.exports.mul=function(a,b){return BigInt(a)*BigInt(b);},e.exports.square=function(a){return BigInt(a)*BigInt(a);},e.exports.div=function(a,b){return BigInt(a)/BigInt(b);},e.exports.mod=function(a,b){return BigInt(a)%BigInt(b);},e.exports.eq=function(a,b){return BigInt(a)==BigInt(b);},e.exports.neq=function(a,b){return BigInt(a)!=BigInt(b);},e.exports.lt=function(a,b){return BigInt(a)BigInt(b);},e.exports.leq=function(a,b){return BigInt(a)<=BigInt(b);},e.exports.geq=function(a,b){return BigInt(a)>=BigInt(b);},e.exports.band=function(a,b){return BigInt(a)&BigInt(b);},e.exports.bor=function(a,b){return BigInt(a)|BigInt(b);},e.exports.bxor=function(a,b){return BigInt(a)^BigInt(b);},e.exports.band=function(a,b){return BigInt(a)&&BigInt(b);},e.exports.bor=function(a,b){return BigInt(a)||BigInt(b);},e.exports.bnot=function(a){return!BigInt(a);};},function(e,t,r){"use strict";var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;function f(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e);}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e];}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e;}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("");}catch(e){return!1;}}()?Object.assign:function(e,source){for(var t,r,l=f(e),s=1;s=n)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;}}),f=r[i];i=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),_(r)?n.showHidden=r:r&&t._extend(n,r),S(n.showHidden)&&(n.showHidden=!1),S(n.depth)&&(n.depth=2),S(n.colors)&&(n.colors=!1),S(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=h),m(n,e,n.depth);}function h(e,t){var style=l.styles[t];return style?"["+l.colors[style][0]+"m"+e+"["+l.colors[style][1]+"m":e;}function d(e,t){return e;}function m(e,r,n){if(e.customInspect&&r&&C(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return E(o)||(o=m(e,o,n)),o;}var c=function(e,t){if(S(t))return e.stylize("undefined","undefined");if(E(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string");}if(M(t))return e.stylize(""+t,"number");if(_(t))return e.stylize(""+t,"boolean");if(A(t))return e.stylize("null","null");}(e,r);if(c)return c;var f=Object.keys(r),l=function(e){var t={};return e.forEach(function(e,r){t[e]=!0;}),t;}(f);if(e.showHidden&&(f=Object.getOwnPropertyNames(r)),I(r)&&(f.indexOf("message")>=0||f.indexOf("description")>=0))return y(r);if(0===f.length){if(C(r)){var h=r.name?": "+r.name:"";return e.stylize("[Function"+h+"]","special");}if(T(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(I(r))return y(r);}var output,base="",d=!1,x=["{","}"];(w(r)&&(d=!0,x=["[","]"]),C(r))&&(base=" [Function"+(r.name?": "+r.name:"")+"]");return T(r)&&(base=" "+RegExp.prototype.toString.call(r)),k(r)&&(base=" "+Date.prototype.toUTCString.call(r)),I(r)&&(base=" "+y(r)),0!==f.length||d&&0!=r.length?n<0?T(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),output=d?function(e,t,r,n,o){for(var output=[],i=0,c=t.length;i=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1;},0)>60)return e[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+e[1];return e[0]+base+" "+output.join(", ")+" "+e[1];}(output,base,x)):x[0]+base+x[1];}function y(e){return"["+Error.prototype.toString.call(e)+"]";}function v(e,t,r,n,o,c){var f,l,desc;if((desc=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?l=desc.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):desc.set&&(l=e.stylize("[Setter]","special")),F(n,o)||(f="["+o+"]"),l||(e.seen.indexOf(desc.value)<0?(l=A(r)?m(e,desc.value,null):m(e,desc.value,r-1)).indexOf("\n")>-1&&(l=c?l.split("\n").map(function(line){return" "+line;}).join("\n").substr(2):"\n"+l.split("\n").map(function(line){return" "+line;}).join("\n")):l=e.stylize("[Circular]","special")),S(f)){if(c&&o.match(/^\d+$/))return l;(f=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.substr(1,f.length-2),f=e.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=e.stylize(f,"string"));}return f+": "+l;}function w(e){return Array.isArray(e);}function _(e){return"boolean"==typeof e;}function A(e){return null===e;}function M(e){return"number"==typeof e;}function E(e){return"string"==typeof e;}function S(e){return void 0===e;}function T(e){return x(e)&&"[object RegExp]"===O(e);}function x(e){return"object"==typeof e&&null!==e;}function k(e){return x(e)&&"[object Date]"===O(e);}function I(e){return x(e)&&("[object Error]"===O(e)||e instanceof Error);}function C(e){return"function"==typeof e;}function O(e){return Object.prototype.toString.call(e);}function B(e){return e<10?"0"+e.toString(10):e.toString(10);}t.debuglog=function(r){if(S(c)&&(c=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!f[r])if(new RegExp("\\b"+r+"\\b","i").test(c)){var n=e.pid;f[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e);};}else f[r]=function(){};return f[r];},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=w,t.isBoolean=_,t.isNull=A,t.isNullOrUndefined=function(e){return null==e;},t.isNumber=M,t.isString=E,t.isSymbol=function(e){return"symbol"==typeof e;},t.isUndefined=S,t.isRegExp=T,t.isObject=x,t.isDate=k,t.isError=I,t.isFunction=C,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e;},t.isBuffer=r(339);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var e=new Date(),time=[B(e.getHours()),B(e.getMinutes()),B(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],time].join(" ");}function F(e,t){return Object.prototype.hasOwnProperty.call(e,t);}t.log=function(){console.log("%s - %s",P(),t.format.apply(t,arguments));},t.inherits=r(340),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e;};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r;}return t(e);}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(L&&e[L]){var t;if("function"!=typeof(t=e[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),t;}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n;}),o=[],i=0;i>1,h=n(e,t,r-1,o,2*c),d=n(e,t,r-1,o+c,2*c),m=new Array(f);for(let i=0;i=0;)this.w[n]=this.F.square(this.w[n+1]),this.wi[n]=this.F.square(this.wi[n+1]),n--;this.roots=[],this._setRoots(15);}_setRoots(e){for(let i=e;i>=0&&!this.roots[i];i--){let e=this.F.one;const t=1<a.length&&([b,a]=[a,b]),b.length<=2||b.length0){return new Array(e).fill(this.F.zero).concat(p);}return-e>=p.length?[]:p.slice(-e);}eval2(p,e){let t=this.F.zero,r=this.F.one;for(let i=0;i>1),t.mul(r,e(p,f,n+o,o<<1,c>>1)));return l;}(this.extend(p,r),e,0,1,r);}lagrange(e){let t=[this.F.one];for(let i=0;i>1,f=this._fft(e,t-1,r,2*n),l=this._fft(e,t-1,r+n,2*n),h=new Array(o);let d=this.F.one;for(let i=0;i0&&this.F.eq(p[i],this.F.zero);)i--;return p.slice(0,i+1);}eq(a,b){const e=this.reduce(a),t=this.reduce(b);if(e.length!=t.length)return!1;for(let i=0;i=0;i--)t[i]=this.F.add(this.F.mul(t[i+1],e),p[i+1]);return t;}_next2Power(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e;}toString(p){let e="";for(let i=this.normalize(p).length-1;i>=0;i--)this.F.eq(p[i],this.F.zero)||(""!=e&&(e+=" + "),e+=p[i].toString(10),i>0&&(e+="x",i>1&&(e=e+"^"+i)));return e;}normalize(p){const e=new Array(p.length);for(let i=0;i2*f&&(h=this.sub(this.scaleX([this.F.one],2*f),this.mul(s,c)));let d,m,q=[],y=u,v=!1;for(;!v;)d=this.mul(y,s),q=this.add(q,this.scaleX(d,-2*f)),l>2*f?(m=this.mul(y,h),y=this.scaleX(m,-2*f),l=y.length-1):v=!0;return q;}oneRoot(e,i){let t=r(e-1)+1,n=this.F.one,o=i;if(i>=e)throw new Error("Given 'i' should be lower than 'n'");if(1<0;)!0&o&&(n=this.F.mul(n,this.w[t])),o>>=1,t--;return n;}computeVanishingPolinomial(e,t){const r=1<>1n,this.bitLength=o.bitLength(this.p),this.mask=(1n<>1n;this.nqr=this.two;let t=this.pow(this.nqr,e);for(;!this.eq(t,this.minusone);)this.nqr=this.nqr+1n,t=this.pow(this.nqr,e);for(this.s=0,this.t=this.minusone;0n==(1n&this.t);)this.s=this.s+1,this.t=this.t>>1n;this.nqr_to_t=this.pow(this.nqr,this.t);}e(a,b){let e;if(b?16==b&&(e=BigInt("0x"+a)):e=BigInt(a),e<0){let t=-e;return t>=this.p&&(t%=this.p),this.p-t;}return e>=this.p?e%this.p:e;}add(a,b){const e=a+b;return e>=this.p?e-this.p:e;}sub(a,b){return a>=b?a-b:this.p-b+a;}neg(a){return a?this.p-a:a;}mul(a,b){return a*b%this.p;}mulScalar(base,s){return base*this.e(s)%this.p;}square(a){return a*a%this.p;}eq(a,b){return a==b;}neq(a,b){return a!=b;}lt(a,b){return(a>this.half?a-this.p:a)<(b>this.half?b-this.p:b);}gt(a,b){return(a>this.half?a-this.p:a)>(b>this.half?b-this.p:b);}leq(a,b){return(a>this.half?a-this.p:a)<=(b>this.half?b-this.p:b);}geq(a,b){return(a>this.half?a-this.p:a)>=(b>this.half?b-this.p:b);}div(a,b){return this.mul(a,this.inv(b));}idiv(a,b){return n(b,"Division by zero"),a/b;}inv(a){n(a,"Division by zero");let e=0n,t=this.p,r=1n,o=a%this.p;for(;o;){let q=t/o;[e,r]=[r,e-q*r],[t,o]=[o,t-q*o];}return e<0n&&(e+=this.p),e;}mod(a,b){return a%b;}pow(b,e){return c.exp(this,b,e);}band(a,b){const e=a&b&this.mask;return e>=this.p?e-this.p:e;}bor(a,b){const e=(a|b)&this.mask;return e>=this.p?e-this.p:e;}bxor(a,b){const e=(a^b)&this.mask;return e>=this.p?e-this.p:e;}bnot(a){const e=a^this.mask;return e>=this.p?e-this.p:e;}shl(a,b){if(Number(b)=this.p?e-this.p:e;}{const e=this.p-b;return Number(e)>e:0n;}}shr(a,b){if(Number(b)>b;{const e=this.p-b;if(Number(e)=this.p?t-this.p:t;}return 0;}}land(a,b){return a&&b?1n:0n;}lor(a,b){return a||b?1n:0n;}lnot(a){return a?0n:1n;}sqrt(e){if(0n==e)return this.zero;if(1n!=this.pow(e,this.minusone>>this.one))return null;let t=this.s,r=this.nqr_to_t,n=this.pow(e,this.t),o=this.pow(e,this.add(this.t,this.one)>>1n);for(;1n!=n;){let e=this.square(n),i=1;for(;1n!=e;)i++,e=this.square(e);let b=r;for(let e=0;ethis.p>>1n&&(o=this.neg(o)),o;}normalize(a,b){if((a=BigInt(a,b))<0){let e=-a;return e>=this.p&&(e%=this.p),this.p-e;}return a>=this.p?a%this.p:a;}random(){const e=2*this.bitLength/8;let t=0n;for(let i=0;ithis.half){e="-"+(this.p-a).toString(base);}else e=a.toString(base);return e;}isZero(a){return 0n==a;}};},function(e,t,r){(t=e.exports=r(186)).Stream=t,t.Readable=t,t.Writable=r(190),t.Duplex=r(70),t.Transform=r(191),t.PassThrough=r(350),t.finished=r(131),t.pipeline=r(351);},function(e,t){},function(e,t,r){"use strict";function n(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable;})),t.push.apply(t,r);}return t;}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;}function c(e,t){for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length;}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length;}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e;}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(s){if(0===this.length)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=s+p.data;return e;}},{key:"concat",value:function(e){if(0===this.length)return f.alloc(0);for(var t,r,n,o=f.allocUnsafe(e>>>0),p=this.head,i=0;p;)t=p.data,r=o,n=i,f.prototype.copy.call(t,r,n),i+=p.data.length,p=p.next;return o;}},{key:"consume",value:function(e,t){var r;return en.length?n.length:e;if(o===n.length?r+=n:r+=n.slice(0,e),0==(e-=o)){o===n.length?(++t,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=n.slice(o));break;}++t;}return this.length-=t,r;}},{key:"_getBuffer",value:function(e){var t=f.allocUnsafe(e),p=this.head,r=1;for(p.data.copy(t),e-=p.data.length;p=p.next;){var n=p.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++r,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=n.slice(o));break;}++r;}return this.length-=r,t;}},{key:h,value:function(e,t){return l(this,function(e){for(var i=1;i0,function(e){n||(n=e),e&&f.forEach(d),r||(f.forEach(d),o(n));});});return t.reduce(m);};},function(e,t,r){var n=r(4),o=r(71),c=r(8).Buffer,f=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function h(){this.init(),this._w=l,o.call(this,64,56);}function d(e){return e<<30|e>>>2;}function m(s,b,e,t){return 0===s?b&e|~b&t:2===s?b&e|b&t|e&t:b^e^t;}n(h,o),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this;},h.prototype._update=function(e){for(var t,r=this._w,a=0|this._a,b=0|this._b,n=0|this._c,o=0|this._d,c=0|this._e,i=0;i<16;++i)r[i]=e.readInt32BE(4*i);for(;i<80;++i)r[i]=r[i-3]^r[i-8]^r[i-14]^r[i-16];for(var l=0;l<80;++l){var s=~~(l/20),h=0|((t=a)<<5|t>>>27)+m(s,b,n,o)+c+r[l]+f[s];c=o,o=n,n=d(b),b=a,a=h;}this._a=a+this._a|0,this._b=b+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0;},h.prototype._hash=function(){var e=c.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e;},e.exports=h;},function(e,t,r){var n=r(4),o=r(71),c=r(8).Buffer,f=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function h(){this.init(),this._w=l,o.call(this,64,56);}function d(e){return e<<5|e>>>27;}function m(e){return e<<30|e>>>2;}function y(s,b,e,t){return 0===s?b&e|~b&t:2===s?b&e|b&t|e&t:b^e^t;}n(h,o),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this;},h.prototype._update=function(e){for(var t,r=this._w,a=0|this._a,b=0|this._b,n=0|this._c,o=0|this._d,c=0|this._e,i=0;i<16;++i)r[i]=e.readInt32BE(4*i);for(;i<80;++i)r[i]=(t=r[i-3]^r[i-8]^r[i-14]^r[i-16])<<1|t>>>31;for(var l=0;l<80;++l){var s=~~(l/20),h=d(a)+y(s,b,n,o)+c+r[l]+f[s]|0;c=o,o=n,n=m(b),b=a,a=h;}this._a=a+this._a|0,this._b=b+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0;},h.prototype._hash=function(){var e=c.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e;},e.exports=h;},function(e,t,r){var n=r(4),o=r(192),c=r(71),f=r(8).Buffer,l=new Array(64);function h(){this.init(),this._w=l,c.call(this,64,56);}n(h,o),h.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this;},h.prototype._hash=function(){var e=f.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e;},e.exports=h;},function(e,t,r){var n=r(4),o=r(193),c=r(71),f=r(8).Buffer,l=new Array(160);function h(){this.init(),this._w=l,c.call(this,128,112);}n(h,o),h.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this;},h.prototype._hash=function(){var e=f.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4);}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e;},e.exports=h;},function(e,t){},function(e,t,r){"use strict";var n=r(135).Buffer,o=r(358);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.head=null,this.tail=null,this.length=0;}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length;},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length;},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e;}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0;},e.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=s+p.data;return e;},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,o,c=n.allocUnsafe(e>>>0),p=this.head,i=0;p;)t=p.data,r=c,o=i,t.copy(r,o),i+=p.data.length,p=p.next;return c;},e;}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e;});},function(e,t){},function(e,t,r){"use strict";e.exports=c;var n=r(198),o=Object.create(r(85));function c(e){if(!(this instanceof c))return new c(e);n.call(this,e);}o.inherits=r(4),o.inherits(c,n),c.prototype._transform=function(e,t,r){r(null,e);};},function(e,t,r){e.exports=r(136);},function(e,t,r){e.exports=r(61);},function(e,t,r){e.exports=r(134).Transform;},function(e,t,r){e.exports=r(134).PassThrough;},function(e,t,r){"use strict";var n=r(4),o=r(8).Buffer,c=r(52),f=o.alloc(128),l=64;function h(e,t){c.call(this,"digest"),"string"==typeof t&&(t=o.from(t)),this._alg=e,this._key=t,t.length>l?t=e(t):t.length15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e;}return null;},v.prototype.flush=function(){for(var e=16-this.cache.length,t=c.allocUnsafe(e),i=-1;++i>i%8,e._prev=c(e._prev,r?n:o);return f;}function c(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i>7;return o;}t.encrypt=function(e,t,r){for(var c=t.length,f=n.allocUnsafe(c),i=-1;++i>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t;}function f(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0);}f.prototype.ghash=function(e){for(var i=-1;++i0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24);}this.state=c(o);},f.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t);},f.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,o],16)),this.ghash(c([0,e,0,t])),this.state;},e.exports=f;},function(e,t,r){var n=r(212),o=r(8).Buffer,c=r(139),f=r(213),l=r(52),h=r(100),d=r(101);function m(e,t,r){l.call(this),this._cache=new y(),this._last=void 0,this._cipher=new h.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0;}function y(){this.cache=o.allocUnsafe(0);}function v(e,t,r){var l=c[e.toLowerCase()];if(!l)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=o.from(r)),"GCM"!==l.mode&&r.length!==l.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=o.from(t)),t.length!==l.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===l.type?new f(l.module,t,r,!0):"auth"===l.type?new n(l.module,t,r,!0):new m(l.module,t,r);}r(4)(m,l),m.prototype._update=function(data){var e,t;this._cache.add(data);for(var r=[];e=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,e),r.push(t);return o.concat(r);},m.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var i=-1;for(;++i16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null;},y.prototype.flush=function(){if(this.cache.length)return this.cache;},t.createDecipher=function(e,t){var r=c[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=d(t,!1,r.key,r.iv);return v(e,n.key,n.iv);},t.createDecipheriv=v;},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0};},function(e,t,r){(function(e){var n=r(214),o=r(384),c=r(385);var f={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var r=new e(o[t].prime,"hex"),n=new e(o[t].gen,"hex");return new c(r,n);},t.createDiffieHellman=t.DiffieHellman=function t(r,o,l,h){return e.isBuffer(o)||void 0===f[o]?t(r,"binary",o,l):(o=o||"binary",h=h||"binary",l=l||new e([2]),e.isBuffer(l)||(l=new e(l,h)),"number"==typeof r?new c(n(r,l),l,!0):(e.isBuffer(r)||(r=new e(r,o)),new c(r,l,!0)));};}).call(this,r(5).Buffer);},function(e,t){},function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}');},function(e,t,r){(function(t){var n=r(3),o=new(r(215))(),c=new n(24),f=new n(11),l=new n(10),h=new n(3),d=new n(7),m=r(214),y=r(51);function v(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this;}function w(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this;}e.exports=A;var _={};function A(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=v,this.setPrivateKey=w):this._primeCode=8;}function M(e,r){var n=new t(e.toArray());return r?n.toString(r):n;}Object.defineProperty(A.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in _)return _[n];var y,v=0;if(e.isEven()||!m.simpleSieve||!m.fermatTest(e)||!o.test(e))return v+=1,v+="02"===r||"05"===r?8:4,_[n]=v,v;switch(o.test(e.shrn(1))||(v+=2),r){case"02":e.mod(c).cmp(f)&&(v+=8);break;case"05":(y=e.mod(l)).cmp(h)&&y.cmp(d)&&(v+=8);break;default:v+=4;}return _[n]=v,v;}(this.__prime,this.__gen)),this._primeCode;}}),A.prototype.generateKeys=function(){return this._priv||(this._priv=new n(y(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey();},A.prototype.computeSecret=function(e){var r=(e=(e=new n(e)).toRed(this._prime)).redPow(this._priv).fromRed(),o=new t(r.toArray()),c=this.getPrime();if(o.length0?this.tail.next=t:this.head=t,this.tail=t,++this.length;}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length;}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e;}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(s){if(0===this.length)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=s+p.data;return e;}},{key:"concat",value:function(e){if(0===this.length)return f.alloc(0);for(var t,r,n,o=f.allocUnsafe(e>>>0),p=this.head,i=0;p;)t=p.data,r=o,n=i,f.prototype.copy.call(t,r,n),i+=p.data.length,p=p.next;return o;}},{key:"consume",value:function(e,t){var r;return en.length?n.length:e;if(o===n.length?r+=n:r+=n.slice(0,e),0==(e-=o)){o===n.length?(++t,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=n.slice(o));break;}++t;}return this.length-=t,r;}},{key:"_getBuffer",value:function(e){var t=f.allocUnsafe(e),p=this.head,r=1;for(p.data.copy(t),e-=p.data.length;p=p.next;){var n=p.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++r,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=n.slice(o));break;}++r;}return this.length-=r,t;}},{key:h,value:function(e,t){return l(this,function(e){for(var i=1;i0,function(e){n||(n=e),e&&f.forEach(d),r||(f.forEach(d),o(n));});});return t.reduce(m);};},function(e,t,r){var n=r(8).Buffer,o=r(199),c=r(142),f=r(74).ec,l=r(224),h=r(103),d=r(230);function m(e,q,t,r){if((e=n.from(e.toArray())).length0&&t.ishrn(r),t;}function v(q,e,t){var r,c;do{for(r=n.alloc(0);8*r.length=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e);}function h(e,t,r){var n=l(e,r);return r-1>=t&&(n|=l(e,r-1)<<4),n;}function d(e,t,r,o){for(var c=0,b=0,f=Math.min(e.length,r),i=t;i=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&b0?e:t;},c.min=function(e,t){return e.cmp(t)<0?e:t;},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),n(base===(0|base)&&base>=2&&base<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[r]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);else if("le"===t)for(i=0,r=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);return this._strip();},c.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)n=h(e,t,i)<=18?(o-=18,c+=1,this.words[c]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,c+=1,this.words[c]|=n>>>26):o+=8;this._strip();},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=base)r++;r--,n=n/base|0;for(var o=e.length-t,c=o%r,f=Math.min(o,o-c)+t,l=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign();},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this;},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=y;}catch(e){c.prototype.inspect=y;}else c.prototype.inspect=y;function y(){return(this.red?"";}var v=["","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"],w=[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],_=[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];c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var r=0,o=0,i=0;i>>24-r&16777215)||i!==this.length-1?v[6-f.length]+f+t:f+t,(r+=2)>=26&&(r-=26,i--);}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}if(base===(0|base)&&base>=2&&base<=36){var l=w[base],h=_[base];t="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(h).toString(base);t=(d=d.idivn(h)).isZero()?m+t:v[l-m.length]+m+t;}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}n(!1,"Base should be between 2 and 36");},c.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e;},c.prototype.toJSON=function(){return this.toString(16,2);},f&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(f,e,t);}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);};function A(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,f=o/67108864|0;r.words[0]=c;for(var l=1;l>>26,d=67108863&f,m=Math.min(l,t.length-1),y=Math.max(0,l-e.length+1);y<=m;y++){var i=l-y|0;h+=(o=(a=0|e.words[i])*(b=0|t.words[y])+d)/67108864|0,d=67108863&o;}r.words[l]=0|d,f=0|h;}return 0!==f?r.words[l]=0|f:r.length--,r._strip();}c.prototype.toArrayLike=function(e,t,r){this._strip();var o=this.byteLength(),c=r||Math.max(1,o);n(o<=c,"byte array longer than desired length"),n(c>0,"Requested array length <= 0");var f=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t);}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](f,o),f;},c.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=c>>>24,o+=2);}if(r=0&&(e[r--]=c>>8&255),r>=0&&(e[r--]=c>>16&255),6===o?(r>=0&&(e[r--]=c>>24&255),n=0,o=0):(n=c>>>24,o+=2);}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0;},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e);}:c.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t;},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r;},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t;},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this);},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this);},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this);},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this);},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this);},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this);},c.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip();},c.prototype.notn=function(e){return this.clone().inotn(e);},c.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this);},c.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 a,b,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==n&&i>26,this.words[i]=67108863&t;if(0===n&&i>>13,y=0|a[1],v=8191&y,w=y>>>13,_=0|a[2],A=8191&_,M=_>>>13,E=0|a[3],S=8191&E,T=E>>>13,x=0|a[4],k=8191&x,I=x>>>13,C=0|a[5],O=8191&C,B=C>>>13,R=0|a[6],P=8191&R,F=R>>>13,L=0|a[7],N=8191&L,D=L>>>13,j=0|a[8],U=8191&j,J=j>>>13,H=0|a[9],z=8191&H,G=H>>>13,K=0|b[0],V=8191&K,X=K>>>13,Q=0|b[1],Z=8191&Q,W=Q>>>13,Y=0|b[2],$=8191&Y,ee=Y>>>13,te=0|b[3],re=8191&te,ne=te>>>13,ie=0|b[4],oe=8191&ie,ae=ie>>>13,se=0|b[5],ue=8191&se,ce=se>>>13,fe=0|b[6],le=8191&fe,he=fe>>>13,de=0|b[7],pe=8191&de,be=de>>>13,me=0|b[8],ge=8191&me,ye=me>>>13,ve=0|b[9],we=8191&ve,_e=ve>>>13;r.negative=e.negative^t.negative,r.length=19;var Ae=(l+(n=Math.imul(d,V))|0)+((8191&(o=(o=Math.imul(d,X))+Math.imul(m,V)|0))<<13)|0;l=((c=Math.imul(m,X))+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(v,V),o=(o=Math.imul(v,X))+Math.imul(w,V)|0,c=Math.imul(w,X);var Me=(l+(n=n+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,W)|0)+Math.imul(m,Z)|0))<<13)|0;l=((c=c+Math.imul(m,W)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(A,V),o=(o=Math.imul(A,X))+Math.imul(M,V)|0,c=Math.imul(M,X),n=n+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,W)|0)+Math.imul(w,Z)|0,c=c+Math.imul(w,W)|0;var Ee=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(m,$)|0))<<13)|0;l=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(S,V),o=(o=Math.imul(S,X))+Math.imul(T,V)|0,c=Math.imul(T,X),n=n+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,W)|0)+Math.imul(M,Z)|0,c=c+Math.imul(M,W)|0,n=n+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0;var Se=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(m,re)|0))<<13)|0;l=((c=c+Math.imul(m,ne)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(k,V),o=(o=Math.imul(k,X))+Math.imul(I,V)|0,c=Math.imul(I,X),n=n+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(T,Z)|0,c=c+Math.imul(T,W)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(M,$)|0,c=c+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,o=(o=o+Math.imul(v,ne)|0)+Math.imul(w,re)|0,c=c+Math.imul(w,ne)|0;var Te=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(m,oe)|0))<<13)|0;l=((c=c+Math.imul(m,ae)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,V),o=(o=Math.imul(O,X))+Math.imul(B,V)|0,c=Math.imul(B,X),n=n+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,W)|0)+Math.imul(I,Z)|0,c=c+Math.imul(I,W)|0,n=n+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(T,$)|0,c=c+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(M,re)|0,c=c+Math.imul(M,ne)|0,n=n+Math.imul(v,oe)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,c=c+Math.imul(w,ae)|0;var xe=(l+(n=n+Math.imul(d,ue)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(m,ue)|0))<<13)|0;l=((c=c+Math.imul(m,ce)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(P,V),o=(o=Math.imul(P,X))+Math.imul(F,V)|0,c=Math.imul(F,X),n=n+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,W)|0)+Math.imul(B,Z)|0,c=c+Math.imul(B,W)|0,n=n+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(I,$)|0,c=c+Math.imul(I,ee)|0,n=n+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ne)|0)+Math.imul(T,re)|0,c=c+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,o=(o=o+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,c=c+Math.imul(M,ae)|0,n=n+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,c=c+Math.imul(w,ce)|0;var ke=(l+(n=n+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,he)|0)+Math.imul(m,le)|0))<<13)|0;l=((c=c+Math.imul(m,he)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,V),o=(o=Math.imul(N,X))+Math.imul(D,V)|0,c=Math.imul(D,X),n=n+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,W)|0)+Math.imul(F,Z)|0,c=c+Math.imul(F,W)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(B,$)|0,c=c+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,o=(o=o+Math.imul(k,ne)|0)+Math.imul(I,re)|0,c=c+Math.imul(I,ne)|0,n=n+Math.imul(S,oe)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(T,oe)|0,c=c+Math.imul(T,ae)|0,n=n+Math.imul(A,ue)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(M,ue)|0,c=c+Math.imul(M,ce)|0,n=n+Math.imul(v,le)|0,o=(o=o+Math.imul(v,he)|0)+Math.imul(w,le)|0,c=c+Math.imul(w,he)|0;var Ie=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,be)|0)+Math.imul(m,pe)|0))<<13)|0;l=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,V),o=(o=Math.imul(U,X))+Math.imul(J,V)|0,c=Math.imul(J,X),n=n+Math.imul(N,Z)|0,o=(o=o+Math.imul(N,W)|0)+Math.imul(D,Z)|0,c=c+Math.imul(D,W)|0,n=n+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(F,$)|0,c=c+Math.imul(F,ee)|0,n=n+Math.imul(O,re)|0,o=(o=o+Math.imul(O,ne)|0)+Math.imul(B,re)|0,c=c+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(I,oe)|0,c=c+Math.imul(I,ae)|0,n=n+Math.imul(S,ue)|0,o=(o=o+Math.imul(S,ce)|0)+Math.imul(T,ue)|0,c=c+Math.imul(T,ce)|0,n=n+Math.imul(A,le)|0,o=(o=o+Math.imul(A,he)|0)+Math.imul(M,le)|0,c=c+Math.imul(M,he)|0,n=n+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,be)|0)+Math.imul(w,pe)|0,c=c+Math.imul(w,be)|0;var Ce=(l+(n=n+Math.imul(d,ge)|0)|0)+((8191&(o=(o=o+Math.imul(d,ye)|0)+Math.imul(m,ge)|0))<<13)|0;l=((c=c+Math.imul(m,ye)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(z,V),o=(o=Math.imul(z,X))+Math.imul(G,V)|0,c=Math.imul(G,X),n=n+Math.imul(U,Z)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(J,Z)|0,c=c+Math.imul(J,W)|0,n=n+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,o=(o=o+Math.imul(P,ne)|0)+Math.imul(F,re)|0,c=c+Math.imul(F,ne)|0,n=n+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(B,oe)|0,c=c+Math.imul(B,ae)|0,n=n+Math.imul(k,ue)|0,o=(o=o+Math.imul(k,ce)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,ce)|0,n=n+Math.imul(S,le)|0,o=(o=o+Math.imul(S,he)|0)+Math.imul(T,le)|0,c=c+Math.imul(T,he)|0,n=n+Math.imul(A,pe)|0,o=(o=o+Math.imul(A,be)|0)+Math.imul(M,pe)|0,c=c+Math.imul(M,be)|0,n=n+Math.imul(v,ge)|0,o=(o=o+Math.imul(v,ye)|0)+Math.imul(w,ge)|0,c=c+Math.imul(w,ye)|0;var Oe=(l+(n=n+Math.imul(d,we)|0)|0)+((8191&(o=(o=o+Math.imul(d,_e)|0)+Math.imul(m,we)|0))<<13)|0;l=((c=c+Math.imul(m,_e)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(z,Z),o=(o=Math.imul(z,W))+Math.imul(G,Z)|0,c=Math.imul(G,W),n=n+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(J,$)|0,c=c+Math.imul(J,ee)|0,n=n+Math.imul(N,re)|0,o=(o=o+Math.imul(N,ne)|0)+Math.imul(D,re)|0,c=c+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(F,oe)|0,c=c+Math.imul(F,ae)|0,n=n+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,ce)|0)+Math.imul(B,ue)|0,c=c+Math.imul(B,ce)|0,n=n+Math.imul(k,le)|0,o=(o=o+Math.imul(k,he)|0)+Math.imul(I,le)|0,c=c+Math.imul(I,he)|0,n=n+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,be)|0)+Math.imul(T,pe)|0,c=c+Math.imul(T,be)|0,n=n+Math.imul(A,ge)|0,o=(o=o+Math.imul(A,ye)|0)+Math.imul(M,ge)|0,c=c+Math.imul(M,ye)|0;var Be=(l+(n=n+Math.imul(v,we)|0)|0)+((8191&(o=(o=o+Math.imul(v,_e)|0)+Math.imul(w,we)|0))<<13)|0;l=((c=c+Math.imul(w,_e)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),n=n+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ne)|0)+Math.imul(J,re)|0,c=c+Math.imul(J,ne)|0,n=n+Math.imul(N,oe)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,c=c+Math.imul(D,ae)|0,n=n+Math.imul(P,ue)|0,o=(o=o+Math.imul(P,ce)|0)+Math.imul(F,ue)|0,c=c+Math.imul(F,ce)|0,n=n+Math.imul(O,le)|0,o=(o=o+Math.imul(O,he)|0)+Math.imul(B,le)|0,c=c+Math.imul(B,he)|0,n=n+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,be)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,be)|0,n=n+Math.imul(S,ge)|0,o=(o=o+Math.imul(S,ye)|0)+Math.imul(T,ge)|0,c=c+Math.imul(T,ye)|0;var Re=(l+(n=n+Math.imul(A,we)|0)|0)+((8191&(o=(o=o+Math.imul(A,_e)|0)+Math.imul(M,we)|0))<<13)|0;l=((c=c+Math.imul(M,_e)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(z,re),o=(o=Math.imul(z,ne))+Math.imul(G,re)|0,c=Math.imul(G,ne),n=n+Math.imul(U,oe)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(J,oe)|0,c=c+Math.imul(J,ae)|0,n=n+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,ce)|0)+Math.imul(D,ue)|0,c=c+Math.imul(D,ce)|0,n=n+Math.imul(P,le)|0,o=(o=o+Math.imul(P,he)|0)+Math.imul(F,le)|0,c=c+Math.imul(F,he)|0,n=n+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(B,pe)|0,c=c+Math.imul(B,be)|0,n=n+Math.imul(k,ge)|0,o=(o=o+Math.imul(k,ye)|0)+Math.imul(I,ge)|0,c=c+Math.imul(I,ye)|0;var Pe=(l+(n=n+Math.imul(S,we)|0)|0)+((8191&(o=(o=o+Math.imul(S,_e)|0)+Math.imul(T,we)|0))<<13)|0;l=((c=c+Math.imul(T,_e)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,oe),o=(o=Math.imul(z,ae))+Math.imul(G,oe)|0,c=Math.imul(G,ae),n=n+Math.imul(U,ue)|0,o=(o=o+Math.imul(U,ce)|0)+Math.imul(J,ue)|0,c=c+Math.imul(J,ce)|0,n=n+Math.imul(N,le)|0,o=(o=o+Math.imul(N,he)|0)+Math.imul(D,le)|0,c=c+Math.imul(D,he)|0,n=n+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,be)|0)+Math.imul(F,pe)|0,c=c+Math.imul(F,be)|0,n=n+Math.imul(O,ge)|0,o=(o=o+Math.imul(O,ye)|0)+Math.imul(B,ge)|0,c=c+Math.imul(B,ye)|0;var Fe=(l+(n=n+Math.imul(k,we)|0)|0)+((8191&(o=(o=o+Math.imul(k,_e)|0)+Math.imul(I,we)|0))<<13)|0;l=((c=c+Math.imul(I,_e)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(z,ue),o=(o=Math.imul(z,ce))+Math.imul(G,ue)|0,c=Math.imul(G,ce),n=n+Math.imul(U,le)|0,o=(o=o+Math.imul(U,he)|0)+Math.imul(J,le)|0,c=c+Math.imul(J,he)|0,n=n+Math.imul(N,pe)|0,o=(o=o+Math.imul(N,be)|0)+Math.imul(D,pe)|0,c=c+Math.imul(D,be)|0,n=n+Math.imul(P,ge)|0,o=(o=o+Math.imul(P,ye)|0)+Math.imul(F,ge)|0,c=c+Math.imul(F,ye)|0;var Le=(l+(n=n+Math.imul(O,we)|0)|0)+((8191&(o=(o=o+Math.imul(O,_e)|0)+Math.imul(B,we)|0))<<13)|0;l=((c=c+Math.imul(B,_e)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(z,le),o=(o=Math.imul(z,he))+Math.imul(G,le)|0,c=Math.imul(G,he),n=n+Math.imul(U,pe)|0,o=(o=o+Math.imul(U,be)|0)+Math.imul(J,pe)|0,c=c+Math.imul(J,be)|0,n=n+Math.imul(N,ge)|0,o=(o=o+Math.imul(N,ye)|0)+Math.imul(D,ge)|0,c=c+Math.imul(D,ye)|0;var Ne=(l+(n=n+Math.imul(P,we)|0)|0)+((8191&(o=(o=o+Math.imul(P,_e)|0)+Math.imul(F,we)|0))<<13)|0;l=((c=c+Math.imul(F,_e)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(z,pe),o=(o=Math.imul(z,be))+Math.imul(G,pe)|0,c=Math.imul(G,be),n=n+Math.imul(U,ge)|0,o=(o=o+Math.imul(U,ye)|0)+Math.imul(J,ge)|0,c=c+Math.imul(J,ye)|0;var De=(l+(n=n+Math.imul(N,we)|0)|0)+((8191&(o=(o=o+Math.imul(N,_e)|0)+Math.imul(D,we)|0))<<13)|0;l=((c=c+Math.imul(D,_e)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(z,ge),o=(o=Math.imul(z,ye))+Math.imul(G,ge)|0,c=Math.imul(G,ye);var je=(l+(n=n+Math.imul(U,we)|0)|0)+((8191&(o=(o=o+Math.imul(U,_e)|0)+Math.imul(J,we)|0))<<13)|0;l=((c=c+Math.imul(J,_e)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863;var Ue=(l+(n=Math.imul(z,we))|0)+((8191&(o=(o=Math.imul(z,_e))+Math.imul(G,we)|0))<<13)|0;return l=((c=Math.imul(G,_e))+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,f[0]=Ae,f[1]=Me,f[2]=Ee,f[3]=Se,f[4]=Te,f[5]=xe,f[6]=ke,f[7]=Ie,f[8]=Ce,f[9]=Oe,f[10]=Be,f[11]=Re,f[12]=Pe,f[13]=Fe,f[14]=Le,f[15]=Ne,f[16]=De,f[17]=je,f[18]=Ue,0!==l&&(f[19]=l,r.length++),r;};function E(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,c=0;c>>26)|0)>>>26,f&=67108863;}r.words[c]=l,n=f,f=o;}return 0!==n?r.words[c]=n:r.length--,r._strip();}function S(e,t,r){return E(e,t,r);}function T(e,t){this.x=e,this.y=t;}Math.imul||(M=A),c.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?M(this,e,t):r<63?A(this,e,t):r<1024?E(this,e,t):S(this,e,t);},T.prototype.makeRBT=function(e){for(var t=new Array(e),r=c.prototype._countBits(e)-1,i=0;i>=1;return n;},T.prototype.permute=function(e,t,r,n,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,r[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,r+=o/67108864|0,r+=c>>>26,this.words[i]=67108863&c;}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this;},c.prototype.muln=function(e){return this.clone().imuln(e);},c.prototype.sqr=function(){return this.mul(this);},c.prototype.isqr=function(){return this.imul(this.clone());},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>o&1;}return t;}(e);if(0===t.length)return new c(1);for(var r=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,r=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t;}o&&(this.words[i]=o,this.length++);}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==l||i>=o);i--){var h=0|this.words[i];this.words[i]=l<<26-c|h>>>c,l=h&mask;}return f&&0!==l&&(f.words[f.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip();},c.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r);},c.prototype.shln=function(e){return this.clone().ishln(e);},c.prototype.ushln=function(e){return this.clone().iushln(e);},c.prototype.shrn=function(e){return this.clone().ishrn(e);},c.prototype.ushrn=function(e){return this.clone().iushrn(e);},c.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this;},c.prototype.isubn=function(e){if(n("number"==typeof e),n(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 i=0;i>26)-(l/67108864|0),this.words[i+r]=67108863&o;}for(;i>26,this.words[i+r]=67108863&o;if(0===f)return this._strip();for(n(-1===f),f=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip();},c.prototype._wordDiv=function(e,t){var r=(this.length,e.length),a=this.clone(),b=e,n=0|b.words[b.length-1];0!==(r=26-this._countBits(n))&&(b=b.ushln(r),a.iushln(r),n=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;l--){var h=67108864*(0|a.words[b.length+l])+(0|a.words[b.length+l-1]);for(h=Math.min(h/n|0,67108863),a._ishlnsubmul(b,h,l);0!==a.negative;)h--,a.negative=0,a._ishlnsubmul(b,1,l),a.isZero()||(a.negative^=1);q&&(q.words[l]=h);}return q&&q._strip(),a._strip(),"div"!==t&&0!==r&&a.iushrn(r),{div:q||null,mod:a};},c.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(f=this.neg().divmod(e,t),"mod"!==t&&(div=f.div.neg()),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(f=this.divmod(e.neg(),t),"mod"!==t&&(div=f.div.neg()),{div:div,mod:f.mod}):0!=(this.negative&e.negative)?(f=this.neg().divmod(e.neg(),t),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:f.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var div,o,f;},c.prototype.div=function(e){return this.divmod(e,"div",!1).div;},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod;},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod;},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),c=r.cmp(n);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1);},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var p=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(p*r+(0|this.words[i]))%e;return t?-r:r;},c.prototype.modn=function(e){return this.modrn(e);},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e;}return this._strip(),t?this.ineg():this;},c.prototype.divn=function(e){return this.clone().idivn(e);},c.prototype.egcd=function(p){n(0===p.negative),n(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var r=new c(1),o=new c(0),f=new c(0),l=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var h=t.clone(),d=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-->0;)(r.isOdd()||o.isOdd())&&(r.iadd(h),o.isub(d)),r.iushrn(1),o.iushrn(1);for(var y=0,v=1;0==(t.words[0]&v)&&y<26;++y,v<<=1);if(y>0)for(t.iushrn(y);y-->0;)(f.isOdd()||l.isOdd())&&(f.iadd(h),l.isub(d)),f.iushrn(1),l.iushrn(1);e.cmp(t)>=0?(e.isub(t),r.isub(f),o.isub(l)):(t.isub(e),f.isub(r),l.isub(o));}return{a:f,b:l,gcd:t.iushln(g)};},c.prototype._invmp=function(p){n(0===p.negative),n(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),r=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,f=1;0==(a.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(a.iushrn(i);i-->0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var l=0,h=1;0==(b.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(b.iushrn(l);l-->0;)r.isOdd()&&r.iadd(o),r.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(r)):(b.isub(a),r.isub(t));}return(e=0===a.cmpn(1)?t:r).cmpn(0)<0&&e.iadd(p),e;},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var n=a;a=b,b=n;}else if(0===r||0===b.cmpn(1))break;a.isub(b);}return b.iushln(t);},c.prototype.invm=function(e){return this.egcd(e).a.umod(e);},c.prototype.isEven=function(){return 0==(1&this.words[0]);},c.prototype.isOdd=function(){return 1==(1&this.words[0]);},c.prototype.andln=function(e){return this.words[0]&e;},c.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o;}return 0!==r&&(this.words[i]=r,this.length++),this;},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},c.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break;}}return t;},c.prototype.gtn=function(e){return 1===this.cmpn(e);},c.prototype.gt=function(e){return 1===this.cmp(e);},c.prototype.gten=function(e){return this.cmpn(e)>=0;},c.prototype.gte=function(e){return this.cmp(e)>=0;},c.prototype.ltn=function(e){return-1===this.cmpn(e);},c.prototype.lt=function(e){return-1===this.cmp(e);},c.prototype.lten=function(e){return this.cmpn(e)<=0;},c.prototype.lte=function(e){return this.cmp(e)<=0;},c.prototype.eqn=function(e){return 0===this.cmpn(e);},c.prototype.eq=function(e){return 0===this.cmp(e);},c.red=function(e){return new R(e);},c.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this);},c.prototype._forceRed=function(e){return this.red=e,this;},c.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e);},c.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},c.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},c.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},c.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},c.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},c.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},c.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},c.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var x={k256:null,p224:null,p192:null,p25519:null};function k(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function I(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function C(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function O(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function B(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function R(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t;}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function P(e){R.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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);}k.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e;},k.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r;},k.prototype.split=function(input,e){input.iushrn(this.n,0,e);},k.prototype.imulK=function(e){return e.imul(this.k);},o(I,k),I.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=r;}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9;},I.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;},c._prime=function(e){if(x[e])return x[e];var t;if("k256"===e)t=new I();else if("p224"===e)t=new C();else if("p192"===e)t=new O();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new B();}return x[e]=t,t;},R.prototype._verify1=function(a){n(0===a.negative,"red works only with positives"),n(a.red,"red works only with red numbers");},R.prototype._verify2=function(a,b){n(0==(a.negative|b.negative),"red works only with positives"),n(a.red&&a.red===b.red,"red works only with red numbers");},R.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(m(a,a.umod(this.m)._forceRed(this)),a);},R.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this);},R.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this);},R.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e;},R.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this);},R.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e;},R.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e));},R.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b));},R.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b));},R.prototype.isqr=function(a){return this.imul(a,a.clone());},R.prototype.sqr=function(a){return this.mul(a,a);},R.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t);}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);n(!q.isZero());var r=new c(1).toRed(this),o=r.redNeg(),f=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new c(2*l*l).toRed(this);0!==this.pow(l,f).cmp(o);)l.redIAdd(o);for(var h=this.pow(l,q),d=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),y=s;0!==m.cmp(r);){for(var v=m,i=0;0!==v.cmp(r);i++)v=v.redSqr();n(i=0;i--){for(var l=e.words[i],h=f-1;h>=0;h--){var d=l>>h&1;r!==t[0]&&(r=this.sqr(r)),0!==d||0!==n?(n<<=1,n|=d,(4===++o||0===i&&0===h)&&(r=this.mul(r,t[n]),o=0,n=0)):o=0;}f=26;}return r;},R.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},R.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},c.mont=function(e){return new P(e);},o(P,R),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},P.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},P.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},P.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this);};}(e,this);}).call(this,r(59)(e));},function(e,t){},function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny ","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}');},function(e,t,r){"use strict";var n=r(38),o=r(3),c=r(4),f=r(102),l=n.assert;function h(e){f.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4);}function d(e,t,r,n){f.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1);}function m(e,t,r,n){f.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(r,16),this.z=new o(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one;}c(h,f),e.exports=h,h.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red);}if(e.lambda)r=new o(e.lambda,16);else{var c=this._getEndoRoots(this.n);0===this.g.mul(c[0]).x.cmp(this.g.x.redMul(t))?r=c[0]:(r=c[1],l(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))));}return{beta:t,lambda:r,basis:e.basis?e.basis.map(function(e){return{a:new o(e.a,16),b:new o(e.b,16)};}):this._getEndoBasis(r)};}},h.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),r=new o(2).toRed(t).redInvm(),n=r.redNeg(),s=new o(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(s).fromRed(),n.redSub(s).fromRed()];},h.prototype._getEndoBasis=function(e){for(var t,r,n,c,f,l,h,d,m,y=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=e,v=this.n.clone(),w=new o(1),_=new o(0),A=new o(0),M=new o(1),i=0;0!==u.cmpn(0);){var q=v.div(u);d=v.sub(q.mul(u)),m=A.sub(q.mul(w));var E=M.sub(q.mul(_));if(!n&&d.cmp(y)<0)t=h.neg(),r=w,n=d.neg(),c=m;else if(n&&2==++i)break;h=d,v=u,u=d,A=w,w=m,M=_,_=E;}f=d.neg(),l=m;var S=n.sqr().add(c.sqr());return f.sqr().add(l.sqr()).cmp(S)>=0&&(f=t,l=r),n.negative&&(n=n.neg(),c=c.neg()),f.negative&&(f=f.neg(),l=l.neg()),[{a:n,b:c},{a:f,b:l}];},h.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],o=n.b.mul(e).divRound(this.n),c=r.b.neg().mul(e).divRound(this.n),f=o.mul(r.a),l=c.mul(n.a),h=o.mul(r.b),d=c.mul(n.b);return{k1:e.sub(f).sub(l),k2:h.add(d).neg()};},h.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var c=n.fromRed().isOdd();return(t&&!c||!t&&c)&&(n=n.redNeg()),this.point(e,n);},h.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0);},h.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i":"";},d.prototype.isInfinity=function(){return this.inf;},d.prototype.add=function(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(0===this.x.cmp(p.x))return this.curve.point(null,null);var e=this.y.redSub(p.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(p.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(p.x),r=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,r);},d.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,t=this.x.redSqr(),r=e.redInvm(),n=t.redAdd(t).redIAdd(t).redIAdd(a).redMul(r),o=n.redSqr().redISub(this.x.redAdd(this.x)),c=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,c);},d.prototype.getX=function(){return this.x.fromRed();},d.prototype.getY=function(){return this.y.fromRed();},d.prototype.mul=function(e){return e=new o(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e);},d.prototype.mulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2);},d.prototype.jmulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0);},d.prototype.eq=function(p){return this===p||this.inf===p.inf&&(this.inf||0===this.x.cmp(p.x)&&0===this.y.cmp(p.y));},d.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var pre=this.precomputed,r=function(p){return p.neg();};t.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(r)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(r)}};}return t;},d.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one);},c(m,f.BasePoint),h.prototype.jpoint=function(e,t,r){return new m(this,e,t,r);},m.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n);},m.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z);},m.prototype.add=function(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var e=p.z.redSqr(),t=this.z.redSqr(),r=this.x.redMul(e),n=p.x.redMul(t),o=this.y.redMul(e.redMul(p.z)),c=p.y.redMul(t.redMul(this.z)),f=r.redSub(n),l=o.redSub(c);if(0===f.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=f.redSqr(),h3=h2.redMul(f),h=r.redMul(h2),d=l.redSqr().redIAdd(h3).redISub(h).redISub(h),m=l.redMul(h.redISub(d)).redISub(o.redMul(h3)),y=this.z.redMul(p.z).redMul(f);return this.curve.jpoint(d,m,y);},m.prototype.mixedAdd=function(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var e=this.z.redSqr(),t=this.x,r=p.x.redMul(e),n=this.y,o=p.y.redMul(e).redMul(this.z),c=t.redSub(r),f=n.redSub(o);if(0===c.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=c.redSqr(),h3=h2.redMul(c),l=t.redMul(h2),h=f.redSqr().redIAdd(h3).redISub(l).redISub(l),d=f.redMul(l.redISub(h)).redISub(n.redMul(h3)),m=this.z.redMul(c);return this.curve.jpoint(h,d,m);},m.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var i;if(this.curve.zeroA||this.curve.threeA){var t=this;for(i=0;i=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0;}},m.prototype.inspect=function(){return this.isInfinity()?"":"";},m.prototype.isInfinity=function(){return 0===this.z.cmpn(0);};},function(e,t,r){"use strict";var n=r(3),o=r(4),c=r(102),f=r(38);function l(e){c.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two));}function h(e,t,r){c.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)));}o(l,c),e.exports=l,l.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n);},o(h,c.BasePoint),l.prototype.decodePoint=function(e,t){return this.point(f.toArray(e,t),1);},l.prototype.point=function(e,t){return new h(this,e,t);},l.prototype.pointFromJSON=function(e){return h.fromJSON(this,e);},h.prototype.precompute=function(){},h.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength());},h.fromJSON=function(e,t){return new h(e,t[0],t[1]||e.one);},h.prototype.inspect=function(){return this.isInfinity()?"":"";},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0);},h.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),o=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,o);},h.prototype.add=function(){throw new Error("Not supported on Montgomery curve");},h.prototype.diffAdd=function(p,e){var a=this.x.redAdd(this.z),b=this.x.redSub(this.z),t=p.x.redAdd(p.z),r=p.x.redSub(p.z).redMul(a),n=t.redMul(b),o=e.z.redMul(r.redAdd(n).redSqr()),c=e.x.redMul(r.redISub(n).redSqr());return this.curve.point(o,c);},h.prototype.mul=function(e){for(var t=e.clone(),a=this,b=this.curve.point(null,null),r=[];0!==t.cmpn(0);t.iushrn(1))r.push(t.andln(1));for(var i=r.length-1;i>=0;i--)0===r[i]?(a=a.diffAdd(b,this),b=b.dbl()):(b=a.diffAdd(b,this),a=a.dbl());return b;},h.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve");},h.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve");},h.prototype.eq=function(e){return 0===this.getX().cmp(e.getX());},h.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this;},h.prototype.getX=function(){return this.normalize(),this.x.fromRed();};},function(e,t,r){"use strict";var n=r(38),o=r(3),c=r(4),f=r(102),l=n.assert;function h(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,f.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),l(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c);}function d(e,t,r,n,c){f.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(t,16),this.y=new o(r,16),this.z=n?new o(n,16):this.curve.one,this.t=c&&new o(c,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))));}c(h,f),e.exports=h,h.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e);},h.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e);},h.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n);},h.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),c=this.one.redSub(this.c2.redMul(this.d).redMul(r)),f=n.redMul(c.redInvm()),l=f.redSqrt();if(0!==l.redSqr().redSub(f).cmp(this.zero))throw new Error("invalid point");var h=l.fromRed().isOdd();return(t&&!h||!t&&h)&&(l=l.redNeg()),this.point(e,l);},h.prototype.pointFromY=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),c=r.redMul(this.d).redMul(this.c2).redSub(this.a),f=n.redMul(c.redInvm());if(0===f.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e);}var l=f.redSqrt();if(0!==l.redSqr().redSub(f).cmp(this.zero))throw new Error("invalid point");return l.fromRed().isOdd()!==t&&(l=l.redNeg()),this.point(l,e);},h.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),o=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(o);},c(d,f.BasePoint),h.prototype.pointFromJSON=function(e){return d.fromJSON(this,e);},h.prototype.point=function(e,t,r,n){return new d(this,e,t,r,n);},d.fromJSON=function(e,t){return new d(e,t[0],t[1],t[2]);},d.prototype.inspect=function(){return this.isInfinity()?"":"";},d.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c));},d.prototype._extDbl=function(){var a=this.x.redSqr(),b=this.y.redSqr(),e=this.z.redSqr();e=e.redIAdd(e);var t=this.curve._mulA(a),r=this.x.redAdd(this.y).redSqr().redISub(a).redISub(b),g=t.redAdd(b),n=g.redSub(e),o=t.redSub(b),c=r.redMul(n),f=g.redMul(o),l=r.redMul(o),h=n.redMul(g);return this.curve.point(c,f,h,l);},d.prototype._projDbl=function(){var e,t,r,n,o,c,b=this.x.redAdd(this.y).redSqr(),f=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var h=(n=this.curve._mulA(f)).redAdd(l);this.zOne?(e=b.redSub(f).redSub(l).redMul(h.redSub(this.curve.two)),t=h.redMul(n.redSub(l)),r=h.redSqr().redSub(h).redSub(h)):(o=this.z.redSqr(),c=h.redSub(o).redISub(o),e=b.redSub(f).redISub(l).redMul(c),t=h.redMul(n.redSub(l)),r=h.redMul(c));}else n=f.redAdd(l),o=this.curve._mulC(this.z).redSqr(),c=n.redSub(o).redSub(o),e=this.curve._mulC(b.redISub(n)).redMul(c),t=this.curve._mulC(n).redMul(f.redISub(l)),r=n.redMul(c);return this.curve.point(e,t,r);},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl();},d.prototype._extAdd=function(p){var a=this.y.redSub(this.x).redMul(p.y.redSub(p.x)),b=this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)),e=this.t.redMul(this.curve.dd).redMul(p.t),t=this.z.redMul(p.z.redAdd(p.z)),r=b.redSub(a),n=t.redSub(e),g=t.redAdd(e),o=b.redAdd(a),c=r.redMul(n),f=g.redMul(o),l=r.redMul(o),h=n.redMul(g);return this.curve.point(c,f,h,l);},d.prototype._projAdd=function(p){var e,t,a=this.z.redMul(p.z),b=a.redSqr(),r=this.x.redMul(p.x),n=this.y.redMul(p.y),o=this.curve.d.redMul(r).redMul(n),c=b.redSub(o),g=b.redAdd(o),f=this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(r).redISub(n),l=a.redMul(c).redMul(f);return this.curve.twisted?(e=a.redMul(g).redMul(n.redSub(this.curve._mulA(r))),t=c.redMul(g)):(e=a.redMul(g).redMul(n.redSub(r)),t=this.curve._mulC(c).redMul(g)),this.curve.point(l,e,t);},d.prototype.add=function(p){return this.isInfinity()?p:p.isInfinity()?this:this.curve.extended?this._extAdd(p):this._projAdd(p);},d.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e);},d.prototype.mulAdd=function(e,p,t){return this.curve._wnafMulAdd(1,[this,p],[e,t],2,!1);},d.prototype.jmulAdd=function(e,p,t){return this.curve._wnafMulAdd(1,[this,p],[e,t],2,!0);},d.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this;},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg());},d.prototype.getX=function(){return this.normalize(),this.x.fromRed();},d.prototype.getY=function(){return this.normalize(),this.y.fromRed();},d.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY());},d.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0;}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add;},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}};},function(e,t,r){"use strict";var n=r(3),o=r(404),c=r(38),f=r(143),l=r(140),h=c.assert,d=r(405),m=r(406);function y(e){if(!(this instanceof y))return new y(e);"string"==typeof e&&(h(Object.prototype.hasOwnProperty.call(f,e),"Unknown curve "+e),e=f[e]),e instanceof f.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash;}e.exports=y,y.prototype.keyPair=function(e){return new d(this,e);},y.prototype.keyFromPrivate=function(e,t){return d.fromPrivate(this,e,t);},y.prototype.keyFromPublic=function(e,t){return d.fromPublic(this,e,t);},y.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||l(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),c=this.n.sub(new n(2));;){var f=new n(t.generate(r));if(!(f.cmp(c)>0))return f.iaddn(1),this.keyFromPrivate(f);}},y.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e;},y.prototype.sign=function(e,t,r,c){"object"==typeof r&&(c=r,r=null),c||(c={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var f=this.n.byteLength(),l=t.getPrivate().toArray("be",f),h=e.toArray("be",f),d=new o({hash:this.hash,entropy:l,nonce:h,pers:c.pers,persEnc:c.persEnc||"utf8"}),y=this.n.sub(new n(1)),v=0;;v++){var w=c.k?c.k(v):new n(d.generate(this.n.byteLength()));if(!((w=this._truncateToN(w,!0)).cmpn(1)<=0||w.cmp(y)>=0)){var _=this.g.mul(w);if(!_.isInfinity()){var A=_.getX(),M=A.umod(this.n);if(0!==M.cmpn(0)){var s=w.invm(this.n).mul(M.mul(t.getPrivate()).iadd(e));if(0!==(s=s.umod(this.n)).cmpn(0)){var E=(_.getY().isOdd()?1:0)|(0!==A.cmp(M)?2:0);return c.canonical&&s.cmp(this.nh)>0&&(s=this.n.sub(s),E^=1),new m({r:M,s:s,recoveryParam:E});}}}}}},y.prototype.verify=function(e,t,r,o){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,o);var c=(t=new m(t,"hex")).r,s=t.s;if(c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var p,f=s.invm(this.n),l=f.mul(e).umod(this.n),h=f.mul(c).umod(this.n);return this.curve._maxwellTrick?!(p=this.g.jmulAdd(l,r.getPublic(),h)).isInfinity()&&p.eqXToP(c):!(p=this.g.mulAdd(l,r.getPublic(),h)).isInfinity()&&0===p.getX().umod(this.n).cmp(c);},y.prototype.recoverPubKey=function(e,t,r,o){h((3&r)===r,"The recovery param is more than two bits"),t=new m(t,o);var c=this.n,f=new n(e),l=t.r,s=t.s,d=1&r,y=r>>1;if(l.cmp(this.curve.p.umod(this.curve.n))>=0&&y)throw new Error("Unable to find sencond key candinate");l=y?this.curve.pointFromX(l.add(this.curve.n),d):this.curve.pointFromX(l,d);var v=t.r.invm(c),w=c.sub(f).mul(v).umod(c),_=s.mul(v).umod(c);return this.g.mulAdd(w,l,_);},y.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new m(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i);}catch(e){continue;}if(o.eq(r))return i;}throw new Error("Unable to find valid recovery factor");};},function(e,t,r){"use strict";var n=r(24),o=r(222),c=r(37);function f(e){if(!(this instanceof f))return new f(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),r=o.toArray(e.nonce,e.nonceEnc||"hex"),n=o.toArray(e.pers,e.persEnc||"hex");c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n);}e.exports=f,f.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1;},f.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=o.toArray(r,n||"hex"),this._update(r));for(var c=[];c.length";};},function(e,t,r){"use strict";var n=r(3),o=r(38),c=o.assert;function f(e,t){if(e instanceof f)return e;this._importDER(e,t)||(c(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam);}function l(){this.place=0;}function h(e,p){var t=e[p.place++];if(!(128&t))return t;var r=15&t;if(0===r||r>4)return!1;for(var n=0,i=0,o=p.place;i>>=0;return!(n<=127)&&(p.place=o,n);}function d(e){for(var i=0,t=e.length-1;!e[i]&&!(128&e[i+1])&&i>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t);}}e.exports=f,f.prototype._importDER=function(data,e){data=o.toArray(data,e);var p=new l();if(48!==data[p.place++])return!1;var t=h(data,p);if(!1===t)return!1;if(t+p.place!==data.length)return!1;if(2!==data[p.place++])return!1;var r=h(data,p);if(!1===r)return!1;var c=data.slice(p.place,r+p.place);if(p.place+=r,2!==data[p.place++])return!1;var f=h(data,p);if(!1===f)return!1;if(data.length!==f+p.place)return!1;var s=data.slice(p.place,f+p.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1);}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1);}return this.r=new n(c),this.s=new n(s),this.recoveryParam=null,!0;},f.prototype.toDER=function(e){var t=this.r.toArray(),s=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&s[0]&&(s=[0].concat(s)),t=d(t),s=d(s);!(s[0]||128&s[1]);)s=s.slice(1);var r=[2];m(r,t.length),(r=r.concat(t)).push(2),m(r,s.length);var n=r.concat(s),c=[48];return m(c,n.length),c=c.concat(n),o.encode(c,e);};},function(e,t,r){"use strict";var n=r(24),o=r(143),c=r(38),f=c.assert,l=c.parseBytes,h=r(408),d=r(409);function m(e){if(f("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof m))return new m(e);e=o[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512;}e.exports=m,m.prototype.sign=function(e,t){e=l(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),o=this.g.mul(n),c=this.encodePoint(o),f=this.hashInt(c,r.pubBytes(),e).mul(r.priv()),h=n.add(f).umod(this.curve.n);return this.makeSignature({R:o,S:h,Rencoded:c});},m.prototype.verify=function(e,t,r){e=l(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),o=this.hashInt(t.Rencoded(),n.pubBytes(),e),c=this.g.mul(t.S());return t.R().add(n.pub().mul(o)).eq(c);},m.prototype.hashInt=function(){for(var e=this.hash(),i=0;i=q)throw new Error("invalid sig");}e.exports=function(e,t,r,d,m){var y=f(r);if("ec"===y.type){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong public key type");return function(e,t,r){var n=l[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var o=new c(n),f=r.data.subjectPrivateKey.data;return o.verify(t,e,f);}(e,t,y);}if("dsa"===y.type){if("dsa"!==d)throw new Error("wrong public key type");return function(e,t,r){var p=r.data.p,q=r.data.q,g=r.data.g,n=r.data.pub_key,c=f.signature.decode(e,"der"),s=c.s,l=c.r;h(s,q),h(l,q);var d=o.mont(p),m=s.invm(q);return 0===g.toRed(d).redPow(new o(t).mul(m).mod(q)).fromRed().mul(n.toRed(d).redPow(l.mul(m).mod(q)).fromRed()).mod(p).mod(q).cmp(l);}(e,t,y);}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong public key type");t=n.concat([m,t]);for(var v=y.modulus.byteLength(),w=[1],_=0;t.length+w.length+2r-v-2)throw new Error("message too long");var w=y.alloc(r-n-v-2),_=r-m-1,A=o(m),M=l(y.concat([d,w,y.alloc(1,1),t],_),f(A,_)),E=l(A,f(M,m));return new h(y.concat([y.alloc(1),E,M],r));}(_,t);else if(1===v)w=function(e,t,r){var n,c=t.length,f=e.modulus.byteLength();if(c>f-11)throw new Error("message too long");n=r?y.alloc(f-c-3,255):function(e){var t,r=y.allocUnsafe(e),i=0,n=o(2*e),c=0;for(;i=0)throw new Error("data too long for modulus");}return r?m(w,_):d(w,_);};},function(e,t,r){var n=r(103),o=r(231),c=r(232),f=r(3),l=r(142),h=r(60),d=r(233),m=r(8).Buffer;e.exports=function(e,t,r){var y;y=e.padding?e.padding:r?1:4;var v,w=n(e),_=w.modulus.byteLength();if(t.length>_||new f(t).cmp(w.modulus)>=0)throw new Error("decryption error");v=r?d(new f(t),w):l(t,w);var A=m.alloc(_-v.length);if(v=m.concat([A,v],_),4===y)return function(e,t){var r=e.modulus.byteLength(),n=h("sha1").update(m.alloc(0)).digest(),f=n.length;if(0!==t[0])throw new Error("decryption error");var l=t.slice(1,f+1),d=t.slice(f+1),y=c(l,o(d,f)),v=c(d,o(y,r-f-1));if(function(a,b){a=m.from(a),b=m.from(b);var e=0,t=a.length;a.length!==b.length&&(e++,t=Math.min(a.length,b.length));var i=-1;for(;++i=t.length){o++;break;}var c=t.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;c.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i);}(0,v,r);if(3===y)return v;throw new Error("unknown padding");};},function(e,t,r){"use strict";(function(e,n){function o(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11");}var c=r(8),f=(r(51),c.Buffer),l=c.kMaxLength,h=e.crypto||e.msCrypto,d=Math.pow(2,32)-1;function m(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>d||e<0)throw new TypeError("offset must be a uint32");if(e>l||e>t)throw new RangeError("offset out of range");}function y(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>d||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>l)throw new RangeError("buffer too small");}function v(e,t,r,o){var c=e.buffer,f=new Uint8Array(c,t,r);return h.getRandomValues(f),o?void n.nextTick(function(){o(null,e);}):e;}h&&h.getRandomValues?(t.randomFill=function(t,r,n,o){if(!(f.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof r)o=r,r=0,n=t.length;else if("function"==typeof n)o=n,n=t.length-r;else if("function"!=typeof o)throw new TypeError('"cb" argument must be a function');return m(r,t.length),y(n,r,t.length),v(t,r,n,o);},t.randomFillSync=function(t,r,n){void 0===r&&(r=0);if(!(f.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');m(r,t.length),void 0===n&&(n=t.length-r);return y(n,r,t.length),v(t,r,n);}):(t.randomFill=o,t.randomFillSync=o);}).call(this,r(18),r(17));},function(e,t,r){const n=r(129),o=r(43);function c(){if("undefined"!=typeof window){if(void 0!==window.crypto){let e=new Uint8Array(1);return window.crypto.getRandomValues(e),e[0];}return Math.floor(256*Math.random());}return r(184).randomBytes(1)[0];}e.exports=class{constructor(p){this.one=n.one,this.zero=n.zero,this.p=n(p),this.minusone=this.p.minus(n.one),this.two=n(2),this.half=this.p.shiftRight(1),this.bitLength=this.p.bitLength(),this.mask=n.one.shiftLeft(this.bitLength).minus(n.one),this.n64=Math.floor((this.bitLength-1)/64)+1,this.R=n.one.shiftLeft(64*this.n64);const e=this.minusone.shiftRight(this.one);this.nqr=this.two;let t=this.pow(this.nqr,e);for(;!t.equals(this.minusone);)this.nqr=this.nqr.add(this.one),t=this.pow(this.nqr,e);for(this.s=this.zero,this.t=this.minusone;!this.t.isOdd();)this.s=this.s.add(this.one),this.t=this.t.shiftRight(this.one);this.nqr_to_t=this.pow(this.nqr,this.t);}e(a,b){const e=n(a,b);return this.normalize(e);}add(a,b){let e=a.add(b);return e.geq(this.p)&&(e=e.minus(this.p)),e;}sub(a,b){return a.geq(b)?a.minus(b):this.p.minus(b.minus(a));}neg(a){return a.isZero()?a:this.p.minus(a);}mul(a,b){return a.times(b).mod(this.p);}mulScalar(base,s){return base.times(n(s)).mod(this.p);}square(a){return a.square().mod(this.p);}eq(a,b){return a.eq(b);}neq(a,b){return a.neq(b);}lt(a,b){const e=a.gt(this.half)?a.minus(this.p):a,t=b.gt(this.half)?b.minus(this.p):b;return e.lt(t);}gt(a,b){const e=a.gt(this.half)?a.minus(this.p):a,t=b.gt(this.half)?b.minus(this.p):b;return e.gt(t);}leq(a,b){const e=a.gt(this.half)?a.minus(this.p):a,t=b.gt(this.half)?b.minus(this.p):b;return e.leq(t);}geq(a,b){const e=a.gt(this.half)?a.minus(this.p):a,t=b.gt(this.half)?b.minus(this.p):b;return e.geq(t);}div(a,b){return o(!b.isZero(),"Division by zero"),a.times(b.modInv(this.p)).mod(this.p);}idiv(a,b){return o(!b.isZero(),"Division by zero"),a.divide(b);}inv(a){return o(!a.isZero(),"Division by zero"),a.modInv(this.p);}mod(a,b){return a.mod(b);}pow(a,b){return a.modPow(b,this.p);}band(a,b){return a.and(b).and(this.mask).mod(this.p);}bor(a,b){return a.or(b).and(this.mask).mod(this.p);}bxor(a,b){return a.xor(b).and(this.mask).mod(this.p);}bnot(a){return a.xor(this.mask).mod(this.p);}shl(a,b){if(b.lt(this.bitLength))return a.shiftLeft(b).and(this.mask).mod(this.p);{const e=this.p.minus(b);return e.lt(this.bitLength)?this.shr(a,e):n.zero;}}shr(a,b){if(b.lt(this.bitLength))return a.shiftRight(b);{const e=this.p.minus(b);return e.lt(this.bitLength)?this.shl(a,e):n.zero;}}land(a,b){return a.isZero()||b.isZero()?n.zero:n.one;}lor(a,b){return a.isZero()&&b.isZero()?n.zero:n.one;}lnot(a){return a.isZero()?n.one:n.zero;}sqrt(e){if(e.equals(this.zero))return this.zero;if(!this.pow(e,this.minusone.shiftRight(this.one)).equals(this.one))return null;let t=parseInt(this.s),r=this.nqr_to_t,n=this.pow(e,this.t),o=this.pow(e,this.add(this.t,this.one).shiftRight(this.one));for(;!n.equals(this.one);){let e=this.square(n),i=1;for(;!e.equals(this.one);)i++,e=this.square(e);let b=r;for(let e=0;e=0;--i){const o=this.loop_count_bits[i];n=this._doubleStep(r),t.coeffs.push(n),o&&(n=this._addStep(e,r),t.coeffs.push(n));}const o=this.G2.affine(this._g2MulByQ(e));if(!this.F2.eq(o[2],this.F2.one))throw new Error("Expected values are not equal");const c=this.G2.affine(this._g2MulByQ(o));if(!this.F2.eq(c[2],this.F2.one))throw new Error("Expected values are not equal");return this.loopCountNeg&&(r.Y=this.F2.neg(r.Y)),c[1]=this.F2.neg(c[1]),n=this._addStep(o,r),t.coeffs.push(n),n=this._addStep(c,r),t.coeffs.push(n),t;}millerLoop(e,t){let r,n=this.F12.one,o=0;for(let i=this.loop_count_bits.length-2;i>=0;--i){const c=this.loop_count_bits[i];r=t.coeffs[o++],n=this.F12.square(n),n=this._mul_by_024(n,r.ell_0,this.F2.mulScalar(r.ell_VW,e.PY),this.F2.mulScalar(r.ell_VV,e.PX)),c&&(r=t.coeffs[o++],n=this._mul_by_024(n,r.ell_0,this.F2.mulScalar(r.ell_VW,e.PY),this.F2.mulScalar(r.ell_VV,e.PX)));}return this.loopCountNeg&&(n=this.F12.inverse(n)),r=t.coeffs[o++],n=this._mul_by_024(n,r.ell_0,this.F2.mulScalar(r.ell_VW,e.PY),this.F2.mulScalar(r.ell_VV,e.PX)),r=t.coeffs[o++],n=this._mul_by_024(n,r.ell_0,this.F2.mulScalar(r.ell_VW,e.PY),this.F2.mulScalar(r.ell_VV,e.PX)),n;}finalExponentiation(e){return this.F12.exp(e,this.final_exponent);}_doubleStep(e){const t=e.X,r=e.Y,n=e.Z,o=this.F2.mulScalar(this.F2.mul(t,r),this.two_inv),c=this.F2.square(r),f=this.F2.square(n),l=this.F2.add(f,this.F2.add(f,f)),h=this.F2.mul(this.twist_coeff_b,l),d=this.F2.add(h,this.F2.add(h,h)),m=this.F2.mulScalar(this.F2.add(c,d),this.two_inv),y=this.F2.sub(this.F2.square(this.F2.add(r,n)),this.F2.add(c,f)),v=this.F2.sub(h,c),w=this.F2.square(t),_=this.F2.square(h);e.X=this.F2.mul(o,this.F2.sub(c,d)),e.Y=this.F2.sub(this.F2.sub(this.F2.square(m),_),this.F2.add(_,_)),e.Z=this.F2.mul(c,y);return{ell_0:this.F2.mul(v,this.twist),ell_VW:this.F2.neg(y),ell_VV:this.F2.add(w,this.F2.add(w,w))};}_addStep(base,e){const t=e.X,r=e.Y,n=e.Z,o=base[0],c=base[1],f=this.F2.sub(t,this.F2.mul(o,n)),l=this.F2.sub(r,this.F2.mul(c,n)),h=this.F2.square(f),d=this.F2.square(l),m=this.F2.mul(f,h),y=this.F2.mul(t,h),v=this.F2.sub(this.F2.add(m,this.F2.mul(n,d)),this.F2.add(y,y));e.X=this.F2.mul(f,v),e.Y=this.F2.sub(this.F2.mul(l,this.F2.sub(y,v)),this.F2.mul(m,r)),e.Z=this.F2.mul(n,m);return{ell_0:this.F2.mul(this.twist,this.F2.sub(this.F2.mul(l,o),this.F2.mul(f,c))),ell_VV:this.F2.neg(l),ell_VW:f};}_mul_by_024(a,e,t,r){let n=a[0][0],o=a[0][1],c=a[0][2],f=a[1][0],l=a[1][1],h=a[1][2];const d=e,m=r,y=t,v=this.F2.mul(n,d),w=this.F2.mul(c,m),_=this.F2.mul(l,y),A=this.F2.add(n,l);let M=this.F2.add(n,c);const E=this.F2.add(this.F2.add(o,f),h);let S=this.F2.mul(o,m),T=this.F2.add(S,_),x=this.F2.add(this.F2.mul(this.nonResidueF6,T),v);n=x,T=this.F2.mul(h,y),S=this.F2.add(S,T),T=this.F2.add(T,w),x=this.F2.mul(this.nonResidueF6,T),T=this.F2.mul(o,d),S=this.F2.add(S,T),x=this.F2.add(x,T),o=x;let k=this.F2.add(d,m);return T=this.F2.sub(this.F2.mul(M,k),this.F2.add(v,w)),x=this.F2.mul(f,y),S=this.F2.add(S,x),k=this.F2.add(c,l),c=this.F2.add(T,x),M=this.F2.add(m,y),T=this.F2.sub(this.F2.mul(k,M),this.F2.add(w,_)),x=this.F2.mul(this.nonResidueF6,T),T=this.F2.mul(f,d),S=this.F2.add(S,T),x=this.F2.add(x,T),f=x,T=this.F2.mul(h,m),S=this.F2.add(S,T),x=this.F2.mul(this.nonResidueF6,T),k=this.F2.add(d,y),T=this.F2.sub(this.F2.mul(A,k),this.F2.add(v,_)),x=this.F2.add(x,T),l=x,k=this.F2.add(this.F2.add(d,m),y),T=this.F2.sub(this.F2.mul(E,k),S),h=T,[[n,o,c],[f,l,h]];}_g2MulByQ(p){const e=[p[0][0],this.F1.mul(p[0][1],this.frobenius_coeffs_c1_1)],t=[p[1][0],this.F1.mul(p[1][1],this.frobenius_coeffs_c1_1)],r=[p[2][0],this.F1.mul(p[2][1],this.frobenius_coeffs_c1_1)];return[this.F2.mul(this.twist_mul_by_q_X,e),this.F2.mul(this.twist_mul_by_q_Y,t),r];}}();},function(e,t,r){const n="function"==typeof BigInt;e.exports=r(n?429:430);},function(e,t,r){(function(t){const n=r(43);e.exports.stringifyBigInts=function e(t){if("bigint"==typeof t||void 0!==t.eq)return t.toString(10);if(Array.isArray(t))return t.map(e);if("object"==typeof t){const r={};for(let n in t)r[n]=e(t[n]);return r;}return t;},e.exports.unstringifyBigInts=function e(t){if("string"==typeof t&&/^[0-9]+$/.test(t))return BigInt(t);if(Array.isArray(t))return t.map(e);if("object"==typeof t){const r={};for(let n in t)r[n]=e(t[n]);return r;}return t;},e.exports.beBuff2int=function(e){let t=0n,i=e.length;for(;i>0;)i>=4?(i-=4,t+=BigInt(e.readUInt32BE(i))<=2?(i-=2,t+=BigInt(e.readUInt16BE(i))<0;)f-4>=0?(f-=4,c.writeUInt32BE(Number(0xFFFFFFFFn&o),f),o>>=32n):f-2>=0?(f-=2,c.writeUInt16BE(Number(0xFFFFn&o),f),o>>=16n):(f-=1,c.writeUInt8(Number(0xFFn&o),f),o>>=8n);return n(0n==o),c;},e.exports.leBuff2int=function(e){let t=0n,i=0;for(;i>=32n):f+2<=r?(c.writeUInt16LE(Number(0xFFFFn&o),f),f+=2,o>>=16n):(c.writeUInt8(Number(0xFFn&o),f),f+=1,o>>=8n);return n(0n==o),c;};}).call(this,r(5).Buffer);},function(e,t,r){(function(t){const n=r(43),o=r(129);e.exports.stringifyBigInts=function e(t){if("bigint"==typeof t||void 0!==t.eq)return t.toString(10);if(Array.isArray(t))return t.map(e);if("object"==typeof t){const r={};for(let n in t)r[n]=e(t[n]);return r;}return t;},e.exports.unstringifyBigInts=function e(t){if("string"==typeof t&&/^[0-9]+$/.test(t))return o(t);if(Array.isArray(t))return t.map(e);if("object"==typeof t){const r={};for(let n in t)r[n]=e(t[n]);return r;}return t;},e.exports.beBuff2int=function(e){let t=o.zero;for(let i=0;i=0;){let e=Number(c.and(o("255")));l[f]=e,f--,c=c.shiftRight(8);}return n(c.eq(o.zero)),l;},e.exports.leBuff2int=function(e){let t=o.zero;for(let i=0;i=f.subOrder)return!1;const c=f.packPoint(r.R8),d=f.packPoint(n),m=h(e.concat([c,d,t])),y=l.leBuff2int(m),v=f.mulPointEscalar(f.Base8,r.S);let w=f.mulPointEscalar(n,o.mul(y,8));return w=f.addPoint(r.R8,w),!!f.F.eq(v[0],w[0])&&!!f.F.eq(v[1],w[1]);},t.verifyMiMC=function(e,t,r){if("object"!=typeof t)return!1;if(!Array.isArray(t.R8))return!1;if(2!=t.R8.length)return!1;if(!f.inCurve(t.R8))return!1;if(!Array.isArray(r))return!1;if(2!=r.length)return!1;if(!f.inCurve(r))return!1;if(t.S>=f.subOrder)return!1;const n=d.multiHash([t.R8[0],t.R8[1],r[0],r[1],e]),c=f.mulPointEscalar(f.Base8,t.S);let l=f.mulPointEscalar(r,o.mul(n,8));return l=f.addPoint(t.R8,l),!!f.F.eq(c[0],l[0])&&!!f.F.eq(c[1],l[1]);},t.verifyPoseidon=function(e,t,r){if("object"!=typeof t)return!1;if(!Array.isArray(t.R8))return!1;if(2!=t.R8.length)return!1;if(!f.inCurve(t.R8))return!1;if(!Array.isArray(r))return!1;if(2!=r.length)return!1;if(!f.inCurve(r))return!1;if(t.S>=f.subOrder)return!1;const n=m([t.R8[0],t.R8[1],r[0],r[1],e]),c=f.mulPointEscalar(f.Base8,t.S);let l=f.mulPointEscalar(r,o.mul(n,8));return l=f.addPoint(t.R8,l),!!f.F.eq(c[0],l[0])&&!!f.F.eq(c[1],l[1]);},t.verifyMiMCSponge=function(e,t,r){if("object"!=typeof t)return!1;if(!Array.isArray(t.R8))return!1;if(2!=t.R8.length)return!1;if(!f.inCurve(t.R8))return!1;if(!Array.isArray(r))return!1;if(2!=r.length)return!1;if(!f.inCurve(r))return!1;if(t.S>=f.subOrder)return!1;const n=y.multiHash([t.R8[0],t.R8[1],r[0],r[1],e]),o=f.mulPointEscalar(f.Base8,t.S);let c=f.mulPointEscalar(r,n.times(bigInt("8")));return c=f.addPoint(t.R8,c),!!f.F.eq(o[0],c[0])&&!!f.F.eq(o[1],c[1]);},t.packSignature=function(t){const r=f.packPoint(t.R8),n=l.leInt2Buff(t.S,32);return e.concat([r,n]);},t.unpackSignature=function(e){return{R8:f.unpackPoint(e.slice(0,32)),S:l.leBuff2int(e.slice(32,64))};},t.pruneBuffer=v;}).call(this,r(5).Buffer);},function(e,t,r){"use strict";var n=r(435);e.exports=function(e){return function(t,r){var o=function(t){switch("string"==typeof t?t.toLowerCase():t){case"blake224":return e.Blake224;case"blake256":return e.Blake256;case"blake384":return e.Blake384;case"blake512":return e.Blake512;default:throw new Error("Invald algorithm: "+t);}}(t);return new n(new o(),r);};};},function(e,t,r){"use strict";(function(t){var n=r(194).Transform;function o(e,t){n.call(this,t),this._engine=e,this._finalized=!1;}r(4)(o,n),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t);}catch(e){n=e;}r(n);},o.prototype._flush=function(e){var t=null;try{this.push(this.digest());}catch(e){t=e;}e(t);},o.prototype.update=function(data,e){if(!t.isBuffer(data)&&"string"!=typeof data)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return t.isBuffer(data)||(data=t.from(data,e)),this._engine.update(data),this;},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._engine.digest();return void 0!==e&&(t=t.toString(e)),t;},e.exports=o;}).call(this,r(5).Buffer);},function(e,t,r){"use strict";e.exports={Blake224:r(437),Blake256:r(239),Blake384:r(438),Blake512:r(241)};},function(e,t,r){"use strict";(function(t){var n=r(4),o=r(239),c=t.from([0]),f=t.from([128]);function l(){o.call(this),this._h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],this._zo=c,this._oo=f;}n(l,o),l.prototype.digest=function(){this._padding();for(var e=t.alloc(28),i=0;i<7;++i)e.writeUInt32BE(this._h[i],4*i);return e;},e.exports=l;}).call(this,r(5).Buffer);},function(e,t,r){"use strict";(function(t){var n=r(4),o=r(241),c=t.from([0]),f=t.from([128]);function l(){o.call(this),this._h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428],this._zo=c,this._oo=f;}n(l,o),l.prototype.digest=function(){this._padding();for(var e=t.alloc(48),i=0;i<12;++i)e.writeUInt32BE(this._h[i],4*i);return e;},e.exports=l;}).call(this,r(5).Buffer);},function(e,t,r){var n=r(243),o=r(440);function c(e,a,b){var t=e[a]+e[b],r=e[a+1]+e[b+1];t>=4294967296&&r++,e[a]=t,e[a+1]=r;}function f(e,a,t,r){var n=e[a]+t;t<0&&(n+=4294967296);var o=e[a+1]+r;n>=4294967296&&o++,e[a]=n,e[a+1]=o;}function l(e,i){return e[i]^e[i+1]<<8^e[i+2]<<16^e[i+3]<<24;}function h(a,b,e,t,r,n){var o=v[r],l=v[r+1],h=v[n],d=v[n+1];c(y,a,b),f(y,a,o,l);var m=y[t]^y[a],w=y[t+1]^y[a+1];y[t]=w,y[t+1]=m,c(y,e,t),m=y[b]^y[e],w=y[b+1]^y[e+1],y[b]=m>>>24^w<<8,y[b+1]=w>>>24^m<<8,c(y,a,b),f(y,a,h,d),m=y[t]^y[a],w=y[t+1]^y[a+1],y[t]=m>>>16^w<<16,y[t+1]=w>>>16^m<<16,c(y,e,t),m=y[b]^y[e],w=y[b+1]^y[e+1],y[b]=w>>>31^m<<1,y[b+1]=m>>>31^w<<1;}var d=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),m=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return 2*e;})),y=new Uint32Array(32),v=new Uint32Array(32);function w(e,t){var i=0;for(i=0;i<16;i++)y[i]=e.h[i],y[i+16]=d[i];for(y[24]=y[24]^e.t,y[25]=y[25]^e.t/4294967296,t&&(y[28]=~y[28],y[29]=~y[29]),i=0;i<32;i++)v[i]=l(e.b,4*i);for(i=0;i<12;i++)h(0,8,16,24,m[16*i+0],m[16*i+1]),h(2,10,18,26,m[16*i+2],m[16*i+3]),h(4,12,20,28,m[16*i+4],m[16*i+5]),h(6,14,22,30,m[16*i+6],m[16*i+7]),h(0,10,20,30,m[16*i+8],m[16*i+9]),h(2,12,22,24,m[16*i+10],m[16*i+11]),h(4,14,16,26,m[16*i+12],m[16*i+13]),h(6,8,18,28,m[16*i+14],m[16*i+15]);for(i=0;i<16;i++)e.h[i]=e.h[i]^y[i]^y[i+16];}var _=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function A(e,t,r,n){_.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=e,_[0]=e,t&&(_[1]=t.length),_[2]=1,_[3]=1,r&&_.set(r,32),n&&_.set(n,48);for(var i=0;i<16;i++)this.h[i]=d[i]^l(_,4*i);t&&(M(this,t),this.c=128);}function M(e,input){for(var i=0;i=this.outlen,"out must have at least outlen bytes of space"),function(e,t){e.t+=e.c;for(;e.c<128;)e.b[e.c++]=0;w(e,!0);for(var i=0;i>2]>>8*(3&i);}(this,t),"hex"===e?function(e){for(var t="",i=0;i=T,"outlen must be at least "+T+", was given "+e),n(e<=x,"outlen must be at most "+x+", was given "+e),null!=t&&n(t.length>=k,"key must be at least "+k+", was given "+t.length),null!=t&&n(t.length<=I,"key must be at most "+I+", was given "+t.length),null!=r&&n(r.length===C,"salt must be exactly "+C+", was given "+r.length),null!=o&&n(o.length===O,"personal must be exactly "+O+", was given "+o.length)),new S(e,t,r,o);},e.exports.ready=function(e){o.ready(function(){e();});},e.exports.WASM_SUPPORTED=o.SUPPORTED,e.exports.WASM_LOADED=!1;var T=e.exports.BYTES_MIN=16,x=e.exports.BYTES_MAX=64,k=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),I=e.exports.KEYBYTES_MAX=64,C=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),O=e.exports.PERSONALBYTES=16;o.ready(function(t){t||(e.exports.WASM_LOADED=!0,S=o);});},function(e,t,r){var n=r(243),o=r(441)(),head=64,c=[];e.exports=v;var f=e.exports.BYTES_MIN=16,l=e.exports.BYTES_MAX=64,h=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),d=e.exports.KEYBYTES_MAX=64,m=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),y=e.exports.PERSONALBYTES=16;function v(e,t,r,w,_){if(!(this instanceof v))return new v(e,t,r,w,_);if(!o||!o.exports)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");e||(e=32),!0!==_&&(n(e>=f,"digestLength must be at least "+f+", was given "+e),n(e<=l,"digestLength must be at most "+l+", was given "+e),null!=t&&n(t.length>=h,"key must be at least "+h+", was given "+t.length),null!=t&&n(t.length<=d,"key must be at least "+d+", was given "+t.length),null!=r&&n(r.length===m,"salt must be exactly "+m+", was given "+r.length),null!=w&&n(w.length===y,"personal must be exactly "+y+", was given "+w.length)),c.length||(c.push(head),head+=216),this.digestLength=e,this.finalized=!1,this.pointer=c.pop(),o.memory.fill(0,0,64),o.memory[0]=this.digestLength,o.memory[1]=t?t.length:0,o.memory[2]=1,o.memory[3]=1,r&&o.memory.set(r,32),w&&o.memory.set(w,48),this.pointer+216>o.memory.length&&o.realloc(this.pointer+216),o.exports.blake2b_init(this.pointer,this.digestLength),t&&(this.update(t),o.memory.fill(0,head,head+t.length),o.memory[this.pointer+200]=128);}function w(){}function _(e){return e<16?"0"+e.toString(16):e.toString(16);}v.prototype.update=function(input){return n(!1===this.finalized,"Hash instance finalized"),n(input,"input must be TypedArray or Buffer"),head+input.length>o.memory.length&&o.realloc(head+input.length),o.memory.set(input,head),o.exports.blake2b_update(this.pointer,head,head+input.length),this;},v.prototype.digest=function(e){if(n(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,c.push(this.pointer),o.exports.blake2b_final(this.pointer),!e||"binary"===e)return o.memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("hex"===e)return function(e,t,r){for(var n="",i=0;i=this.digestLength,"input must be TypedArray or Buffer");for(var i=0;i2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points");var y=m[0],v=m[1];if(y||(y="0"),v||(v="0"),v.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;v.length=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c;}return n;}function h(e,t,r,n){for(var o=0,c=Math.min(e.length,r),i=t;i=49?f-49+10:f>=17?f-17+10:f;}return o;}c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words);},c.max=function(e,t){return e.cmp(t)>0?e:t;},c.min=function(e,t){return e.cmp(t)<0?e:t;},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),n(base===(0|base)&&base>=2&&base<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&r++,16===base?this._parseHex(e,r):this._parseBase(e,base,r),"-"===e[0]&&(this.negative=1),this.strip(),"le"===t&&this._initArray(this.toArray(),base,t);},c.prototype._initNumber=function(e,base,t){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===t&&this._initArray(this.toArray(),base,t);},c.prototype._initArray=function(e,base,t){if(n("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 i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[r]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);else if("le"===t)for(i=0,r=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);return this.strip();},c.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=l(e,i,i+6),this.words[r]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);i+6!==t&&(n=l(e,t,i+6),this.words[r]|=n<>>26-o&4194303),this.strip();},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=base)r++;r--,n=n/base|0;for(var o=e.length-t,c=o%r,f=Math.min(o,o-c)+t,l=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign();},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this;},c.prototype.inspect=function(){return(this.red?"";};var d=["","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"],m=[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],y=[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];function v(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,f=o/67108864|0;r.words[0]=c;for(var l=1;l>>26,d=67108863&f,m=Math.min(l,t.length-1),y=Math.max(0,l-e.length+1);y<=m;y++){var i=l-y|0;h+=(o=(a=0|e.words[i])*(b=0|t.words[y])+d)/67108864|0,d=67108863&o;}r.words[l]=0|d,f=0|h;}return 0!==f?r.words[l]=0|f:r.length--,r.strip();}c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var r=0,o=0,i=0;i>>24-r&16777215)||i!==this.length-1?d[6-f.length]+f+t:f+t,(r+=2)>=26&&(r-=26,i--);}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}if(base===(0|base)&&base>=2&&base<=36){var l=m[base],h=y[base];t="";var v=this.clone();for(v.negative=0;!v.isZero();){var w=v.modn(h).toString(base);t=(v=v.idivn(h)).isZero()?w+t:d[l-w.length]+w+t;}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}n(!1,"Base should be between 2 and 36");},c.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e;},c.prototype.toJSON=function(){return this.toString(16);},c.prototype.toBuffer=function(e,t){return n(void 0!==f),this.toArrayLike(f,e,t);},c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);},c.prototype.toArrayLike=function(e,t,r){var o=this.byteLength(),c=r||Math.max(1,o);n(o<=c,"byte array longer than desired length"),n(c>0,"Requested array length <= 0"),this.strip();var b,i,f="le"===t,l=new e(c),q=this.clone();if(f){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),l[i]=b;for(;i=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t;},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r;},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t;},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this);},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this);},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this);},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this);},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this);},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this);},c.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip();},c.prototype.notn=function(e){return this.clone().inotn(e);},c.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this);},c.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 a,b,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==n&&i>26,this.words[i]=67108863&t;if(0===n&&i>>13,y=0|a[1],v=8191&y,w=y>>>13,_=0|a[2],A=8191&_,M=_>>>13,E=0|a[3],S=8191&E,T=E>>>13,x=0|a[4],k=8191&x,I=x>>>13,C=0|a[5],O=8191&C,B=C>>>13,R=0|a[6],P=8191&R,F=R>>>13,L=0|a[7],N=8191&L,D=L>>>13,j=0|a[8],U=8191&j,J=j>>>13,H=0|a[9],z=8191&H,G=H>>>13,K=0|b[0],V=8191&K,X=K>>>13,Q=0|b[1],Z=8191&Q,W=Q>>>13,Y=0|b[2],$=8191&Y,ee=Y>>>13,te=0|b[3],re=8191&te,ne=te>>>13,ie=0|b[4],oe=8191&ie,ae=ie>>>13,se=0|b[5],ue=8191&se,ce=se>>>13,fe=0|b[6],le=8191&fe,he=fe>>>13,de=0|b[7],pe=8191&de,be=de>>>13,me=0|b[8],ge=8191&me,ye=me>>>13,ve=0|b[9],we=8191&ve,_e=ve>>>13;r.negative=e.negative^t.negative,r.length=19;var Ae=(l+(n=Math.imul(d,V))|0)+((8191&(o=(o=Math.imul(d,X))+Math.imul(m,V)|0))<<13)|0;l=((c=Math.imul(m,X))+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(v,V),o=(o=Math.imul(v,X))+Math.imul(w,V)|0,c=Math.imul(w,X);var Me=(l+(n=n+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,W)|0)+Math.imul(m,Z)|0))<<13)|0;l=((c=c+Math.imul(m,W)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(A,V),o=(o=Math.imul(A,X))+Math.imul(M,V)|0,c=Math.imul(M,X),n=n+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,W)|0)+Math.imul(w,Z)|0,c=c+Math.imul(w,W)|0;var Ee=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(m,$)|0))<<13)|0;l=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(S,V),o=(o=Math.imul(S,X))+Math.imul(T,V)|0,c=Math.imul(T,X),n=n+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,W)|0)+Math.imul(M,Z)|0,c=c+Math.imul(M,W)|0,n=n+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0;var Se=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(m,re)|0))<<13)|0;l=((c=c+Math.imul(m,ne)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(k,V),o=(o=Math.imul(k,X))+Math.imul(I,V)|0,c=Math.imul(I,X),n=n+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(T,Z)|0,c=c+Math.imul(T,W)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(M,$)|0,c=c+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,o=(o=o+Math.imul(v,ne)|0)+Math.imul(w,re)|0,c=c+Math.imul(w,ne)|0;var Te=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(m,oe)|0))<<13)|0;l=((c=c+Math.imul(m,ae)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,V),o=(o=Math.imul(O,X))+Math.imul(B,V)|0,c=Math.imul(B,X),n=n+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,W)|0)+Math.imul(I,Z)|0,c=c+Math.imul(I,W)|0,n=n+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(T,$)|0,c=c+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(M,re)|0,c=c+Math.imul(M,ne)|0,n=n+Math.imul(v,oe)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,c=c+Math.imul(w,ae)|0;var xe=(l+(n=n+Math.imul(d,ue)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(m,ue)|0))<<13)|0;l=((c=c+Math.imul(m,ce)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(P,V),o=(o=Math.imul(P,X))+Math.imul(F,V)|0,c=Math.imul(F,X),n=n+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,W)|0)+Math.imul(B,Z)|0,c=c+Math.imul(B,W)|0,n=n+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(I,$)|0,c=c+Math.imul(I,ee)|0,n=n+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ne)|0)+Math.imul(T,re)|0,c=c+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,o=(o=o+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,c=c+Math.imul(M,ae)|0,n=n+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,c=c+Math.imul(w,ce)|0;var ke=(l+(n=n+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,he)|0)+Math.imul(m,le)|0))<<13)|0;l=((c=c+Math.imul(m,he)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,V),o=(o=Math.imul(N,X))+Math.imul(D,V)|0,c=Math.imul(D,X),n=n+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,W)|0)+Math.imul(F,Z)|0,c=c+Math.imul(F,W)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(B,$)|0,c=c+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,o=(o=o+Math.imul(k,ne)|0)+Math.imul(I,re)|0,c=c+Math.imul(I,ne)|0,n=n+Math.imul(S,oe)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(T,oe)|0,c=c+Math.imul(T,ae)|0,n=n+Math.imul(A,ue)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(M,ue)|0,c=c+Math.imul(M,ce)|0,n=n+Math.imul(v,le)|0,o=(o=o+Math.imul(v,he)|0)+Math.imul(w,le)|0,c=c+Math.imul(w,he)|0;var Ie=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,be)|0)+Math.imul(m,pe)|0))<<13)|0;l=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,V),o=(o=Math.imul(U,X))+Math.imul(J,V)|0,c=Math.imul(J,X),n=n+Math.imul(N,Z)|0,o=(o=o+Math.imul(N,W)|0)+Math.imul(D,Z)|0,c=c+Math.imul(D,W)|0,n=n+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(F,$)|0,c=c+Math.imul(F,ee)|0,n=n+Math.imul(O,re)|0,o=(o=o+Math.imul(O,ne)|0)+Math.imul(B,re)|0,c=c+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(I,oe)|0,c=c+Math.imul(I,ae)|0,n=n+Math.imul(S,ue)|0,o=(o=o+Math.imul(S,ce)|0)+Math.imul(T,ue)|0,c=c+Math.imul(T,ce)|0,n=n+Math.imul(A,le)|0,o=(o=o+Math.imul(A,he)|0)+Math.imul(M,le)|0,c=c+Math.imul(M,he)|0,n=n+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,be)|0)+Math.imul(w,pe)|0,c=c+Math.imul(w,be)|0;var Ce=(l+(n=n+Math.imul(d,ge)|0)|0)+((8191&(o=(o=o+Math.imul(d,ye)|0)+Math.imul(m,ge)|0))<<13)|0;l=((c=c+Math.imul(m,ye)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(z,V),o=(o=Math.imul(z,X))+Math.imul(G,V)|0,c=Math.imul(G,X),n=n+Math.imul(U,Z)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(J,Z)|0,c=c+Math.imul(J,W)|0,n=n+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,o=(o=o+Math.imul(P,ne)|0)+Math.imul(F,re)|0,c=c+Math.imul(F,ne)|0,n=n+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(B,oe)|0,c=c+Math.imul(B,ae)|0,n=n+Math.imul(k,ue)|0,o=(o=o+Math.imul(k,ce)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,ce)|0,n=n+Math.imul(S,le)|0,o=(o=o+Math.imul(S,he)|0)+Math.imul(T,le)|0,c=c+Math.imul(T,he)|0,n=n+Math.imul(A,pe)|0,o=(o=o+Math.imul(A,be)|0)+Math.imul(M,pe)|0,c=c+Math.imul(M,be)|0,n=n+Math.imul(v,ge)|0,o=(o=o+Math.imul(v,ye)|0)+Math.imul(w,ge)|0,c=c+Math.imul(w,ye)|0;var Oe=(l+(n=n+Math.imul(d,we)|0)|0)+((8191&(o=(o=o+Math.imul(d,_e)|0)+Math.imul(m,we)|0))<<13)|0;l=((c=c+Math.imul(m,_e)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(z,Z),o=(o=Math.imul(z,W))+Math.imul(G,Z)|0,c=Math.imul(G,W),n=n+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(J,$)|0,c=c+Math.imul(J,ee)|0,n=n+Math.imul(N,re)|0,o=(o=o+Math.imul(N,ne)|0)+Math.imul(D,re)|0,c=c+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(F,oe)|0,c=c+Math.imul(F,ae)|0,n=n+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,ce)|0)+Math.imul(B,ue)|0,c=c+Math.imul(B,ce)|0,n=n+Math.imul(k,le)|0,o=(o=o+Math.imul(k,he)|0)+Math.imul(I,le)|0,c=c+Math.imul(I,he)|0,n=n+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,be)|0)+Math.imul(T,pe)|0,c=c+Math.imul(T,be)|0,n=n+Math.imul(A,ge)|0,o=(o=o+Math.imul(A,ye)|0)+Math.imul(M,ge)|0,c=c+Math.imul(M,ye)|0;var Be=(l+(n=n+Math.imul(v,we)|0)|0)+((8191&(o=(o=o+Math.imul(v,_e)|0)+Math.imul(w,we)|0))<<13)|0;l=((c=c+Math.imul(w,_e)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),n=n+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ne)|0)+Math.imul(J,re)|0,c=c+Math.imul(J,ne)|0,n=n+Math.imul(N,oe)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,c=c+Math.imul(D,ae)|0,n=n+Math.imul(P,ue)|0,o=(o=o+Math.imul(P,ce)|0)+Math.imul(F,ue)|0,c=c+Math.imul(F,ce)|0,n=n+Math.imul(O,le)|0,o=(o=o+Math.imul(O,he)|0)+Math.imul(B,le)|0,c=c+Math.imul(B,he)|0,n=n+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,be)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,be)|0,n=n+Math.imul(S,ge)|0,o=(o=o+Math.imul(S,ye)|0)+Math.imul(T,ge)|0,c=c+Math.imul(T,ye)|0;var Re=(l+(n=n+Math.imul(A,we)|0)|0)+((8191&(o=(o=o+Math.imul(A,_e)|0)+Math.imul(M,we)|0))<<13)|0;l=((c=c+Math.imul(M,_e)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(z,re),o=(o=Math.imul(z,ne))+Math.imul(G,re)|0,c=Math.imul(G,ne),n=n+Math.imul(U,oe)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(J,oe)|0,c=c+Math.imul(J,ae)|0,n=n+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,ce)|0)+Math.imul(D,ue)|0,c=c+Math.imul(D,ce)|0,n=n+Math.imul(P,le)|0,o=(o=o+Math.imul(P,he)|0)+Math.imul(F,le)|0,c=c+Math.imul(F,he)|0,n=n+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(B,pe)|0,c=c+Math.imul(B,be)|0,n=n+Math.imul(k,ge)|0,o=(o=o+Math.imul(k,ye)|0)+Math.imul(I,ge)|0,c=c+Math.imul(I,ye)|0;var Pe=(l+(n=n+Math.imul(S,we)|0)|0)+((8191&(o=(o=o+Math.imul(S,_e)|0)+Math.imul(T,we)|0))<<13)|0;l=((c=c+Math.imul(T,_e)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,oe),o=(o=Math.imul(z,ae))+Math.imul(G,oe)|0,c=Math.imul(G,ae),n=n+Math.imul(U,ue)|0,o=(o=o+Math.imul(U,ce)|0)+Math.imul(J,ue)|0,c=c+Math.imul(J,ce)|0,n=n+Math.imul(N,le)|0,o=(o=o+Math.imul(N,he)|0)+Math.imul(D,le)|0,c=c+Math.imul(D,he)|0,n=n+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,be)|0)+Math.imul(F,pe)|0,c=c+Math.imul(F,be)|0,n=n+Math.imul(O,ge)|0,o=(o=o+Math.imul(O,ye)|0)+Math.imul(B,ge)|0,c=c+Math.imul(B,ye)|0;var Fe=(l+(n=n+Math.imul(k,we)|0)|0)+((8191&(o=(o=o+Math.imul(k,_e)|0)+Math.imul(I,we)|0))<<13)|0;l=((c=c+Math.imul(I,_e)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(z,ue),o=(o=Math.imul(z,ce))+Math.imul(G,ue)|0,c=Math.imul(G,ce),n=n+Math.imul(U,le)|0,o=(o=o+Math.imul(U,he)|0)+Math.imul(J,le)|0,c=c+Math.imul(J,he)|0,n=n+Math.imul(N,pe)|0,o=(o=o+Math.imul(N,be)|0)+Math.imul(D,pe)|0,c=c+Math.imul(D,be)|0,n=n+Math.imul(P,ge)|0,o=(o=o+Math.imul(P,ye)|0)+Math.imul(F,ge)|0,c=c+Math.imul(F,ye)|0;var Le=(l+(n=n+Math.imul(O,we)|0)|0)+((8191&(o=(o=o+Math.imul(O,_e)|0)+Math.imul(B,we)|0))<<13)|0;l=((c=c+Math.imul(B,_e)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(z,le),o=(o=Math.imul(z,he))+Math.imul(G,le)|0,c=Math.imul(G,he),n=n+Math.imul(U,pe)|0,o=(o=o+Math.imul(U,be)|0)+Math.imul(J,pe)|0,c=c+Math.imul(J,be)|0,n=n+Math.imul(N,ge)|0,o=(o=o+Math.imul(N,ye)|0)+Math.imul(D,ge)|0,c=c+Math.imul(D,ye)|0;var Ne=(l+(n=n+Math.imul(P,we)|0)|0)+((8191&(o=(o=o+Math.imul(P,_e)|0)+Math.imul(F,we)|0))<<13)|0;l=((c=c+Math.imul(F,_e)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(z,pe),o=(o=Math.imul(z,be))+Math.imul(G,pe)|0,c=Math.imul(G,be),n=n+Math.imul(U,ge)|0,o=(o=o+Math.imul(U,ye)|0)+Math.imul(J,ge)|0,c=c+Math.imul(J,ye)|0;var De=(l+(n=n+Math.imul(N,we)|0)|0)+((8191&(o=(o=o+Math.imul(N,_e)|0)+Math.imul(D,we)|0))<<13)|0;l=((c=c+Math.imul(D,_e)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(z,ge),o=(o=Math.imul(z,ye))+Math.imul(G,ge)|0,c=Math.imul(G,ye);var je=(l+(n=n+Math.imul(U,we)|0)|0)+((8191&(o=(o=o+Math.imul(U,_e)|0)+Math.imul(J,we)|0))<<13)|0;l=((c=c+Math.imul(J,_e)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863;var Ue=(l+(n=Math.imul(z,we))|0)+((8191&(o=(o=Math.imul(z,_e))+Math.imul(G,we)|0))<<13)|0;return l=((c=Math.imul(G,_e))+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,f[0]=Ae,f[1]=Me,f[2]=Ee,f[3]=Se,f[4]=Te,f[5]=xe,f[6]=ke,f[7]=Ie,f[8]=Ce,f[9]=Oe,f[10]=Be,f[11]=Re,f[12]=Pe,f[13]=Fe,f[14]=Le,f[15]=Ne,f[16]=De,f[17]=je,f[18]=Ue,0!==l&&(f[19]=l,r.length++),r;};function _(e,t,r){return new A().mulp(e,t,r);}function A(e,t){this.x=e,this.y=t;}Math.imul||(w=v),c.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?w(this,e,t):n<63?v(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,c=0;c>>26)|0)>>>26,f&=67108863;}r.words[c]=l,n=f,f=o;}return 0!==n?r.words[c]=n:r.length--,r.strip();}(this,e,t):_(this,e,t),r;},A.prototype.makeRBT=function(e){for(var t=new Array(e),r=c.prototype._countBits(e)-1,i=0;i>=1;return n;},A.prototype.permute=function(e,t,r,n,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,r[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,t+=r/67108864|0,t+=o>>>26,this.words[i]=67108863&o;}return 0!==t&&(this.words[i]=t,this.length++),this;},c.prototype.muln=function(e){return this.clone().imuln(e);},c.prototype.sqr=function(){return this.mul(this);},c.prototype.isqr=function(){return this.imul(this.clone());},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>o;}return t;}(e);if(0===t.length)return new c(1);for(var r=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,r=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t;}o&&(this.words[i]=o,this.length++);}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==l||i>=o);i--){var h=0|this.words[i];this.words[i]=l<<26-c|h>>>c,l=h&mask;}return f&&0!==l&&(f.words[f.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip();},c.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r);},c.prototype.shln=function(e){return this.clone().ishln(e);},c.prototype.ushln=function(e){return this.clone().iushln(e);},c.prototype.shrn=function(e){return this.clone().ishrn(e);},c.prototype.ushrn=function(e){return this.clone().iushrn(e);},c.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this;},c.prototype.isubn=function(e){if(n("number"==typeof e),n(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 i=0;i>26)-(l/67108864|0),this.words[i+r]=67108863&o;}for(;i>26,this.words[i+r]=67108863&o;if(0===f)return this.strip();for(n(-1===f),f=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip();},c.prototype._wordDiv=function(e,t){var r=(this.length,e.length),a=this.clone(),b=e,n=0|b.words[b.length-1];0!==(r=26-this._countBits(n))&&(b=b.ushln(r),a.iushln(r),n=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;l--){var h=67108864*(0|a.words[b.length+l])+(0|a.words[b.length+l-1]);for(h=Math.min(h/n|0,67108863),a._ishlnsubmul(b,h,l);0!==a.negative;)h--,a.negative=0,a._ishlnsubmul(b,1,l),a.isZero()||(a.negative^=1);q&&(q.words[l]=h);}return q&&q.strip(),a.strip(),"div"!==t&&0!==r&&a.iushrn(r),{div:q||null,mod:a};},c.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(f=this.neg().divmod(e,t),"mod"!==t&&(div=f.div.neg()),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(f=this.divmod(e.neg(),t),"mod"!==t&&(div=f.div.neg()),{div:div,mod:f.mod}):0!=(this.negative&e.negative)?(f=this.neg().divmod(e.neg(),t),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:f.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var div,o,f;},c.prototype.div=function(e){return this.divmod(e,"div",!1).div;},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod;},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod;},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),c=r.cmp(n);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1);},c.prototype.modn=function(e){n(e<=67108863);for(var p=(1<<26)%e,t=0,i=this.length-1;i>=0;i--)t=(p*t+(0|this.words[i]))%e;return t;},c.prototype.idivn=function(e){n(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var r=(0|this.words[i])+67108864*t;this.words[i]=r/e|0,t=r%e;}return this.strip();},c.prototype.divn=function(e){return this.clone().idivn(e);},c.prototype.egcd=function(p){n(0===p.negative),n(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var r=new c(1),o=new c(0),f=new c(0),l=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var h=t.clone(),d=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-->0;)(r.isOdd()||o.isOdd())&&(r.iadd(h),o.isub(d)),r.iushrn(1),o.iushrn(1);for(var y=0,v=1;0==(t.words[0]&v)&&y<26;++y,v<<=1);if(y>0)for(t.iushrn(y);y-->0;)(f.isOdd()||l.isOdd())&&(f.iadd(h),l.isub(d)),f.iushrn(1),l.iushrn(1);e.cmp(t)>=0?(e.isub(t),r.isub(f),o.isub(l)):(t.isub(e),f.isub(r),l.isub(o));}return{a:f,b:l,gcd:t.iushln(g)};},c.prototype._invmp=function(p){n(0===p.negative),n(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),r=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,f=1;0==(a.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(a.iushrn(i);i-->0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var l=0,h=1;0==(b.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(b.iushrn(l);l-->0;)r.isOdd()&&r.iadd(o),r.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(r)):(b.isub(a),r.isub(t));}return(e=0===a.cmpn(1)?t:r).cmpn(0)<0&&e.iadd(p),e;},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var n=a;a=b,b=n;}else if(0===r||0===b.cmpn(1))break;a.isub(b);}return b.iushln(t);},c.prototype.invm=function(e){return this.egcd(e).a.umod(e);},c.prototype.isEven=function(){return 0==(1&this.words[0]);},c.prototype.isOdd=function(){return 1==(1&this.words[0]);},c.prototype.andln=function(e){return this.words[0]&e;},c.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o;}return 0!==r&&(this.words[i]=r,this.length++),this;},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},c.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break;}}return t;},c.prototype.gtn=function(e){return 1===this.cmpn(e);},c.prototype.gt=function(e){return 1===this.cmp(e);},c.prototype.gten=function(e){return this.cmpn(e)>=0;},c.prototype.gte=function(e){return this.cmp(e)>=0;},c.prototype.ltn=function(e){return-1===this.cmpn(e);},c.prototype.lt=function(e){return-1===this.cmp(e);},c.prototype.lten=function(e){return this.cmpn(e)<=0;},c.prototype.lte=function(e){return this.cmp(e)<=0;},c.prototype.eqn=function(e){return 0===this.cmpn(e);},c.prototype.eq=function(e){return 0===this.cmp(e);},c.red=function(e){return new I(e);},c.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this);},c.prototype._forceRed=function(e){return this.red=e,this;},c.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e);},c.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},c.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},c.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},c.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},c.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},c.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},c.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},c.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var M={k256:null,p224:null,p192:null,p25519:null};function E(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function S(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function T(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function x(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function k(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function I(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t;}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function C(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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);}E.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e;},E.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r;},E.prototype.split=function(input,e){input.iushrn(this.n,0,e);},E.prototype.imulK=function(e){return e.imul(this.k);},o(S,E),S.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=r;}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9;},S.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;},c._prime=function(e){if(M[e])return M[e];var t;if("k256"===e)t=new S();else if("p224"===e)t=new T();else if("p192"===e)t=new x();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k();}return M[e]=t,t;},I.prototype._verify1=function(a){n(0===a.negative,"red works only with positives"),n(a.red,"red works only with red numbers");},I.prototype._verify2=function(a,b){n(0==(a.negative|b.negative),"red works only with positives"),n(a.red&&a.red===b.red,"red works only with red numbers");},I.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this);},I.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this);},I.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this);},I.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e;},I.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this);},I.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e;},I.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e));},I.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b));},I.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b));},I.prototype.isqr=function(a){return this.imul(a,a.clone());},I.prototype.sqr=function(a){return this.mul(a,a);},I.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t);}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);n(!q.isZero());var r=new c(1).toRed(this),o=r.redNeg(),f=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new c(2*l*l).toRed(this);0!==this.pow(l,f).cmp(o);)l.redIAdd(o);for(var h=this.pow(l,q),d=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),y=s;0!==m.cmp(r);){for(var v=m,i=0;0!==v.cmp(r);i++)v=v.redSqr();n(i=0;i--){for(var l=e.words[i],h=f-1;h>=0;h--){var d=l>>h&1;r!==t[0]&&(r=this.sqr(r)),0!==d||0!==n?(n<<=1,n|=d,(4===++o||0===i&&0===h)&&(r=this.mul(r,t[n]),o=0,n=0)):o=0;}f=26;}return r;},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},c.mont=function(e){return new C(e);},o(C,I),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},C.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},C.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},C.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this);};}(e,this);}).call(this,r(59)(e));},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed");}function o(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r(),e.prototype.constructor=e;}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"));}var f;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{f=r(5).Buffer;}catch(e){}function l(e,t,r){for(var n=0,o=Math.min(e.length,r),i=t;i=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c;}return n;}function h(e,t,r,n){for(var o=0,c=Math.min(e.length,r),i=t;i=49?f-49+10:f>=17?f-17+10:f;}return o;}c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words);},c.max=function(e,t){return e.cmp(t)>0?e:t;},c.min=function(e,t){return e.cmp(t)<0?e:t;},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),n(base===(0|base)&&base>=2&&base<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&r++,16===base?this._parseHex(e,r):this._parseBase(e,base,r),"-"===e[0]&&(this.negative=1),this.strip(),"le"===t&&this._initArray(this.toArray(),base,t);},c.prototype._initNumber=function(e,base,t){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===t&&this._initArray(this.toArray(),base,t);},c.prototype._initArray=function(e,base,t){if(n("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 i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[r]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);else if("le"===t)for(i=0,r=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);return this.strip();},c.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=l(e,i,i+6),this.words[r]|=n<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);i+6!==t&&(n=l(e,t,i+6),this.words[r]|=n<>>26-o&4194303),this.strip();},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=base)r++;r--,n=n/base|0;for(var o=e.length-t,c=o%r,f=Math.min(o,o-c)+t,l=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign();},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this;},c.prototype.inspect=function(){return(this.red?"";};var d=["","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"],m=[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],y=[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];function v(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,f=o/67108864|0;r.words[0]=c;for(var l=1;l>>26,d=67108863&f,m=Math.min(l,t.length-1),y=Math.max(0,l-e.length+1);y<=m;y++){var i=l-y|0;h+=(o=(a=0|e.words[i])*(b=0|t.words[y])+d)/67108864|0,d=67108863&o;}r.words[l]=0|d,f=0|h;}return 0!==f?r.words[l]=0|f:r.length--,r.strip();}c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var r=0,o=0,i=0;i>>24-r&16777215)||i!==this.length-1?d[6-f.length]+f+t:f+t,(r+=2)>=26&&(r-=26,i--);}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}if(base===(0|base)&&base>=2&&base<=36){var l=m[base],h=y[base];t="";var v=this.clone();for(v.negative=0;!v.isZero();){var w=v.modn(h).toString(base);t=(v=v.idivn(h)).isZero()?w+t:d[l-w.length]+w+t;}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}n(!1,"Base should be between 2 and 36");},c.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e;},c.prototype.toJSON=function(){return this.toString(16);},c.prototype.toBuffer=function(e,t){return n(void 0!==f),this.toArrayLike(f,e,t);},c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);},c.prototype.toArrayLike=function(e,t,r){var o=this.byteLength(),c=r||Math.max(1,o);n(o<=c,"byte array longer than desired length"),n(c>0,"Requested array length <= 0"),this.strip();var b,i,f="le"===t,l=new e(c),q=this.clone();if(f){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),l[i]=b;for(;i=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t;},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r;},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t;},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this);},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this);},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this);},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this);},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this);},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this);},c.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip();},c.prototype.notn=function(e){return this.clone().inotn(e);},c.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this);},c.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 a,b,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==n&&i>26,this.words[i]=67108863&t;if(0===n&&i>>13,y=0|a[1],v=8191&y,w=y>>>13,_=0|a[2],A=8191&_,M=_>>>13,E=0|a[3],S=8191&E,T=E>>>13,x=0|a[4],k=8191&x,I=x>>>13,C=0|a[5],O=8191&C,B=C>>>13,R=0|a[6],P=8191&R,F=R>>>13,L=0|a[7],N=8191&L,D=L>>>13,j=0|a[8],U=8191&j,J=j>>>13,H=0|a[9],z=8191&H,G=H>>>13,K=0|b[0],V=8191&K,X=K>>>13,Q=0|b[1],Z=8191&Q,W=Q>>>13,Y=0|b[2],$=8191&Y,ee=Y>>>13,te=0|b[3],re=8191&te,ne=te>>>13,ie=0|b[4],oe=8191&ie,ae=ie>>>13,se=0|b[5],ue=8191&se,ce=se>>>13,fe=0|b[6],le=8191&fe,he=fe>>>13,de=0|b[7],pe=8191&de,be=de>>>13,me=0|b[8],ge=8191&me,ye=me>>>13,ve=0|b[9],we=8191&ve,_e=ve>>>13;r.negative=e.negative^t.negative,r.length=19;var Ae=(l+(n=Math.imul(d,V))|0)+((8191&(o=(o=Math.imul(d,X))+Math.imul(m,V)|0))<<13)|0;l=((c=Math.imul(m,X))+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(v,V),o=(o=Math.imul(v,X))+Math.imul(w,V)|0,c=Math.imul(w,X);var Me=(l+(n=n+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,W)|0)+Math.imul(m,Z)|0))<<13)|0;l=((c=c+Math.imul(m,W)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(A,V),o=(o=Math.imul(A,X))+Math.imul(M,V)|0,c=Math.imul(M,X),n=n+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,W)|0)+Math.imul(w,Z)|0,c=c+Math.imul(w,W)|0;var Ee=(l+(n=n+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(m,$)|0))<<13)|0;l=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(S,V),o=(o=Math.imul(S,X))+Math.imul(T,V)|0,c=Math.imul(T,X),n=n+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,W)|0)+Math.imul(M,Z)|0,c=c+Math.imul(M,W)|0,n=n+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(w,$)|0,c=c+Math.imul(w,ee)|0;var Se=(l+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(m,re)|0))<<13)|0;l=((c=c+Math.imul(m,ne)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(k,V),o=(o=Math.imul(k,X))+Math.imul(I,V)|0,c=Math.imul(I,X),n=n+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,W)|0)+Math.imul(T,Z)|0,c=c+Math.imul(T,W)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(M,$)|0,c=c+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,o=(o=o+Math.imul(v,ne)|0)+Math.imul(w,re)|0,c=c+Math.imul(w,ne)|0;var Te=(l+(n=n+Math.imul(d,oe)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(m,oe)|0))<<13)|0;l=((c=c+Math.imul(m,ae)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(O,V),o=(o=Math.imul(O,X))+Math.imul(B,V)|0,c=Math.imul(B,X),n=n+Math.imul(k,Z)|0,o=(o=o+Math.imul(k,W)|0)+Math.imul(I,Z)|0,c=c+Math.imul(I,W)|0,n=n+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(T,$)|0,c=c+Math.imul(T,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(M,re)|0,c=c+Math.imul(M,ne)|0,n=n+Math.imul(v,oe)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(w,oe)|0,c=c+Math.imul(w,ae)|0;var xe=(l+(n=n+Math.imul(d,ue)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(m,ue)|0))<<13)|0;l=((c=c+Math.imul(m,ce)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(P,V),o=(o=Math.imul(P,X))+Math.imul(F,V)|0,c=Math.imul(F,X),n=n+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,W)|0)+Math.imul(B,Z)|0,c=c+Math.imul(B,W)|0,n=n+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(I,$)|0,c=c+Math.imul(I,ee)|0,n=n+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ne)|0)+Math.imul(T,re)|0,c=c+Math.imul(T,ne)|0,n=n+Math.imul(A,oe)|0,o=(o=o+Math.imul(A,ae)|0)+Math.imul(M,oe)|0,c=c+Math.imul(M,ae)|0,n=n+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,c=c+Math.imul(w,ce)|0;var ke=(l+(n=n+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,he)|0)+Math.imul(m,le)|0))<<13)|0;l=((c=c+Math.imul(m,he)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(N,V),o=(o=Math.imul(N,X))+Math.imul(D,V)|0,c=Math.imul(D,X),n=n+Math.imul(P,Z)|0,o=(o=o+Math.imul(P,W)|0)+Math.imul(F,Z)|0,c=c+Math.imul(F,W)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(B,$)|0,c=c+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,o=(o=o+Math.imul(k,ne)|0)+Math.imul(I,re)|0,c=c+Math.imul(I,ne)|0,n=n+Math.imul(S,oe)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(T,oe)|0,c=c+Math.imul(T,ae)|0,n=n+Math.imul(A,ue)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(M,ue)|0,c=c+Math.imul(M,ce)|0,n=n+Math.imul(v,le)|0,o=(o=o+Math.imul(v,he)|0)+Math.imul(w,le)|0,c=c+Math.imul(w,he)|0;var Ie=(l+(n=n+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,be)|0)+Math.imul(m,pe)|0))<<13)|0;l=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,V),o=(o=Math.imul(U,X))+Math.imul(J,V)|0,c=Math.imul(J,X),n=n+Math.imul(N,Z)|0,o=(o=o+Math.imul(N,W)|0)+Math.imul(D,Z)|0,c=c+Math.imul(D,W)|0,n=n+Math.imul(P,$)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(F,$)|0,c=c+Math.imul(F,ee)|0,n=n+Math.imul(O,re)|0,o=(o=o+Math.imul(O,ne)|0)+Math.imul(B,re)|0,c=c+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,o=(o=o+Math.imul(k,ae)|0)+Math.imul(I,oe)|0,c=c+Math.imul(I,ae)|0,n=n+Math.imul(S,ue)|0,o=(o=o+Math.imul(S,ce)|0)+Math.imul(T,ue)|0,c=c+Math.imul(T,ce)|0,n=n+Math.imul(A,le)|0,o=(o=o+Math.imul(A,he)|0)+Math.imul(M,le)|0,c=c+Math.imul(M,he)|0,n=n+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,be)|0)+Math.imul(w,pe)|0,c=c+Math.imul(w,be)|0;var Ce=(l+(n=n+Math.imul(d,ge)|0)|0)+((8191&(o=(o=o+Math.imul(d,ye)|0)+Math.imul(m,ge)|0))<<13)|0;l=((c=c+Math.imul(m,ye)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(z,V),o=(o=Math.imul(z,X))+Math.imul(G,V)|0,c=Math.imul(G,X),n=n+Math.imul(U,Z)|0,o=(o=o+Math.imul(U,W)|0)+Math.imul(J,Z)|0,c=c+Math.imul(J,W)|0,n=n+Math.imul(N,$)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(D,$)|0,c=c+Math.imul(D,ee)|0,n=n+Math.imul(P,re)|0,o=(o=o+Math.imul(P,ne)|0)+Math.imul(F,re)|0,c=c+Math.imul(F,ne)|0,n=n+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(B,oe)|0,c=c+Math.imul(B,ae)|0,n=n+Math.imul(k,ue)|0,o=(o=o+Math.imul(k,ce)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,ce)|0,n=n+Math.imul(S,le)|0,o=(o=o+Math.imul(S,he)|0)+Math.imul(T,le)|0,c=c+Math.imul(T,he)|0,n=n+Math.imul(A,pe)|0,o=(o=o+Math.imul(A,be)|0)+Math.imul(M,pe)|0,c=c+Math.imul(M,be)|0,n=n+Math.imul(v,ge)|0,o=(o=o+Math.imul(v,ye)|0)+Math.imul(w,ge)|0,c=c+Math.imul(w,ye)|0;var Oe=(l+(n=n+Math.imul(d,we)|0)|0)+((8191&(o=(o=o+Math.imul(d,_e)|0)+Math.imul(m,we)|0))<<13)|0;l=((c=c+Math.imul(m,_e)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(z,Z),o=(o=Math.imul(z,W))+Math.imul(G,Z)|0,c=Math.imul(G,W),n=n+Math.imul(U,$)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(J,$)|0,c=c+Math.imul(J,ee)|0,n=n+Math.imul(N,re)|0,o=(o=o+Math.imul(N,ne)|0)+Math.imul(D,re)|0,c=c+Math.imul(D,ne)|0,n=n+Math.imul(P,oe)|0,o=(o=o+Math.imul(P,ae)|0)+Math.imul(F,oe)|0,c=c+Math.imul(F,ae)|0,n=n+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,ce)|0)+Math.imul(B,ue)|0,c=c+Math.imul(B,ce)|0,n=n+Math.imul(k,le)|0,o=(o=o+Math.imul(k,he)|0)+Math.imul(I,le)|0,c=c+Math.imul(I,he)|0,n=n+Math.imul(S,pe)|0,o=(o=o+Math.imul(S,be)|0)+Math.imul(T,pe)|0,c=c+Math.imul(T,be)|0,n=n+Math.imul(A,ge)|0,o=(o=o+Math.imul(A,ye)|0)+Math.imul(M,ge)|0,c=c+Math.imul(M,ye)|0;var Be=(l+(n=n+Math.imul(v,we)|0)|0)+((8191&(o=(o=o+Math.imul(v,_e)|0)+Math.imul(w,we)|0))<<13)|0;l=((c=c+Math.imul(w,_e)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(z,$),o=(o=Math.imul(z,ee))+Math.imul(G,$)|0,c=Math.imul(G,ee),n=n+Math.imul(U,re)|0,o=(o=o+Math.imul(U,ne)|0)+Math.imul(J,re)|0,c=c+Math.imul(J,ne)|0,n=n+Math.imul(N,oe)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(D,oe)|0,c=c+Math.imul(D,ae)|0,n=n+Math.imul(P,ue)|0,o=(o=o+Math.imul(P,ce)|0)+Math.imul(F,ue)|0,c=c+Math.imul(F,ce)|0,n=n+Math.imul(O,le)|0,o=(o=o+Math.imul(O,he)|0)+Math.imul(B,le)|0,c=c+Math.imul(B,he)|0,n=n+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,be)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,be)|0,n=n+Math.imul(S,ge)|0,o=(o=o+Math.imul(S,ye)|0)+Math.imul(T,ge)|0,c=c+Math.imul(T,ye)|0;var Re=(l+(n=n+Math.imul(A,we)|0)|0)+((8191&(o=(o=o+Math.imul(A,_e)|0)+Math.imul(M,we)|0))<<13)|0;l=((c=c+Math.imul(M,_e)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(z,re),o=(o=Math.imul(z,ne))+Math.imul(G,re)|0,c=Math.imul(G,ne),n=n+Math.imul(U,oe)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(J,oe)|0,c=c+Math.imul(J,ae)|0,n=n+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,ce)|0)+Math.imul(D,ue)|0,c=c+Math.imul(D,ce)|0,n=n+Math.imul(P,le)|0,o=(o=o+Math.imul(P,he)|0)+Math.imul(F,le)|0,c=c+Math.imul(F,he)|0,n=n+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(B,pe)|0,c=c+Math.imul(B,be)|0,n=n+Math.imul(k,ge)|0,o=(o=o+Math.imul(k,ye)|0)+Math.imul(I,ge)|0,c=c+Math.imul(I,ye)|0;var Pe=(l+(n=n+Math.imul(S,we)|0)|0)+((8191&(o=(o=o+Math.imul(S,_e)|0)+Math.imul(T,we)|0))<<13)|0;l=((c=c+Math.imul(T,_e)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(z,oe),o=(o=Math.imul(z,ae))+Math.imul(G,oe)|0,c=Math.imul(G,ae),n=n+Math.imul(U,ue)|0,o=(o=o+Math.imul(U,ce)|0)+Math.imul(J,ue)|0,c=c+Math.imul(J,ce)|0,n=n+Math.imul(N,le)|0,o=(o=o+Math.imul(N,he)|0)+Math.imul(D,le)|0,c=c+Math.imul(D,he)|0,n=n+Math.imul(P,pe)|0,o=(o=o+Math.imul(P,be)|0)+Math.imul(F,pe)|0,c=c+Math.imul(F,be)|0,n=n+Math.imul(O,ge)|0,o=(o=o+Math.imul(O,ye)|0)+Math.imul(B,ge)|0,c=c+Math.imul(B,ye)|0;var Fe=(l+(n=n+Math.imul(k,we)|0)|0)+((8191&(o=(o=o+Math.imul(k,_e)|0)+Math.imul(I,we)|0))<<13)|0;l=((c=c+Math.imul(I,_e)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(z,ue),o=(o=Math.imul(z,ce))+Math.imul(G,ue)|0,c=Math.imul(G,ce),n=n+Math.imul(U,le)|0,o=(o=o+Math.imul(U,he)|0)+Math.imul(J,le)|0,c=c+Math.imul(J,he)|0,n=n+Math.imul(N,pe)|0,o=(o=o+Math.imul(N,be)|0)+Math.imul(D,pe)|0,c=c+Math.imul(D,be)|0,n=n+Math.imul(P,ge)|0,o=(o=o+Math.imul(P,ye)|0)+Math.imul(F,ge)|0,c=c+Math.imul(F,ye)|0;var Le=(l+(n=n+Math.imul(O,we)|0)|0)+((8191&(o=(o=o+Math.imul(O,_e)|0)+Math.imul(B,we)|0))<<13)|0;l=((c=c+Math.imul(B,_e)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(z,le),o=(o=Math.imul(z,he))+Math.imul(G,le)|0,c=Math.imul(G,he),n=n+Math.imul(U,pe)|0,o=(o=o+Math.imul(U,be)|0)+Math.imul(J,pe)|0,c=c+Math.imul(J,be)|0,n=n+Math.imul(N,ge)|0,o=(o=o+Math.imul(N,ye)|0)+Math.imul(D,ge)|0,c=c+Math.imul(D,ye)|0;var Ne=(l+(n=n+Math.imul(P,we)|0)|0)+((8191&(o=(o=o+Math.imul(P,_e)|0)+Math.imul(F,we)|0))<<13)|0;l=((c=c+Math.imul(F,_e)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(z,pe),o=(o=Math.imul(z,be))+Math.imul(G,pe)|0,c=Math.imul(G,be),n=n+Math.imul(U,ge)|0,o=(o=o+Math.imul(U,ye)|0)+Math.imul(J,ge)|0,c=c+Math.imul(J,ye)|0;var De=(l+(n=n+Math.imul(N,we)|0)|0)+((8191&(o=(o=o+Math.imul(N,_e)|0)+Math.imul(D,we)|0))<<13)|0;l=((c=c+Math.imul(D,_e)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(z,ge),o=(o=Math.imul(z,ye))+Math.imul(G,ge)|0,c=Math.imul(G,ye);var je=(l+(n=n+Math.imul(U,we)|0)|0)+((8191&(o=(o=o+Math.imul(U,_e)|0)+Math.imul(J,we)|0))<<13)|0;l=((c=c+Math.imul(J,_e)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863;var Ue=(l+(n=Math.imul(z,we))|0)+((8191&(o=(o=Math.imul(z,_e))+Math.imul(G,we)|0))<<13)|0;return l=((c=Math.imul(G,_e))+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,f[0]=Ae,f[1]=Me,f[2]=Ee,f[3]=Se,f[4]=Te,f[5]=xe,f[6]=ke,f[7]=Ie,f[8]=Ce,f[9]=Oe,f[10]=Be,f[11]=Re,f[12]=Pe,f[13]=Fe,f[14]=Le,f[15]=Ne,f[16]=De,f[17]=je,f[18]=Ue,0!==l&&(f[19]=l,r.length++),r;};function _(e,t,r){return new A().mulp(e,t,r);}function A(e,t){this.x=e,this.y=t;}Math.imul||(w=v),c.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?w(this,e,t):n<63?v(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,c=0;c>>26)|0)>>>26,f&=67108863;}r.words[c]=l,n=f,f=o;}return 0!==n?r.words[c]=n:r.length--,r.strip();}(this,e,t):_(this,e,t),r;},A.prototype.makeRBT=function(e){for(var t=new Array(e),r=c.prototype._countBits(e)-1,i=0;i>=1;return n;},A.prototype.permute=function(e,t,r,n,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,r[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,t+=r/67108864|0,t+=o>>>26,this.words[i]=67108863&o;}return 0!==t&&(this.words[i]=t,this.length++),this;},c.prototype.muln=function(e){return this.clone().imuln(e);},c.prototype.sqr=function(){return this.mul(this);},c.prototype.isqr=function(){return this.imul(this.clone());},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>o;}return t;}(e);if(0===t.length)return new c(1);for(var r=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,r=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t;}o&&(this.words[i]=o,this.length++);}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==l||i>=o);i--){var h=0|this.words[i];this.words[i]=l<<26-c|h>>>c,l=h&mask;}return f&&0!==l&&(f.words[f.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip();},c.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r);},c.prototype.shln=function(e){return this.clone().ishln(e);},c.prototype.ushln=function(e){return this.clone().iushln(e);},c.prototype.shrn=function(e){return this.clone().ishrn(e);},c.prototype.ushrn=function(e){return this.clone().iushrn(e);},c.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this;},c.prototype.isubn=function(e){if(n("number"==typeof e),n(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 i=0;i>26)-(l/67108864|0),this.words[i+r]=67108863&o;}for(;i>26,this.words[i+r]=67108863&o;if(0===f)return this.strip();for(n(-1===f),f=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip();},c.prototype._wordDiv=function(e,t){var r=(this.length,e.length),a=this.clone(),b=e,n=0|b.words[b.length-1];0!==(r=26-this._countBits(n))&&(b=b.ushln(r),a.iushln(r),n=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;l--){var h=67108864*(0|a.words[b.length+l])+(0|a.words[b.length+l-1]);for(h=Math.min(h/n|0,67108863),a._ishlnsubmul(b,h,l);0!==a.negative;)h--,a.negative=0,a._ishlnsubmul(b,1,l),a.isZero()||(a.negative^=1);q&&(q.words[l]=h);}return q&&q.strip(),a.strip(),"div"!==t&&0!==r&&a.iushrn(r),{div:q||null,mod:a};},c.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(f=this.neg().divmod(e,t),"mod"!==t&&(div=f.div.neg()),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(f=this.divmod(e.neg(),t),"mod"!==t&&(div=f.div.neg()),{div:div,mod:f.mod}):0!=(this.negative&e.negative)?(f=this.neg().divmod(e.neg(),t),"div"!==t&&(o=f.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:f.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var div,o,f;},c.prototype.div=function(e){return this.divmod(e,"div",!1).div;},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod;},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod;},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),c=r.cmp(n);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1);},c.prototype.modn=function(e){n(e<=67108863);for(var p=(1<<26)%e,t=0,i=this.length-1;i>=0;i--)t=(p*t+(0|this.words[i]))%e;return t;},c.prototype.idivn=function(e){n(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var r=(0|this.words[i])+67108864*t;this.words[i]=r/e|0,t=r%e;}return this.strip();},c.prototype.divn=function(e){return this.clone().idivn(e);},c.prototype.egcd=function(p){n(0===p.negative),n(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var r=new c(1),o=new c(0),f=new c(0),l=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var h=t.clone(),d=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-->0;)(r.isOdd()||o.isOdd())&&(r.iadd(h),o.isub(d)),r.iushrn(1),o.iushrn(1);for(var y=0,v=1;0==(t.words[0]&v)&&y<26;++y,v<<=1);if(y>0)for(t.iushrn(y);y-->0;)(f.isOdd()||l.isOdd())&&(f.iadd(h),l.isub(d)),f.iushrn(1),l.iushrn(1);e.cmp(t)>=0?(e.isub(t),r.isub(f),o.isub(l)):(t.isub(e),f.isub(r),l.isub(o));}return{a:f,b:l,gcd:t.iushln(g)};},c.prototype._invmp=function(p){n(0===p.negative),n(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),r=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,f=1;0==(a.words[0]&f)&&i<26;++i,f<<=1);if(i>0)for(a.iushrn(i);i-->0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var l=0,h=1;0==(b.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(b.iushrn(l);l-->0;)r.isOdd()&&r.iadd(o),r.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(r)):(b.isub(a),r.isub(t));}return(e=0===a.cmpn(1)?t:r).cmpn(0)<0&&e.iadd(p),e;},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var n=a;a=b,b=n;}else if(0===r||0===b.cmpn(1))break;a.isub(b);}return b.iushln(t);},c.prototype.invm=function(e){return this.egcd(e).a.umod(e);},c.prototype.isEven=function(){return 0==(1&this.words[0]);},c.prototype.isOdd=function(){return 1==(1&this.words[0]);},c.prototype.andln=function(e){return this.words[0]&e;},c.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o;}return 0!==r&&(this.words[i]=r,this.length++),this;},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},c.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break;}}return t;},c.prototype.gtn=function(e){return 1===this.cmpn(e);},c.prototype.gt=function(e){return 1===this.cmp(e);},c.prototype.gten=function(e){return this.cmpn(e)>=0;},c.prototype.gte=function(e){return this.cmp(e)>=0;},c.prototype.ltn=function(e){return-1===this.cmpn(e);},c.prototype.lt=function(e){return-1===this.cmp(e);},c.prototype.lten=function(e){return this.cmpn(e)<=0;},c.prototype.lte=function(e){return this.cmp(e)<=0;},c.prototype.eqn=function(e){return 0===this.cmpn(e);},c.prototype.eq=function(e){return 0===this.cmp(e);},c.red=function(e){return new I(e);},c.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this);},c.prototype._forceRed=function(e){return this.red=e,this;},c.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e);},c.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},c.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},c.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},c.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},c.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},c.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},c.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},c.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var M={k256:null,p224:null,p192:null,p25519:null};function E(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function S(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function T(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function x(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function k(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function I(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t;}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function C(e){I.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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);}E.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e;},E.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();}while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r;},E.prototype.split=function(input,e){input.iushrn(this.n,0,e);},E.prototype.imulK=function(e){return e.imul(this.k);},o(S,E),S.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=r;}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9;},S.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;},c._prime=function(e){if(M[e])return M[e];var t;if("k256"===e)t=new S();else if("p224"===e)t=new T();else if("p192"===e)t=new x();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k();}return M[e]=t,t;},I.prototype._verify1=function(a){n(0===a.negative,"red works only with positives"),n(a.red,"red works only with red numbers");},I.prototype._verify2=function(a,b){n(0==(a.negative|b.negative),"red works only with positives"),n(a.red&&a.red===b.red,"red works only with red numbers");},I.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this);},I.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this);},I.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this);},I.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e;},I.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this);},I.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e;},I.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e));},I.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b));},I.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b));},I.prototype.isqr=function(a){return this.imul(a,a.clone());},I.prototype.sqr=function(a){return this.mul(a,a);},I.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t);}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);n(!q.isZero());var r=new c(1).toRed(this),o=r.redNeg(),f=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new c(2*l*l).toRed(this);0!==this.pow(l,f).cmp(o);)l.redIAdd(o);for(var h=this.pow(l,q),d=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),y=s;0!==m.cmp(r);){for(var v=m,i=0;0!==v.cmp(r);i++)v=v.redSqr();n(i=0;i--){for(var l=e.words[i],h=f-1;h>=0;h--){var d=l>>h&1;r!==t[0]&&(r=this.sqr(r)),0!==d||0!==n?(n<<=1,n|=d,(4===++o||0===i&&0===h)&&(r=this.mul(r,t[n]),o=0,n=0)):o=0;}f=26;}return r;},I.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},I.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},c.mont=function(e){return new C(e);},o(C,I),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},C.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},C.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},C.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this);};}(e,this);}).call(this,r(59)(e));},function(e,t,r){!function(e){var t,r,n,o=String.fromCharCode;function c(e){for(var t,r,output=[],n=0,o=e.length;n=55296&&t<=56319&&n=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");}function l(e,t){return o(e>>t&63|128);}function h(e){if(0==(4294967168&e))return o(e);var symbol="";return 0==(4294965248&e)?symbol=o(e>>6&31|192):0==(4294901760&e)?(f(e),symbol=o(e>>12&15|224),symbol+=l(e,6)):0==(4292870144&e)&&(symbol=o(e>>18&7|240),symbol+=l(e,12),symbol+=l(e,6)),symbol+=o(63&e|128);}function d(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte");}function m(){var e,o;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,0==(128&e))return e;if(192==(224&e)){if((o=(31&e)<<6|d())>=128)return o;throw Error("Invalid continuation byte");}if(224==(240&e)){if((o=(15&e)<<12|d()<<6|d())>=2048)return f(o),o;throw Error("Invalid continuation byte");}if(240==(248&e)&&(o=(7&e)<<18|d()<<12|d()<<6|d())>=65536&&o<=1114111)return o;throw Error("Invalid UTF-8 detected");}e.version="3.0.0",e.encode=function(e){for(var t=c(e),r=t.length,n=-1,o="";++n65535&&(output+=o((t-=65536)>>>10&1023|55296),t=56320|1023&t),output+=o(t);return output;}(l);};}(t);},function(e,t){const r="0123456789abcdef".split(""),n=[1,256,65536,16777216],o=[0,8,16,24],c=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],f=s=>{var e,t,r,n,o,f,l,h,d,m,y,v,w,_,A,M,E,S,T,x,k,I,C,O,B,R,P,F,L,N,D,j,U,J,H,z,G,K,V,X,Q,Z,W,Y,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe,le,he,de,pe,be,me,ge;for(r=0;r<48;r+=2)n=s[0]^s[10]^s[20]^s[30]^s[40],o=s[1]^s[11]^s[21]^s[31]^s[41],f=s[2]^s[12]^s[22]^s[32]^s[42],l=s[3]^s[13]^s[23]^s[33]^s[43],h=s[4]^s[14]^s[24]^s[34]^s[44],d=s[5]^s[15]^s[25]^s[35]^s[45],m=s[6]^s[16]^s[26]^s[36]^s[46],y=s[7]^s[17]^s[27]^s[37]^s[47],e=(v=s[8]^s[18]^s[28]^s[38]^s[48])^(f<<1|l>>>31),t=(w=s[9]^s[19]^s[29]^s[39]^s[49])^(l<<1|f>>>31),s[0]^=e,s[1]^=t,s[10]^=e,s[11]^=t,s[20]^=e,s[21]^=t,s[30]^=e,s[31]^=t,s[40]^=e,s[41]^=t,e=n^(h<<1|d>>>31),t=o^(d<<1|h>>>31),s[2]^=e,s[3]^=t,s[12]^=e,s[13]^=t,s[22]^=e,s[23]^=t,s[32]^=e,s[33]^=t,s[42]^=e,s[43]^=t,e=f^(m<<1|y>>>31),t=l^(y<<1|m>>>31),s[4]^=e,s[5]^=t,s[14]^=e,s[15]^=t,s[24]^=e,s[25]^=t,s[34]^=e,s[35]^=t,s[44]^=e,s[45]^=t,e=h^(v<<1|w>>>31),t=d^(w<<1|v>>>31),s[6]^=e,s[7]^=t,s[16]^=e,s[17]^=t,s[26]^=e,s[27]^=t,s[36]^=e,s[37]^=t,s[46]^=e,s[47]^=t,e=m^(n<<1|o>>>31),t=y^(o<<1|n>>>31),s[8]^=e,s[9]^=t,s[18]^=e,s[19]^=t,s[28]^=e,s[29]^=t,s[38]^=e,s[39]^=t,s[48]^=e,s[49]^=t,_=s[0],A=s[1],ee=s[11]<<4|s[10]>>>28,te=s[10]<<4|s[11]>>>28,F=s[20]<<3|s[21]>>>29,L=s[21]<<3|s[20]>>>29,pe=s[31]<<9|s[30]>>>23,be=s[30]<<9|s[31]>>>23,Z=s[40]<<18|s[41]>>>14,W=s[41]<<18|s[40]>>>14,J=s[2]<<1|s[3]>>>31,H=s[3]<<1|s[2]>>>31,M=s[13]<<12|s[12]>>>20,E=s[12]<<12|s[13]>>>20,re=s[22]<<10|s[23]>>>22,ne=s[23]<<10|s[22]>>>22,N=s[33]<<13|s[32]>>>19,D=s[32]<<13|s[33]>>>19,me=s[42]<<2|s[43]>>>30,ge=s[43]<<2|s[42]>>>30,ue=s[5]<<30|s[4]>>>2,ce=s[4]<<30|s[5]>>>2,z=s[14]<<6|s[15]>>>26,G=s[15]<<6|s[14]>>>26,S=s[25]<<11|s[24]>>>21,T=s[24]<<11|s[25]>>>21,ie=s[34]<<15|s[35]>>>17,oe=s[35]<<15|s[34]>>>17,j=s[45]<<29|s[44]>>>3,U=s[44]<<29|s[45]>>>3,O=s[6]<<28|s[7]>>>4,B=s[7]<<28|s[6]>>>4,fe=s[17]<<23|s[16]>>>9,le=s[16]<<23|s[17]>>>9,K=s[26]<<25|s[27]>>>7,V=s[27]<<25|s[26]>>>7,x=s[36]<<21|s[37]>>>11,k=s[37]<<21|s[36]>>>11,ae=s[47]<<24|s[46]>>>8,se=s[46]<<24|s[47]>>>8,Y=s[8]<<27|s[9]>>>5,$=s[9]<<27|s[8]>>>5,R=s[18]<<20|s[19]>>>12,P=s[19]<<20|s[18]>>>12,he=s[29]<<7|s[28]>>>25,de=s[28]<<7|s[29]>>>25,X=s[38]<<8|s[39]>>>24,Q=s[39]<<8|s[38]>>>24,I=s[48]<<14|s[49]>>>18,C=s[49]<<14|s[48]>>>18,s[0]=_^~M&S,s[1]=A^~E&T,s[10]=O^~R&F,s[11]=B^~P&L,s[20]=J^~z&K,s[21]=H^~G&V,s[30]=Y^~ee&re,s[31]=$^~te&ne,s[40]=ue^~fe&he,s[41]=ce^~le&de,s[2]=M^~S&x,s[3]=E^~T&k,s[12]=R^~F&N,s[13]=P^~L&D,s[22]=z^~K&X,s[23]=G^~V&Q,s[32]=ee^~re&ie,s[33]=te^~ne&oe,s[42]=fe^~he&pe,s[43]=le^~de&be,s[4]=S^~x&I,s[5]=T^~k&C,s[14]=F^~N&j,s[15]=L^~D&U,s[24]=K^~X&Z,s[25]=V^~Q&W,s[34]=re^~ie&ae,s[35]=ne^~oe&se,s[44]=he^~pe&me,s[45]=de^~be&ge,s[6]=x^~I&_,s[7]=k^~C&A,s[16]=N^~j&O,s[17]=D^~U&B,s[26]=X^~Z&J,s[27]=Q^~W&H,s[36]=ie^~ae&Y,s[37]=oe^~se&$,s[46]=pe^~me&ue,s[47]=be^~ge&ce,s[8]=I^~_&M,s[9]=C^~A&E,s[18]=j^~O&R,s[19]=U^~B&P,s[28]=Z^~J&z,s[29]=W^~H&G,s[38]=ae^~Y&ee,s[39]=se^~$&te,s[48]=me^~ue&fe,s[49]=ge^~ce&le,s[0]^=c[r],s[1]^=c[r+1];},l=e=>t=>{var c;if("0x"===t.slice(0,2)){c=[];for(var i=2,l=t.length;i{for(var code,c=t.length,l=e.blocks,h=e.blockCount<<2,d=e.blockCount,m=e.outputBlocks,s=e.s,y=0;y>2]|=t[y]<>2]|=code<>2]|=(192|code>>6)<>2]|=(128|63&code)<=57344?(l[i>>2]|=(224|code>>12)<>2]|=(128|code>>6&63)<>2]|=(128|63&code)<>2]|=(240|code>>18)<>2]|=(128|code>>12&63)<>2]|=(128|code>>6&63)<>2]|=(128|63&code)<=h){for(e.start=i-h,e.block=l[d],i=0;i>2]|=n[3&i],e.lastByteIndex===h)for(l[0]=l[d],i=1;i>4&15]+r[15&v]+r[v>>12&15]+r[v>>8&15]+r[v>>20&15]+r[v>>16&15]+r[v>>28&15]+r[v>>24&15];_%d==0&&(f(s),i=0);}return"0x"+w;})((e=>{return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(s=[0,0,0,0,0,0,0,0,0,0],[].concat(s,s,s,s,s))};var s;})(e),c);};e.exports={keccak256:l(256),keccak512:l(512),keccak256s:l(256),keccak512s:l(512)};},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(448);function o(e){return"string"==typeof e&&!!/^(0x)?[0-9a-f]{512}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e));}function c(e,t){"object"==typeof t&&t.constructor===Uint8Array&&(t=n.bytesToHex(t));const r=n.keccak256(t).replace("0x","");for(let i=0;i<12;i+=4){const t=(parseInt(r.substr(i,2),16)<<8)+parseInt(r.substr(i+2,2),16)&2047,n=1<=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error("invalid bloom");}function l(e){return"string"==typeof e&&!!/^(0x)?[0-9a-f]{64}$/i.test(e)&&!(!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e));}function h(address){return"string"==typeof address&&(!!address.match(/^(0x)?[0-9a-fA-F]{40}$/)||!!address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/));}t.isBloom=o,t.isInBloom=c,t.isUserEthereumAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!h(t))throw new Error(`Invalid ethereum address given: "${t}"`);return c(e,n.padLeft(t,64));},t.isContractAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!h(t))throw new Error(`Invalid contract address given: "${t}"`);return c(e,t);},t.isTopicInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given");if(!l(t))throw new Error("Invalid topic");return c(e,t);},t.isTopic=l,t.isAddress=h;},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(449);function o(e){if(null==e)throw new Error("cannot convert null value to array");if("string"==typeof e){const t=e.match(/^(0x)?[0-9a-fA-F]*$/);if(!t)throw new Error("invalid hexidecimal string");if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e);const r=[];for(let i=0;i=256||parseInt(String(t))!=t)return!1;}return!0;}(e))return c(new Uint8Array(e));throw new Error("invalid arrayify value");}function c(e){return void 0!==e.slice||(e.slice=()=>{const t=Array.prototype.slice.call(arguments);return c(new Uint8Array(Array.prototype.slice.apply(e,t)));}),e;}t.keccak256=function(data){return"0x"+n.keccak_256(o(data));},t.padLeft=(e,t)=>{const r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0;return(r?"0x":"")+new Array(n).join("0")+e;},t.bytesToHex=function(e){const t=[];for(let i=0;i>>4).toString(16)),t.push((15&e[i]).toString(16));return`0x${t.join("").replace(/^0+/,"")}`;},t.toByteArray=o;},function(e,t,r){(function(n,o){var c;!function(){"use strict";var f="input is invalid type",l="object"==typeof window,h=l?window:{};h.JS_SHA3_NO_WINDOW&&(l=!1);var d=!l&&"object"==typeof self;!h.JS_SHA3_NO_NODE_JS&&"object"==typeof n&&n.versions&&n.versions.node?h=o:d&&(h=self);var m=!h.JS_SHA3_NO_COMMON_JS&&"object"==typeof e&&e.exports,y=r(450),v=!h.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,w="0123456789abcdef".split(""),_=[4,1024,262144,67108864],A=[0,8,16,24],M=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],E=[224,256,384,512],S=[128,256],T=["hex","buffer","arrayBuffer","array","digest"],x={128:168,256:136};!h.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e);}),!v||!h.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer;});for(var k=function(e,t,r){return function(n){return new H(e,t,e).update(n)[r]();};},I=function(e,t,r){return function(n,o){return new H(e,t,o).update(n)[r]();};},C=function(e,t,r){return function(t,n,o,s){return F["cshake"+e].update(t,n,o,s)[r]();};},O=function(e,t,r){return function(t,n,o,s){return F["kmac"+e].update(t,n,o,s)[r]();};},B=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var i=0;i<50;++i)this.s[i]=0;}function z(e,t,r){H.call(this,e,t,r);}H.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(f);if(null===e)throw new Error(f);if(v&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||v&&ArrayBuffer.isView(e)))throw new Error(f);t=!0;}for(var i,code,n=this.blocks,o=this.byteCount,c=e.length,l=this.blockCount,h=0,s=this.s;h>2]|=e[h]<>2]|=code<>2]|=(192|code>>6)<>2]|=(128|63&code)<=57344?(n[i>>2]|=(224|code>>12)<>2]|=(128|code>>6&63)<>2]|=(128|63&code)<>2]|=(240|code>>18)<>2]|=(128|code>>12&63)<>2]|=(128|code>>6&63)<>2]|=(128|63&code)<=o){for(this.start=i-o,this.block=n[l],i=0;i>=8);r>0;)o.unshift(r),r=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length;},H.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(f);if(null===e)throw new Error(f);if(v&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||v&&ArrayBuffer.isView(e)))throw new Error(f);t=!0;}var n=0,o=e.length;if(t)n=o;else for(var i=0;i=57344?n+=3:(code=65536+((1023&code)<<10|1023&e.charCodeAt(++i)),n+=4);}return n+=this.encode(8*n),this.update(e),n;},H.prototype.bytepad=function(e,t){for(var r=this.encode(t),i=0;i>2]|=this.padding[3&i],this.lastByteIndex===this.byteCount)for(e[0]=e[t],i=1;i>4&15]+w[15&e]+w[e>>12&15]+w[e>>8&15]+w[e>>20&15]+w[e>>16&15]+w[e>>28&15]+w[e>>24&15];o%t==0&&(G(s),i=0);}return n&&(e=s[i],c+=w[e>>4&15]+w[15&e],n>1&&(c+=w[e>>12&15]+w[e>>8&15]),n>2&&(c+=w[e>>20&15]+w[e>>16&15])),c;},H.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,s=this.s,r=this.outputBlocks,n=this.extraBytes,i=0,o=0,c=this.outputBits>>3;e=n?new ArrayBuffer(r+1<<2):new ArrayBuffer(c);for(var f=new Uint32Array(e);o>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;c%r==0&&G(s);}return o&&(e=c<<2,t=s[i],f[e]=255&t,o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f;},z.prototype=new H(),z.prototype.finalize=function(){return this.encode(this.outputBits,!0),H.prototype.finalize.call(this);};var G=function(s){var e,t,r,n,o,c,f,l,h,d,m,y,v,w,_,A,E,S,T,x,k,I,C,O,B,R,P,F,L,N,D,j,U,J,H,z,G,K,V,X,Q,Z,W,Y,$,ee,te,re,ne,ie,oe,ae,se,ue,ce,fe,le,he,de,pe,be,me,ge;for(r=0;r<48;r+=2)n=s[0]^s[10]^s[20]^s[30]^s[40],o=s[1]^s[11]^s[21]^s[31]^s[41],c=s[2]^s[12]^s[22]^s[32]^s[42],f=s[3]^s[13]^s[23]^s[33]^s[43],l=s[4]^s[14]^s[24]^s[34]^s[44],h=s[5]^s[15]^s[25]^s[35]^s[45],d=s[6]^s[16]^s[26]^s[36]^s[46],m=s[7]^s[17]^s[27]^s[37]^s[47],e=(y=s[8]^s[18]^s[28]^s[38]^s[48])^(c<<1|f>>>31),t=(v=s[9]^s[19]^s[29]^s[39]^s[49])^(f<<1|c>>>31),s[0]^=e,s[1]^=t,s[10]^=e,s[11]^=t,s[20]^=e,s[21]^=t,s[30]^=e,s[31]^=t,s[40]^=e,s[41]^=t,e=n^(l<<1|h>>>31),t=o^(h<<1|l>>>31),s[2]^=e,s[3]^=t,s[12]^=e,s[13]^=t,s[22]^=e,s[23]^=t,s[32]^=e,s[33]^=t,s[42]^=e,s[43]^=t,e=c^(d<<1|m>>>31),t=f^(m<<1|d>>>31),s[4]^=e,s[5]^=t,s[14]^=e,s[15]^=t,s[24]^=e,s[25]^=t,s[34]^=e,s[35]^=t,s[44]^=e,s[45]^=t,e=l^(y<<1|v>>>31),t=h^(v<<1|y>>>31),s[6]^=e,s[7]^=t,s[16]^=e,s[17]^=t,s[26]^=e,s[27]^=t,s[36]^=e,s[37]^=t,s[46]^=e,s[47]^=t,e=d^(n<<1|o>>>31),t=m^(o<<1|n>>>31),s[8]^=e,s[9]^=t,s[18]^=e,s[19]^=t,s[28]^=e,s[29]^=t,s[38]^=e,s[39]^=t,s[48]^=e,s[49]^=t,w=s[0],_=s[1],ee=s[11]<<4|s[10]>>>28,te=s[10]<<4|s[11]>>>28,F=s[20]<<3|s[21]>>>29,L=s[21]<<3|s[20]>>>29,pe=s[31]<<9|s[30]>>>23,be=s[30]<<9|s[31]>>>23,Z=s[40]<<18|s[41]>>>14,W=s[41]<<18|s[40]>>>14,J=s[2]<<1|s[3]>>>31,H=s[3]<<1|s[2]>>>31,A=s[13]<<12|s[12]>>>20,E=s[12]<<12|s[13]>>>20,re=s[22]<<10|s[23]>>>22,ne=s[23]<<10|s[22]>>>22,N=s[33]<<13|s[32]>>>19,D=s[32]<<13|s[33]>>>19,me=s[42]<<2|s[43]>>>30,ge=s[43]<<2|s[42]>>>30,ue=s[5]<<30|s[4]>>>2,ce=s[4]<<30|s[5]>>>2,z=s[14]<<6|s[15]>>>26,G=s[15]<<6|s[14]>>>26,S=s[25]<<11|s[24]>>>21,T=s[24]<<11|s[25]>>>21,ie=s[34]<<15|s[35]>>>17,oe=s[35]<<15|s[34]>>>17,j=s[45]<<29|s[44]>>>3,U=s[44]<<29|s[45]>>>3,O=s[6]<<28|s[7]>>>4,B=s[7]<<28|s[6]>>>4,fe=s[17]<<23|s[16]>>>9,le=s[16]<<23|s[17]>>>9,K=s[26]<<25|s[27]>>>7,V=s[27]<<25|s[26]>>>7,x=s[36]<<21|s[37]>>>11,k=s[37]<<21|s[36]>>>11,ae=s[47]<<24|s[46]>>>8,se=s[46]<<24|s[47]>>>8,Y=s[8]<<27|s[9]>>>5,$=s[9]<<27|s[8]>>>5,R=s[18]<<20|s[19]>>>12,P=s[19]<<20|s[18]>>>12,he=s[29]<<7|s[28]>>>25,de=s[28]<<7|s[29]>>>25,X=s[38]<<8|s[39]>>>24,Q=s[39]<<8|s[38]>>>24,I=s[48]<<14|s[49]>>>18,C=s[49]<<14|s[48]>>>18,s[0]=w^~A&S,s[1]=_^~E&T,s[10]=O^~R&F,s[11]=B^~P&L,s[20]=J^~z&K,s[21]=H^~G&V,s[30]=Y^~ee&re,s[31]=$^~te&ne,s[40]=ue^~fe&he,s[41]=ce^~le&de,s[2]=A^~S&x,s[3]=E^~T&k,s[12]=R^~F&N,s[13]=P^~L&D,s[22]=z^~K&X,s[23]=G^~V&Q,s[32]=ee^~re&ie,s[33]=te^~ne&oe,s[42]=fe^~he&pe,s[43]=le^~de&be,s[4]=S^~x&I,s[5]=T^~k&C,s[14]=F^~N&j,s[15]=L^~D&U,s[24]=K^~X&Z,s[25]=V^~Q&W,s[34]=re^~ie&ae,s[35]=ne^~oe&se,s[44]=he^~pe&me,s[45]=de^~be&ge,s[6]=x^~I&w,s[7]=k^~C&_,s[16]=N^~j&O,s[17]=D^~U&B,s[26]=X^~Z&J,s[27]=Q^~W&H,s[36]=ie^~ae&Y,s[37]=oe^~se&$,s[46]=pe^~me&ue,s[47]=be^~ge&ce,s[8]=I^~w&A,s[9]=C^~_&E,s[18]=j^~O&R,s[19]=U^~B&P,s[28]=Z^~J&z,s[29]=W^~H&G,s[38]=ae^~Y&ee,s[39]=se^~$&te,s[48]=me^~ue&fe,s[49]=ge^~ce&le,s[0]^=M[r],s[1]^=M[r+1];};if(m)e.exports=F;else{for(i=0;i32||f256)throw new Error("Invalid uint"+f+" size");if((l=c(t)).bitLength()>f)throw new Error("Supplied uint exceeds width: "+f+" vs "+l.bitLength());if(l.lt(new n(0)))throw new Error("Supplied uint "+l.toString()+" is negative");return f?o.leftPad(l.toString("hex"),f/8*2):l;}if(e.startsWith("int")){if(f%8||f<8||f>256)throw new Error("Invalid int"+f+" size");if((l=c(t)).bitLength()>f)throw new Error("Supplied int exceeds width: "+f+" vs "+l.bitLength());return l.lt(new n(0))?l.toTwos(f).toString("hex"):f?o.leftPad(l.toString("hex"),f/8*2):l;}throw new Error("Unsupported or invalid type: "+e);},l=function(e){if(Array.isArray(e))throw new Error("Autodetection of array types is not supported.");var t,r,c="";if(e&&"object"==typeof e&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,c=e.hasOwnProperty("v")?e.v:e.value):(t=o.toHex(e,!0),c=o.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof c||/^(-)?0x/i.test(c)||(c=new n(c)),Array.isArray(c)){if(r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e);return t?parseInt(t[1],10):null;}(t),r&&c.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(c));r=c.length;}return Array.isArray(c)?c.map(function(e){return f(t,e,r).toString("hex").replace("0x","");}).join(""):f(t,c,r).toString("hex").replace("0x","");};e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments),t=e.map(l);return o.sha3("0x"+t.join(""));},soliditySha3Raw:function(){return o.sha3Raw("0x"+Array.prototype.slice.call(arguments).map(l).join(""));},encodePacked:function(){var e=Array.prototype.slice.call(arguments),t=e.map(l);return"0x"+t.join("").toLowerCase();}};},function(e,t,r){"use strict";(function(e){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r];}});}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r];}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t;};Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature_v4=t.recoverTypedSignature=t.signTypedData_v4=t.signTypedData=t.recoverTypedMessage=t.signTypedMessage=t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=t.recoverTypedSignatureLegacy=t.signTypedDataLegacy=t.typedSignatureHash=t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=t.normalize=t.concatSig=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=void 0;const f=c(r(453)),l=c(r(474)),h=c(r(483)),d=c(r(485)),m={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]};t.TYPED_MESSAGE_SCHEMA=m;const y={encodeData(t,data,r,n=!0){const o=["bytes32"],c=[this.hashType(t,r)];if(n){const h=(t,o,c)=>{if(void 0!==r[o])return["bytes32",null==c?"0x0000000000000000000000000000000000000000000000000000000000000000":f.keccak(this.encodeData(o,c,r,n))];if(void 0===c)throw new Error(`missing value for field ${t} of type ${o}`);if("bytes"===o)return["bytes32",f.keccak(c)];if("string"===o)return"string"==typeof c&&(c=e.from(c,"utf8")),["bytes32",f.keccak(c)];if(o.lastIndexOf("]")===o.length-1){const e=o.slice(0,o.lastIndexOf("[")),r=c.map(r=>h(t,e,r));return["bytes32",f.keccak(l.rawEncode(r.map(([e])=>e),r.map(([,e])=>e)))];}return[o,c];};for(const e of r[t]){const[t,r]=h(e.name,e.type,data[e.name]);o.push(t),c.push(r);}}else for(const l of r[t]){let t=data[l.name];if(void 0!==t)if("bytes"===l.type)o.push("bytes32"),t=f.keccak(t),c.push(t);else if("string"===l.type)o.push("bytes32"),"string"==typeof t&&(t=e.from(t,"utf8")),t=f.keccak(t),c.push(t);else if(void 0!==r[l.type])o.push("bytes32"),t=f.keccak(this.encodeData(l.type,t,r,n)),c.push(t);else{if(l.type.lastIndexOf("]")===l.type.length-1)throw new Error("Arrays are unimplemented in encodeData; use V4 extension");o.push(l.type),c.push(t);}}return l.rawEncode(o,c);},encodeType(e,t){let r="",n=this.findTypeDependencies(e,t).filter(t=>t!==e);n=[e].concat(n.sort());for(const e of n){if(!t[e])throw new Error(`No type definition specified: ${e}`);r+=`${e}(${t[e].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;}return r;},findTypeDependencies(e,t,r=[]){if([e]=e.match(/^\w*/u),r.includes(e)||void 0===t[e])return r;r.push(e);for(const n of t[e])for(const e of this.findTypeDependencies(n.type,t,r))!r.includes(e)&&r.push(e);return r;},hashStruct(e,data,t,r=!0){return f.keccak(this.encodeData(e,data,t,r));},hashType(e,t){return f.keccak(this.encodeType(e,t));},sanitizeData(data){const e={};for(const t in m.properties)data[t]&&(e[t]=data[t]);return"types"in e&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e;},sign(t,r=!0){const n=this.sanitizeData(t),o=[e.from("1901","hex")];return o.push(this.hashStruct("EIP712Domain",n.domain,n.types,r)),"EIP712Domain"!==n.primaryType&&o.push(this.hashStruct(n.primaryType,n.message,n.types,r)),f.keccak(e.concat(o));}};function v(e,t,s){const r=f.fromSigned(t),n=f.fromSigned(s),o=f.bufferToInt(e),c=O(f.toUnsigned(r).toString("hex"),64),l=O(f.toUnsigned(n).toString("hex"),64),h=f.stripHexPrefix(f.intToHex(o));return f.addHexPrefix(c.concat(l,h)).toString("hex");}function w(e,t){const r=k(t.data),n=f.ecsign(r,e);return f.bufferToHex(v(n.v,n.r,n.s));}function _(e){const t=I(k(e.data),e.sig),r=f.publicToAddress(t);return f.bufferToHex(r);}function A(e,t,r){if("x25519-xsalsa20-poly1305"===r){if("string"!=typeof t.data)throw new Error('Cannot detect secret message, message params should be of the form {data: "secret message"} ');const r=h.box.keyPair();let n;try{n=d.decodeBase64(e);}catch(e){throw new Error("Bad public key");}const o=d.decodeUTF8(t.data),c=h.randomBytes(h.box.nonceLength),f=h.box(o,c,n,r.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:d.encodeBase64(c),ephemPublicKey:d.encodeBase64(r.publicKey),ciphertext:d.encodeBase64(f)};}throw new Error("Encryption type/version not supported");}function M(e,t){if("x25519-xsalsa20-poly1305"===e.version){const r=B(t),n=h.box.keyPair.fromSecretKey(r).secretKey,o=d.decodeBase64(e.nonce),c=d.decodeBase64(e.ciphertext),f=d.decodeBase64(e.ephemPublicKey),l=h.box.open(c,o,f,n);let output;try{output=d.encodeUTF8(l);}catch(e){throw new Error("Decryption failed.");}if(output)return output;throw new Error("Decryption failed.");}throw new Error("Encryption type/version not supported.");}function E(e,t){const r=y.sign(t.data,!1),n=f.ecsign(r,e);return f.bufferToHex(v(n.v,n.r,n.s));}function S(e,t){const r=y.sign(t.data),n=f.ecsign(r,e);return f.bufferToHex(v(n.v,n.r,n.s));}function T(e){const t=I(y.sign(e.data,!1),e.sig),r=f.publicToAddress(t);return f.bufferToHex(r);}function x(e){const t=I(y.sign(e.data),e.sig),r=f.publicToAddress(t);return f.bufferToHex(r);}function k(e){const t=new Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;const data=e.map(function(e){return"bytes"===e.type?f.toBuffer(e.value):e.value;}),r=e.map(function(e){return e.type;}),n=e.map(function(e){if(!e.name)throw t;return`${e.type} ${e.name}`;});return l.soliditySHA3(["bytes32","bytes32"],[l.soliditySHA3(new Array(e.length).fill("string"),n),l.soliditySHA3(r,data)]);}function I(e,t){const r=f.toBuffer(t),n=f.fromRpcSig(r);return f.ecrecover(e,n.v,n.r,n.s);}function C(e){const t=f.toBuffer(e.data);return I(f.hashPersonalMessage(t),e.sig);}function O(e,t){let r=`${e}`;for(;r.length0&&(f=2048-c-16),o.padding="0".repeat(f),A(t,{data:JSON.stringify(o)},n);},t.decrypt=M,t.decryptSafely=function(e,t){return JSON.parse(M(e,t)).data;},t.getEncryptionPublicKey=function(e){const t=B(e),r=h.box.keyPair.fromSecretKey(t).publicKey;return d.encodeBase64(r);},t.signTypedMessage=function(e,t,r="V4"){switch(r){case"V1":return w(e,t);case"V3":return E(e,t);default:return S(e,t);}},t.recoverTypedMessage=function(e,t="V4"){switch(t){case"V1":return _(e);case"V3":return T(e);default:return x(e);}},t.signTypedData=E,t.signTypedData_v4=S,t.recoverTypedSignature=T,t.recoverTypedSignature_v4=x;}).call(this,r(5).Buffer);},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e;}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e;},o=r(251),c=o.keccak224,f=o.keccak384,l=o.keccak256,h=o.keccak512,d=r(468),m=r(43),y=r(104),v=r(3),w=r(60),_=r(8).Buffer;Object.assign(t,r(77)),t.MAX_INTEGER=new v("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new v("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.SHA3_NULL_S=t.KECCAK256_NULL_S,t.KECCAK256_NULL=_.from(t.KECCAK256_NULL_S,"hex"),t.SHA3_NULL=t.KECCAK256_NULL,t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.SHA3_RLP_ARRAY_S=t.KECCAK256_RLP_ARRAY_S,t.KECCAK256_RLP_ARRAY=_.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.SHA3_RLP_ARRAY=t.KECCAK256_RLP_ARRAY,t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.SHA3_RLP_S=t.KECCAK256_RLP_S,t.KECCAK256_RLP=_.from(t.KECCAK256_RLP_S,"hex"),t.SHA3_RLP=t.KECCAK256_RLP,t.BN=v,t.rlp=y,t.secp256k1=d,t.zeros=function(e){return _.allocUnsafe(e).fill(0);},t.zeroAddress=function(){var e=t.zeros(20);return t.bufferToHex(e);},t.setLengthLeft=t.setLength=function(e,r,n){var o=t.zeros(r);return e=t.toBuffer(e),n?e.length0&&"0"===e.toString();)e=(a=a.slice(1))[0];return a;},t.toBuffer=function(e){if(!_.isBuffer(e))if(Array.isArray(e))e=_.from(e);else if("string"==typeof e)e=t.isHexString(e)?_.from(t.padToEven(t.stripHexPrefix(e)),"hex"):_.from(e);else if("number"==typeof e)e=t.intToBuffer(e);else if(null==e)e=_.allocUnsafe(0);else if(v.isBN(e))e=e.toArrayLike(_);else{if(!e.toArray)throw new Error("invalid type");e=_.from(e.toArray());}return e;},t.bufferToInt=function(e){return new v(t.toBuffer(e)).toNumber();},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex");},t.fromSigned=function(e){return new v(e).fromTwos(256);},t.toUnsigned=function(e){return _.from(e.toTwos(256).toArray());},t.keccak=function(a,e){switch(a=t.toBuffer(a),e||(e=256),e){case 224:return c(a);case 256:return l(a);case 384:return f(a);case 512:return h(a);default:throw new Error("Invald algorithm: keccak"+e);}},t.keccak256=function(a){return t.keccak(a);},t.sha3=t.keccak,t.sha256=function(a){return a=t.toBuffer(a),w("sha256").update(a).digest();},t.ripemd160=function(a,e){a=t.toBuffer(a);var r=w("rmd160").update(a).digest();return!0===e?t.setLength(r,32):r;},t.rlphash=function(a){return t.keccak(y.encode(a));},t.isValidPrivate=function(e){return d.privateKeyVerify(e);},t.isValidPublic=function(e,t){return 64===e.length?d.publicKeyVerify(_.concat([_.from([4]),e])):!!t&&d.publicKeyVerify(e);},t.pubToAddress=t.publicToAddress=function(e,r){return e=t.toBuffer(e),r&&64!==e.length&&(e=d.publicKeyConvert(e,!1).slice(1)),m(64===e.length),t.keccak(e).slice(-20);};var A=t.privateToPublic=function(e){return e=t.toBuffer(e),d.publicKeyCreate(e,!1).slice(1);};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=d.publicKeyConvert(e,!1).slice(1)),e;},t.ecsign=function(e,t){var r=d.sign(e,t),n={};return n.r=r.signature.slice(0,32),n.s=r.signature.slice(32,64),n.v=r.recovery+27,n;},t.hashPersonalMessage=function(e){var r=t.toBuffer("Ethereum Signed Message:\n"+e.length.toString());return t.keccak(_.concat([r,e]));},t.ecrecover=function(e,r,n,s){var o=_.concat([t.setLength(n,32),t.setLength(s,32)],64),c=r-27;if(0!==c&&1!==c)throw new Error("Invalid signature v value");var f=d.recover(e,o,c);return d.publicKeyConvert(f,!1).slice(1);},t.toRpcSig=function(e,r,s){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(_.concat([t.setLengthLeft(r,32),t.setLengthLeft(s,32),t.toBuffer(e-27)]));},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var r=e[64];return r<27&&(r+=27),{v:r,r:e.slice(0,32),s:e.slice(32,64)};},t.privateToAddress=function(e){return t.publicToAddress(A(e));},t.isValidAddress=function(address){return /^0x[0-9a-fA-F]{40}$/.test(address);},t.isZeroAddress=function(address){return t.zeroAddress()===t.addHexPrefix(address);},t.toChecksumAddress=function(address){address=t.stripHexPrefix(address).toLowerCase();for(var e=t.keccak(address).toString("hex"),r="0x",i=0;i=8?r+=address[i].toUpperCase():r+=address[i];return r;},t.isValidChecksumAddress=function(address){return t.isValidAddress(address)&&t.toChecksumAddress(address)===address;},t.generateAddress=function(e,r){return e=t.toBuffer(e),r=(r=new v(r)).isZero()?null:_.from(r.toArray()),t.rlphash([e,r]).slice(-20);},t.isPrecompiled=function(address){var a=t.unpad(address);return 1===a.length&&a[0]>=1&&a[0]<=8;},t.addHexPrefix=function(e){return"string"!=typeof e||t.isHexPrefixed(e)?e:"0x"+e;},t.isValidSignature=function(e,t,s,r){var n=new v("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new v("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===s.length&&(27===e||28===e)&&(t=new v(t),s=new v(s),!(t.isZero()||t.gt(o)||s.isZero()||s.gt(o))&&(!1!==r||1!==new v(s).cmp(n)));},t.baToJSON=function(e){if(_.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var r=[],i=0;i=n.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===n.length||!r.length||m(r.length===n.length,"The field "+r.name+" must have byte length of "+r.length),e.raw[i]=n;}e._fields.push(r.name),Object.defineProperty(e,r.name,{enumerable:!0,configurable:!0,get:n,set:o}),r.default&&(e[r.name]=r.default),r.alias&&Object.defineProperty(e,r.alias,{enumerable:!1,configurable:!0,set:o,get:n});}),data)if("string"==typeof data&&(data=_.from(t.stripHexPrefix(data),"hex")),_.isBuffer(data)&&(data=y.decode(data)),Array.isArray(data)){if(data.length>e._fields.length)throw new Error("wrong number of fields in data");data.forEach(function(r,i){e[e._fields[i]]=t.toBuffer(r);});}else{if("object"!==(void 0===data?"undefined":n(data)))throw new Error("invalid data");var o=Object.keys(data);r.forEach(function(t){-1!==o.indexOf(t.name)&&(e[t.name]=data[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=data[t.alias]);});}};},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createHashFunction=function(t){return function(r){var n=t();return n.update(r),e.from(n.digest());};};}).call(this,r(5).Buffer);},function(e,t,r){e.exports=r(456)(r(466));},function(e,t,r){const n=r(457),o=r(465);e.exports=function(e){const t=n(e),r=o(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e);}};};},function(e,t,r){(function(t){const{Transform:n}=r(252);e.exports=e=>class r extends n{constructor(t,r,n,o,c){super(c),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=o,this._options=c,this._state=new e(),this._state.initialize(t,r),this._finalized=!1;}_transform(e,t,r){let n=null;try{this.update(e,t);}catch(e){n=e;}r(n);}_flush(e){let t=null;try{this.push(this.digest());}catch(e){t=e;}e(t);}update(data,e){if(!t.isBuffer(data)&&"string"!=typeof data)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return t.isBuffer(data)||(data=t.from(data,e)),this._state.absorb(data),this;}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t;}_resetState(){return this._state.initialize(this._rate,this._capacity),this;}_clone(){const e=new r(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e;}};}).call(this,r(5).Buffer);},function(e,t){},function(e,t,r){"use strict";function n(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable;})),t.push.apply(t,r);}return t;}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;}function c(e,t){for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length;}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length;}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e;}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(s){if(0===this.length)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=s+p.data;return e;}},{key:"concat",value:function(e){if(0===this.length)return f.alloc(0);for(var t,r,n,o=f.allocUnsafe(e>>>0),p=this.head,i=0;p;)t=p.data,r=o,n=i,f.prototype.copy.call(t,r,n),i+=p.data.length,p=p.next;return o;}},{key:"consume",value:function(e,t){var r;return en.length?n.length:e;if(o===n.length?r+=n:r+=n.slice(0,e),0==(e-=o)){o===n.length?(++t,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=n.slice(o));break;}++t;}return this.length-=t,r;}},{key:"_getBuffer",value:function(e){var t=f.allocUnsafe(e),p=this.head,r=1;for(p.data.copy(t),e-=p.data.length;p=p.next;){var n=p.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++r,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=n.slice(o));break;}++r;}return this.length-=r,t;}},{key:h,value:function(e,t){return l(this,function(e){for(var i=1;i0,function(e){n||(n=e),e&&f.forEach(d),r||(f.forEach(d),o(n));});});return t.reduce(m);};},function(e,t,r){(function(t){const{Transform:n}=r(252);e.exports=e=>class r extends n{constructor(t,r,n,o){super(o),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=o,this._state=new e(),this._state.initialize(t,r),this._finalized=!1;}_transform(e,t,r){let n=null;try{this.update(e,t);}catch(e){n=e;}r(n);}_flush(){}_read(e){this.push(this.squeeze(e));}update(data,e){if(!t.isBuffer(data)&&"string"!=typeof data)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return t.isBuffer(data)||(data=t.from(data,e)),this._state.absorb(data),this;}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let data=this._state.squeeze(e);return void 0!==t&&(data=data.toString(t)),data;}_resetState(){return this._state.initialize(this._rate,this._capacity),this;}_clone(){const e=new r(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e;}};}).call(this,r(5).Buffer);},function(e,t,r){(function(t){const n=r(467);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1;}o.prototype.initialize=function(e,t){for(let i=0;i<50;++i)this.state[i]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1;},o.prototype.absorb=function(data){for(let i=0;i>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return output;},o.prototype.copy=function(e){for(let i=0;i<50;++i)e.state[i]=this.state[i];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing;},e.exports=o;}).call(this,r(5).Buffer);},function(e,t){const r=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t.p1600=function(s){for(let e=0;e<24;++e){const t=s[0]^s[10]^s[20]^s[30]^s[40],n=s[1]^s[11]^s[21]^s[31]^s[41],o=s[2]^s[12]^s[22]^s[32]^s[42],c=s[3]^s[13]^s[23]^s[33]^s[43],f=s[4]^s[14]^s[24]^s[34]^s[44],l=s[5]^s[15]^s[25]^s[35]^s[45],h=s[6]^s[16]^s[26]^s[36]^s[46],d=s[7]^s[17]^s[27]^s[37]^s[47],m=s[8]^s[18]^s[28]^s[38]^s[48],y=s[9]^s[19]^s[29]^s[39]^s[49];let v=m^(o<<1|c>>>31),w=y^(c<<1|o>>>31);const _=s[0]^v,A=s[1]^w,M=s[10]^v,E=s[11]^w,S=s[20]^v,T=s[21]^w,x=s[30]^v,k=s[31]^w,I=s[40]^v,C=s[41]^w;v=t^(f<<1|l>>>31),w=n^(l<<1|f>>>31);const O=s[2]^v,B=s[3]^w,R=s[12]^v,P=s[13]^w,F=s[22]^v,L=s[23]^w,N=s[32]^v,D=s[33]^w,j=s[42]^v,U=s[43]^w;v=o^(h<<1|d>>>31),w=c^(d<<1|h>>>31);const J=s[4]^v,H=s[5]^w,z=s[14]^v,G=s[15]^w,K=s[24]^v,V=s[25]^w,X=s[34]^v,Q=s[35]^w,Z=s[44]^v,W=s[45]^w;v=f^(m<<1|y>>>31),w=l^(y<<1|m>>>31);const Y=s[6]^v,$=s[7]^w,ee=s[16]^v,te=s[17]^w,re=s[26]^v,ne=s[27]^w,ie=s[36]^v,oe=s[37]^w,ae=s[46]^v,se=s[47]^w;v=h^(t<<1|n>>>31),w=d^(n<<1|t>>>31);const ue=s[8]^v,ce=s[9]^w,fe=s[18]^v,le=s[19]^w,he=s[28]^v,de=s[29]^w,pe=s[38]^v,be=s[39]^w,me=s[48]^v,ge=s[49]^w,ye=_,ve=A,we=E<<4|M>>>28,_e=M<<4|E>>>28,Ae=S<<3|T>>>29,Me=T<<3|S>>>29,Ee=k<<9|x>>>23,Se=x<<9|k>>>23,Te=I<<18|C>>>14,xe=C<<18|I>>>14,ke=O<<1|B>>>31,Ie=B<<1|O>>>31,Ce=P<<12|R>>>20,Oe=R<<12|P>>>20,Be=F<<10|L>>>22,Re=L<<10|F>>>22,Pe=D<<13|N>>>19,Fe=N<<13|D>>>19,Le=j<<2|U>>>30,Ne=U<<2|j>>>30,De=H<<30|J>>>2,je=J<<30|H>>>2,Ue=z<<6|G>>>26,Je=G<<6|z>>>26,He=V<<11|K>>>21,ze=K<<11|V>>>21,Ge=X<<15|Q>>>17,Ke=Q<<15|X>>>17,Ve=W<<29|Z>>>3,Xe=Z<<29|W>>>3,qe=Y<<28|$>>>4,Qe=$<<28|Y>>>4,Ze=te<<23|ee>>>9,We=ee<<23|te>>>9,Ye=re<<25|ne>>>7,$e=ne<<25|re>>>7,et=ie<<21|oe>>>11,tt=oe<<21|ie>>>11,nt=se<<24|ae>>>8,it=ae<<24|se>>>8,ot=ue<<27|ce>>>5,at=ce<<27|ue>>>5,st=fe<<20|le>>>12,ut=le<<20|fe>>>12,ct=de<<7|he>>>25,ft=he<<7|de>>>25,lt=pe<<8|be>>>24,ht=be<<8|pe>>>24,pt=me<<14|ge>>>18,bt=ge<<14|me>>>18;s[0]=ye^~Ce&He,s[1]=ve^~Oe&ze,s[10]=qe^~st&Ae,s[11]=Qe^~ut&Me,s[20]=ke^~Ue&Ye,s[21]=Ie^~Je&$e,s[30]=ot^~we&Be,s[31]=at^~_e&Re,s[40]=De^~Ze&ct,s[41]=je^~We&ft,s[2]=Ce^~He&et,s[3]=Oe^~ze&tt,s[12]=st^~Ae&Pe,s[13]=ut^~Me&Fe,s[22]=Ue^~Ye<,s[23]=Je^~$e&ht,s[32]=we^~Be&Ge,s[33]=_e^~Re&Ke,s[42]=Ze^~ct&Ee,s[43]=We^~ft&Se,s[4]=He^~et&pt,s[5]=ze^~tt&bt,s[14]=Ae^~Pe&Ve,s[15]=Me^~Fe&Xe,s[24]=Ye^~lt&Te,s[25]=$e^~ht&xe,s[34]=Be^~Ge&nt,s[35]=Re^~Ke&it,s[44]=ct^~Ee&Le,s[45]=ft^~Se&Ne,s[6]=et^~pt&ye,s[7]=tt^~bt&ve,s[16]=Pe^~Ve&qe,s[17]=Fe^~Xe&Qe,s[26]=lt^~Te&ke,s[27]=ht^~xe&Ie,s[36]=Ge^~nt&ot,s[37]=Ke^~it&at,s[46]=Ee^~Le&De,s[47]=Se^~Ne&je,s[8]=pt^~ye&Ce,s[9]=bt^~ve&Oe,s[18]=Ve^~qe&st,s[19]=Xe^~Qe&ut,s[28]=Te^~ke&Ue,s[29]=xe^~Ie&Je,s[38]=nt^~ot&we,s[39]=it^~at&_e,s[48]=Le^~De&Ze,s[49]=Ne^~je&We,s[0]^=r[2*e],s[1]^=r[2*e+1];}};},function(e,t,r){"use strict";(function(t){var n=r(259),o=r(472),c=r(473),f=function(e){return 32===e.length&&n.privateKeyVerify(Uint8Array.from(e));};e.exports={privateKeyVerify:f,privateKeyExport:function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var r=o.privateKeyExport(e,t);return c.privateKeyExport(e,r,t);},privateKeyImport:function(e){if(null!==(e=c.privateKeyImport(e))&&32===e.length&&f(e))return e;throw new Error("couldn't import from DER format");},privateKeyNegate:function(e){return t.from(n.privateKeyNegate(Uint8Array.from(e)));},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return t.from(o.privateKeyModInverse(Uint8Array.from(e)));},privateKeyTweakAdd:function(e,r){return t.from(n.privateKeyTweakAdd(Uint8Array.from(e),r));},privateKeyTweakMul:function(e,r){return t.from(n.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(r)));},publicKeyCreate:function(e,r){return t.from(n.publicKeyCreate(Uint8Array.from(e),r));},publicKeyConvert:function(e,r){return t.from(n.publicKeyConvert(Uint8Array.from(e),r));},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&n.publicKeyVerify(Uint8Array.from(e));},publicKeyTweakAdd:function(e,r,o){return t.from(n.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(r),o));},publicKeyTweakMul:function(e,r,o){return t.from(n.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(r),o));},publicKeyCombine:function(e,r){var o=[];return e.forEach(function(e){o.push(Uint8Array.from(e));}),t.from(n.publicKeyCombine(o,r));},signatureNormalize:function(e){return t.from(n.signatureNormalize(Uint8Array.from(e)));},signatureExport:function(e){return t.from(n.signatureExport(Uint8Array.from(e)));},signatureImport:function(e){return t.from(n.signatureImport(Uint8Array.from(e)));},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=c.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return o.signatureImport(t);},sign:function(e,r,o){if(null===o)throw new TypeError("options should be an Object");var c=void 0;if(o){if(c={},null===o.data)throw new TypeError("options.data should be a Buffer");if(o.data){if(32!==o.data.length)throw new RangeError("options.data length is invalid");c.data=new Uint8Array(o.data);}if(null===o.noncefn)throw new TypeError("options.noncefn should be a Function");o.noncefn&&(c.noncefn=function(e,r,n,data,c){var f=null!=n?t.from(n):null,l=null!=data?t.from(data):null,h=t.from("");return o.noncefn&&(h=o.noncefn(t.from(e),t.from(r),f,l,c)),Uint8Array.from(h);});}var f=n.ecdsaSign(Uint8Array.from(e),Uint8Array.from(r),c);return{signature:t.from(f.signature),recovery:f.recid};},verify:function(e,t,r){return n.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),r);},recover:function(e,r,o,c){return t.from(n.ecdsaRecover(Uint8Array.from(r),o,Uint8Array.from(e),c));},ecdh:function(e,r){return t.from(n.ecdh(Uint8Array.from(e),Uint8Array.from(r),{}));},ecdhUnsafe:function(e,r,n){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==r.length)throw new RangeError("private key length is invalid");return t.from(o.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(r),n));}};}).call(this,r(5).Buffer);},function(e,t){const r="Impossible case. Please create issue.",n="The tweak was out of range or the resulted private key is invalid",o="The tweak was out of range or equal to zero",c="Unknow error on context randomization",f="Private Key is invalid",l="Public Key could not be parsed",h="Public Key serialization error",d="The sum of the public keys is not valid",m="Signature could not be parsed",y="The nonce generation function failed, or the private key was invalid",v="Public key could not be recover",w="Scalar was invalid (zero or overflow)";function _(e,t){if(!e)throw new Error(t);}function A(e,t,r){if(_(t instanceof Uint8Array,`Expected ${e} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=`Expected ${e} to be an Uint8Array with length [${r.join(", ")}]`;_(r.includes(t.length),n);}else{const n=`Expected ${e} to be an Uint8Array with length ${r}`;_(t.length===r,n);}}function M(e){_("Boolean"===S(e),"Expected compressed to be a Boolean");}function E(output=e=>new Uint8Array(e),e){return"function"==typeof output&&(output=output(e)),A("output",output,e),output;}function S(e){return Object.prototype.toString.call(e).slice(8,-1);}e.exports=e=>({contextRandomize(t){if(_(null===t||t instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==t&&A("seed",t,32),1===e.contextRandomize(t))throw new Error(c);},privateKeyVerify:t=>(A("private key",t,32),0===e.privateKeyVerify(t)),privateKeyNegate(t){switch(A("private key",t,32),e.privateKeyNegate(t)){case 0:return t;case 1:throw new Error(r);}},privateKeyTweakAdd(t,r){switch(A("private key",t,32),A("tweak",r,32),e.privateKeyTweakAdd(t,r)){case 0:return t;case 1:throw new Error(n);}},privateKeyTweakMul(t,r){switch(A("private key",t,32),A("tweak",r,32),e.privateKeyTweakMul(t,r)){case 0:return t;case 1:throw new Error(o);}},publicKeyVerify:t=>(A("public key",t,[33,65]),0===e.publicKeyVerify(t)),publicKeyCreate(t,r=!0,output){switch(A("private key",t,32),M(r),output=E(output,r?33:65),e.publicKeyCreate(output,t)){case 0:return output;case 1:throw new Error(f);case 2:throw new Error(h);}},publicKeyConvert(t,r=!0,output){switch(A("public key",t,[33,65]),M(r),output=E(output,r?33:65),e.publicKeyConvert(output,t)){case 0:return output;case 1:throw new Error(l);case 2:throw new Error(h);}},publicKeyNegate(t,n=!0,output){switch(A("public key",t,[33,65]),M(n),output=E(output,n?33:65),e.publicKeyNegate(output,t)){case 0:return output;case 1:throw new Error(l);case 2:throw new Error(r);case 3:throw new Error(h);}},publicKeyCombine(t,r=!0,output){_(Array.isArray(t),"Expected public keys to be an Array"),_(t.length>0,"Expected public keys array will have more than zero items");for(const e of t)A("public key",e,[33,65]);switch(M(r),output=E(output,r?33:65),e.publicKeyCombine(output,t)){case 0:return output;case 1:throw new Error(l);case 2:throw new Error(d);case 3:throw new Error(h);}},publicKeyTweakAdd(t,r,o=!0,output){switch(A("public key",t,[33,65]),A("tweak",r,32),M(o),output=E(output,o?33:65),e.publicKeyTweakAdd(output,t,r)){case 0:return output;case 1:throw new Error(l);case 2:throw new Error(n);}},publicKeyTweakMul(t,r,n=!0,output){switch(A("public key",t,[33,65]),A("tweak",r,32),M(n),output=E(output,n?33:65),e.publicKeyTweakMul(output,t,r)){case 0:return output;case 1:throw new Error(l);case 2:throw new Error(o);}},signatureNormalize(t){switch(A("signature",t,64),e.signatureNormalize(t)){case 0:return t;case 1:throw new Error(m);}},signatureExport(t,output){A("signature",t,64);const n={output:output=E(output,72),outputlen:72};switch(e.signatureExport(n,t)){case 0:return output.slice(0,n.outputlen);case 1:throw new Error(m);case 2:throw new Error(r);}},signatureImport(t,output){switch(A("signature",t),output=E(output,64),e.signatureImport(output,t)){case 0:return output;case 1:throw new Error(m);case 2:throw new Error(r);}},ecdsaSign(t,n,o={},output){A("message",t,32),A("private key",n,32),_("Object"===S(o),"Expected options to be an Object"),void 0!==o.data&&A("options.data",o.data),void 0!==o.noncefn&&_("Function"===S(o.noncefn),"Expected options.noncefn to be a Function");const c={signature:output=E(output,64),recid:null};switch(e.ecdsaSign(c,t,n,o.data,o.noncefn)){case 0:return c;case 1:throw new Error(y);case 2:throw new Error(r);}},ecdsaVerify(t,r,n){switch(A("signature",t,64),A("message",r,32),A("public key",n,[33,65]),e.ecdsaVerify(t,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(m);case 2:throw new Error(l);}},ecdsaRecover(t,n,o,c=!0,output){switch(A("signature",t,64),_("Number"===S(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),A("message",o,32),M(c),output=E(output,c?33:65),e.ecdsaRecover(output,t,n,o)){case 0:return output;case 1:throw new Error(m);case 2:throw new Error(v);case 3:throw new Error(r);}},ecdh(t,r,n={},output){switch(A("public key",t,[33,65]),A("private key",r,32),_("Object"===S(n),"Expected options to be an Object"),void 0!==n.data&&A("options.data",n.data),void 0!==n.hashfn?(_("Function"===S(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&A("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&A("options.ybuf",n.ybuf,32),A("output",output)):output=E(output,32),e.ecdh(output,t,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return output;case 1:throw new Error(l);case 2:throw new Error(w);}}});},function(e,t,r){const n=new(0,r(74).ec)("secp256k1"),o=n.curve,c=o.n.constructor;function f(e){const t=e[0];switch(t){case 2:case 3:return 33!==e.length?null:function(e,t){let r=new c(t);if(r.cmp(o.p)>=0)return null;r=r.toRed(o.red);let f=r.redSqr().redIMul(r).redIAdd(o.b).redSqrt();return 3===e!==f.isOdd()&&(f=f.redNeg()),n.keyPair({pub:{x:r,y:f}});}(t,e.subarray(1,33));case 4:case 6:case 7:return 65!==e.length?null:function(e,t,r){let f=new c(t),l=new c(r);if(f.cmp(o.p)>=0||l.cmp(o.p)>=0)return null;if(f=f.toRed(o.red),l=l.toRed(o.red),(6===e||7===e)&&l.isOdd()!==(7===e))return null;const h=f.redSqr().redIMul(f);return l.redSqr().redISub(h.redIAdd(o.b)).isZero()?n.keyPair({pub:{x:f,y:l}}):null;}(t,e.subarray(1,33),e.subarray(33,65));default:return null;}}function l(output,e){const t=e.encode(null,33===output.length);for(let i=0;i0,privateKeyVerify(e){const t=new c(e);return t.cmp(o.n)<0&&!t.isZero()?0:1;},privateKeyNegate(e){const t=new c(e),r=o.n.sub(t).umod(o.n).toArrayLike(Uint8Array,"be",32);return e.set(r),0;},privateKeyTweakAdd(e,t){const r=new c(t);if(r.cmp(o.n)>=0)return 1;if(r.iadd(new c(e)),r.cmp(o.n)>=0&&r.isub(o.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0;},privateKeyTweakMul(e,t){let r=new c(t);if(r.cmp(o.n)>=0||r.isZero())return 1;r.imul(new c(e)),r.cmp(o.n)>=0&&(r=r.umod(o.n));const n=r.toArrayLike(Uint8Array,"be",32);return e.set(n),0;},publicKeyVerify:e=>null===f(e)?1:0,publicKeyCreate(output,e){const t=new c(e);if(t.cmp(o.n)>=0||t.isZero())return 1;return l(output,n.keyFromPrivate(e).getPublic()),0;},publicKeyConvert(output,e){const t=f(e);if(null===t)return 1;return l(output,t.getPublic()),0;},publicKeyNegate(output,e){const t=f(e);if(null===t)return 1;const r=t.getPublic();return r.y=r.y.redNeg(),l(output,r),0;},publicKeyCombine(output,e){const t=new Array(e.length);for(let i=0;i=0)return 2;const n=r.getPublic().add(o.g.mul(t));return n.isInfinity()?2:(l(output,n),0);},publicKeyTweakMul(output,e,t){const r=f(e);if(null===r)return 1;if((t=new c(t)).cmp(o.n)>=0||t.isZero())return 2;return l(output,r.getPublic().mul(t)),0;},signatureNormalize(e){const t=new c(e.subarray(0,32)),s=new c(e.subarray(32,64));return t.cmp(o.n)>=0||s.cmp(o.n)>=0?1:(1===s.cmp(n.nh)&&e.set(o.n.sub(s).toArrayLike(Uint8Array,"be",32),32),0);},signatureExport(e,t){const r=t.subarray(0,32),n=t.subarray(32,64);if(new c(r).cmp(o.n)>=0)return 1;if(new c(n).cmp(o.n)>=0)return 1;const{output:output}=e;let f=output.subarray(4,37);f[0]=0,f.set(r,1);let l=33,h=0;for(;l>1&&0===f[h]&&!(128&f[h+1]);--l,++h);if(f=f.subarray(h),128&f[0])return 1;if(l>1&&0===f[0]&&!(128&f[1]))return 1;let s=output.subarray(39,72);s[0]=0,s.set(n,1);let d=33,m=0;for(;d>1&&0===s[m]&&!(128&s[m+1]);--d,++m);return s=s.subarray(m),128&s[0]||d>1&&0===s[0]&&!(128&s[1])?1:(e.outputlen=6+l+d,output[0]=48,output[1]=e.outputlen-2,output[2]=2,output[3]=f.length,output.set(f,4),output[4+l]=2,output[5+l]=s.length,output.set(s,6+l),0);},signatureImport(output,e){if(e.length<8)return 1;if(e.length>72)return 1;if(48!==e[0])return 1;if(e[1]!==e.length-2)return 1;if(2!==e[2])return 1;const t=e[3];if(0===t)return 1;if(5+t>=e.length)return 1;if(2!==e[4+t])return 1;const r=e[5+t];if(0===r)return 1;if(6+t+r!==e.length)return 1;if(128&e[4])return 1;if(t>1&&0===e[4]&&!(128&e[5]))return 1;if(128&e[t+6])return 1;if(r>1&&0===e[t+6]&&!(128&e[t+7]))return 1;let n=e.subarray(4,4+t);if(33===n.length&&0===n[0]&&(n=n.subarray(1)),n.length>32)return 1;let f=e.subarray(6+t);if(33===f.length&&0===f[0]&&(f=f.slice(1)),f.length>32)throw new Error("S length is too long");let l=new c(n);l.cmp(o.n)>=0&&(l=new c(0));let s=new c(e.subarray(6+t));return s.cmp(o.n)>=0&&(s=new c(0)),output.set(l.toArrayLike(Uint8Array,"be",32),0),output.set(s.toArrayLike(Uint8Array,"be",32),32),0;},ecdsaSign(e,t,r,data,f){if(f){const e=f;f=n=>{const o=e(t,r,null,data,n);if(!(o instanceof Uint8Array&&32===o.length))throw new Error("This is the way");return new c(o);};}const l=new c(r);if(l.cmp(o.n)>=0||l.isZero())return 1;let h;try{h=n.sign(t,r,{canonical:!0,k:f,pers:data});}catch(e){return 1;}return e.signature.set(h.r.toArrayLike(Uint8Array,"be",32),0),e.signature.set(h.s.toArrayLike(Uint8Array,"be",32),32),e.recid=h.recoveryParam,0;},ecdsaVerify(e,t,r){const l={r:e.subarray(0,32),s:e.subarray(32,64)},h=new c(l.r),d=new c(l.s);if(h.cmp(o.n)>=0||d.cmp(o.n)>=0)return 1;if(1===d.cmp(n.nh)||h.isZero()||d.isZero())return 3;const m=f(r);if(null===m)return 2;const y=m.getPublic();return n.verify(t,l,y)?0:3;},ecdsaRecover(output,e,t,r){const f={r:e.slice(0,32),s:e.slice(32,64)},h=new c(f.r),d=new c(f.s);if(h.cmp(o.n)>=0||d.cmp(o.n)>=0)return 1;if(h.isZero()||d.isZero())return 2;let m;try{m=n.recoverPubKey(r,f,t);}catch(e){return 2;}return l(output,m),0;},ecdh(output,e,t,data,r,l,h){const d=f(e);if(null===d)return 1;const m=new c(t);if(m.cmp(o.n)>=0||m.isZero())return 2;const y=d.getPublic().mul(m);if(void 0===r){const data=y.encode(null,!0),e=n.hash().update(data).digest();for(let i=0;i<32;++i)output[i]=e[i];}else{l||(l=new Uint8Array(32));const e=y.getX().toArray("be",32);for(let i=0;i<32;++i)l[i]=e[i];h||(h=new Uint8Array(32));const t=y.getY().toArray("be",32);for(let i=0;i<32;++i)h[i]=t[i];const n=r(l,h,data);if(!(n instanceof Uint8Array&&n.length===output.length))return 2;output.set(n);}return 0;}};},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(51);t.getRandomBytes=function(e){return new Promise(function(t,r){n(e,function(e,n){e?r(e):t(n);});});},t.getRandomBytesSync=function(e){return n(e);};},function(e,t,r){"use strict";(function(e){var n=r(3),o=new(0,r(74).ec)("secp256k1"),c=o.curve;t.privateKeyExport=function(e,t){var r=new n(e);if(r.ucmp(c.n)>=0)throw new Error("couldn't export to DER format");var l=o.g.mul(r);return f(l.getX(),l.getY(),t);},t.privateKeyModInverse=function(t){var r=new n(t);if(r.ucmp(c.n)>=0||r.isZero())throw new Error("private key range is invalid");return r.invm(c.n).toArrayLike(e,"be",32);},t.signatureImport=function(t){var r=new n(t.r);r.ucmp(c.n)>=0&&(r=new n(0));var s=new n(t.s);return s.ucmp(c.n)>=0&&(s=new n(0)),e.concat([r.toArrayLike(e,"be",32),s.toArrayLike(e,"be",32)]);},t.ecdhUnsafe=function(e,t,r){var l=o.keyFromPublic(e),h=new n(t);if(h.ucmp(c.n)>=0||h.isZero())throw new Error("scalar was invalid (zero or overflow)");var d=l.pub.mul(h);return f(d.getX(),d.getY(),r);};var f=function(t,r,n){var o=void 0;return n?((o=e.alloc(33))[0]=r.isOdd()?3:2,t.toArrayLike(e,"be",32).copy(o,1)):((o=e.alloc(65))[0]=4,t.toArrayLike(e,"be",32).copy(o,1),r.toArrayLike(e,"be",32).copy(o,33)),o;};}).call(this,r(5).Buffer);},function(e,t,r){"use strict";(function(e){var r=e.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=e.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(t,o,c){var f=e.from(c?r:n);return t.copy(f,c?8:9),o.copy(f,c?181:214),f;},t.privateKeyImport=function(e){var t=e.length,r=0;if(t2)return null;if(t<(r+=1)+n)return null;var o=e[r+n-1]|(n>1?e[r+n-2]<<8:0);return t<(r+=n)+o||t32||tn)return null;if(2!==t[o++])return null;var f=t[o++];if(128&f){if(o+(c=f-128)>n)return null;for(;c>0&&0===t[o];o+=1,c-=1);for(f=0;c>0;o+=1,c-=1)f=(f<<8)+t[o];}if(f>n-o)return null;var l=o;if(o+=f,2!==t[o++])return null;var h=t[o++];if(128&h){if(o+(c=h-128)>n)return null;for(;c>0&&0===t[o];o+=1,c-=1);for(h=0;c>0;o+=1,c-=1)h=(h<<8)+t[o];}if(h>n-o)return null;var d=o;for(o+=h;f>0&&0===t[l];f-=1,l+=1);if(f>32)return null;var m=t.slice(l,l+f);for(m.copy(r,32-m.length);h>0&&0===t[d];h-=1,d+=1);if(h>32)return null;var y=t.slice(d,d+h);return y.copy(s,32-y.length),{r:r,s:s};};}).call(this,r(5).Buffer);},function(e,t,r){e.exports=r(475);},function(e,t,r){(function(t){const n=r(476),o=r(3);var c=function(){};function f(e){return e.startsWith("int[")?"int256"+e.slice(3):"int"===e?"int256":e.startsWith("uint[")?"uint256"+e.slice(4):"uint"===e?"uint256":e.startsWith("fixed[")?"fixed128x128"+e.slice(5):"fixed"===e?"fixed128x128":e.startsWith("ufixed[")?"ufixed128x128"+e.slice(6):"ufixed"===e?"ufixed128x128":e;}function l(e){return parseInt(/^\D+(\d+)$/.exec(e)[1],10);}function h(e){var t=/^\D+(\d+)x(\d+)$/.exec(e);return[parseInt(t[1],10),parseInt(t[2],10)];}function d(e){var t=e.match(/(.*)\[(.*?)\]$/);return t?""===t[2]?"dynamic":parseInt(t[2],10):null;}function m(e){var t=typeof e;if("string"===t)return n.isHexPrefixed(e)?new o(n.stripHexPrefix(e),16):new o(e,10);if("number"===t)return new o(e);if(e.toArray)return e;throw new Error("Argument is not a number");}function y(e){var t=/^(\w+)\((.*)\)$/.exec(e);if(3!==t.length)throw new Error("Invalid method signature");var r=/^(.+)\):\((.+)$/.exec(t[2]);if(null!==r&&3===r.length)return{method:t[1],args:r[1].split(","),retargs:r[2].split(",")};var n=t[2].split(",");return 1===n.length&&""===n[0]&&(n=[]),{method:t[1],args:n};}function v(e,r){var c,f,y,i;if("address"===e)return v("uint160",m(r));if("bool"===e)return v("uint8",r?1:0);if("string"===e)return v("bytes",t.from(r,"utf8"));if(M(e)){if(void 0===r.length)throw new Error("Not an array?");if("dynamic"!==(c=d(e))&&0!==c&&r.length>c)throw new Error("Elements exceed array size: "+c);for(i in y=[],e=e.slice(0,e.lastIndexOf("[")),"string"==typeof r&&(r=JSON.parse(r)),r)y.push(v(e,r[i]));if("dynamic"===c){var w=v("uint256",r.length);y.unshift(w);}return t.concat(y);}if("bytes"===e)return r=t.from(r),y=t.concat([v("uint256",r.length),r]),r.length%32!=0&&(y=t.concat([y,n.zeros(32-r.length%32)])),y;if(e.startsWith("bytes")){if((c=l(e))<1||c>32)throw new Error("Invalid bytes width: "+c);return n.setLengthRight(r,32);}if(e.startsWith("uint")){if((c=l(e))%8||c<8||c>256)throw new Error("Invalid uint width: "+c);if((f=m(r)).bitLength()>c)throw new Error("Supplied uint exceeds width: "+c+" vs "+f.bitLength());if(f<0)throw new Error("Supplied uint is negative");return f.toArrayLike(t,"be",32);}if(e.startsWith("int")){if((c=l(e))%8||c<8||c>256)throw new Error("Invalid int width: "+c);if((f=m(r)).bitLength()>c)throw new Error("Supplied int exceeds width: "+c+" vs "+f.bitLength());return f.toTwos(256).toArrayLike(t,"be",32);}if(e.startsWith("ufixed")){if(c=h(e),(f=m(r))<0)throw new Error("Supplied ufixed is negative");return v("uint256",f.mul(new o(2).pow(new o(c[1]))));}if(e.startsWith("fixed"))return c=h(e),v("int256",m(r).mul(new o(2).pow(new o(c[1]))));throw new Error("Unsupported or invalid type: "+e);}function w(e,data,r){var n,c,f,i;if("string"==typeof e&&(e=_(e)),"address"===e.name)return w(e.rawType,data,r).toArrayLike(t,"be",20).toString("hex");if("bool"===e.name)return w(e.rawType,data,r).toString()===new o(1).toString();if("string"===e.name){var l=w(e.rawType,data,r);return t.from(l,"utf8").toString();}if(e.isArray){for(f=[],n=e.size,"dynamic"===e.size&&(r=w("uint256",data,r).toNumber(),n=w("uint256",data,r).toNumber(),r+=32),i=0;ie.size)throw new Error("Decoded int exceeds width: "+e.size+" vs "+c.bitLength());return c;}if(e.name.startsWith("int")){if((c=new o(data.slice(r,r+32),16,"be").fromTwos(256)).bitLength()>e.size)throw new Error("Decoded uint exceeds width: "+e.size+" vs "+c.bitLength());return c;}if(e.name.startsWith("ufixed")){if(n=new o(2).pow(new o(e.size[1])),!(c=w("uint256",data,r)).mod(n).isZero())throw new Error("Decimals not supported yet");return c.div(n);}if(e.name.startsWith("fixed")){if(n=new o(2).pow(new o(e.size[1])),!(c=w("int256",data,r)).mod(n).isZero())throw new Error("Decimals not supported yet");return c.div(n);}throw new Error("Unsupported or invalid type: "+e.name);}function _(e){var t,r,n;if(M(e)){t=d(e);var o=e.slice(0,e.lastIndexOf("["));return o=_(o),r={isArray:!0,name:e,size:t,memoryUsage:"dynamic"===t?32:o.memoryUsage*t,subArray:o};}switch(e){case"address":n="uint160";break;case"bool":n="uint8";break;case"string":n="bytes";}if(r={rawType:n,name:e,memoryUsage:32},e.startsWith("bytes")&&"bytes"!==e||e.startsWith("uint")||e.startsWith("int")?r.size=l(e):(e.startsWith("ufixed")||e.startsWith("fixed"))&&(r.size=h(e)),e.startsWith("bytes")&&"bytes"!==e&&(r.size<1||r.size>32))throw new Error("Invalid bytes width: "+r.size);if((e.startsWith("uint")||e.startsWith("int"))&&(r.size%8||r.size<8||r.size>256))throw new Error("Invalid int/uint width: "+r.size);return r;}function A(e){return"string"===e||"bytes"===e||"dynamic"===d(e);}function M(e){return e.lastIndexOf("]")===e.length-1;}function E(e,t){return e.startsWith("address")||e.startsWith("bytes")?"0x"+t.toString("hex"):t.toString();}c.eventID=function(e,r){var o=e+"("+r.map(f).join(",")+")";return n.keccak256(t.from(o));},c.methodID=function(e,t){return c.eventID(e,t).slice(0,4);},c.rawEncode=function(e,r){var output=[],data=[],n=0;e.forEach(function(e){if(M(e)){var t=d(e);n+="dynamic"!==t?32*t:32;}else n+=32;});for(var i=0;iv)throw new Error("Elements exceed array size: "+v);}var w=r.map(function(e){return c.solidityHexValue(y,e,256);});return t.concat(w);}if("bytes"===e)return r;if("string"===e)return t.from(r,"utf8");if("bool"===e){o=o||8;var _=Array(o/4).join("0");return t.from(r?_+"1":_+"0","hex");}if("address"===e){var A=20;return o&&(A=o/8),n.setLengthLeft(r,A);}if(e.startsWith("bytes")){if((f=l(e))<1||f>32)throw new Error("Invalid bytes width: "+f);return n.setLengthRight(r,f);}if(e.startsWith("uint")){if((f=l(e))%8||f<8||f>256)throw new Error("Invalid uint width: "+f);if((h=m(r)).bitLength()>f)throw new Error("Supplied uint exceeds width: "+f+" vs "+h.bitLength());return o=o||f,h.toArrayLike(t,"be",o/8);}if(e.startsWith("int")){if((f=l(e))%8||f<8||f>256)throw new Error("Invalid int width: "+f);if((h=m(r)).bitLength()>f)throw new Error("Supplied int exceeds width: "+f+" vs "+h.bitLength());return o=o||f,h.toTwos(f).toArrayLike(t,"be",o/8);}throw new Error("Unsupported or invalid type: "+e);},c.solidityPack=function(e,r){if(e.length!==r.length)throw new Error("Number of types are not matching the values");for(var n=[],i=0;i="0"&&t<="9";)o+=e[c]-"0",c++;i=c-1,r.push(o);}else if("i"===n)r.push("int256");else{if("a"!==n)throw new Error("Unsupported or invalid type: "+n);r.push("int256[]");}}return r;},c.toSerpent=function(e){for(var t=[],i=0;i=0)throw new Error("couldn't export to DER format");var l=o.g.mul(r);return f(l.getX(),l.getY(),t);},t.privateKeyModInverse=function(t){var r=new n(t);if(r.ucmp(c.n)>=0||r.isZero())throw new Error("private key range is invalid");return r.invm(c.n).toArrayLike(e,"be",32);},t.signatureImport=function(t){var r=new n(t.r);r.ucmp(c.n)>=0&&(r=new n(0));var s=new n(t.s);return s.ucmp(c.n)>=0&&(s=new n(0)),e.concat([r.toArrayLike(e,"be",32),s.toArrayLike(e,"be",32)]);},t.ecdhUnsafe=function(e,t,r){void 0===r&&(r=!0);var l=o.keyFromPublic(e),h=new n(t);if(h.ucmp(c.n)>=0||h.isZero())throw new Error("scalar was invalid (zero or overflow)");var d=l.pub.mul(h);return f(d.getX(),d.getY(),r);};var f=function(t,r,n){var o;return n?((o=e.alloc(33))[0]=r.isOdd()?3:2,t.toArrayLike(e,"be",32).copy(o,1)):((o=e.alloc(65))[0]=4,t.toArrayLike(e,"be",32).copy(o,1),r.toArrayLike(e,"be",32).copy(o,33)),o;};}).call(this,r(5).Buffer);},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=e.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=e.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t.privateKeyExport=function(t,o,c){void 0===c&&(c=!0);var f=e.from(c?r:n);return t.copy(f,c?8:9),o.copy(f,c?181:214),f;},t.privateKeyImport=function(e){var t=e.length,r=0;if(t2)return null;if(t<(r+=1)+n)return null;var o=e[r+n-1]|(n>1?e[r+n-2]<<8:0);return t<(r+=n)+o||t32||tn)return null;if(2!==t[o++])return null;var f=t[o++];if(128&f){if(o+(c=f-128)>n)return null;for(;c>0&&0===t[o];o+=1,c-=1);for(f=0;c>0;o+=1,c-=1)f=(f<<8)+t[o];}if(f>n-o)return null;var l=o;if(o+=f,2!==t[o++])return null;var h=t[o++];if(128&h){if(o+(c=h-128)>n)return null;for(;c>0&&0===t[o];o+=1,c-=1);for(h=0;c>0;o+=1,c-=1)h=(h<<8)+t[o];}if(h>n-o)return null;var d=o;for(o+=h;f>0&&0===t[l];f-=1,l+=1);if(f>32)return null;var m=t.slice(l,l+f);for(m.copy(r,32-m.length);h>0&&0===t[d];h-=1,d+=1);if(h>32)return null;var y=t.slice(d,d+h);return y.copy(s,32-y.length),{r:r,s:s};};}).call(this,r(5).Buffer);},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.MAX_INTEGER=void 0;var n=r(3);t.MAX_INTEGER=new n("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),t.TWO_POW256=new n("10000000000000000000000000000000000000000000000000000000000000000",16),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=e.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=e.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=e.from(t.KECCAK256_RLP_S,"hex");}).call(this,r(5).Buffer);},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.importPublic=t.privateToPublic=t.privateToAddress=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.isPrecompiled=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isZeroAddress=t.isValidAddress=t.zeroAddress=void 0;var n=r(43),o=r(77),c=r(151),f=r(3),l=r(88),h=r(152);t.zeroAddress=function(){var e=l.zeros(20);return l.bufferToHex(e);},t.isValidAddress=function(address){return /^0x[0-9a-fA-F]{40}$/.test(address);},t.isZeroAddress=function(address){return t.zeroAddress()===l.addHexPrefix(address);},t.toChecksumAddress=function(address,e){address=o.stripHexPrefix(address).toLowerCase();for(var t=void 0!==e?e.toString()+"0x":"",r=h.keccak(t+address).toString("hex"),n="0x",i=0;i=8?n+=address[i].toUpperCase():n+=address[i];return n;},t.isValidChecksumAddress=function(address,e){return t.isValidAddress(address)&&t.toChecksumAddress(address,e)===address;},t.generateAddress=function(t,r){t=l.toBuffer(t);var n=new f(r);return n.isZero()?h.rlphash([t,null]).slice(-20):h.rlphash([t,e.from(n.toArray())]).slice(-20);},t.generateAddress2=function(t,r,o){var c=l.toBuffer(t),f=l.toBuffer(r),d=l.toBuffer(o);return n(20===c.length),n(32===f.length),h.keccak256(e.concat([e.from("ff","hex"),c,f,h.keccak256(d)])).slice(-20);},t.isPrecompiled=function(address){var a=l.unpad(address);return 1===a.length&&a[0]>=1&&a[0]<=8;},t.isValidPrivate=function(e){return c.privateKeyVerify(e);},t.isValidPublic=function(t,r){return void 0===r&&(r=!1),64===t.length?c.publicKeyVerify(e.concat([e.from([4]),t])):!!r&&c.publicKeyVerify(t);},t.pubToAddress=function(e,t){return void 0===t&&(t=!1),e=l.toBuffer(e),t&&64!==e.length&&(e=c.publicKeyConvert(e,!1).slice(1)),n(64===e.length),h.keccak(e).slice(-20);},t.publicToAddress=t.pubToAddress,t.privateToAddress=function(e){return t.publicToAddress(t.privateToPublic(e));},t.privateToPublic=function(e){return e=l.toBuffer(e),c.publicKeyCreate(e,!1).slice(1);},t.importPublic=function(e){return 64!==(e=l.toBuffer(e)).length&&(e=c.publicKeyConvert(e,!1).slice(1)),e;};}).call(this,r(5).Buffer);},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;var n=r(151),o=r(3),c=r(88),f=r(152);function l(e,t){return t?e-(2*t+35):e-27;}function h(e){return 0===e||1===e;}t.ecsign=function(e,t,r){var o=n.sign(e,t),c=o.recovery;return{r:o.signature.slice(0,32),s:o.signature.slice(32,64),v:r?c+(2*r+35):c+27};},t.ecrecover=function(t,r,o,s,f){var d=e.concat([c.setLength(o,32),c.setLength(s,32)],64),m=l(r,f);if(!h(m))throw new Error("Invalid signature v value");var y=n.recover(t,d,m);return n.publicKeyConvert(y,!1).slice(1);},t.toRpcSig=function(t,r,s,n){if(!h(l(t,n)))throw new Error("Invalid signature v value");return c.bufferToHex(e.concat([c.setLengthLeft(r,32),c.setLengthLeft(s,32),c.toBuffer(t)]));},t.fromRpcSig=function(e){var t=c.toBuffer(e);if(65!==t.length)throw new Error("Invalid signature length");var r=t[64];return r<27&&(r+=27),{v:r,r:t.slice(0,32),s:t.slice(32,64)};},t.isValidSignature=function(e,t,s,r,n){void 0===r&&(r=!0);var c=new o("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),f=new o("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);if(32!==t.length||32!==s.length)return!1;if(!h(l(e,n)))return!1;var d=new o(t),m=new o(s);return!(d.isZero()||d.gt(f)||m.isZero()||m.gt(f))&&(!r||1!==m.cmp(c));},t.hashPersonalMessage=function(t){var r=e.from("Ethereum Signed Message:\n"+t.length.toString(),"utf-8");return f.keccak(e.concat([r,t]));};}).call(this,r(5).Buffer);},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=void 0;var n=r(43),o=r(77),c=r(104),f=r(88);t.defineProperties=function(t,r,data){if(t.raw=[],t._fields=[],t.toJSON=function(label){if(void 0===label&&(label=!1),label){var e={};return t._fields.forEach(function(r){e[r]="0x"+t[r].toString("hex");}),e;}return f.baToJSON(t.raw);},t.serialize=function(){return c.encode(t.raw);},r.forEach(function(r,i){function o(){return t.raw[i];}function c(o){"00"!==(o=f.toBuffer(o)).toString("hex")||r.allowZero||(o=e.allocUnsafe(0)),r.allowLess&&r.length?(o=f.stripZeros(o),n(r.length>=o.length,"The field "+r.name+" must not have more "+r.length+" bytes")):r.allowZero&&0===o.length||!r.length||n(r.length===o.length,"The field "+r.name+" must have byte length of "+r.length),t.raw[i]=o;}t._fields.push(r.name),Object.defineProperty(t,r.name,{enumerable:!0,configurable:!0,get:o,set:c}),r.default&&(t[r.name]=r.default),r.alias&&Object.defineProperty(t,r.alias,{enumerable:!1,configurable:!0,set:c,get:o});}),data)if("string"==typeof data&&(data=e.from(o.stripHexPrefix(data),"hex")),e.isBuffer(data)&&(data=c.decode(data)),Array.isArray(data)){if(data.length>t._fields.length)throw new Error("wrong number of fields in data");data.forEach(function(e,i){t[t._fields[i]]=f.toBuffer(e);});}else{if("object"!=typeof data)throw new Error("invalid data");var l=Object.keys(data);r.forEach(function(e){-1!==l.indexOf(e.name)&&(t[e.name]=data[e.name]),-1!==l.indexOf(e.alias)&&(t[e.alias]=data[e.alias]);});}};}).call(this,r(5).Buffer);},function(e,t,r){!function(e){"use strict";var t=function(e){var i,t=new Float64Array(16);if(e)for(i=0;i>24&255,e[i+1]=t>>16&255,e[i+2]=t>>8&255,e[i+3]=255&t,e[i+4]=r>>24&255,e[i+5]=r>>16&255,e[i+6]=r>>8&255,e[i+7]=255&r;}function A(e,t,r,n,o){var i,c=0;for(i=0;i>>8)-1;}function M(e,t,r,n){return A(e,t,r,n,16);}function E(e,t,r,n){return A(e,t,r,n,32);}function S(e,t,r,n){!function(e,p,t,r){for(var u,n=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,c=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,l=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,h=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&p[0]|(255&p[1])<<8|(255&p[2])<<16|(255&p[3])<<24,m=255&p[4]|(255&p[5])<<8|(255&p[6])<<16|(255&p[7])<<24,y=255&p[8]|(255&p[9])<<8|(255&p[10])<<16|(255&p[11])<<24,v=255&p[12]|(255&p[13])<<8|(255&p[14])<<16|(255&p[15])<<24,w=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,_=255&t[16]|(255&t[17])<<8|(255&t[18])<<16|(255&t[19])<<24,A=255&t[20]|(255&t[21])<<8|(255&t[22])<<16|(255&t[23])<<24,M=255&t[24]|(255&t[25])<<8|(255&t[26])<<16|(255&t[27])<<24,E=255&t[28]|(255&t[29])<<8|(255&t[30])<<16|(255&t[31])<<24,S=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,T=n,x=o,k=c,I=f,C=l,O=h,B=d,R=m,P=y,F=v,L=w,N=_,D=A,j=M,U=E,J=S,i=0;i<20;i+=2)T^=(u=(D^=(u=(P^=(u=(C^=(u=T+D|0)<<7|u>>>25)+T|0)<<9|u>>>23)+C|0)<<13|u>>>19)+P|0)<<18|u>>>14,O^=(u=(x^=(u=(j^=(u=(F^=(u=O+x|0)<<7|u>>>25)+O|0)<<9|u>>>23)+F|0)<<13|u>>>19)+j|0)<<18|u>>>14,L^=(u=(B^=(u=(k^=(u=(U^=(u=L+B|0)<<7|u>>>25)+L|0)<<9|u>>>23)+U|0)<<13|u>>>19)+k|0)<<18|u>>>14,J^=(u=(N^=(u=(R^=(u=(I^=(u=J+N|0)<<7|u>>>25)+J|0)<<9|u>>>23)+I|0)<<13|u>>>19)+R|0)<<18|u>>>14,T^=(u=(I^=(u=(k^=(u=(x^=(u=T+I|0)<<7|u>>>25)+T|0)<<9|u>>>23)+x|0)<<13|u>>>19)+k|0)<<18|u>>>14,O^=(u=(C^=(u=(R^=(u=(B^=(u=O+C|0)<<7|u>>>25)+O|0)<<9|u>>>23)+B|0)<<13|u>>>19)+R|0)<<18|u>>>14,L^=(u=(F^=(u=(P^=(u=(N^=(u=L+F|0)<<7|u>>>25)+L|0)<<9|u>>>23)+N|0)<<13|u>>>19)+P|0)<<18|u>>>14,J^=(u=(U^=(u=(j^=(u=(D^=(u=J+U|0)<<7|u>>>25)+J|0)<<9|u>>>23)+D|0)<<13|u>>>19)+j|0)<<18|u>>>14;T=T+n|0,x=x+o|0,k=k+c|0,I=I+f|0,C=C+l|0,O=O+h|0,B=B+d|0,R=R+m|0,P=P+y|0,F=F+v|0,L=L+w|0,N=N+_|0,D=D+A|0,j=j+M|0,U=U+E|0,J=J+S|0,e[0]=T>>>0&255,e[1]=T>>>8&255,e[2]=T>>>16&255,e[3]=T>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=k>>>0&255,e[9]=k>>>8&255,e[10]=k>>>16&255,e[11]=k>>>24&255,e[12]=I>>>0&255,e[13]=I>>>8&255,e[14]=I>>>16&255,e[15]=I>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=O>>>0&255,e[21]=O>>>8&255,e[22]=O>>>16&255,e[23]=O>>>24&255,e[24]=B>>>0&255,e[25]=B>>>8&255,e[26]=B>>>16&255,e[27]=B>>>24&255,e[28]=R>>>0&255,e[29]=R>>>8&255,e[30]=R>>>16&255,e[31]=R>>>24&255,e[32]=P>>>0&255,e[33]=P>>>8&255,e[34]=P>>>16&255,e[35]=P>>>24&255,e[36]=F>>>0&255,e[37]=F>>>8&255,e[38]=F>>>16&255,e[39]=F>>>24&255,e[40]=L>>>0&255,e[41]=L>>>8&255,e[42]=L>>>16&255,e[43]=L>>>24&255,e[44]=N>>>0&255,e[45]=N>>>8&255,e[46]=N>>>16&255,e[47]=N>>>24&255,e[48]=D>>>0&255,e[49]=D>>>8&255,e[50]=D>>>16&255,e[51]=D>>>24&255,e[52]=j>>>0&255,e[53]=j>>>8&255,e[54]=j>>>16&255,e[55]=j>>>24&255,e[56]=U>>>0&255,e[57]=U>>>8&255,e[58]=U>>>16&255,e[59]=U>>>24&255,e[60]=J>>>0&255,e[61]=J>>>8&255,e[62]=J>>>16&255,e[63]=J>>>24&255;}(e,t,r,n);}function T(e,t,r,n){!function(e,p,t,r){for(var u,n=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,o=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,c=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,l=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,h=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&p[0]|(255&p[1])<<8|(255&p[2])<<16|(255&p[3])<<24,m=255&p[4]|(255&p[5])<<8|(255&p[6])<<16|(255&p[7])<<24,y=255&p[8]|(255&p[9])<<8|(255&p[10])<<16|(255&p[11])<<24,v=255&p[12]|(255&p[13])<<8|(255&p[14])<<16|(255&p[15])<<24,w=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,_=255&t[16]|(255&t[17])<<8|(255&t[18])<<16|(255&t[19])<<24,A=255&t[20]|(255&t[21])<<8|(255&t[22])<<16|(255&t[23])<<24,M=255&t[24]|(255&t[25])<<8|(255&t[26])<<16|(255&t[27])<<24,E=255&t[28]|(255&t[29])<<8|(255&t[30])<<16|(255&t[31])<<24,S=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,i=0;i<20;i+=2)n^=(u=(A^=(u=(y^=(u=(l^=(u=n+A|0)<<7|u>>>25)+n|0)<<9|u>>>23)+l|0)<<13|u>>>19)+y|0)<<18|u>>>14,h^=(u=(o^=(u=(M^=(u=(v^=(u=h+o|0)<<7|u>>>25)+h|0)<<9|u>>>23)+v|0)<<13|u>>>19)+M|0)<<18|u>>>14,w^=(u=(d^=(u=(c^=(u=(E^=(u=w+d|0)<<7|u>>>25)+w|0)<<9|u>>>23)+E|0)<<13|u>>>19)+c|0)<<18|u>>>14,S^=(u=(_^=(u=(m^=(u=(f^=(u=S+_|0)<<7|u>>>25)+S|0)<<9|u>>>23)+f|0)<<13|u>>>19)+m|0)<<18|u>>>14,n^=(u=(f^=(u=(c^=(u=(o^=(u=n+f|0)<<7|u>>>25)+n|0)<<9|u>>>23)+o|0)<<13|u>>>19)+c|0)<<18|u>>>14,h^=(u=(l^=(u=(m^=(u=(d^=(u=h+l|0)<<7|u>>>25)+h|0)<<9|u>>>23)+d|0)<<13|u>>>19)+m|0)<<18|u>>>14,w^=(u=(v^=(u=(y^=(u=(_^=(u=w+v|0)<<7|u>>>25)+w|0)<<9|u>>>23)+_|0)<<13|u>>>19)+y|0)<<18|u>>>14,S^=(u=(E^=(u=(M^=(u=(A^=(u=S+E|0)<<7|u>>>25)+S|0)<<9|u>>>23)+A|0)<<13|u>>>19)+M|0)<<18|u>>>14;e[0]=n>>>0&255,e[1]=n>>>8&255,e[2]=n>>>16&255,e[3]=n>>>24&255,e[4]=h>>>0&255,e[5]=h>>>8&255,e[6]=h>>>16&255,e[7]=h>>>24&255,e[8]=w>>>0&255,e[9]=w>>>8&255,e[10]=w>>>16&255,e[11]=w>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=m>>>0&255,e[21]=m>>>8&255,e[22]=m>>>16&255,e[23]=m>>>24&255,e[24]=y>>>0&255,e[25]=y>>>8&255,e[26]=y>>>16&255,e[27]=y>>>24&255,e[28]=v>>>0&255,e[29]=v>>>8&255,e[30]=v>>>16&255,e[31]=v>>>24&255;}(e,t,r,n);}var x=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(e,t,r,n,b,o,c){var u,i,f=new Uint8Array(16),l=new Uint8Array(64);for(i=0;i<16;i++)f[i]=0;for(i=0;i<8;i++)f[i]=o[i];for(;b>=64;){for(S(l,f,c,x),i=0;i<64;i++)e[t+i]=r[n+i]^l[i];for(u=1,i=8;i<16;i++)u=u+(255&f[i])|0,f[i]=255&u,u>>>=8;b-=64,t+=64,n+=64;}if(b>0)for(S(l,f,c,x),i=0;i=64;){for(S(c,o,n,x),i=0;i<64;i++)e[t+i]=c[i];for(u=1,i=8;i<16;i++)u=u+(255&o[i])|0,o[i]=255&u,u>>>=8;b-=64,t+=64;}if(b>0)for(S(c,o,n,x),i=0;i>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),c=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|c<<12),this.r[5]=c>>>1&8190,f=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(c>>>14|f<<2),l=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(f>>>11|l<<5),h=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(l>>>8|h<<8),this.r[9]=h>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8;};function R(e,t,r,n,o,c){var s=new B(c);return s.update(r,n,o),s.finish(e,t),0;}function P(e,t,r,n,o,c){var f=new Uint8Array(16);return R(f,0,r,n,o,c),M(e,t,f,0);}function F(e,t,r,n,o){var i;if(r<32)return-1;for(O(e,0,t,0,r,n,o),R(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0;}function L(e,t,r,n,o){var i,c=new Uint8Array(32);if(r<32)return-1;if(C(c,0,32,n,o),0!==P(t,16,t,32,r-32,c))return-1;for(O(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0;}function N(e,a){var i;for(i=0;i<16;i++)e[i]=0|a[i];}function D(e){var i,t,r=1;for(i=0;i<16;i++)t=e[i]+r+65535,r=Math.floor(t/65536),e[i]=t-65536*r;e[0]+=r-1+37*(r-1);}function j(p,q,b){for(var e,t=~(b-1),i=0;i<16;i++)e=t&(p[i]^q[i]),p[i]^=e,q[i]^=e;}function U(e,r){var i,n,b,o=t(),c=t();for(i=0;i<16;i++)c[i]=r[i];for(D(c),D(c),D(c),n=0;n<2;n++){for(o[0]=c[0]-65517,i=1;i<15;i++)o[i]=c[i]-65535-(o[i-1]>>16&1),o[i-1]&=65535;o[15]=c[15]-32767-(o[14]>>16&1),b=o[15]>>16&1,o[14]&=65535,j(c,o,1-b);}for(i=0;i<16;i++)e[2*i]=255&c[i],e[2*i+1]=c[i]>>8;}function J(a,b){var e=new Uint8Array(32),t=new Uint8Array(32);return U(e,a),U(t,b),E(e,0,t,0);}function H(a){var e=new Uint8Array(32);return U(e,a),1&e[0];}function z(e,t){var i;for(i=0;i<16;i++)e[i]=t[2*i]+(t[2*i+1]<<8);e[15]&=32767;}function G(e,a,b){for(var i=0;i<16;i++)e[i]=a[i]+b[i];}function K(e,a,b){for(var i=0;i<16;i++)e[i]=a[i]-b[i];}function V(e,a,b){var t,r,n=0,o=0,c=0,f=0,l=0,h=0,d=0,m=0,y=0,v=0,w=0,_=0,A=0,M=0,E=0,S=0,T=0,x=0,k=0,I=0,C=0,O=0,B=0,R=0,P=0,F=0,L=0,N=0,D=0,j=0,U=0,J=b[0],H=b[1],z=b[2],G=b[3],K=b[4],V=b[5],X=b[6],Q=b[7],Z=b[8],W=b[9],Y=b[10],$=b[11],ee=b[12],te=b[13],re=b[14],ne=b[15];n+=(t=a[0])*J,o+=t*H,c+=t*z,f+=t*G,l+=t*K,h+=t*V,d+=t*X,m+=t*Q,y+=t*Z,v+=t*W,w+=t*Y,_+=t*$,A+=t*ee,M+=t*te,E+=t*re,S+=t*ne,o+=(t=a[1])*J,c+=t*H,f+=t*z,l+=t*G,h+=t*K,d+=t*V,m+=t*X,y+=t*Q,v+=t*Z,w+=t*W,_+=t*Y,A+=t*$,M+=t*ee,E+=t*te,S+=t*re,T+=t*ne,c+=(t=a[2])*J,f+=t*H,l+=t*z,h+=t*G,d+=t*K,m+=t*V,y+=t*X,v+=t*Q,w+=t*Z,_+=t*W,A+=t*Y,M+=t*$,E+=t*ee,S+=t*te,T+=t*re,x+=t*ne,f+=(t=a[3])*J,l+=t*H,h+=t*z,d+=t*G,m+=t*K,y+=t*V,v+=t*X,w+=t*Q,_+=t*Z,A+=t*W,M+=t*Y,E+=t*$,S+=t*ee,T+=t*te,x+=t*re,k+=t*ne,l+=(t=a[4])*J,h+=t*H,d+=t*z,m+=t*G,y+=t*K,v+=t*V,w+=t*X,_+=t*Q,A+=t*Z,M+=t*W,E+=t*Y,S+=t*$,T+=t*ee,x+=t*te,k+=t*re,I+=t*ne,h+=(t=a[5])*J,d+=t*H,m+=t*z,y+=t*G,v+=t*K,w+=t*V,_+=t*X,A+=t*Q,M+=t*Z,E+=t*W,S+=t*Y,T+=t*$,x+=t*ee,k+=t*te,I+=t*re,C+=t*ne,d+=(t=a[6])*J,m+=t*H,y+=t*z,v+=t*G,w+=t*K,_+=t*V,A+=t*X,M+=t*Q,E+=t*Z,S+=t*W,T+=t*Y,x+=t*$,k+=t*ee,I+=t*te,C+=t*re,O+=t*ne,m+=(t=a[7])*J,y+=t*H,v+=t*z,w+=t*G,_+=t*K,A+=t*V,M+=t*X,E+=t*Q,S+=t*Z,T+=t*W,x+=t*Y,k+=t*$,I+=t*ee,C+=t*te,O+=t*re,B+=t*ne,y+=(t=a[8])*J,v+=t*H,w+=t*z,_+=t*G,A+=t*K,M+=t*V,E+=t*X,S+=t*Q,T+=t*Z,x+=t*W,k+=t*Y,I+=t*$,C+=t*ee,O+=t*te,B+=t*re,R+=t*ne,v+=(t=a[9])*J,w+=t*H,_+=t*z,A+=t*G,M+=t*K,E+=t*V,S+=t*X,T+=t*Q,x+=t*Z,k+=t*W,I+=t*Y,C+=t*$,O+=t*ee,B+=t*te,R+=t*re,P+=t*ne,w+=(t=a[10])*J,_+=t*H,A+=t*z,M+=t*G,E+=t*K,S+=t*V,T+=t*X,x+=t*Q,k+=t*Z,I+=t*W,C+=t*Y,O+=t*$,B+=t*ee,R+=t*te,P+=t*re,F+=t*ne,_+=(t=a[11])*J,A+=t*H,M+=t*z,E+=t*G,S+=t*K,T+=t*V,x+=t*X,k+=t*Q,I+=t*Z,C+=t*W,O+=t*Y,B+=t*$,R+=t*ee,P+=t*te,F+=t*re,L+=t*ne,A+=(t=a[12])*J,M+=t*H,E+=t*z,S+=t*G,T+=t*K,x+=t*V,k+=t*X,I+=t*Q,C+=t*Z,O+=t*W,B+=t*Y,R+=t*$,P+=t*ee,F+=t*te,L+=t*re,N+=t*ne,M+=(t=a[13])*J,E+=t*H,S+=t*z,T+=t*G,x+=t*K,k+=t*V,I+=t*X,C+=t*Q,O+=t*Z,B+=t*W,R+=t*Y,P+=t*$,F+=t*ee,L+=t*te,N+=t*re,D+=t*ne,E+=(t=a[14])*J,S+=t*H,T+=t*z,x+=t*G,k+=t*K,I+=t*V,C+=t*X,O+=t*Q,B+=t*Z,R+=t*W,P+=t*Y,F+=t*$,L+=t*ee,N+=t*te,D+=t*re,j+=t*ne,S+=(t=a[15])*J,o+=38*(x+=t*z),c+=38*(k+=t*G),f+=38*(I+=t*K),l+=38*(C+=t*V),h+=38*(O+=t*X),d+=38*(B+=t*Q),m+=38*(R+=t*Z),y+=38*(P+=t*W),v+=38*(F+=t*Y),w+=38*(L+=t*$),_+=38*(N+=t*ee),A+=38*(D+=t*te),M+=38*(j+=t*re),E+=38*(U+=t*ne),n=(t=(n+=38*(T+=t*H))+(r=1)+65535)-65536*(r=Math.floor(t/65536)),o=(t=o+r+65535)-65536*(r=Math.floor(t/65536)),c=(t=c+r+65535)-65536*(r=Math.floor(t/65536)),f=(t=f+r+65535)-65536*(r=Math.floor(t/65536)),l=(t=l+r+65535)-65536*(r=Math.floor(t/65536)),h=(t=h+r+65535)-65536*(r=Math.floor(t/65536)),d=(t=d+r+65535)-65536*(r=Math.floor(t/65536)),m=(t=m+r+65535)-65536*(r=Math.floor(t/65536)),y=(t=y+r+65535)-65536*(r=Math.floor(t/65536)),v=(t=v+r+65535)-65536*(r=Math.floor(t/65536)),w=(t=w+r+65535)-65536*(r=Math.floor(t/65536)),_=(t=_+r+65535)-65536*(r=Math.floor(t/65536)),A=(t=A+r+65535)-65536*(r=Math.floor(t/65536)),M=(t=M+r+65535)-65536*(r=Math.floor(t/65536)),E=(t=E+r+65535)-65536*(r=Math.floor(t/65536)),S=(t=S+r+65535)-65536*(r=Math.floor(t/65536)),n=(t=(n+=r-1+37*(r-1))+(r=1)+65535)-65536*(r=Math.floor(t/65536)),o=(t=o+r+65535)-65536*(r=Math.floor(t/65536)),c=(t=c+r+65535)-65536*(r=Math.floor(t/65536)),f=(t=f+r+65535)-65536*(r=Math.floor(t/65536)),l=(t=l+r+65535)-65536*(r=Math.floor(t/65536)),h=(t=h+r+65535)-65536*(r=Math.floor(t/65536)),d=(t=d+r+65535)-65536*(r=Math.floor(t/65536)),m=(t=m+r+65535)-65536*(r=Math.floor(t/65536)),y=(t=y+r+65535)-65536*(r=Math.floor(t/65536)),v=(t=v+r+65535)-65536*(r=Math.floor(t/65536)),w=(t=w+r+65535)-65536*(r=Math.floor(t/65536)),_=(t=_+r+65535)-65536*(r=Math.floor(t/65536)),A=(t=A+r+65535)-65536*(r=Math.floor(t/65536)),M=(t=M+r+65535)-65536*(r=Math.floor(t/65536)),E=(t=E+r+65535)-65536*(r=Math.floor(t/65536)),S=(t=S+r+65535)-65536*(r=Math.floor(t/65536)),n+=r-1+37*(r-1),e[0]=n,e[1]=o,e[2]=c,e[3]=f,e[4]=l,e[5]=h,e[6]=d,e[7]=m,e[8]=y,e[9]=v,e[10]=w,e[11]=_,e[12]=A,e[13]=M,e[14]=E,e[15]=S;}function X(e,a){V(e,a,a);}function Q(e,i){var a,r=t();for(a=0;a<16;a++)r[a]=i[a];for(a=253;a>=0;a--)X(r,r),2!==a&&4!==a&&V(r,r,i);for(a=0;a<16;a++)e[a]=r[a];}function Z(e,i){var a,r=t();for(a=0;a<16;a++)r[a]=i[a];for(a=250;a>=0;a--)X(r,r),1!==a&&V(r,r,i);for(a=0;a<16;a++)e[a]=r[a];}function W(q,e,p){var r,i,n=new Uint8Array(32),o=new Float64Array(80),a=t(),b=t(),c=t(),f=t(),l=t(),d=t();for(i=0;i<31;i++)n[i]=e[i];for(n[31]=127&e[31]|64,n[0]&=248,z(o,p),i=0;i<16;i++)b[i]=o[i],f[i]=a[i]=c[i]=0;for(a[0]=f[0]=1,i=254;i>=0;--i)j(a,b,r=n[i>>>3]>>>(7&i)&1),j(c,f,r),G(l,a,c),K(a,a,c),G(c,b,f),K(b,b,f),X(f,l),X(d,a),V(a,c,a),V(c,b,l),G(l,a,c),K(a,a,c),X(b,a),K(c,f,d),V(a,c,h),G(a,a,f),V(c,c,a),V(a,f,d),V(f,b,o),X(b,l),j(a,b,r),j(c,f,r);for(i=0;i<16;i++)o[i+16]=a[i],o[i+32]=c[i],o[i+48]=b[i],o[i+64]=f[i];var m=o.subarray(32),y=o.subarray(16);return Q(m,m),V(y,y,m),U(q,y),0;}function Y(q,e){return W(q,e,c);}function $(e,t){return n(t,32),Y(e,t);}function ee(e,t,r){var s=new Uint8Array(32);return W(s,r,t),T(e,o,s,x);}B.prototype.blocks=function(e,t,r){for(var n,o,c,f,l,h,d,m,y,v,w,_,A,M,E,S,T,x,k,I=this.fin?0:2048,C=this.h[0],h1=this.h[1],h2=this.h[2],h3=this.h[3],h4=this.h[4],h5=this.h[5],h6=this.h[6],O=this.h[7],B=this.h[8],R=this.h[9],P=this.r[0],F=this.r[1],L=this.r[2],N=this.r[3],D=this.r[4],j=this.r[5],U=this.r[6],J=this.r[7],H=this.r[8],z=this.r[9];r>=16;)v=y=0,v+=(C+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*P,v+=(h1+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*z),v+=(h2+=8191&(o>>>10|(c=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*H),v+=(h3+=8191&(c>>>7|(f=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*J),y=(v+=(h4+=8191&(f>>>4|(l=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,v&=8191,v+=(h5+=l>>>1&8191)*(5*j),v+=(h6+=8191&(l>>>14|(h=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*D),v+=(O+=8191&(h>>>11|(d=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*N),v+=(B+=8191&(d>>>8|(m=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*L),w=y+=(v+=(R+=m>>>5|I)*(5*F))>>>13,w+=C*F,w+=h1*P,w+=h2*(5*z),w+=h3*(5*H),y=(w+=h4*(5*J))>>>13,w&=8191,w+=h5*(5*U),w+=h6*(5*j),w+=O*(5*D),w+=B*(5*N),y+=(w+=R*(5*L))>>>13,w&=8191,_=y,_+=C*L,_+=h1*F,_+=h2*P,_+=h3*(5*z),y=(_+=h4*(5*H))>>>13,_&=8191,_+=h5*(5*J),_+=h6*(5*U),_+=O*(5*j),_+=B*(5*D),A=y+=(_+=R*(5*N))>>>13,A+=C*N,A+=h1*L,A+=h2*F,A+=h3*P,y=(A+=h4*(5*z))>>>13,A&=8191,A+=h5*(5*H),A+=h6*(5*J),A+=O*(5*U),A+=B*(5*j),M=y+=(A+=R*(5*D))>>>13,M+=C*D,M+=h1*N,M+=h2*L,M+=h3*F,y=(M+=h4*P)>>>13,M&=8191,M+=h5*(5*z),M+=h6*(5*H),M+=O*(5*J),M+=B*(5*U),E=y+=(M+=R*(5*j))>>>13,E+=C*j,E+=h1*D,E+=h2*N,E+=h3*L,y=(E+=h4*F)>>>13,E&=8191,E+=h5*P,E+=h6*(5*z),E+=O*(5*H),E+=B*(5*J),S=y+=(E+=R*(5*U))>>>13,S+=C*U,S+=h1*j,S+=h2*D,S+=h3*N,y=(S+=h4*L)>>>13,S&=8191,S+=h5*F,S+=h6*P,S+=O*(5*z),S+=B*(5*H),T=y+=(S+=R*(5*J))>>>13,T+=C*J,T+=h1*U,T+=h2*j,T+=h3*D,y=(T+=h4*N)>>>13,T&=8191,T+=h5*L,T+=h6*F,T+=O*P,T+=B*(5*z),x=y+=(T+=R*(5*H))>>>13,x+=C*H,x+=h1*J,x+=h2*U,x+=h3*j,y=(x+=h4*D)>>>13,x&=8191,x+=h5*N,x+=h6*L,x+=O*F,x+=B*P,k=y+=(x+=R*(5*z))>>>13,k+=C*z,k+=h1*H,k+=h2*J,k+=h3*U,y=(k+=h4*j)>>>13,k&=8191,k+=h5*D,k+=h6*N,k+=O*L,k+=B*F,C=v=8191&(y=(y=((y+=(k+=R*P)>>>13)<<2)+y|0)+(v&=8191)|0),h1=w+=y>>>=13,h2=_&=8191,h3=A&=8191,h4=M&=8191,h5=E&=8191,h6=S&=8191,O=T&=8191,B=x&=8191,R=k&=8191,t+=16,r-=16;this.h[0]=C,this.h[1]=h1,this.h[2]=h2,this.h[3]=h3,this.h[4]=h4,this.h[5]=h5,this.h[6]=h6,this.h[7]=O,this.h[8]=B,this.h[9]=R;},B.prototype.finish=function(e,t){var r,mask,n,i,g=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16);}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,g[0]=this.h[0]+5,r=g[0]>>>13,g[0]&=8191,i=1;i<10;i++)g[i]=this.h[i]+r,r=g[i]>>>13,g[i]&=8191;for(g[9]-=8192,mask=(1^r)-1,i=0;i<10;i++)g[i]&=mask;for(mask=~mask,i=0;i<10;i++)this.h[i]=this.h[i]&mask|g[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),n=this.h[0]+this.pad[0],this.h[0]=65535&n,i=1;i<8;i++)n=(this.h[i]+this.pad[i]|0)+(n>>>16)|0,this.h[i]=65535&n;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255;},B.prototype.update=function(e,t,r){var i,n;if(this.leftover){for((n=16-this.leftover)>r&&(n=r),i=0;i=16&&(n=r-r%16,this.blocks(e,t,n),t+=n,r-=n),r){for(i=0;i=128;){for(i=0;i<16;i++)k=8*i+Y,R[i]=r[k+0]<<24|r[k+1]<<16|r[k+2]<<8|r[k+3],P[i]=r[k+4]<<24|r[k+5]<<16|r[k+6]<<8|r[k+7];for(i=0;i<80;i++)if(o=F,c=L,f=N,l=D,h=j,d=U,m=J,H,v=z,w=G,_=K,A=V,M=X,E=Q,S=Z,W,a=65535&(C=W),b=C>>>16,O=65535&(I=H),B=I>>>16,a+=65535&(C=(X>>>14|j<<18)^(X>>>18|j<<14)^(j>>>9|X<<23)),b+=C>>>16,O+=65535&(I=(j>>>14|X<<18)^(j>>>18|X<<14)^(X>>>9|j<<23)),B+=I>>>16,a+=65535&(C=X&Q^~X&Z),b+=C>>>16,O+=65535&(I=j&U^~j&J),B+=I>>>16,a+=65535&(C=ne[2*i+1]),b+=C>>>16,O+=65535&(I=ne[2*i]),B+=I>>>16,I=R[i%16],b+=(C=P[i%16])>>>16,O+=65535&I,B+=I>>>16,O+=(b+=(a+=65535&C)>>>16)>>>16,a=65535&(C=x=65535&a|b<<16),b=C>>>16,O=65535&(I=th=65535&O|(B+=O>>>16)<<16),B=I>>>16,a+=65535&(C=(z>>>28|F<<4)^(F>>>2|z<<30)^(F>>>7|z<<25)),b+=C>>>16,O+=65535&(I=(F>>>28|z<<4)^(z>>>2|F<<30)^(z>>>7|F<<25)),B+=I>>>16,b+=(C=z&G^z&K^G&K)>>>16,O+=65535&(I=F&L^F&N^L&N),B+=I>>>16,y=65535&(O+=(b+=(a+=65535&C)>>>16)>>>16)|(B+=O>>>16)<<16,T=65535&a|b<<16,a=65535&(C=A),b=C>>>16,O=65535&(I=l),B=I>>>16,b+=(C=x)>>>16,O+=65535&(I=th),B+=I>>>16,L=o,N=c,D=f,j=l=65535&(O+=(b+=(a+=65535&C)>>>16)>>>16)|(B+=O>>>16)<<16,U=h,J=d,H=m,F=y,G=v,K=w,V=_,X=A=65535&a|b<<16,Q=M,Z=E,W=S,z=T,i%16==15)for(k=0;k<16;k++)I=R[k],a=65535&(C=P[k]),b=C>>>16,O=65535&I,B=I>>>16,I=R[(k+9)%16],a+=65535&(C=P[(k+9)%16]),b+=C>>>16,O+=65535&I,B+=I>>>16,th=R[(k+1)%16],a+=65535&(C=((x=P[(k+1)%16])>>>1|th<<31)^(x>>>8|th<<24)^(x>>>7|th<<25)),b+=C>>>16,O+=65535&(I=(th>>>1|x<<31)^(th>>>8|x<<24)^th>>>7),B+=I>>>16,th=R[(k+14)%16],b+=(C=((x=P[(k+14)%16])>>>19|th<<13)^(th>>>29|x<<3)^(x>>>6|th<<26))>>>16,O+=65535&(I=(th>>>19|x<<13)^(x>>>29|th<<3)^th>>>6),B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,R[k]=65535&O|B<<16,P[k]=65535&a|b<<16;a=65535&(C=z),b=C>>>16,O=65535&(I=F),B=I>>>16,I=e[0],b+=(C=t[0])>>>16,O+=65535&I,B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,e[0]=F=65535&O|B<<16,t[0]=z=65535&a|b<<16,a=65535&(C=G),b=C>>>16,O=65535&(I=L),B=I>>>16,I=e[1],b+=(C=t[1])>>>16,O+=65535&I,B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,e[1]=L=65535&O|B<<16,t[1]=G=65535&a|b<<16,a=65535&(C=K),b=C>>>16,O=65535&(I=N),B=I>>>16,I=e[2],b+=(C=t[2])>>>16,O+=65535&I,B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,e[2]=N=65535&O|B<<16,t[2]=K=65535&a|b<<16,a=65535&(C=V),b=C>>>16,O=65535&(I=D),B=I>>>16,I=e[3],b+=(C=t[3])>>>16,O+=65535&I,B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,e[3]=D=65535&O|B<<16,t[3]=V=65535&a|b<<16,a=65535&(C=X),b=C>>>16,O=65535&(I=j),B=I>>>16,I=e[4],b+=(C=t[4])>>>16,O+=65535&I,B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,e[4]=j=65535&O|B<<16,t[4]=X=65535&a|b<<16,a=65535&(C=Q),b=C>>>16,O=65535&(I=U),B=I>>>16,I=e[5],b+=(C=t[5])>>>16,O+=65535&I,B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,e[5]=U=65535&O|B<<16,t[5]=Q=65535&a|b<<16,a=65535&(C=Z),b=C>>>16,O=65535&(I=J),B=I>>>16,I=e[6],b+=(C=t[6])>>>16,O+=65535&I,B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,e[6]=J=65535&O|B<<16,t[6]=Z=65535&a|b<<16,a=65535&(C=W),b=C>>>16,O=65535&(I=H),B=I>>>16,I=e[7],b+=(C=t[7])>>>16,O+=65535&I,B+=I>>>16,B+=(O+=(b+=(a+=65535&C)>>>16)>>>16)>>>16,e[7]=H=65535&O|B<<16,t[7]=W=65535&a|b<<16,Y+=128,n-=128;}return n;}function oe(e,t,r){var i,n=new Int32Array(8),o=new Int32Array(8),c=new Uint8Array(256),b=r;for(n[0]=1779033703,n[1]=3144134277,n[2]=1013904242,n[3]=2773480762,n[4]=1359893119,n[5]=2600822924,n[6]=528734635,n[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,ie(n,o,t,r),r%=128,i=0;i=0;--i)se(p,q,b=s[i/8|0]>>(7&i)&1),ae(q,p),ae(p,p),se(p,q,b);}function fe(p,s){var q=[t(),t(),t(),t()];N(q[0],y),N(q[1],v),N(q[2],l),V(q[3],y,v),ce(p,q,s);}function le(e,r,o){var i,c=new Uint8Array(64),p=[t(),t(),t(),t()];for(o||n(r,32),oe(c,r,32),c[0]&=248,c[31]&=127,c[31]|=64,fe(p,c),ue(e,p),i=0;i<32;i++)r[i+32]=e[i];return 0;}var he=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function de(e,t){var r,i,n,o;for(i=63;i>=32;--i){for(r=0,n=i-32,o=i-12;n>4)*he[n],r=t[n]>>8,t[n]&=255;for(n=0;n<32;n++)t[n]-=r*he[n];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,e[i]=255&t[i];}function pe(e){var i,t=new Float64Array(64);for(i=0;i<64;i++)t[i]=e[i];for(i=0;i<64;i++)e[i]=0;de(e,t);}function be(e,r,n,o){var i,c,f=new Uint8Array(64),l=new Uint8Array(64),h=new Uint8Array(64),d=new Float64Array(64),p=[t(),t(),t(),t()];oe(f,o,32),f[0]&=248,f[31]&=127,f[31]|=64;var m=n+64;for(i=0;i>7&&K(e[0],f,e[0]),V(e[3],e[0],e[1]),0);}(q,o))return-1;for(i=0;i=0;},e.sign.keyPair=function(){var e=new Uint8Array(ve),t=new Uint8Array(we);return le(e,t),{publicKey:e,secretKey:t};},e.sign.keyPair.fromSecretKey=function(e){if(Ae(e),e.length!==we)throw new Error("bad secret key size");for(var t=new Uint8Array(ve),i=0;i1?arguments[1]:void 0);};},function(e,t,r){var n=r(265),o=r(156),c=r(44),f=r(28)("species");e.exports=function(e){var t;return n(e)&&(t=e.constructor,(o(t)&&(t===Array||n(t.prototype))||c(t)&&null===(t=t[f]))&&(t=void 0)),void 0===t?Array:t;};},function(e,t,r){"use strict";var n=r(32);e.exports=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){throw 1;},1);});};},function(e,t,r){var n=r(26),o=r(44);e.exports=function(input,e){var t,r;if("string"===e&&n(t=input.toString)&&!o(r=t.call(input)))return r;if(n(t=input.valueOf)&&!o(r=t.call(input)))return r;if("string"!==e&&n(t=input.toString)&&!o(r=t.call(input)))return r;throw TypeError("Can't convert object to primitive value");};},function(e,t,r){var n=r(34),o=r(496).values;n({target:"Object",stat:!0},{values:function(e){return o(e);}});},function(e,t,r){var n=r(31),o=r(26),c=r(163),f=n.WeakMap;e.exports=o(f)&&/native code/.test(c(f));},function(e,t,r){var n=r(39),o=r(271),c=r(78),f=r(46);e.exports=function(e,source){for(var t=o(source),r=f.f,l=c.f,i=0;ii;)r=h[i++],n&&!f.call(l,r)||m.push(e?[r,l[r]]:l[r]);return m;};};e.exports={entries:l(!0),values:l(!1)};},function(e,t,r){var n=r(40),o=r(167).EXISTS,c=r(46).f,f=Function.prototype,l=f.toString,h=/^\s*function ([^ (]*)/;n&&!o&&c(f,"name",{configurable:!0,get:function(){try{return l.call(this).match(h)[1];}catch(e){return"";}}});},function(e,t,r){var n=r(28),o=r(80),c=r(46),f=n("unscopables"),l=Array.prototype;null==l[f]&&c.f(l,f,{configurable:!0,value:o(null)}),e.exports=function(e){l[f][e]=!0;};},function(e,t,r){var n=r(40),o=r(46),c=r(47),f=r(115);e.exports=n?Object.defineProperties:function(e,t){c(e);for(var r,n=f(t),l=n.length,h=0;l>h;)o.f(e,r=n[h++],t[r]);return e;};},function(e,t,r){var n=r(63);e.exports=n("document","documentElement");},function(e,t,r){var n=r(502);e.exports=function(e){if(n(e))throw TypeError("The method doesn't accept regular expressions");return e;};},function(e,t,r){var n=r(44),o=r(89),c=r(28)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[c])?!!t:"RegExp"==o(e));};},function(e,t,r){var n=r(28)("match");e.exports=function(e){var t=/./;try{"/./"[e](t);}catch(r){try{return t[n]=!1,"/./"[e](t);}catch(e){}}return!1;};},function(e,t,r){var n=r(34),o=r(62),c=r(115);n({target:"Object",stat:!0,forced:r(32)(function(){c(1);})},{keys:function(e){return c(o(e));}});},function(e,t,r){"use strict";var n=r(34),o=r(31),c=r(63),f=r(109),l=r(40),h=r(162),d=r(32),m=r(39),y=r(265),v=r(26),w=r(44),_=r(111),A=r(47),M=r(62),E=r(53),S=r(110),T=r(93),x=r(92),k=r(80),I=r(115),C=r(114),O=r(506),B=r(275),R=r(78),P=r(46),F=r(165),L=r(79),N=r(158),D=r(112),j=r(113),U=r(161),J=r(28),H=r(279),z=r(507),G=r(169),K=r(166),V=r(155).forEach,X=D("hidden"),Q="Symbol",Z=J("toPrimitive"),W=K.set,Y=K.getterFor(Q),$=Object.prototype,ee=o.Symbol,te=c("JSON","stringify"),re=R.f,ne=P.f,ie=O.f,oe=F.f,ae=N("symbols"),se=N("op-symbols"),ue=N("string-to-symbol-registry"),ce=N("symbol-to-string-registry"),fe=N("wks"),le=o.QObject,he=!le||!le.prototype||!le.prototype.findChild,de=l&&d(function(){return 7!=k(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a;}})).a;})?function(e,t,r){var n=re($,t);n&&delete $[t],ne(e,t,r),n&&e!==$&&ne($,t,n);}:ne,pe=function(e,t){var symbol=ae[e]=k(ee.prototype);return W(symbol,{type:Q,tag:e,description:t}),l||(symbol.description=t),symbol;},be=function(e,t,r){e===$&&be(se,t,r),A(e);var n=S(t);return A(r),m(ae,n)?(r.enumerable?(m(e,X)&&e[X][n]&&(e[X][n]=!1),r=k(r,{enumerable:x(0,!1)})):(m(e,X)||ne(e,X,x(1,{})),e[X][n]=!0),de(e,n,r)):ne(e,n,r);},me=function(e,t){A(e);var r=E(t),n=I(r).concat(we(r));return V(n,function(t){l&&!ge.call(r,t)||be(e,t,r[t]);}),e;},ge=function(e){var t=S(e),r=oe.call(this,t);return!(this===$&&m(ae,t)&&!m(se,t))&&(!(r||!m(this,t)||!m(ae,t)||m(this,X)&&this[X][t])||r);},ye=function(e,t){var r=E(e),n=S(t);if(r!==$||!m(ae,n)||m(se,n)){var o=re(r,n);return!o||!m(ae,n)||m(r,X)&&r[X][n]||(o.enumerable=!0),o;}},ve=function(e){var t=ie(E(e)),r=[];return V(t,function(e){m(ae,e)||m(j,e)||r.push(e);}),r;},we=function(e){var t=e===$,r=ie(t?se:E(e)),n=[];return V(r,function(e){!m(ae,e)||t&&!m($,e)||n.push(ae[e]);}),n;};(h||(ee=function(){if(this instanceof ee)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?T(arguments[0]):void 0,t=U(e),r=function(e){this===$&&r.call(se,e),m(this,X)&&m(this[X],t)&&(this[X][t]=!1),de(this,t,x(1,e));};return l&&he&&de($,t,{configurable:!0,set:r}),pe(t,e);},L(ee.prototype,"toString",function(){return Y(this).tag;}),L(ee,"withoutSetter",function(e){return pe(U(e),e);}),F.f=ge,P.f=be,R.f=ye,C.f=O.f=ve,B.f=we,H.f=function(e){return pe(J(e),e);},l&&(ne(ee.prototype,"description",{configurable:!0,get:function(){return Y(this).description;}}),f||L($,"propertyIsEnumerable",ge,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!h,sham:!h},{Symbol:ee}),V(I(fe),function(e){z(e);}),n({target:Q,stat:!0,forced:!h},{for:function(e){var t=T(e);if(m(ue,t))return ue[t];var symbol=ee(t);return ue[t]=symbol,ce[symbol]=t,symbol;},keyFor:function(e){if(!_(e))throw TypeError(e+" is not a symbol");if(m(ce,e))return ce[e];},useSetter:function(){he=!0;},useSimple:function(){he=!1;}}),n({target:"Object",stat:!0,forced:!h,sham:!l},{create:function(e,t){return void 0===t?k(e):me(k(e),t);},defineProperty:be,defineProperties:me,getOwnPropertyDescriptor:ye}),n({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:ve,getOwnPropertySymbols:we}),n({target:"Object",stat:!0,forced:d(function(){B.f(1);})},{getOwnPropertySymbols:function(e){return B.f(M(e));}}),te)&&n({target:"JSON",stat:!0,forced:!h||d(function(){var symbol=ee();return"[null]"!=te([symbol])||"{}"!=te({a:symbol})||"{}"!=te(Object(symbol));})},{stringify:function(e,t,r){for(var n,o=[e],c=1;arguments.length>c;)o.push(arguments[c++]);if(n=t,(w(t)||void 0!==e)&&!_(e))return y(t)||(t=function(e,t){if(v(n)&&(t=n.call(this,e,t)),!_(t))return t;}),o[1]=t,te.apply(null,o);}});if(!ee.prototype[Z]){var _e=ee.prototype.valueOf;L(ee.prototype,Z,function(){return _e.apply(this,arguments);});}G(ee,Q),j[X]=!0;},function(e,t,r){var n=r(53),o=r(114).f,c={}.toString,f="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return f&&"[object Window]"==c.call(e)?function(e){try{return o(e);}catch(e){return f.slice();}}(e):o(n(e));};},function(e,t,r){var path=r(508),n=r(39),o=r(279),c=r(46).f;e.exports=function(e){var t=path.Symbol||(path.Symbol={});n(t,e)||c(t,e,{value:o.f(e)});};},function(e,t,r){var n=r(31);e.exports=n;},function(e,t,r){"use strict";var n=r(34),o=r(155).filter;n({target:"Array",proto:!0,forced:!r(280)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0);}});},function(e,t,r){var n=r(34),o=r(32),c=r(53),f=r(78).f,l=r(40),h=o(function(){f(1);});n({target:"Object",stat:!0,forced:!l||h,sham:!l},{getOwnPropertyDescriptor:function(e,t){return f(c(e),t);}});},function(e,t,r){var n=r(34),o=r(40),c=r(271),f=r(53),l=r(78),h=r(170);n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(object){for(var e,t,r=f(object),n=l.f,o=c(r),d={},m=0;o.length>m;)void 0!==(t=n(r,e=o[m++]))&&h(d,e,t);return d;}});},function(e,t,r){"use strict";r.r(t),r.d(t,"getBatches",function(){return c;}),r.d(t,"getBlocksBatches",function(){return f;}),r.d(t,"sleep",function(){return l;}),r.d(t,"isAmount",function(){return d;}),r.d(t,"getOperationChecker",function(){return m;}),r.d(t,"getIsWhitelistedDomain",function(){return y;}),r.d(t,"controlledPromise",function(){return v;});var n=r(22),o=(r(153),r(513),r(514),r(521),r(527),r(277),r(278),r(285),r(286),r(65));function c(e,t){for(var r=[];e.length;)r.push(e.splice(0,t));return r;}function f(e,t,r){var n=t-e,c=Math.ceil(n/r);return Array.from({length:r},function(n,f){var l=e+c*f,h=l+c-o.numbers.ONE;return f+o.numbers.ONE===r&&(h=t),[l>h?h:l,h>t?t:h];});}function l(e){return h.apply(this,arguments);}function h(){return(h=Object(n.a)(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(e){return setTimeout(e,t);});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop();}},e);}))).apply(this,arguments);}function d(e){return e&&Number(e);}function m(e){var t=e.checker,r=e.isRelayer;return e.additionalCondition?t&&!r:t;}function y(){return!!window.location.host.includes("compassionate-payne-b9dc6b.netlify.app")||["localhost:3000","nova.tornadocash.eth","nova.tornadocash.eth.link","nova.tornadocash.eth.limo"].includes(window.location.host);}function v(e){var t,r;return{promise:new Promise(function(n,o){t=o,r=n,e.then(n).catch(o);}),resolve:r,reject:t};}},function(e,t,r){"use strict";var n=r(34),o=r(274),c=r(107),f=r(106),l=r(62),h=r(264),d=r(170),m=r(280)("splice"),y=Math.max,v=Math.min,w=9007199254740991,_="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!m},{splice:function(e,t){var r,n,m,A,M,E,S=l(this),T=f(S.length),x=o(e,T),k=arguments.length;if(0===k?r=n=0:1===k?(r=0,n=T-x):(r=k-2,n=v(y(c(t),0),T-x)),T+r-n>w)throw TypeError(_);for(m=h(S,n),A=0;AT-n+r;A--)delete S[A-1];}else if(r>n)for(A=T-n;A>x;A--)E=A+r-1,(M=A+n-1)in S?S[E]=S[M]:delete S[E];for(A=0;A1?arguments[1]:void 0,_=void 0!==w;_&&(w=n(w,v>2?arguments[2]:void 0,2));var A,M,E,S,T,x,k=y(t),I=0;if(!k||this==Array&&f(k))for(A=h(t.length),M=r?new this(A):Array(A);A>I;I++)x=_?w(t[I],I):t[I],d(M,I,x);else for(T=(S=m(t,k)).next,M=r?new this():[];!(E=T.call(S)).done;I++)x=_?c(S,w,[E.value,I],!0):E.value,d(M,I,x);return M.length=I,M;};},function(e,t,r){var n=r(47),o=r(517);e.exports=function(e,t,r,c){try{return c?t(n(r)[0],r[1]):t(r);}catch(t){o(e,"throw",t);}};},function(e,t,r){var n=r(47),o=r(164);e.exports=function(e,t,r){var c,f;n(e);try{if(!(c=o(e,"return"))){if("throw"===t)throw r;return r;}c=c.call(e);}catch(e){f=!0,c=e;}if("throw"===t)throw r;if(f)throw c;return n(c),r;};},function(e,t,r){var n=r(28),o=r(116),c=n("iterator"),f=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||f[c]===e);};},function(e,t,r){var n=r(105),o=r(47),c=r(281);e.exports=function(e,t){var r=arguments.length<2?c(e):t;if(n(r))return o(r.call(e));throw TypeError(String(e)+" is not iterable");};},function(e,t,r){var n=r(28)("iterator"),o=!1;try{var c=0,f={next:function(){return{done:!!c++};},return:function(){o=!0;}};f[n]=function(){return this;},Array.from(f,function(){throw 2;});}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var r=!1;try{var object={};object[n]=function(){return{next:function(){return{done:r=!0};}};},e(object);}catch(e){}return r;};},function(e,t,r){"use strict";var n=r(522).charAt,o=r(93),c=r(166),f=r(523),l="String Iterator",h=c.set,d=c.getterFor(l);f(String,"String",function(e){h(this,{type:l,string:o(e),index:0});},function(){var e,t=d(this),r=t.string,o=t.index;return o>=r.length?{value:void 0,done:!0}:(e=n(r,o),t.index+=e.length,{value:e,done:!1});});},function(e,t,r){var n=r(107),o=r(93),c=r(90),f=function(e){return function(t,r){var f,l,h=o(c(t)),d=n(r),m=h.length;return d<0||d>=m?e?"":void 0:(f=h.charCodeAt(d))<55296||f>56319||d+1===m||(l=h.charCodeAt(d+1))<56320||l>57343?e?h.charAt(d):f:e?h.slice(d,d+2):l-56320+(f-55296<<10)+65536;};};e.exports={codeAt:f(!1),charAt:f(!0)};},function(e,t,r){"use strict";var n=r(34),o=r(109),c=r(167),f=r(26),l=r(524),h=r(283),d=r(284),m=r(169),y=r(91),v=r(79),w=r(28),_=r(116),A=r(282),M=c.PROPER,E=c.CONFIGURABLE,S=A.IteratorPrototype,T=A.BUGGY_SAFARI_ITERATORS,x=w("iterator"),k="keys",I="values",C="entries",O=function(){return this;};e.exports=function(e,t,r,c,w,A,B){l(r,t,c);var R,P,F,L=function(e){if(e===w&&J)return J;if(!T&&e in j)return j[e];switch(e){case k:case I:case C:return function(){return new r(this,e);};}return function(){return new r(this);};},N=t+" Iterator",D=!1,j=e.prototype,U=j[x]||j["@@iterator"]||w&&j[w],J=!T&&U||L(w),H="Array"==t&&j.entries||U;if(H&&(R=h(H.call(new e())))!==Object.prototype&&R.next&&(o||h(R)===S||(d?d(R,S):f(R[x])||v(R,x,O)),m(R,N,!0,!0),o&&(_[N]=O)),M&&w==I&&U&&U.name!==I&&(!o&&E?y(j,"name",I):(D=!0,J=function(){return U.call(this);})),w)if(P={values:L(I),keys:A?J:L(k),entries:L(C)},B)for(F in P)(T||D||!(F in j))&&v(j,F,P[F]);else n({target:t,proto:!0,forced:T||D},P);return o&&!B||j[x]===J||v(j,x,J,{name:w}),_[t]=J,P;};},function(e,t,r){"use strict";var n=r(282).IteratorPrototype,o=r(80),c=r(92),f=r(169),l=r(116),h=function(){return this;};e.exports=function(e,t,r){var d=t+" Iterator";return e.prototype=o(n,{next:c(1,r)}),f(e,d,!1,!0),l[d]=h,e;};},function(e,t,r){var n=r(32);e.exports=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e())!==e.prototype;});},function(e,t,r){var n=r(26);e.exports=function(e){if("object"==typeof e||n(e))return e;throw TypeError("Can't set "+String(e)+" as a prototype");};},function(e,t,r){"use strict";var n=r(40),o=r(31),c=r(276),f=r(79),l=r(39),h=r(89),d=r(528),m=r(111),y=r(270),v=r(32),w=r(80),_=r(114).f,A=r(78).f,M=r(46).f,E=r(529).trim,S="Number",T=o.Number,x=T.prototype,k=h(w(x))==S,I=function(e){if(m(e))throw TypeError("Cannot convert a Symbol value to a number");var t,r,n,o,c,f,l,code,h=y(e,"number");if("string"==typeof h&&h.length>2)if(43===(t=(h=E(h)).charCodeAt(0))||45===t){if(88===(r=h.charCodeAt(2))||120===r)return NaN;}else if(48===t){switch(h.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+h;}for(f=(c=h.slice(2)).length,l=0;lo)return NaN;return parseInt(c,n);}return+h;};if(c(S,!T(" 0o1")||!T("0b1")||T("+0x1"))){for(var C,O=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof O&&(k?v(function(){x.valueOf.call(r);}):h(r)!=S)?d(new T(I(t)),r,O):I(t);},B=n?_(T):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),R=0;B.length>R;R++)l(T,C=B[R])&&!l(O,C)&&M(O,C,A(T,C));O.prototype=x,x.constructor=O,f(o,S,O);}},function(e,t,r){var n=r(26),o=r(44),c=r(284);e.exports=function(e,t,r){var f,l;return c&&n(f=t.constructor)&&f!==r&&o(l=f.prototype)&&l!==r.prototype&&c(e,l),e;};},function(e,t,r){var n=r(90),o=r(93),c="["+r(530)+"]",f=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),h=function(e){return function(t){var r=o(n(t));return 1&e&&(r=r.replace(f,"")),2&e&&(r=r.replace(l,"")),r;};};e.exports={start:h(1),end:h(2),trim:h(3)};},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff";},function(e,t,r){"use strict";var n=r(157),o=r(108);e.exports=n?{}.toString:function(){return"[object "+o(this)+"]";};},function(e,t,r){var n=r(34),o=r(63),c=r(533),f=r(47),l=r(44),h=r(80),d=r(534),m=r(32),y=o("Reflect","construct"),v=m(function(){function e(){}return!(y(function(){},[],e)instanceof e);}),w=!m(function(){y(function(){});}),_=v||w;n({target:"Reflect",stat:!0,forced:_,sham:_},{construct:function(e,t){c(e),f(t);var r=arguments.length<3?e:c(arguments[2]);if(w&&!v)return y(e,t,r);if(e==r){switch(t.length){case 0:return new e();case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);}var n=[null];return n.push.apply(n,t),new(d.apply(e,n))();}var o=r.prototype,m=h(l(o)?o:Object.prototype),_=Function.apply.call(e,m,t);return l(_)?_:m;}});},function(e,t,r){var n=r(156),o=r(262);e.exports=function(e){if(n(e))return e;throw TypeError(o(e)+" is not a constructor");};},function(e,t,r){"use strict";var n=r(105),o=r(44),c=[].slice,f={},l=function(e,t,r){if(!(t in f)){for(var n=[],i=0;ie>=65&&e<=90||e>=97&&e<=123));}function M(e){if(null==_&&(_="A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(e=>function(e){const output=[];return Array.prototype.forEach.call(Object(v.f)(e),e=>{47===e?(output.push(204),output.push(129)):126===e?(output.push(110),output.push(204),output.push(131)):output.push(e);}),Object(v.h)(output);}(e)),_.forEach((e,t)=>{w[A(e)]=t;}),"0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300"!==n.a.check(e)))throw _=null,new Error("BIP39 Wordlist for es (Spanish) FAILED");}class E extends n.a{constructor(){super("es");}getWord(e){return M(this),_[e];}getWordIndex(e){return M(this),w[A(e)];}}const S=new E();n.a.register(S);let T=null;const x={};function k(e){return n.b.checkNormalize(),Object(v.h)(Array.prototype.filter.call(Object(v.f)(e.normalize("NFD").toLowerCase()),e=>e>=65&&e<=90||e>=97&&e<=123));}function I(e){if(null==T&&(T="AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(e=>function(e){const output=[];return Array.prototype.forEach.call(Object(v.f)(e),e=>{47===e?(output.push(204),output.push(129)):45===e?(output.push(204),output.push(128)):output.push(e);}),Object(v.h)(output);}(e)),T.forEach((e,t)=>{x[k(e)]=t;}),"0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045"!==n.a.check(e)))throw T=null,new Error("BIP39 Wordlist for fr (French) FAILED");}class C extends n.a{constructor(){super("fr");}getWord(e){return I(this),T[e];}getWordIndex(e){return I(this),x[k(e)];}}const O=new C();n.a.register(O);var B=r(0);const data=["AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR","ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR","AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm","ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC","BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD","QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD","IJBEJqXZJ"];let R=null;function P(e){return Object(B.i)(Object(v.f)(e));}function F(e){if(null!==R)return;R=[];const t={};function r(e){let r="";for(let i=0;ib?1:0;}),"0xe3818de38284e3818f"===P(R[442])&&"0xe3818de38283e3818f"===P(R[443])){const e=R[442];R[442]=R[443],R[443]=e;}if("0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600"!==n.a.check(e))throw R=null,new Error("BIP39 Wordlist for ja (Japanese) FAILED");}class L extends n.a{constructor(){super("ja");}getWord(e){return F(this),R[e];}getWordIndex(e){return F(this),R.indexOf(e);}split(e){return n.b.checkNormalize(),e.split(/(?:\u3000| )+/g);}join(e){return e.join(" ");}}const N=new L();n.a.register(N);const D=["OYAa","ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8","ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6","ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv","AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo","AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg","HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb","AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl"];let j=null;function U(e){if(null==j&&(j=[],D.forEach((data,e)=>{e+=4;for(let i=0;i=40?code=code+168-40:code>=19&&(code=code+97-19),Object(v.h)([225,132+(code>>6),128+(63&code)]));j.push(t);}var code;}),j.sort(),"0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a"!==n.a.check(e)))throw j=null,new Error("BIP39 Wordlist for ko (Korean) FAILED");}class J extends n.a{constructor(){super("ko");}getWord(e){return U(this),j[e];}getWordIndex(e){return U(this),j.indexOf(e);}}const H=new J();n.a.register(H);let z=null;function G(e){if(null==z&&(z="AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620"!==n.a.check(e)))throw z=null,new Error("BIP39 Wordlist for it (Italian) FAILED");}class K extends n.a{constructor(){super("it");}getWord(e){return G(this),z[e];}getWordIndex(e){return G(this),z.indexOf(e);}}const V=new K();n.a.register(V);const X="}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN>2),128+W.indexOf(X[3*i+1]),128+W.indexOf(X[3*i+2])];if("zh_tw"===e.locale){for(let i=s%4;i<3;i++)r[i]=W.indexOf("FAZDC6BALcLZCA+GBARCW8wNCcDDZ8LVFBOqqDUiou+M42TFAyERXFb7EjhP+vmBFpFrUpfDV2F7eB+eCltCHJFWLFCED+pWTojEIHFXc3aFn4F68zqjEuKidS1QBVPDEhE7NA4mhMF7oThD49ot3FgtzHFCK0acW1x8DH1EmLoIlrWFBLE+y5+NA3Cx65wJHTaEZVaK1mWAmPGxgYCdxwOjTDIt/faOEhTl1vqNsKtJCOhJWuio2g07KLZEQsFBUpNtwEByBgxFslFheFbiEPvi61msDvApxCzB6rBCzox7joYA5UdDc+Cb4FSgIabpXFAj3bjkmFAxCZE+mD/SFf/0ELecYCt3nLoxC6WEZf2tKDB4oZvrEmqFkKk7BwILA7gtYBpsTq//D4jD0F0wEB9pyQ1BD5Ba0oYHDI+sbDFhvrHXdDHfgFEIJLi5r8qercNFBgFLC4bo5ERJtamWBDFy73KCEb6M8VpmEt330ygCTK58EIIFkYgF84gtGA9Uyh3m68iVrFbWFbcbqiCYHZ9J1jeRPbL8yswhMiDbhEhdNoSwFbZrLT740ABEqgCkO8J1BLd1VhKKR4sD1yUo0z+FF59Mvg71CFbyEhbHSFBKEIKyoQNgQppq9T0KAqePu0ZFGrXOHdKJqkoTFhYvpDNyuuznrN84thJbsCoO6Cu6Xlvntvy0QYuAExQEYtTUBf3CoCqwgGFZ4u1HJFzDVwEy3cjcpV4QvsPaBC3rCGyCF23o4K3pp2gberGgFEJEHo4nHICtyKH2ZqyxhN05KBBJIQlKh/Oujv/DH32VrlqFdIFC7Fz9Ct4kaqFME0UETLprnN9kfy+kFmtQBB0+5CFu0N9Ij8l/VvJDh2oq3hT6EzjTHKFN7ZjZwoTsAZ4Exsko6Fpa6WC+sduz8jyrLpegTv2h1EBeYpLpm2czQW0KoCcS0bCVXCmuWJDBjN1nQNLdF58SFJ0h7i3pC3oEOKy/FjBklL70XvBEEIWp2yZ04xObzAWDDJG7f+DbqBEA7LyiR95j7MDVdDViz2RE5vWlBMv5e4+VfhP3aXNPhvLSynb9O2x4uFBV+3jqu6d5pCG28/sETByvmu/+IJ0L3wb4rj9DNOLBF6XPIODr4L19U9RRofAG6Nxydi8Bki8BhGJbBAJKzbJxkZSlF9Q2Cu8oKqggB9hBArwLLqEBWEtFowy8XK8bEyw9snT+BeyFk1ZCSrdmgfEwFePTgCjELBEnIbjaDDPJm36rG9pztcEzT8dGk23SBhXBB1H4z+OWze0ooFzz8pDBYFvp9j9tvFByf9y4EFdVnz026CGR5qMr7fxMHN8UUdlyJAzlTBDRC28k+L4FB8078ljyD91tUj1ocnTs8vdEf7znbzm+GIjEZnoZE5rnLL700Xc7yHfz05nWxy03vBB9YGHYOWxgMQGBCR24CVYNE1hpfKxN0zKnfJDmmMgMmBWqNbjfSyFCBWSCGCgR8yFXiHyEj+VtD1FB3FpC1zI0kFbzifiKTLm9yq5zFmur+q8FHqjoOBWsBPiDbnCC2ErunV6cJ6TygXFYHYp7MKN9RUlSIS8/xBAGYLzeqUnBF4QbsTuUkUqGs6CaiDWKWjQK9EJkjpkTmNCPYXL"[t++])+(0==i?228:128);}Q[e.locale].push(Object(v.h)(r));}if(n.a.check(e)!==Z[e.locale])throw Q[e.locale]=null,new Error("BIP39 Wordlist for "+e.locale+" (Chinese) FAILED");}class $ extends n.a{constructor(e){super("zh_"+e);}getWord(e){return Y(this),Q[this.locale][e];}getWordIndex(e){return Y(this),Q[this.locale].indexOf(e);}split(e){return(e=e.replace(/(?:\u3000| )+/g,"")).split("");}}const ee=new $("cn");n.a.register(ee),n.a.register(ee,"zh");const te=new $("tw");n.a.register(te);const re={cz:l,en:y,es:S,fr:O,it:V,ja:N,ko:H,zh:ee,zh_cn:ee,zh_tw:te};},function(e,t,r){"use strict";r.r(t),r.d(t,"ExtendedProvider",function(){return M;});r(532);var n=r(22),o=r(13),c=r(14);function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e);},f(e);}function l(e,t,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var base=function(object,e){for(;!Object.prototype.hasOwnProperty.call(object,e)&&null!==(object=f(object)););return object;}(e,t);if(base){var desc=Object.getOwnPropertyDescriptor(base,t);return desc.get?desc.get.call(r):desc.value;}},l(e,t,r||e);}function h(e,p){return h=Object.setPrototypeOf||function(e,p){return e.__proto__=p,e;},h(e,p);}var d=r(291),m=r.n(d);function y(e,t){if(t&&("object"===m()(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}(e);}r(285),r(286),r(153);var v=r(29),w=r(21),_=r(65);function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0;}catch(e){return!1;}}();return function(){var r,n=f(e);if(t){var o=f(this).constructor;r=Reflect.construct(n,arguments,o);}else r=n.apply(this,arguments);return y(this,r);};}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t);}(y,e);var t,r,d,m=A(y);function y(e,t,r){var n;return Object(o.a)(this,y),(n=m.call(this,e,t)).fallbackRpcs=r,n;}return Object(c.a)(y,[{key:"send",value:(d=Object(n.a)(regeneratorRuntime.mark(function e(t,r){var n,o,c=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>2&&void 0!==c[2]?c[2]:0,e.prev=1,e.next=4,l(f(y.prototype),"send",this).call(this,t,r);case 4:return e.abrupt("return",e.sent);case 7:if(e.prev=7,e.t0=e.catch(1),n){e.next=18;break;}return o=3e3,e.next=13,this.sleep(o);case 13:if(!this.fallbackRpcs){e.next=17;break;}return e.next=16,this.fallbackSend(t,r,this.fallbackRpcs);case 16:return e.abrupt("return",e.sent);case 17:return e.abrupt("return",this.send(t,r,++n));case 18:throw e.t0;case 19:case"end":return e.stop();}},e,this,[[1,7]]);})),function(e,t){return d.apply(this,arguments);})},{key:"fallbackSend",value:(r=Object(n.a)(regeneratorRuntime.mark(function e(t,r,n){var o,c,f,l,h=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=function(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t;}return e.result;},o=h.length>3&&void 0!==h[3]?h[3]:0,e.prev=2,f={method:t,params:r,id:this._nextId+_.numbers.ONE,jsonrpc:"2.0"},l=Object(w.b)({url:n[o]},JSON.stringify(f),c).then(function(e){return e;},function(e){throw e;}),e.next=7,l;case 7:return e.abrupt("return",e.sent);case 10:if(e.prev=10,e.t0=e.catch(2),o+=_.numbers.ONE,n[o]){e.next=17;break;}throw e.t0;case 17:return e.next=19,this.fallbackSend(t,r,n,o);case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop();}},e,this,[[2,10]]);})),function(e,t,n){return r.apply(this,arguments);})},{key:"sleep",value:(t=Object(n.a)(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(e){return setTimeout(e,t);});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop();}},e);})),function(e){return t.apply(this,arguments);})}]),y;}(v.ethers.providers.StaticJsonRpcProvider);},function(e,t,r){"use strict";r.r(t),r.d(t,"IndexedDB",function(){return P;});var n=r(12),o=r(22),c=r(13),f=r(14);r(153),r(486),r(493),r(497),r(277),r(278),r(504),r(505),r(509),r(510),r(511);let l,h;const d=new WeakMap(),m=new WeakMap(),y=new WeakMap(),v=new WeakMap(),w=new WeakMap();let _={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return m.get(e);if("objectStoreNames"===t)return e.objectStoreNames||y.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0]);}return E(e[t]);},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function A(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(h||(h=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(S(this),t),E(d.get(this));}:function(...t){return E(e.apply(S(this),t));}:function(t,...r){const n=e.call(S(this),t,...r);return y.set(n,t.sort?t.sort():[t]),E(n);};}function M(e){return"function"==typeof e?A(e):(e instanceof IDBTransaction&&function(e){if(m.has(e))return;const t=new Promise((t,r)=>{const n=()=>{e.removeEventListener("complete",o),e.removeEventListener("error",c),e.removeEventListener("abort",c);},o=()=>{t(),n();},c=()=>{r(e.error||new DOMException("AbortError","AbortError")),n();};e.addEventListener("complete",o),e.addEventListener("error",c),e.addEventListener("abort",c);});m.set(e,t);}(e),object=e,(l||(l=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(e=>object instanceof e)?new Proxy(e,_):e);var object;}function E(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,r)=>{const n=()=>{e.removeEventListener("success",o),e.removeEventListener("error",c);},o=()=>{t(E(e.result)),n();},c=()=>{r(e.error),n();};e.addEventListener("success",o),e.addEventListener("error",c);});return t.then(t=>{t instanceof IDBCursor&&d.set(t,e);}).catch(()=>{}),w.set(t,e),t;}(e);if(v.has(e))return v.get(e);const t=M(e);return t!==e&&(v.set(e,t),w.set(t,e)),t;}const S=e=>w.get(e);function T(e,t,{blocked:r,upgrade:n,blocking:o,terminated:c}={}){const f=indexedDB.open(e,t),l=E(f);return n&&f.addEventListener("upgradeneeded",e=>{n(E(f.result),e.oldVersion,e.newVersion,E(f.transaction));}),r&&f.addEventListener("blocked",()=>r()),l.then(e=>{c&&e.addEventListener("close",()=>c()),o&&e.addEventListener("versionchange",()=>o());}).catch(()=>{}),l;}function x(e,{blocked:t}={}){const r=indexedDB.deleteDatabase(e);return t&&r.addEventListener("blocked",()=>t()),E(r).then(()=>{});}const k=["get","getKey","getAll","getAllKeys","count"],I=["put","add","delete","clear"],C=new Map();function O(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(C.get(t))return C.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=I.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!o&&!k.includes(r))return;const c=async function(e,...t){const c=this.transaction(e,o?"readwrite":"readonly");let f=c.store;return n&&(f=f.index(t.shift())),(await Promise.all([f[r](...t),o&&c.done]))[0];};return C.set(t,c),c;}function B(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable;})),t.push.apply(t,r);}return t;}function R(e){for(var i=1;i({...e,get:(t,r,n)=>O(t,r)||e.get(t,r,n),has:(t,r)=>!!O(t,r)||e.has(t,r)}))(_);var P=function(){function e(t){var r=t.stores,n=t.dbName;Object(c.a)(this,e),this.dbExists=!1,this.isBlocked=!1,this.options={upgrade:function(e){Object.values(e.objectStoreNames).forEach(function(t){e.deleteObjectStore(t);}),r.forEach(function(t){var r=t.name,n=t.keyPath,o=t.indexes,c=e.createObjectStore(r,{keyPath:n,autoIncrement:!0});Array.isArray(o)&&o.forEach(function(e){var t=e.name,r=e.unique,n=void 0!==r&&r;c.createIndex(t,String(t),{unique:n});});});}},this.dbName=n;}var t,r,n,l,h,d,m,y,v,w,_,A;return Object(f.a)(e,[{key:"initDB",value:(A=Object(o.a)(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.dbExists){e.next=3;break;}return e.abrupt("return");case 3:return e.next=5,T(this.dbName,9,this.options);case 5:this.db=e.sent,this.onEventHandler(),this.dbExists=!0,e.next=19;break;case 10:if(e.prev=10,e.t0=e.catch(0),!e.t0.message.includes("A mutation operation was attempted on a database that did not allow mutations.")){e.next=15;break;}return this.isBlocked=!0,e.abrupt("return");case 15:if(!e.t0.message.includes("less than the existing version")){e.next=18;break;}return e.next=18,this.removeExist();case 18:console.error("initDB has error: ".concat(e.t0.message));case 19:case"end":return e.stop();}},e,this,[[0,10]]);})),function(){return A.apply(this,arguments);})},{key:"createTransactions",value:(_=Object(o.a)(regeneratorRuntime.mark(function e(t){var r,data,n,o,c,f;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.storeName,data=t.data,n=t.mode,o=void 0===n?"readwrite":n,e.prev=1,c=this.db.transaction(r,o),!(f=c.objectStore(r)).add){e.next=9;break;}return e.next=7,f.add(data);case 7:return e.next=9,c.done;case 9:e.next=14;break;case 11:throw e.prev=11,e.t0=e.catch(1),new Error("Method createTransactions has error: ".concat(e.t0.message));case 14:case"end":return e.stop();}},e,this,[[1,11]]);})),function(e){return _.apply(this,arguments);})},{key:"createMultipleTransactions",value:function(e){var t=e.storeName,data=e.data,r=e.index,n=e.mode,o=void 0===n?"readwrite":n;try{var c=this.db.transaction(t,o);data.forEach(function(e){e&&c.store&&c.store.put&&c.store.put(R(R({},e),r));});}catch(e){throw new Error("Method createMultipleTransactions has error: ".concat(e.message));}}},{key:"getFromIndex",value:(w=Object(o.a)(regeneratorRuntime.mark(function e(t){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isBlocked){e.next=2;break;}return e.abrupt("return");case 2:return e.prev=2,e.next=5,this.getFromIndexHandler(t);case 5:return r=e.sent,e.abrupt("return",r);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",void 0);case 12:case"end":return e.stop();}},e,this,[[2,9]]);})),function(e){return w.apply(this,arguments);})},{key:"getItem",value:(v=Object(o.a)(regeneratorRuntime.mark(function e(t){var r,n,o,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.storeName,n=t.key,e.prev=1,!this.isBlocked){e.next=4;break;}return e.abrupt("return");case 4:return o=this.db.transaction(r).objectStore(r),e.next=7,o.get(n);case 7:return c=e.sent,e.abrupt("return",c);case 11:throw e.prev=11,e.t0=e.catch(1),new Error("Method getItem has error: ".concat(e.t0.message));case 14:case"end":return e.stop();}},e,this,[[1,11]]);})),function(e){return v.apply(this,arguments);})},{key:"addItem",value:(y=Object(o.a)(regeneratorRuntime.mark(function e(t){var r,data,n,o;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeName,data=t.data,n=t.key,e.prev=1,o=this.db.transaction(r,"readwrite"),e.next=5,o.objectStore(r).get(n);case 5:if(e.sent){e.next=9;break;}return e.next=9,o.objectStore(r).add(data);case 9:e.next=14;break;case 11:throw e.prev=11,e.t0=e.catch(1),new Error("Method addItem has error: ".concat(e.t0.message));case 14:case"end":return e.stop();}},e,this,[[1,11]]);})),function(e){return y.apply(this,arguments);})},{key:"putItem",value:(m=Object(o.a)(regeneratorRuntime.mark(function e(t){var r,data,n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.storeName,data=t.data,e.prev=1,!this.isBlocked){e.next=4;break;}return e.abrupt("return");case 4:return n=this.db.transaction(r,"readwrite"),e.next=7,n.objectStore(r).put(data);case 7:e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(1),new Error("Method putItem has error: ".concat(e.t0.message));case 12:case"end":return e.stop();}},e,this,[[1,9]]);})),function(e){return m.apply(this,arguments);})},{key:"getAll",value:(d=Object(o.a)(regeneratorRuntime.mark(function e(t){var r,n,o,data;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.storeName,e.prev=1,!this.isBlocked&&this.dbExists){e.next=4;break;}return e.abrupt("return",[]);case 4:return n=this.db.transaction(r,"readonly"),o=n.objectStore(r),e.next=8,o.getAll();case 8:return data=e.sent,e.abrupt("return",data);case 12:throw e.prev=12,e.t0=e.catch(1),new Error("Method getAll has error: ".concat(e.t0.message));case 15:case"end":return e.stop();}},e,this,[[1,12]]);})),function(e){return d.apply(this,arguments);})},{key:"clearStore",value:(h=Object(o.a)(regeneratorRuntime.mark(function e(t){var r,n,o,c,f;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.storeName,n=t.mode,o=void 0===n?"readwrite":n,e.prev=1,c=this.db.transaction(r,o),!(f=c.objectStore(r)).clear){e.next=7;break;}return e.next=7,f.clear();case 7:e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(1),new Error("Method clearStore has error: ".concat(e.t0.message));case 12:case"end":return e.stop();}},e,this,[[1,9]]);})),function(e){return h.apply(this,arguments);})},{key:"getAllFromIndex",value:(l=Object(o.a)(regeneratorRuntime.mark(function e(t){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isBlocked){e.next=2;break;}return e.abrupt("return",[]);case 2:return e.prev=2,e.next=5,this.getAllFromIndexHandler(t);case 5:return r=e.sent,e.abrupt("return",r);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",[]);case 12:case"end":return e.stop();}},e,this,[[2,9]]);})),function(e){return l.apply(this,arguments);})},{key:"onEventHandler",value:function(){var e=this;this.db.addEventListener("onupgradeneeded",Object(o.a)(regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.removeExist();case 2:case"end":return t.stop();}},t);})));}},{key:"removeExist",value:(n=Object(o.a)(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x(this.dbName);case 2:return this.dbExists=!1,e.next=5,this.initDB();case 5:case"end":return e.stop();}},e,this);})),function(){return n.apply(this,arguments);})},{key:"getFromIndexHandler",value:(r=Object(o.a)(regeneratorRuntime.mark(function e(t){var r,n,o,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeName,n=t.indexName,o=t.key,e.prev=1,e.next=4,this.db.getFromIndex(r,n,o);case 4:return c=e.sent,e.abrupt("return",c);case 8:throw e.prev=8,e.t0=e.catch(1),new Error("Method getFromIndexHandler has error: ".concat(e.t0.message));case 11:case"end":return e.stop();}},e,this,[[1,8]]);})),function(e){return r.apply(this,arguments);})},{key:"getAllFromIndexHandler",value:(t=Object(o.a)(regeneratorRuntime.mark(function e(t){var r,n,o,c,f;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.storeName,n=t.indexName,o=t.key,c=t.count,e.prev=1,e.next=4,this.db.getAllFromIndex(r,n,o,c);case 4:return f=e.sent,e.abrupt("return",f);case 8:throw e.prev=8,e.t0=e.catch(1),new Error("Method getAllFromIndex has error: ".concat(e.t0.message));case 11:case"end":return e.stop();}},e,this,[[1,8]]);})),function(e){return t.apply(this,arguments);})}]),e;}();},function(e,t,r){"use strict";r.d(t,"a",function(){return c;});var n=r(0),o=r(293);function c(e,t,r,c,f){let l;e=Object(n.a)(e),t=Object(n.a)(t);let h=1;const d=new Uint8Array(c),m=new Uint8Array(t.length+4);let y,v;m.set(t);for(let i=1;i<=h;i++){m[t.length]=i>>24&255,m[t.length+1]=i>>16&255,m[t.length+2]=i>>8&255,m[t.length+3]=255&i;let w=Object(n.a)(Object(o.a)(f,e,m));l||(l=w.length,v=new Uint8Array(l),h=Math.ceil(c/l),y=c-(h-1)*l),v.set(w);for(let t=1;t256||t[2]&&t[2]!==String(n))&&v.throwArgumentError("invalid numeric width","type",e);const f=E.mask(r?n-1:n),l=r?f.add(M).mul(_):A;return function(t){const r=o.a.from(t);return(r.lt(l)||r.gt(f))&&v.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),Object(c.h)(r.toTwos(256).toHexString(),32);};}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&v.throwArgumentError("invalid bytes width","type",e),function(t){return Object(c.a)(t).length!==r&&v.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=Object(c.a)(e),r=t.length%32;return r?Object(c.c)([t,w.slice(r)]):Object(c.i)(t);}(t);};}}switch(e){case"address":return function(e){return Object(c.h)(Object(n.a)(e),32);};case"bool":return function(e){return e?S:T;};case"bytes":return function(e){return Object(f.a)(e);};case"string":return function(e){return Object(m.a)(e);};}return null;}function B(e,t){return`${e}(${t.map(({name:e,type:t})=>t+" "+e).join(",")})`;}class R{constructor(e){Object(l.d)(this,"types",Object.freeze(Object(l.c)(e))),Object(l.d)(this,"_encoderCache",{}),Object(l.d)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach(e=>{t[e]={},r[e]=[],n[e]={};});for(const n in e){const o={};e[n].forEach(c=>{o[c.name]&&v.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(n)}`,"types",e),o[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===n&&v.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e);O(f)||(r[f]||v.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),r[f].push(n),t[n][f]=!0);});}const o=Object.keys(r).filter(e=>0===r[e].length);0===o.length?v.throwArgumentError("missing primary type","types",e):o.length>1&&v.throwArgumentError(`ambiguous primary types or unused types: ${o.map(e=>JSON.stringify(e)).join(", ")}`,"types",e),Object(l.d)(this,"primaryType",o[0]),function o(c,f){f[c]&&v.throwArgumentError(`circular type reference to ${JSON.stringify(c)}`,"types",e),f[c]=!0,Object.keys(t[c]).forEach(e=>{r[e]&&(o(e,f),Object.keys(f).forEach(t=>{n[t][e]=!0;}));}),delete f[c];}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=B(t,e[t])+r.map(t=>B(t,e[t])).join("");}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t;}_getEncoder(e){{const t=O(e);if(t)return t;}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let o=t.map(r);return this._types[e]&&(o=o.map(f.a)),Object(f.a)(Object(c.c)(o));};}const r=this.types[e];if(r){const t=Object(m.a)(this._types[e]);return e=>{const n=r.map(({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?Object(f.a)(n):n;});return n.unshift(t),Object(c.c)(n);};}return v.throwArgumentError(`unknown type: ${e}`,"type",e);}encodeType(e){const t=this._types[e];return t||v.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t;}encodeData(e,t){return this.getEncoder(e)(t);}hashStruct(e,t){return Object(f.a)(this.encodeData(e,t));}encode(e){return this.encodeData(this.primaryType,e);}hash(e){return this.hashStruct(this.primaryType,e);}_visit(e,t,r){if(O(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],o=parseInt(n[3]);return o>=0&&t.length!==o&&v.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(t=>this._visit(e,t,r));}const o=this.types[e];return o?o.reduce((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e),{}):v.throwArgumentError(`unknown type: ${e}`,"type",e);}visit(e,t){return this._visit(this.primaryType,e,t);}static from(e){return new R(e);}static getPrimaryType(e){return R.from(e).primaryType;}static hashStruct(e,t,r){return R.from(t).hashStruct(e,r);}static hashDomain(e){const t=[];for(const r in e){const n=x[r];n||v.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n});}return t.sort((a,b)=>k.indexOf(a.name)-k.indexOf(b.name)),R.hashStruct("EIP712Domain",{EIP712Domain:t},e);}static encode(e,t,r){return Object(c.c)(["0x1901",R.hashDomain(e),R.from(t).hash(r)]);}static hash(e,t,r){return Object(f.a)(R.encode(e,t,r));}static resolveNames(e,t,r,n){return y(this,void 0,void 0,function*(){e=Object(l.g)(e);const o={};e.verifyingContract&&!Object(c.l)(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const f=R.from(t);f.visit(r,(e,t)=>("address"!==e||Object(c.l)(t,20)||(o[t]="0x"),t));for(const e in o)o[e]=yield n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=f.visit(r,(e,t)=>"address"===e&&o[t]?o[t]:t),{domain:e,value:r};});}static getPayload(e,t,r){R.hashDomain(e);const n={},f=[];k.forEach(t=>{const r=e[t];null!=r&&(n[t]=C[t](r),f.push({name:t,type:x[t]}));});const h=R.from(t),d=Object(l.g)(t);return d.EIP712Domain?v.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):d.EIP712Domain=f,h.encode(r),{types:d,domain:n,primaryType:h.primaryType,message:h.visit(r,(e,t)=>{if(e.match(/^bytes(\d*)/))return Object(c.i)(Object(c.a)(t));if(e.match(/^u?int/))return o.a.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&v.throwArgumentError("invalid string","value",t),t;}return v.throwArgumentError("unsupported type","type",e);})};}}},function(e,t,r){"use strict";r.d(t,"a",function(){return v;}),r.d(t,"b",function(){return w;});var n=r(0),o=r(292),c=r(30),f=r(7),l=r(2),h=r(119);const d=new l.b(h.a),m=new Uint8Array(32);m.fill(0);const y=new RegExp("^((.*)\\.)?([^.]+)$");function v(e){try{const t=e.split(".");for(let i=0;i0;i--){const t=Math.floor(Math.random()*(i+1)),r=e[i];e[i]=e[t],e[t]=r;}return e;}r.d(t,"a",function(){return n;});}]); diff --git a/static/nullifier.worker.js b/static/nullifier.worker.js deleted file mode 100644 index f24c5d2..0000000 --- a/static/nullifier.worker.js +++ /dev/null @@ -1 +0,0 @@ -/*! For license information please see ../LICENSES */!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports;}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n});},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t];}.bind(null,o));return n;},r.n=function(e){var t=e&&e.__esModule?function(){return e.default;}:function(){return e;};return r.d(t,"a",t),t;},r.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e);},r.p="/_nuxt/",r(r.s=146);}([function(e,t,r){"use strict";r.d(t,"k",function(){return l;}),r.d(t,"j",function(){return d;}),r.d(t,"a",function(){return f;}),r.d(t,"b",function(){return h;}),r.d(t,"o",function(){return m;}),r.d(t,"p",function(){return y;}),r.d(t,"l",function(){return v;}),r.d(t,"i",function(){return w;}),r.d(t,"d",function(){return A;}),r.d(t,"e",function(){return E;}),r.d(t,"c",function(){return S;}),r.d(t,"g",function(){return O;}),r.d(t,"f",function(){return _;}),r.d(t,"h",function(){return M;}),r.d(t,"n",function(){return k;}),r.d(t,"m",function(){return C;});const n=new(r(2).b)("bytes/5.4.0");function o(e){return!!e.toHexString;}function c(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return c(new Uint8Array(Array.prototype.slice.apply(e,t)));}),e;}function l(e){return v(e)&&!(e.length%2)||d(e);}function d(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(null==e.length)return!1;for(let i=0;i=256||t%1)return!1;}return!0;}function f(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),c(new Uint8Array(t));}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),v(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0x0"+r.substring(2):"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const o=[];for(let i=0;if(e)),r=t.reduce((e,t)=>e+t.length,0),n=new Uint8Array(r);return t.reduce((e,object)=>(n.set(object,e),e+object.length),0),c(n);}function m(e){let t=f(e);if(0===t.length)return t;let r=0;for(;rt&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),c(r);}function v(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t);}const T="0123456789abcdef";function w(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=T[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00";}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(v(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(d(e)){let t="0x";for(let i=0;i>4]+T[15&r];}return t;}return n.throwArgumentError("invalid hexlify value","value",e);}function A(data){if("string"!=typeof data)data=w(data);else if(!v(data)||data.length%2)return null;return(data.length-2)/2;}function E(data,e,t){return"string"!=typeof data?data=w(data):(!v(data)||data.length%2)&&n.throwArgumentError("invalid hexData","value",data),e=2+2*e,null!=t?"0x"+data.substring(e,2+2*t):"0x"+data.substring(e);}function S(e){let t="0x";return e.forEach(e=>{t+=w(e).substring(2);}),t;}function O(e){const t=_(w(e,{hexPad:"left"}));return"0x"===t?"0x0":t;}function _(e){"string"!=typeof e&&(e=w(e)),v(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e;}function k(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0};if(l(e)){const r=f(e);65!==r.length&&n.throwArgumentError("invalid signature string; must be 65 bytes","signature",e),t.r=w(r.slice(0,32)),t.s=w(r.slice(32,64)),t.v=r[64],t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=w(r.slice(32,64));}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=y(f(t._vs),32);t._vs=w(r);const o=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const s=w(r);null==t.s?t.s=s:t.s!==s&&n.throwArgumentError("signature v mismatch _vs","signature",e);}null==t.recoveryParam?null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2:null==t.v?t.v=27+t.recoveryParam:t.recoveryParam!==1-t.v%2&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e),null!=t.r&&v(t.r)?t.r=M(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&v(t.s)?t.s=M(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=f(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const o=w(r);t._vs&&(v(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=M(t._vs,32)),null==t._vs?t._vs=o:t._vs!==o&&n.throwArgumentError("signature _vs mismatch v and s","signature",e);}return t;}function C(e){return w(h([(e=k(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]));}},function(e,t,r){"use strict";r.d(t,"d",function(){return l;}),r.d(t,"e",function(){return d;}),r.d(t,"f",function(){return f;}),r.d(t,"b",function(){return h;}),r.d(t,"g",function(){return m;}),r.d(t,"c",function(){return w;}),r.d(t,"a",function(){return A;});var n=r(2);var o=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function l(e){try{f(n.next(e));}catch(e){c(e);}}function d(e){try{f(n.throw(e));}catch(e){c(e);}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(l,d);}f((n=n.apply(e,t||[])).next());});};const c=new n.b("properties/5.4.1");function l(object,e,t){Object.defineProperty(object,e,{enumerable:!0,value:t,writable:!1});}function d(e,t){for(let i=0;i<32;i++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor;}return null;}function f(object){return o(this,void 0,void 0,function*(){const e=Object.keys(object).map(e=>{const t=object[e];return Promise.resolve(t).then(t=>({key:e,value:t}));});return(yield Promise.all(e)).reduce((e,t)=>(e[t.key]=t.value,e),{});});}function h(object,e){object&&"object"==typeof object||c.throwArgumentError("invalid object","object",object),Object.keys(object).forEach(t=>{e[t]||c.throwArgumentError("invalid object key - "+t,"transaction:"+t,object);});}function m(object){const e={};for(const t in object)e[t]=object[t];return e;}const y={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function v(object){if(null==object||y[typeof object])return!0;if(Array.isArray(object)||"object"==typeof object){if(!Object.isFrozen(object))return!1;const e=Object.keys(object);for(let i=0;iw(e)));if("object"==typeof object){const e={};for(const t in object){const r=object[t];void 0!==r&&l(e,t,w(r));}return e;}return c.throwArgumentError("Cannot deepCopy "+typeof object,"object",object);}function w(object){return T(object);}class A{constructor(e){for(const t in e)this[t]=w(e[t]);}}},function(e,t,r){"use strict";r.d(t,"a",function(){return m;}),r.d(t,"b",function(){return v;});let n=!1,o=!1;const c={debug:1,default:2,info:2,warning:3,error:4,off:5};let l=c.default,d=null;const f=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(form=>{try{if("test"!=="test".normalize(form))throw new Error("bad normalize");}catch(t){e.push(form);}}),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation");}catch(e){return e.message;}return null;}();var h,m;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF";}(h||(h={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED";}(m||(m={}));const y="0123456789abcdef";class v{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1});}_log(e,t){const r=e.toLowerCase();null==c[r]&&this.throwArgumentError("invalid log level name","logLevel",e),l>c[r]||console.log.apply(console,t);}debug(...e){this._log(v.levels.DEBUG,e);}info(...e){this._log(v.levels.INFO,e);}warn(...e){this._log(v.levels.WARNING,e);}makeError(e,code,t){if(o)return this.makeError("censored error",code,{});code||(code=v.errors.UNKNOWN_ERROR),t||(t={});const r=[];Object.keys(t).forEach(e=>{const n=t[e];try{if(n instanceof Uint8Array){let t="";for(let i=0;i>4],t+=y[15&n[i]];r.push(e+"=Uint8Array(0x"+t+")");}else r.push(e+"="+JSON.stringify(n));}catch(n){r.push(e+"="+JSON.stringify(t[e].toString()));}}),r.push(`code=${code}`),r.push(`version=${this.version}`);const n=e;r.length&&(e+=" ("+r.join(", ")+")");const c=new Error(e);return c.reason=n,c.code=code,Object.keys(t).forEach(function(e){c[e]=t[e];}),c;}throwError(e,code,t){throw this.makeError(e,code,t);}throwArgumentError(e,t,r){return this.throwError(e,v.errors.INVALID_ARGUMENT,{argument:t,value:r});}assert(e,t,code,r){e||this.throwError(t,code,r);}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n);}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),f&&this.throwError("platform missing String.prototype.normalize",v.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f});}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,v.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,v.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}));}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,v.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t});}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",v.errors.MISSING_NEW,{name:t.name});}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",v.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",v.errors.MISSING_NEW,{name:t.name});}static globalLogger(){return d||(d=new v("logger/5.4.1")),d;}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",v.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",v.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"});}o=!!e,n=!!t;}static setLogLevel(e){const t=c[e.toLowerCase()];null!=t?l=t:v.globalLogger().warn("invalid log level - "+e);}static from(e){return new v(e);}}v.errors=m,v.levels=h;},function(e,t,r){"use strict";r.d(t,"a",function(){return T;}),r.d(t,"e",function(){return w;}),r.d(t,"d",function(){return A;}),r.d(t,"b",function(){return E;}),r.d(t,"c",function(){return S;});var n=r(0),o=r(12),c=r(5),l=r(28);const d=new(r(2).b)("address/5.4.0");function f(address){Object(n.l)(address,20)||d.throwArgumentError("invalid address","address",address);const e=(address=address.toLowerCase()).substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);const r=Object(n.a)(Object(c.a)(t));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(15&r[i>>1])>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("");}const h={};for(let i=0;i<10;i++)h[String(i)]=String(i);for(let i=0;i<26;i++)h[String.fromCharCode(65+i)]=String(10+i);const m=Math.floor((y=9007199254740991,Math.log10?Math.log10(y):Math.log(y)/Math.LN10));var y;function v(address){let e=(address=(address=address.toUpperCase()).substring(4)+address.substring(0,2)+"00").split("").map(e=>h[e]).join("");for(;e.length>=m;){let t=e.substring(0,m);e=parseInt(t,10)%97+e.substring(t.length);}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t;}function T(address){let e=null;if("string"!=typeof address&&d.throwArgumentError("invalid address","address",address),address.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==address.substring(0,2)&&(address="0x"+address),e=f(address),address.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==address&&d.throwArgumentError("bad address checksum","address",address);else if(address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(address.substring(2,4)!==v(address)&&d.throwArgumentError("bad icap checksum","address",address),e=Object(o.c)(address.substring(4));e.length<40;)e="0"+e;e=f("0x"+e);}else d.throwArgumentError("invalid address","address",address);return e;}function w(address){try{return T(address),!0;}catch(e){}return!1;}function A(address){let e=Object(o.b)(T(address).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+v("XE00"+e)+e;}function E(e){let t=null;try{t=T(e.from);}catch(t){d.throwArgumentError("missing from address","transaction",e);}const r=Object(n.o)(Object(n.a)(o.a.from(e.nonce).toHexString()));return T(Object(n.e)(Object(c.a)(Object(l.encode)([t,r])),12));}function S(e,t,r){return 32!==Object(n.d)(t)&&d.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(n.d)(r)&&d.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),T(Object(n.e)(Object(c.a)(Object(n.b)(["0xff",T(e),t,r])),12));}},function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed");}function o(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r(),e.prototype.constructor=e;}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"));}var l;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(149).Buffer;}catch(e){}function d(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15;}function f(e,t,r){var n=d(e,r);return r-1>=t&&(n|=d(e,r-1)<<4),n;}function h(e,t,r,n){for(var o=0,c=Math.min(e.length,r),i=t;i=49?l-49+10:l>=17?l-17+10:l;}return o;}c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words);},c.max=function(e,t){return e.cmp(t)>0?e:t;},c.min=function(e,t){return e.cmp(t)<0?e:t;},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),n(base===(0|base)&&base>=2&&base<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[r]|=o<>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);else if("le"===t)for(i=0,r=0;i>>26-c&67108863,(c+=24)>=26&&(c-=26,r++);return this.strip();},c.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i=t;i-=2)n=f(e,t,i)<=18?(o-=18,c+=1,this.words[c]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(o-=18,c+=1,this.words[c]|=n>>>26):o+=8;this.strip();},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=base)r++;r--,n=n/base|0;for(var o=e.length-t,c=o%r,l=Math.min(o,o-c)+t,d=0,i=t;i1&&0===this.words[this.length-1];)this.length--;return this._normSign();},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this;},c.prototype.inspect=function(){return(this.red?"";};var m=["","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"],y=[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],v=[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];function T(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;r.words[0]=c;for(var d=1;d>>26,h=67108863&l,m=Math.min(d,t.length-1),y=Math.max(0,d-e.length+1);y<=m;y++){var i=d-y|0;f+=(o=(a=0|e.words[i])*(b=0|t.words[y])+h)/67108864|0,h=67108863&o;}r.words[d]=0|h,l=0|f;}return 0!==l?r.words[d]=0|l:r.length--,r.strip();}c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var r=0,o=0,i=0;i>>24-r&16777215)||i!==this.length-1?m[6-l.length]+l+t:l+t,(r+=2)>=26&&(r-=26,i--);}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}if(base===(0|base)&&base>=2&&base<=36){var d=y[base],f=v[base];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var T=h.modn(f).toString(base);t=(h=h.idivn(f)).isZero()?T+t:m[d-T.length]+T+t;}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t;}n(!1,"Base should be between 2 and 36");},c.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e;},c.prototype.toJSON=function(){return this.toString(16);},c.prototype.toBuffer=function(e,t){return n(void 0!==l),this.toArrayLike(l,e,t);},c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t);},c.prototype.toArrayLike=function(e,t,r){var o=this.byteLength(),c=r||Math.max(1,o);n(o<=c,"byte array longer than desired length"),n(c>0,"Requested array length <= 0"),this.strip();var b,i,l="le"===t,d=new e(c),q=this.clone();if(l){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),d[i]=b;for(;i=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t;},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r;},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t;},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;ie.length?this.clone().ior(e):e.clone().ior(this);},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this);},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this);},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this);},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this);},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this);},c.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip();},c.prototype.notn=function(e){return this.clone().inotn(e);},c.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=a.length,0!==r)this.words[this.length]=r,this.length++;else if(a!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this);},c.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 a,b,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==n&&i>26,this.words[i]=67108863&t;if(0===n&&i>>13,y=0|a[1],v=8191&y,T=y>>>13,w=0|a[2],A=8191&w,E=w>>>13,S=0|a[3],O=8191&S,_=S>>>13,M=0|a[4],k=8191&M,C=M>>>13,P=0|a[5],F=8191&P,L=P>>>13,R=0|a[6],B=8191&R,N=R>>>13,x=0|a[7],j=8191&x,I=x>>>13,J=0|a[8],D=8191&J,X=J>>>13,G=0|a[9],H=8191&G,U=G>>>13,V=0|b[0],z=8191&V,Z=V>>>13,K=0|b[1],Q=8191&K,W=K>>>13,Y=0|b[2],$=8191&Y,ee=Y>>>13,te=0|b[3],re=8191&te,ne=te>>>13,ie=0|b[4],ae=8191&ie,oe=ie>>>13,se=0|b[5],ue=8191&se,ce=se>>>13,le=0|b[6],de=8191&le,fe=le>>>13,he=0|b[7],pe=8191&he,me=he>>>13,ye=0|b[8],ge=8191&ye,be=ye>>>13,ve=0|b[9],Te=8191&ve,we=ve>>>13;r.negative=e.negative^t.negative,r.length=19;var Ae=(d+(n=Math.imul(h,z))|0)+((8191&(o=(o=Math.imul(h,Z))+Math.imul(m,z)|0))<<13)|0;d=((c=Math.imul(m,Z))+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(v,z),o=(o=Math.imul(v,Z))+Math.imul(T,z)|0,c=Math.imul(T,Z);var Ee=(d+(n=n+Math.imul(h,Q)|0)|0)+((8191&(o=(o=o+Math.imul(h,W)|0)+Math.imul(m,Q)|0))<<13)|0;d=((c=c+Math.imul(m,W)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(A,z),o=(o=Math.imul(A,Z))+Math.imul(E,z)|0,c=Math.imul(E,Z),n=n+Math.imul(v,Q)|0,o=(o=o+Math.imul(v,W)|0)+Math.imul(T,Q)|0,c=c+Math.imul(T,W)|0;var Se=(d+(n=n+Math.imul(h,$)|0)|0)+((8191&(o=(o=o+Math.imul(h,ee)|0)+Math.imul(m,$)|0))<<13)|0;d=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(O,z),o=(o=Math.imul(O,Z))+Math.imul(_,z)|0,c=Math.imul(_,Z),n=n+Math.imul(A,Q)|0,o=(o=o+Math.imul(A,W)|0)+Math.imul(E,Q)|0,c=c+Math.imul(E,W)|0,n=n+Math.imul(v,$)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(T,$)|0,c=c+Math.imul(T,ee)|0;var Oe=(d+(n=n+Math.imul(h,re)|0)|0)+((8191&(o=(o=o+Math.imul(h,ne)|0)+Math.imul(m,re)|0))<<13)|0;d=((c=c+Math.imul(m,ne)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(k,z),o=(o=Math.imul(k,Z))+Math.imul(C,z)|0,c=Math.imul(C,Z),n=n+Math.imul(O,Q)|0,o=(o=o+Math.imul(O,W)|0)+Math.imul(_,Q)|0,c=c+Math.imul(_,W)|0,n=n+Math.imul(A,$)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(E,$)|0,c=c+Math.imul(E,ee)|0,n=n+Math.imul(v,re)|0,o=(o=o+Math.imul(v,ne)|0)+Math.imul(T,re)|0,c=c+Math.imul(T,ne)|0;var _e=(d+(n=n+Math.imul(h,ae)|0)|0)+((8191&(o=(o=o+Math.imul(h,oe)|0)+Math.imul(m,ae)|0))<<13)|0;d=((c=c+Math.imul(m,oe)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(F,z),o=(o=Math.imul(F,Z))+Math.imul(L,z)|0,c=Math.imul(L,Z),n=n+Math.imul(k,Q)|0,o=(o=o+Math.imul(k,W)|0)+Math.imul(C,Q)|0,c=c+Math.imul(C,W)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(_,$)|0,c=c+Math.imul(_,ee)|0,n=n+Math.imul(A,re)|0,o=(o=o+Math.imul(A,ne)|0)+Math.imul(E,re)|0,c=c+Math.imul(E,ne)|0,n=n+Math.imul(v,ae)|0,o=(o=o+Math.imul(v,oe)|0)+Math.imul(T,ae)|0,c=c+Math.imul(T,oe)|0;var Me=(d+(n=n+Math.imul(h,ue)|0)|0)+((8191&(o=(o=o+Math.imul(h,ce)|0)+Math.imul(m,ue)|0))<<13)|0;d=((c=c+Math.imul(m,ce)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,z),o=(o=Math.imul(B,Z))+Math.imul(N,z)|0,c=Math.imul(N,Z),n=n+Math.imul(F,Q)|0,o=(o=o+Math.imul(F,W)|0)+Math.imul(L,Q)|0,c=c+Math.imul(L,W)|0,n=n+Math.imul(k,$)|0,o=(o=o+Math.imul(k,ee)|0)+Math.imul(C,$)|0,c=c+Math.imul(C,ee)|0,n=n+Math.imul(O,re)|0,o=(o=o+Math.imul(O,ne)|0)+Math.imul(_,re)|0,c=c+Math.imul(_,ne)|0,n=n+Math.imul(A,ae)|0,o=(o=o+Math.imul(A,oe)|0)+Math.imul(E,ae)|0,c=c+Math.imul(E,oe)|0,n=n+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(T,ue)|0,c=c+Math.imul(T,ce)|0;var ke=(d+(n=n+Math.imul(h,de)|0)|0)+((8191&(o=(o=o+Math.imul(h,fe)|0)+Math.imul(m,de)|0))<<13)|0;d=((c=c+Math.imul(m,fe)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,z),o=(o=Math.imul(j,Z))+Math.imul(I,z)|0,c=Math.imul(I,Z),n=n+Math.imul(B,Q)|0,o=(o=o+Math.imul(B,W)|0)+Math.imul(N,Q)|0,c=c+Math.imul(N,W)|0,n=n+Math.imul(F,$)|0,o=(o=o+Math.imul(F,ee)|0)+Math.imul(L,$)|0,c=c+Math.imul(L,ee)|0,n=n+Math.imul(k,re)|0,o=(o=o+Math.imul(k,ne)|0)+Math.imul(C,re)|0,c=c+Math.imul(C,ne)|0,n=n+Math.imul(O,ae)|0,o=(o=o+Math.imul(O,oe)|0)+Math.imul(_,ae)|0,c=c+Math.imul(_,oe)|0,n=n+Math.imul(A,ue)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(E,ue)|0,c=c+Math.imul(E,ce)|0,n=n+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(T,de)|0,c=c+Math.imul(T,fe)|0;var Ce=(d+(n=n+Math.imul(h,pe)|0)|0)+((8191&(o=(o=o+Math.imul(h,me)|0)+Math.imul(m,pe)|0))<<13)|0;d=((c=c+Math.imul(m,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(D,z),o=(o=Math.imul(D,Z))+Math.imul(X,z)|0,c=Math.imul(X,Z),n=n+Math.imul(j,Q)|0,o=(o=o+Math.imul(j,W)|0)+Math.imul(I,Q)|0,c=c+Math.imul(I,W)|0,n=n+Math.imul(B,$)|0,o=(o=o+Math.imul(B,ee)|0)+Math.imul(N,$)|0,c=c+Math.imul(N,ee)|0,n=n+Math.imul(F,re)|0,o=(o=o+Math.imul(F,ne)|0)+Math.imul(L,re)|0,c=c+Math.imul(L,ne)|0,n=n+Math.imul(k,ae)|0,o=(o=o+Math.imul(k,oe)|0)+Math.imul(C,ae)|0,c=c+Math.imul(C,oe)|0,n=n+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,ce)|0)+Math.imul(_,ue)|0,c=c+Math.imul(_,ce)|0,n=n+Math.imul(A,de)|0,o=(o=o+Math.imul(A,fe)|0)+Math.imul(E,de)|0,c=c+Math.imul(E,fe)|0,n=n+Math.imul(v,pe)|0,o=(o=o+Math.imul(v,me)|0)+Math.imul(T,pe)|0,c=c+Math.imul(T,me)|0;var Pe=(d+(n=n+Math.imul(h,ge)|0)|0)+((8191&(o=(o=o+Math.imul(h,be)|0)+Math.imul(m,ge)|0))<<13)|0;d=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(H,z),o=(o=Math.imul(H,Z))+Math.imul(U,z)|0,c=Math.imul(U,Z),n=n+Math.imul(D,Q)|0,o=(o=o+Math.imul(D,W)|0)+Math.imul(X,Q)|0,c=c+Math.imul(X,W)|0,n=n+Math.imul(j,$)|0,o=(o=o+Math.imul(j,ee)|0)+Math.imul(I,$)|0,c=c+Math.imul(I,ee)|0,n=n+Math.imul(B,re)|0,o=(o=o+Math.imul(B,ne)|0)+Math.imul(N,re)|0,c=c+Math.imul(N,ne)|0,n=n+Math.imul(F,ae)|0,o=(o=o+Math.imul(F,oe)|0)+Math.imul(L,ae)|0,c=c+Math.imul(L,oe)|0,n=n+Math.imul(k,ue)|0,o=(o=o+Math.imul(k,ce)|0)+Math.imul(C,ue)|0,c=c+Math.imul(C,ce)|0,n=n+Math.imul(O,de)|0,o=(o=o+Math.imul(O,fe)|0)+Math.imul(_,de)|0,c=c+Math.imul(_,fe)|0,n=n+Math.imul(A,pe)|0,o=(o=o+Math.imul(A,me)|0)+Math.imul(E,pe)|0,c=c+Math.imul(E,me)|0,n=n+Math.imul(v,ge)|0,o=(o=o+Math.imul(v,be)|0)+Math.imul(T,ge)|0,c=c+Math.imul(T,be)|0;var Fe=(d+(n=n+Math.imul(h,Te)|0)|0)+((8191&(o=(o=o+Math.imul(h,we)|0)+Math.imul(m,Te)|0))<<13)|0;d=((c=c+Math.imul(m,we)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(H,Q),o=(o=Math.imul(H,W))+Math.imul(U,Q)|0,c=Math.imul(U,W),n=n+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(X,$)|0,c=c+Math.imul(X,ee)|0,n=n+Math.imul(j,re)|0,o=(o=o+Math.imul(j,ne)|0)+Math.imul(I,re)|0,c=c+Math.imul(I,ne)|0,n=n+Math.imul(B,ae)|0,o=(o=o+Math.imul(B,oe)|0)+Math.imul(N,ae)|0,c=c+Math.imul(N,oe)|0,n=n+Math.imul(F,ue)|0,o=(o=o+Math.imul(F,ce)|0)+Math.imul(L,ue)|0,c=c+Math.imul(L,ce)|0,n=n+Math.imul(k,de)|0,o=(o=o+Math.imul(k,fe)|0)+Math.imul(C,de)|0,c=c+Math.imul(C,fe)|0,n=n+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,me)|0)+Math.imul(_,pe)|0,c=c+Math.imul(_,me)|0,n=n+Math.imul(A,ge)|0,o=(o=o+Math.imul(A,be)|0)+Math.imul(E,ge)|0,c=c+Math.imul(E,be)|0;var Le=(d+(n=n+Math.imul(v,Te)|0)|0)+((8191&(o=(o=o+Math.imul(v,we)|0)+Math.imul(T,Te)|0))<<13)|0;d=((c=c+Math.imul(T,we)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,n=Math.imul(H,$),o=(o=Math.imul(H,ee))+Math.imul(U,$)|0,c=Math.imul(U,ee),n=n+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ne)|0)+Math.imul(X,re)|0,c=c+Math.imul(X,ne)|0,n=n+Math.imul(j,ae)|0,o=(o=o+Math.imul(j,oe)|0)+Math.imul(I,ae)|0,c=c+Math.imul(I,oe)|0,n=n+Math.imul(B,ue)|0,o=(o=o+Math.imul(B,ce)|0)+Math.imul(N,ue)|0,c=c+Math.imul(N,ce)|0,n=n+Math.imul(F,de)|0,o=(o=o+Math.imul(F,fe)|0)+Math.imul(L,de)|0,c=c+Math.imul(L,fe)|0,n=n+Math.imul(k,pe)|0,o=(o=o+Math.imul(k,me)|0)+Math.imul(C,pe)|0,c=c+Math.imul(C,me)|0,n=n+Math.imul(O,ge)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(_,ge)|0,c=c+Math.imul(_,be)|0;var Re=(d+(n=n+Math.imul(A,Te)|0)|0)+((8191&(o=(o=o+Math.imul(A,we)|0)+Math.imul(E,Te)|0))<<13)|0;d=((c=c+Math.imul(E,we)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(H,re),o=(o=Math.imul(H,ne))+Math.imul(U,re)|0,c=Math.imul(U,ne),n=n+Math.imul(D,ae)|0,o=(o=o+Math.imul(D,oe)|0)+Math.imul(X,ae)|0,c=c+Math.imul(X,oe)|0,n=n+Math.imul(j,ue)|0,o=(o=o+Math.imul(j,ce)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,ce)|0,n=n+Math.imul(B,de)|0,o=(o=o+Math.imul(B,fe)|0)+Math.imul(N,de)|0,c=c+Math.imul(N,fe)|0,n=n+Math.imul(F,pe)|0,o=(o=o+Math.imul(F,me)|0)+Math.imul(L,pe)|0,c=c+Math.imul(L,me)|0,n=n+Math.imul(k,ge)|0,o=(o=o+Math.imul(k,be)|0)+Math.imul(C,ge)|0,c=c+Math.imul(C,be)|0;var Be=(d+(n=n+Math.imul(O,Te)|0)|0)+((8191&(o=(o=o+Math.imul(O,we)|0)+Math.imul(_,Te)|0))<<13)|0;d=((c=c+Math.imul(_,we)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(H,ae),o=(o=Math.imul(H,oe))+Math.imul(U,ae)|0,c=Math.imul(U,oe),n=n+Math.imul(D,ue)|0,o=(o=o+Math.imul(D,ce)|0)+Math.imul(X,ue)|0,c=c+Math.imul(X,ce)|0,n=n+Math.imul(j,de)|0,o=(o=o+Math.imul(j,fe)|0)+Math.imul(I,de)|0,c=c+Math.imul(I,fe)|0,n=n+Math.imul(B,pe)|0,o=(o=o+Math.imul(B,me)|0)+Math.imul(N,pe)|0,c=c+Math.imul(N,me)|0,n=n+Math.imul(F,ge)|0,o=(o=o+Math.imul(F,be)|0)+Math.imul(L,ge)|0,c=c+Math.imul(L,be)|0;var Ne=(d+(n=n+Math.imul(k,Te)|0)|0)+((8191&(o=(o=o+Math.imul(k,we)|0)+Math.imul(C,Te)|0))<<13)|0;d=((c=c+Math.imul(C,we)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(H,ue),o=(o=Math.imul(H,ce))+Math.imul(U,ue)|0,c=Math.imul(U,ce),n=n+Math.imul(D,de)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(X,de)|0,c=c+Math.imul(X,fe)|0,n=n+Math.imul(j,pe)|0,o=(o=o+Math.imul(j,me)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,me)|0,n=n+Math.imul(B,ge)|0,o=(o=o+Math.imul(B,be)|0)+Math.imul(N,ge)|0,c=c+Math.imul(N,be)|0;var xe=(d+(n=n+Math.imul(F,Te)|0)|0)+((8191&(o=(o=o+Math.imul(F,we)|0)+Math.imul(L,Te)|0))<<13)|0;d=((c=c+Math.imul(L,we)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(H,de),o=(o=Math.imul(H,fe))+Math.imul(U,de)|0,c=Math.imul(U,fe),n=n+Math.imul(D,pe)|0,o=(o=o+Math.imul(D,me)|0)+Math.imul(X,pe)|0,c=c+Math.imul(X,me)|0,n=n+Math.imul(j,ge)|0,o=(o=o+Math.imul(j,be)|0)+Math.imul(I,ge)|0,c=c+Math.imul(I,be)|0;var je=(d+(n=n+Math.imul(B,Te)|0)|0)+((8191&(o=(o=o+Math.imul(B,we)|0)+Math.imul(N,Te)|0))<<13)|0;d=((c=c+Math.imul(N,we)|0)+(o>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(H,pe),o=(o=Math.imul(H,me))+Math.imul(U,pe)|0,c=Math.imul(U,me),n=n+Math.imul(D,ge)|0,o=(o=o+Math.imul(D,be)|0)+Math.imul(X,ge)|0,c=c+Math.imul(X,be)|0;var Ie=(d+(n=n+Math.imul(j,Te)|0)|0)+((8191&(o=(o=o+Math.imul(j,we)|0)+Math.imul(I,Te)|0))<<13)|0;d=((c=c+Math.imul(I,we)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(H,ge),o=(o=Math.imul(H,be))+Math.imul(U,ge)|0,c=Math.imul(U,be);var Je=(d+(n=n+Math.imul(D,Te)|0)|0)+((8191&(o=(o=o+Math.imul(D,we)|0)+Math.imul(X,Te)|0))<<13)|0;d=((c=c+Math.imul(X,we)|0)+(o>>>13)|0)+(Je>>>26)|0,Je&=67108863;var De=(d+(n=Math.imul(H,Te))|0)+((8191&(o=(o=Math.imul(H,we))+Math.imul(U,Te)|0))<<13)|0;return d=((c=Math.imul(U,we))+(o>>>13)|0)+(De>>>26)|0,De&=67108863,l[0]=Ae,l[1]=Ee,l[2]=Se,l[3]=Oe,l[4]=_e,l[5]=Me,l[6]=ke,l[7]=Ce,l[8]=Pe,l[9]=Fe,l[10]=Le,l[11]=Re,l[12]=Be,l[13]=Ne,l[14]=xe,l[15]=je,l[16]=Ie,l[17]=Je,l[18]=De,0!==d&&(l[19]=d,r.length++),r;};function A(e,t,r){return new E().mulp(e,t,r);}function E(e,t){this.x=e,this.y=t;}Math.imul||(w=T),c.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?w(this,e,t):n<63?T(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,c=0;c>>26)|0)>>>26,l&=67108863;}r.words[c]=d,n=l,l=o;}return 0!==n?r.words[c]=n:r.length--,r.strip();}(this,e,t):A(this,e,t),r;},E.prototype.makeRBT=function(e){for(var t=new Array(e),r=c.prototype._countBits(e)-1,i=0;i>=1;return n;},E.prototype.permute=function(e,t,r,n,o,c){for(var i=0;i>>=1)i++;return 1<>>=13,r[2*i+1]=8191&c,c>>>=13;for(i=2*t;i>=26,t+=r/67108864|0,t+=o>>>26,this.words[i]=67108863&o;}return 0!==t&&(this.words[i]=t,this.length++),this;},c.prototype.muln=function(e){return this.clone().imuln(e);},c.prototype.sqr=function(){return this.mul(this);},c.prototype.isqr=function(){return this.imul(this.clone());},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>o;}return t;}(e);if(0===t.length)return new c(1);for(var r=this,i=0;i=0);var i,t=e%26,s=(e-t)/26,r=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i>>26-t;}o&&(this.words[i]=o,this.length++);}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<s)for(this.length-=s,i=0;i=0&&(0!==d||i>=o);i--){var f=0|this.words[i];this.words[i]=d<<26-c|f>>>c,d=f&mask;}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip();},c.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r);},c.prototype.shln=function(e){return this.clone().ishln(e);},c.prototype.ushln=function(e){return this.clone().iushln(e);},c.prototype.shrn=function(e){return this.clone().ishrn(e);},c.prototype.ushrn=function(e){return this.clone().iushrn(e);},c.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<=0);var t=e%26,s=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this;},c.prototype.isubn=function(e){if(n("number"==typeof e),n(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 i=0;i>26)-(d/67108864|0),this.words[i+r]=67108863&o;}for(;i>26,this.words[i+r]=67108863&o;if(0===l)return this.strip();for(n(-1===l),l=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip();},c.prototype._wordDiv=function(e,t){var r=(this.length,e.length),a=this.clone(),b=e,n=0|b.words[b.length-1];0!==(r=26-this._countBits(n))&&(b=b.ushln(r),a.iushln(r),n=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i=0;d--){var f=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(f=Math.min(f/n|0,67108863),a._ishlnsubmul(b,f,d);0!==a.negative;)f--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=f);}return q&&q.strip(),a.strip(),"div"!==t&&0!==r&&a.iushrn(r),{div:q||null,mod:a};},c.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var div,o,l;},c.prototype.div=function(e){return this.divmod(e,"div",!1).div;},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod;},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod;},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),c=r.cmp(n);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1);},c.prototype.modn=function(e){n(e<=67108863);for(var p=(1<<26)%e,t=0,i=this.length-1;i>=0;i--)t=(p*t+(0|this.words[i]))%e;return t;},c.prototype.idivn=function(e){n(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var r=(0|this.words[i])+67108864*t;this.words[i]=r/e|0,t=r%e;}return this.strip();},c.prototype.divn=function(e){return this.clone().idivn(e);},c.prototype.egcd=function(p){n(0===p.negative),n(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var r=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var f=t.clone(),h=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-->0;)(r.isOdd()||o.isOdd())&&(r.iadd(f),o.isub(h)),r.iushrn(1),o.iushrn(1);for(var y=0,v=1;0==(t.words[0]&v)&&y<26;++y,v<<=1);if(y>0)for(t.iushrn(y);y-->0;)(l.isOdd()||d.isOdd())&&(l.iadd(f),d.isub(h)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),r.isub(l),o.isub(d)):(t.isub(e),l.isub(r),d.isub(o));}return{a:l,b:d,gcd:t.iushln(g)};},c.prototype._invmp=function(p){n(0===p.negative),n(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),r=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-->0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,f=1;0==(b.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(b.iushrn(d);d-->0;)r.isOdd()&&r.iadd(o),r.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(r)):(b.isub(a),r.isub(t));}return(e=0===a.cmpn(1)?t:r).cmpn(0)<0&&e.iadd(p),e;},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var n=a;a=b,b=n;}else if(0===r||0===b.cmpn(1))break;a.isub(b);}return b.iushln(t);},c.prototype.invm=function(e){return this.egcd(e).a.umod(e);},c.prototype.isEven=function(){return 0==(1&this.words[0]);},c.prototype.isOdd=function(){return 1==(1&this.words[0]);},c.prototype.andln=function(e){return this.words[0]&e;},c.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<>>26,o&=67108863,this.words[i]=o;}return 0!==r&&(this.words[i]=r,this.length++),this;},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0];},c.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){ab&&(t=1);break;}}return t;},c.prototype.gtn=function(e){return 1===this.cmpn(e);},c.prototype.gt=function(e){return 1===this.cmp(e);},c.prototype.gten=function(e){return this.cmpn(e)>=0;},c.prototype.gte=function(e){return this.cmp(e)>=0;},c.prototype.ltn=function(e){return-1===this.cmpn(e);},c.prototype.lt=function(e){return-1===this.cmp(e);},c.prototype.lten=function(e){return this.cmpn(e)<=0;},c.prototype.lte=function(e){return this.cmp(e)<=0;},c.prototype.eqn=function(e){return 0===this.cmpn(e);},c.prototype.eq=function(e){return 0===this.cmp(e);},c.red=function(e){return new P(e);},c.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e);},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this);},c.prototype._forceRed=function(e){return this.red=e,this;},c.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e);},c.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e);},c.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e);},c.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e);},c.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e);},c.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e);},c.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e);},c.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e);},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this);},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this);},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this);},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this);},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this);},c.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e);};var S={k256:null,p224:null,p192:null,p25519:null};function O(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}function _(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}function M(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}function k(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}function C(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}function P(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t;}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null;}function F(e){P.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(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);}O.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e;},O.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r;},O.prototype.split=function(input,e){input.iushrn(this.n,0,e);},O.prototype.imulK=function(e){return e.imul(this.k);},o(_,O),_.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i>>22,t=r;}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9;},_.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;},c._prime=function(e){if(S[e])return S[e];var t;if("k256"===e)t=new _();else if("p224"===e)t=new M();else if("p192"===e)t=new k();else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C();}return S[e]=t,t;},P.prototype._verify1=function(a){n(0===a.negative,"red works only with positives"),n(a.red,"red works only with red numbers");},P.prototype._verify2=function(a,b){n(0==(a.negative|b.negative),"red works only with positives"),n(a.red&&a.red===b.red,"red works only with red numbers");},P.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this);},P.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this);},P.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this);},P.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e;},P.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this);},P.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e;},P.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e));},P.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b));},P.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b));},P.prototype.isqr=function(a){return this.imul(a,a.clone());},P.prototype.sqr=function(a){return this.mul(a,a);},P.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t);}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);n(!q.isZero());var r=new c(1).toRed(this),o=r.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var f=this.pow(d,q),h=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),y=s;0!==m.cmp(r);){for(var v=m,i=0;0!==v.cmp(r);i++)v=v.redSqr();n(i=0;i--){for(var d=e.words[i],f=l-1;f>=0;f--){var h=d>>f&1;r!==t[0]&&(r=this.sqr(r)),0!==h||0!==n?(n<<=1,n|=h,(4===++o||0===i&&0===f)&&(r=this.mul(r,t[n]),o=0,n=0)):o=0;}l=26;}return r;},P.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t;},P.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t;},c.mont=function(e){return new F(e);},o(F,P),F.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift));},F.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t;},F.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},F.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),r=u;return u.cmp(this.m)>=0?r=u.isub(this.m):u.cmpn(0)<0&&(r=u.iadd(this.m)),r._forceRed(this);},F.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this);};}(e,this);}).call(this,r(106)(e));},function(e,t,r){"use strict";r.d(t,"a",function(){return l;});var n=r(140),o=r.n(n),c=r(0);function l(data){return"0x"+o.a.keccak_256(Object(c.a)(data));}},function(e,t,r){"use strict";r.d(t,"b",function(){return c;}),r.d(t,"e",function(){return l;}),r.d(t,"a",function(){return d;}),r.d(t,"c",function(){return f;}),r.d(t,"d",function(){return h;});var n=r(0),o=r(22);function c(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Object(n.a)(e);}function l(e,t){for(e=String(e);e.length32&&v.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r;}function k(e,t){return{address:Object(n.a)(e),storageKeys:(t||[]).map((t,r)=>(32!==Object(c.d)(t)&&v.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase()))};}function C(e){if(Array.isArray(e))return e.map((e,t)=>Array.isArray(e)?(e.length>2&&v.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),k(e[0],e[1])):k(e.address,e.storageKeys));const t=Object.keys(e).map(t=>{const r=e[t].reduce((e,t)=>(e[t]=!0,e),{});return k(t,Object.keys(r).sort());});return t.sort((a,b)=>a.address.localeCompare(b.address)),t;}function P(e){return C(e).map(e=>[e.address,e.storageKeys]);}function F(e,t){if(null!=e.gasPrice){const t=o.a.from(e.gasPrice),r=o.a.from(e.maxFeePerGas||0);t.eq(r)||v.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r});}const r=[M(e.chainId||0,"chainId"),M(e.nonce||0,"nonce"),M(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),M(e.maxFeePerGas||0,"maxFeePerGas"),M(e.gasLimit||0,"gasLimit"),null!=e.to?Object(n.a)(e.to):"0x",M(e.value||0,"value"),e.data||"0x",P(e.accessList||[])];if(t){const e=Object(c.n)(t);r.push(M(e.recoveryParam,"recoveryParam")),r.push(Object(c.o)(e.r)),r.push(Object(c.o)(e.s));}return Object(c.c)(["0x02",h.encode(r)]);}function L(e,t){const r=[M(e.chainId||0,"chainId"),M(e.nonce||0,"nonce"),M(e.gasPrice||0,"gasPrice"),M(e.gasLimit||0,"gasLimit"),null!=e.to?Object(n.a)(e.to):"0x",M(e.value||0,"value"),e.data||"0x",P(e.accessList||[])];if(t){const e=Object(c.n)(t);r.push(M(e.recoveryParam,"recoveryParam")),r.push(Object(c.o)(e.r)),r.push(Object(c.o)(e.s));}return Object(c.c)(["0x01",h.encode(r)]);}function R(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&v.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){Object(f.b)(e,S);const r=[];E.forEach(function(t){let n=e[t.name]||[];const o={};t.numeric&&(o.hexPad="left"),n=Object(c.a)(Object(c.i)(n,o)),t.length&&n.length!==t.length&&n.length>0&&v.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=Object(c.o)(n),n.length>t.maxLength&&v.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push(Object(c.i)(n));});let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&v.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!Object(c.k)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push(Object(c.i)(n)),r.push("0x"),r.push("0x")),!t)return h.encode(r);const o=Object(c.n)(t);let l=27+o.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),l+=2*n+8,o.v>28&&o.v!==l&&v.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):o.v!==l&&v.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push(Object(c.i)(l)),r.push(Object(c.o)(Object(c.a)(o.r))),r.push(Object(c.o)(Object(c.a)(o.s))),h.encode(r);}(e,t);switch(e.type){case 1:return L(e,t);case 2:return F(e,t);}return v.throwError(`unsupported transaction type: ${e.type}`,y.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type});}function B(e,t,r){try{const r=A(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r;}catch(e){v.throwArgumentError("invalid v for transaction type: 1","v",t[0]);}e.r=Object(c.h)(t[1],32),e.s=Object(c.h)(t[2],32);try{const t=Object(d.a)(r(e));e.from=_(t,{r:e.r,s:e.s,recoveryParam:e.v});}catch(e){console.log(e);}}function N(e){const t=Object(c.a)(e);if(t[0]>127)return function(e){const t=h.decode(e);9!==t.length&&6!==t.length&&v.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:A(t[0]).toNumber(),gasPrice:A(t[1]),gasLimit:A(t[2]),to:w(t[3]),value:A(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.a.from(t[6]).toNumber();}catch(e){return console.log(e),r;}if(r.r=Object(c.h)(t[7],32),r.s=Object(c.h)(t[8],32),o.a.from(r.r).isZero()&&o.a.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const o=t.slice(0,6);0!==r.chainId&&(o.push(Object(c.i)(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);const l=Object(d.a)(h.encode(o));try{r.from=_(l,{r:Object(c.i)(r.r),s:Object(c.i)(r.s),recoveryParam:n});}catch(e){console.log(e);}r.hash=Object(d.a)(e);}return r.type=null,r;}(t);switch(t[0]){case 1:return function(e){const t=h.decode(e.slice(1));8!==t.length&&11!==t.length&&v.throwArgumentError("invalid component count for transaction type: 1","payload",Object(c.i)(e));const r={type:1,chainId:A(t[0]).toNumber(),nonce:A(t[1]).toNumber(),gasPrice:A(t[2]),gasLimit:A(t[3]),to:w(t[4]),value:A(t[5]),data:t[6],accessList:C(t[7])};return 8===t.length||(r.hash=Object(d.a)(e),B(r,t.slice(8),L)),r;}(t);case 2:return function(e){const t=h.decode(e.slice(1));9!==t.length&&12!==t.length&&v.throwArgumentError("invalid component count for transaction type: 2","payload",Object(c.i)(e));const r=A(t[2]),n=A(t[3]),o={type:2,chainId:A(t[0]).toNumber(),nonce:A(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:A(t[4]),to:w(t[5]),value:A(t[6]),data:t[7],accessList:C(t[8])};return 9===t.length||(o.hash=Object(d.a)(e),B(o,t.slice(9),F)),o;}(t);}return v.throwError(`unsupported transaction type: ${t[0]}`,y.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]});}},function(e,t,r){"use strict";r.d(t,"d",function(){return v;}),r.d(t,"a",function(){return w;}),r.d(t,"c",function(){return _;}),r.d(t,"b",function(){return M;});var n=r(4),o=r.n(n),c=r(0),l=r(2),d=r(76),f=o.a.BN;const h=new l.b(d.a),m={},y=9007199254740991;function v(e){return null!=e&&(w.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||Object(c.l)(e)||"bigint"==typeof e||Object(c.j)(e));}let T=!1;class w{constructor(e,t){h.checkNew(new.target,w),e!==m&&h.throwError("cannot call constructor directly; use BigNumber.from",l.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this);}fromTwos(e){return E(S(this).fromTwos(e));}toTwos(e){return E(S(this).toTwos(e));}abs(){return"-"===this._hex[0]?w.from(this._hex.substring(1)):this;}add(e){return E(S(this).add(S(e)));}sub(e){return E(S(this).sub(S(e)));}div(e){return w.from(e).isZero()&&O("division by zero","div"),E(S(this).div(S(e)));}mul(e){return E(S(this).mul(S(e)));}mod(e){const t=S(e);return t.isNeg()&&O("cannot modulo negative values","mod"),E(S(this).umod(t));}pow(e){const t=S(e);return t.isNeg()&&O("cannot raise to negative values","pow"),E(S(this).pow(t));}and(e){const t=S(e);return(this.isNegative()||t.isNeg())&&O("cannot 'and' negative values","and"),E(S(this).and(t));}or(e){const t=S(e);return(this.isNegative()||t.isNeg())&&O("cannot 'or' negative values","or"),E(S(this).or(t));}xor(e){const t=S(e);return(this.isNegative()||t.isNeg())&&O("cannot 'xor' negative values","xor"),E(S(this).xor(t));}mask(e){return(this.isNegative()||e<0)&&O("cannot mask negative values","mask"),E(S(this).maskn(e));}shl(e){return(this.isNegative()||e<0)&&O("cannot shift negative values","shl"),E(S(this).shln(e));}shr(e){return(this.isNegative()||e<0)&&O("cannot shift negative values","shr"),E(S(this).shrn(e));}eq(e){return S(this).eq(S(e));}lt(e){return S(this).lt(S(e));}lte(e){return S(this).lte(S(e));}gt(e){return S(this).gt(S(e));}gte(e){return S(this).gte(S(e));}isNegative(){return"-"===this._hex[0];}isZero(){return S(this).isZero();}toNumber(){try{return S(this).toNumber();}catch(e){O("overflow","toNumber",this.toString());}return null;}toBigInt(){try{return BigInt(this.toString());}catch(e){}return h.throwError("this platform does not support BigInt",l.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()});}toString(){return arguments.length>0&&(10===arguments[0]?T||(T=!0,h.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?h.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",l.b.errors.UNEXPECTED_ARGUMENT,{}):h.throwError("BigNumber.toString does not accept parameters",l.b.errors.UNEXPECTED_ARGUMENT,{})),S(this).toString(10);}toHexString(){return this._hex;}toJSON(e){return{type:"BigNumber",hex:this.toHexString()};}static from(e){if(e instanceof w)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new w(m,A(e)):e.match(/^-?[0-9]+$/)?new w(m,A(new f(e))):h.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&O("underflow","BigNumber.from",e),(e>=y||e<=-y)&&O("overflow","BigNumber.from",e),w.from(String(e));const t=e;if("bigint"==typeof t)return w.from(t.toString());if(Object(c.j)(t))return w.from(Object(c.i)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return w.from(e);}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(Object(c.l)(e)||"-"===e[0]&&Object(c.l)(e.substring(1))))return w.from(e);}return h.throwArgumentError("invalid BigNumber value","value",e);}static isBigNumber(e){return!(!e||!e._isBigNumber);}}function A(e){if("string"!=typeof e)return A(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&h.throwArgumentError("invalid hex","value",e),"0x00"===(e=A(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e;}function E(e){return w.from(A(e));}function S(e){const t=w.from(e).toHexString();return"-"===t[0]?new f("-"+t.substring(3),16):new f(t.substring(2),16);}function O(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),h.throwError(e,l.b.errors.NUMERIC_FAULT,n);}function _(e){return new f(e,36).toString(16);}function M(e){return new f(e,16).toString(36);}},,function(e,t,r){"use strict";r.d(t,"b",function(){return P;}),r.d(t,"a",function(){return F;}),r.d(t,"g",function(){return L;}),r.d(t,"f",function(){return R;}),r.d(t,"c",function(){return B;}),r.d(t,"e",function(){return N;}),r.d(t,"d",function(){return x;});var n=r(41),o=r(0),c=r(12),l=r(22),d=r(214),f=r(1),h=r(25),m=r(145),y=r(141),v=r(11),T=r(211);const w=new(r(2).b)("hdnode/5.4.0"),A=c.a.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),E=Object(l.f)("Bitcoin seed"),S=2147483648;function O(e){return(1<=256)throw new Error("Depth too large!");return M(Object(o.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(o.i)(this.depth),this.parentFingerprint,Object(o.h)(Object(o.i)(this.index),4),this.chainCode,null!=this.privateKey?Object(o.b)(["0x00",this.privateKey]):this.publicKey]));}neuter(){return new F(C,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path);}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let path=this.path;path&&(path+="/"+(2147483647&e));const data=new Uint8Array(37);if(e&S){if(!this.privateKey)throw new Error("cannot derive child of neutered node");data.set(Object(o.a)(this.privateKey),1),path&&(path+="'");}else data.set(Object(o.a)(this.publicKey));for(let i=24;i>=0;i-=8)data[33+(i>>3)]=e>>24-i&255;const t=Object(o.a)(Object(m.a)(y.a.sha512,this.chainCode,data)),r=t.slice(0,32),n=t.slice(32);let l=null,d=null;if(this.privateKey)l=_(c.a.from(r).add(this.privateKey).mod(A));else{d=new h.a(Object(o.i)(r))._addPoint(this.publicKey);}let f=path;const v=this.mnemonic;return v&&(f=Object.freeze({phrase:v.phrase,path:path,locale:v.locale||"en"})),new F(C,l,d,this.fingerprint,_(n),e,this.depth+1,f);}derivePath(path){const e=path.split("/");if(0===e.length||"m"===e[0]&&0!==this.depth)throw new Error("invalid path - "+path);"m"===e[0]&&e.shift();let t=this;for(let i=0;i=S)throw new Error("invalid path index - "+component);t=t._derive(S+e);}else{if(!component.match(/^[0-9]+$/))throw new Error("invalid path component - "+component);{const e=parseInt(component);if(e>=S)throw new Error("invalid path index - "+component);t=t._derive(e);}}}return t;}static _fromSeed(e,t){const r=Object(o.a)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=Object(o.a)(Object(m.a)(y.a.sha512,E,r));return new F(C,_(n.slice(0,32)),null,"0x00000000",_(n.slice(32)),0,0,t);}static fromMnemonic(e,t,r){return e=B(R(e,r=k(r)),r),F._fromSeed(L(e,t),{phrase:e,path:"m",locale:r.locale});}static fromSeed(e){return F._fromSeed(e,null);}static fromExtendedKey(e){const t=n.a.decode(e);82===t.length&&M(t.slice(0,78))===e||w.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],c=Object(o.i)(t.slice(5,9)),l=parseInt(Object(o.i)(t.slice(9,13)).substring(2),16),d=Object(o.i)(t.slice(13,45)),f=t.slice(45,78);switch(Object(o.i)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new F(C,null,Object(o.i)(f),c,d,l,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==f[0])break;return new F(C,Object(o.i)(f.slice(1)),null,c,d,l,r,null);}return w.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");}}function L(e,t){t||(t="");const r=Object(l.f)("mnemonic"+t,l.a.NFKD);return Object(d.a)(Object(l.f)(e,l.a.NFKD),r,2048,64,"sha512");}function R(e,t){t=k(t),w.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=Object(o.a)(new Uint8Array(Math.ceil(11*r.length/8)));let c=0;for(let i=0;i>3]|=1<<7-c%8),c++;}const l=32*r.length/3,d=O(r.length/3);if((Object(o.a)(Object(m.c)(n.slice(0,l/8)))[0]&d)!==(n[n.length-1]&d))throw new Error("invalid checksum");return Object(o.i)(n.slice(0,l/8));}function B(e,t){if(t=k(t),(e=Object(o.a)(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let i=0;i8?(r[r.length-1]<<=8,r[r.length-1]|=e[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[i]>>8-n,r.push(e[i]&(1<<8-n)-1),n+=3);const c=e.length/4,l=Object(o.a)(Object(m.c)(e))[0]&O(c);return r[r.length-1]<<=c,r[r.length-1]|=l>>8-c,t.join(r.map(e=>t.getWord(e)));}function N(e,t){try{return R(e,t),!0;}catch(e){}return!1;}function x(e){return("number"!=typeof e||e<0||e>=S||e%1)&&w.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`;}},function(e,t,r){"use strict";r.d(t,"a",function(){return w;}),r.d(t,"b",function(){return A;}),r.d(t,"c",function(){return E;});var n=r(83),o=r(0),c=r(1),l=r(22),d=r(2);var f=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function l(e){try{f(n.next(e));}catch(e){c(e);}}function d(e){try{f(n.throw(e));}catch(e){c(e);}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(l,d);}f((n=n.apply(e,t||[])).next());});};function h(e,t){return f(this,void 0,void 0,function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0,mode:"cors",cache:"no-cache",credentials:"same-origin",redirect:"follow",referrer:"client"},n=yield fetch(e,r),body=yield n.arrayBuffer(),c={};return n.headers.forEach?n.headers.forEach((e,t)=>{c[t.toLowerCase()]=e;}):n.headers.keys().forEach(e=>{c[e.toLowerCase()]=n.headers.get(e);}),{headers:c,statusCode:n.status,statusMessage:n.statusText,body:Object(o.a)(new Uint8Array(body))};});}var m=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function l(e){try{f(n.next(e));}catch(e){c(e);}}function d(e){try{f(n.throw(e));}catch(e){c(e);}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(l,d);}f((n=n.apply(e,t||[])).next());});};const y=new d.b("web/5.4.0");function v(e){return new Promise(t=>{setTimeout(t,e);});}function T(e,t){if(null==e)return null;if("string"==typeof e)return e;if(Object(o.k)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Object(l.h)(e);}catch(e){}return Object(o.i)(e);}return e;}function w(e,body,t){const r="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;y.assertArgument(r>0&&r%1==0,"invalid connection throttle limit","connection.throttleLimit",r);const o="object"==typeof e?e.throttleCallback:null,c="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;y.assertArgument(c>0&&c%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",c);const f={};let w=null;const A={method:"GET"};let E=!1,S=12e4;if("string"==typeof e)w=e;else if("object"==typeof e){if(null!=e&&null!=e.url||y.throwArgumentError("missing URL","connection.url",e),w=e.url,"number"==typeof e.timeout&&e.timeout>0&&(S=e.timeout),e.headers)for(const t in e.headers)f[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(E=!0);if(A.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==w.substring(0,6)&&!0!==e.allowInsecureAuthentication&&y.throwError("basic authentication requires a secure https url",d.b.errors.INVALID_ARGUMENT,{argument:"url",url:w,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;f.authorization={key:"Authorization",value:"Basic "+Object(n.b)(Object(l.f)(t))};}}body&&(A.method="POST",A.body=body,null==f["content-type"]&&(f["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==f["content-length"]&&(f["content-length"]={key:"Content-Length",value:String(body.length)}));const O={};Object.keys(f).forEach(e=>{const header=f[e];O[header.key]=header.value;}),A.headers=O;const _=function(){let e=null;return{promise:new Promise(function(t,r){S&&(e=setTimeout(()=>{null!=e&&(e=null,r(y.makeError("timeout",d.b.errors.TIMEOUT,{requestBody:T(A.body,O["content-type"]),requestMethod:A.method,timeout:S,url:w})));},S));}),cancel:function(){null!=e&&(clearTimeout(e),e=null);}};}(),M=function(){return m(this,void 0,void 0,function*(){for(let e=0;e=300)&&(_.cancel(),y.throwError("bad response",d.b.errors.SERVER_ERROR,{status:n.statusCode,headers:n.headers,body:T(body,n.headers?n.headers["content-type"]:null),requestBody:T(A.body,O["content-type"]),requestMethod:A.method,url:w})),t)try{const e=yield t(body,n);return _.cancel(),e;}catch(t){if(t.throttleRetry&&e"content-type"===e.toLowerCase()).length||(r.headers=Object(c.g)(r.headers),r.headers["content-type"]="application/json");}else r.headers={"content-type":"application/json"};e=r;}return w(e,body,(e,t)=>{let n=null;if(null!=e)try{n=JSON.parse(Object(l.h)(e));}catch(t){y.throwError("invalid JSON",d.b.errors.SERVER_ERROR,{body:e,error:t});}return r&&(n=r(n,t)),n;});}function E(e,t){return t||(t={}),null==(t=Object(c.g)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise(function(r,n){let o=null,c=!1;const l=()=>!c&&(c=!0,o&&clearTimeout(o),!0);t.timeout&&(o=setTimeout(()=>{l()&&n(new Error("timeout"));},t.timeout));const d=t.retryLimit;let f=0;!function o(){return e().then(function(e){if(void 0!==e)l()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",o);else if(t.onceBlock)t.onceBlock.once("block",o);else if(!c){if(f++,f>d)return void(l()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,f)));et.ceiling&&(e=t.ceiling),setTimeout(o,e);}return null;},function(e){l()&&n(e);});}();});}},function(e,t,r){"use strict";function n(e,t,r,n,o,c,l){try{var d=e[c](l),f=d.value;}catch(e){return void r(e);}d.done?t(f):Promise.resolve(f).then(n,o);}function o(e){return function(){var t=this,r=arguments;return new Promise(function(o,c){var l=e.apply(t,r);function d(e){n(l,o,c,d,f,"next",e);}function f(e){n(l,o,c,d,f,"throw",e);}d(void 0);});};}r.d(t,"a",function(){return o;});},,function(e,t){e.exports=function(e){return"function"==typeof e;};},function(e,t,r){var n=r(23),o=r(90),c=r(29),l=r(93),d=r(94),f=r(120),h=o("wks"),m=n.Symbol,y=f?m:m&&m.withoutSetter||l;e.exports=function(e){return c(h,e)&&(d||"string"==typeof h[e])||(d&&c(m,e)?h[e]=m[e]:h[e]=y("Symbol."+e)),h[e];};},function(e,t,r){"use strict";r.r(t);var n=r(40);r.d(t,"ethers",function(){return n;});var o=r(27);r.d(t,"Signer",function(){return o.a;});var c=r(52);r.d(t,"Wallet",function(){return c.a;}),r.d(t,"VoidSigner",function(){return o.b;});var l=r(62);r.d(t,"getDefaultProvider",function(){return l.getDefaultProvider;}),r.d(t,"providers",function(){return n.providers;});var d=r(46);r.d(t,"BaseContract",function(){return d.a;}),r.d(t,"Contract",function(){return d.b;}),r.d(t,"ContractFactory",function(){return d.c;});var f=r(12);r.d(t,"BigNumber",function(){return f.a;});var h=r(159);r.d(t,"FixedNumber",function(){return h.a;}),r.d(t,"constants",function(){return n.constants;});var m=r(2);r.d(t,"errors",function(){return m.a;}),r.d(t,"logger",function(){return n.logger;}),r.d(t,"utils",function(){return n.utils;});var y=r(211);r.d(t,"wordlists",function(){return y.a;});var v=r(75);r.d(t,"version",function(){return v.a;});var T=r(7);r.d(t,"Wordlist",function(){return T.a;});try{const e=window;null==e._ethers&&(e._ethers=n);}catch(e){}},function(e,t,r){var n=t;n.utils=r(34),n.common=r(56),n.sha=r(151),n.ripemd=r(155),n.hmac=r(156),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160;},function(e,t,r){"use strict";r.d(t,"a",function(){return c;}),r.d(t,"c",function(){return l;}),r.d(t,"b",function(){return f;}),r.d(t,"f",function(){return m;}),r.d(t,"d",function(){return v;}),r.d(t,"e",function(){return T;}),r.d(t,"h",function(){return w;}),r.d(t,"g",function(){return A;});var n=r(0);const o=new(r(2).b)("strings/5.4.0");var c,l;function d(e,t,r,output,n){if(e===l.BAD_PREFIX||e===l.UNEXPECTED_CONTINUE){let i=0;for(let e=t+1;e>6==2;e++)i++;return i;}return e===l.OVERRUN?r.length-t-1:0;}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD";}(c||(c={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation";}(l||(l={}));const f=Object.freeze({error:function(e,t,r,output,n){return o.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r);},ignore:d,replace:function(e,t,r,output,n){return e===l.OVERLONG?(output.push(n),0):(output.push(65533),d(e,t,r));}});function h(e,t){null==t&&(t=f.error),e=Object(n.a)(e);const r=[];let i=0;for(;i>7==0){r.push(n);continue;}let o=null,c=null;if(192==(224&n))o=1,c=127;else if(224==(240&n))o=2,c=2047;else{if(240!=(248&n)){i+=t(128==(192&n)?l.UNEXPECTED_CONTINUE:l.BAD_PREFIX,i-1,e,r);continue;}o=3,c=65535;}if(i-1+o>=e.length){i+=t(l.OVERRUN,i-1,e,r);continue;}let d=n&(1<<8-o-1)-1;for(let n=0;n1114111?i+=t(l.OUT_OF_RANGE,i-1-o,e,r,d):d>=55296&&d<=57343?i+=t(l.UTF16_SURROGATE,i-1-o,e,r,d):d<=c?i+=t(l.OVERLONG,i-1-o,e,r,d):r.push(d));}return r;}function m(e,form=c.current){form!=c.current&&(o.checkNormalize(),e=e.normalize(form));let t=[];for(let i=0;i>6|192),t.push(63&r|128);else if(55296==(64512&r)){i++;const n=e.charCodeAt(i);if(i>=e.length||56320!=(64512&n))throw new Error("invalid utf-8 string");const o=65536+((1023&r)<<10)+(1023&n);t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128);}else t.push(r>>12|224),t.push(r>>6&63|128),t.push(63&r|128);}return Object(n.a)(t);}function y(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4);}function v(e,t){return'"'+h(e,t).map(e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\";}if(e>=32&&e<127)return String.fromCharCode(e);}return e<=65535?y(e):y(55296+((e-=65536)>>10&1023))+y(56320+(1023&e));}).join("")+'"';}function T(e){return e.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("");}function w(e,t){return T(h(e,t));}function A(e,form=c.current){return h(m(e,form));}},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e;};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this;}()||Function("return this")();}).call(this,r(43));},function(e,t){e.exports=function(e){try{return!!e();}catch(e){return!0;}};},function(e,t,r){"use strict";r.d(t,"a",function(){return h;}),r.d(t,"c",function(){return m;}),r.d(t,"b",function(){return y;});var n=r(139),o=r(0),c=r(1);const l=new(r(2).b)("signing-key/5.4.0");let d=null;function f(){return d||(d=new n.a("secp256k1")),d;}class h{constructor(e){Object(c.d)(this,"curve","secp256k1"),Object(c.d)(this,"privateKey",Object(o.i)(e));const t=f().keyFromPrivate(Object(o.a)(this.privateKey));Object(c.d)(this,"publicKey","0x"+t.getPublic(!1,"hex")),Object(c.d)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),Object(c.d)(this,"_isSigningKey",!0);}_addPoint(e){const t=f().keyFromPublic(Object(o.a)(this.publicKey)),r=f().keyFromPublic(Object(o.a)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex");}signDigest(e){const t=f().keyFromPrivate(Object(o.a)(this.privateKey)),r=Object(o.a)(e);32!==r.length&&l.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return Object(o.n)({recoveryParam:n.recoveryParam,r:Object(o.h)("0x"+n.r.toString(16),32),s:Object(o.h)("0x"+n.s.toString(16),32)});}computeSharedSecret(e){const t=f().keyFromPrivate(Object(o.a)(this.privateKey)),r=f().keyFromPublic(Object(o.a)(y(e)));return Object(o.h)("0x"+t.derive(r.getPublic()).toString(16),32);}static isSigningKey(e){return!(!e||!e._isSigningKey);}}function m(e,t){const r=Object(o.n)(t),n={r:Object(o.a)(r.r),s:Object(o.a)(r.s)};return"0x"+f().recoverPubKey(Object(o.a)(e),n,r.recoveryParam).encode("hex",!1);}function y(e,t){const r=Object(o.a)(e);if(32===r.length){const e=new h(r);return t?"0x"+f().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey;}return 33===r.length?t?Object(o.i)(r):"0x"+f().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+f().keyFromPublic(r).getPublic(!0,"hex"):Object(o.i)(r):l.throwArgumentError("invalid public or private key","key","[REDACTED]");}},function(e,t,r){var n=r(23),o=r(49).f,c=r(59),l=r(50),d=r(92),f=r(169),h=r(128);e.exports=function(e,source){var t,r,m,y,v,T=e.target,w=e.global,A=e.stat;if(t=w?n:A?n[T]||d(T,{}):(n[T]||{}).prototype)for(r in source){if(y=source[r],m=e.noTargetGet?(v=o(t,r))&&v.value:t[r],!h(w?r:T+(A?".":"#")+r,e.forced)&&void 0!==m){if(typeof y==typeof m)continue;f(y,m);}(e.sham||m&&m.sham)&&c(y,"sham",!0),l(t,r,y,e);}};},function(e,t,r){"use strict";r.d(t,"a",function(){return h;}),r.d(t,"b",function(){return m;});var n=r(1),o=r(2);var c=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function l(e){try{f(n.next(e));}catch(e){c(e);}}function d(e){try{f(n.throw(e));}catch(e){c(e);}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(l,d);}f((n=n.apply(e,t||[])).next());});};const l=new o.b("abstract-signer/5.4.1"),d=["accessList","chainId","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],f=[o.b.errors.INSUFFICIENT_FUNDS,o.b.errors.NONCE_EXPIRED,o.b.errors.REPLACEMENT_UNDERPRICED];class h{constructor(){l.checkAbstract(new.target,h),Object(n.d)(this,"_isSigner",!0);}getBalance(e){return c(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e);});}getTransactionCount(e){return c(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e);});}estimateGas(e){return c(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const t=yield Object(n.f)(this.checkTransaction(e));return yield this.provider.estimateGas(t);});}call(e,t){return c(this,void 0,void 0,function*(){this._checkProvider("call");const r=yield Object(n.f)(this.checkTransaction(e));return yield this.provider.call(r,t);});}sendTransaction(e){return c(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r);});}getChainId(){return c(this,void 0,void 0,function*(){this._checkProvider("getChainId");return(yield this.provider.getNetwork()).chainId;});}getGasPrice(){return c(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice();});}getFeeData(){return c(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData();});}resolveName(e){return c(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e);});}checkTransaction(e){for(const t in e)-1===d.indexOf(t)&&l.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=Object(n.g)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then(t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&l.throwArgumentError("from address mismatch","transaction",e),t[0])),t;}populateTransaction(e){return c(this,void 0,void 0,function*(){const t=yield Object(n.f)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then(e=>c(this,void 0,void 0,function*(){if(null==e)return null;const address=yield this.resolveName(e);return null==address&&l.throwArgumentError("provided ENS name resolves to null","tx.to",e),address;})),t.to.catch(e=>{}));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||l.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):l.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas){if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type){if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas){if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e;}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);}else null!=e.gasPrice?(r&&l.throwError("network does not support EIP-1559",o.b.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):l.throwError("failed to get consistent fee data",o.b.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});}else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas));}}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch(e=>{if(f.indexOf(e.code)>=0)throw e;return l.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",o.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t});})),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then(t=>(0!==t[1]&&t[0]!==t[1]&&l.throwArgumentError("chainId address mismatch","transaction",e),t[0])),yield Object(n.f)(t);});}_checkProvider(e){this.provider||l.throwError("missing provider",o.b.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"});}static isSigner(e){return!(!e||!e._isSigner);}}class m extends h{constructor(address,e){l.checkNew(new.target,m),super(),Object(n.d)(this,"address",address),Object(n.d)(this,"provider",e||null);}getAddress(){return Promise.resolve(this.address);}_fail(e,t){return Promise.resolve().then(()=>{l.throwError(e,o.b.errors.UNSUPPORTED_OPERATION,{operation:t});});}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage");}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction");}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData");}connect(e){return new m(this.address,e);}}},function(e,t,r){"use strict";r.r(t),r.d(t,"encode",function(){return h;}),r.d(t,"decode",function(){return v;});var n=r(0),o=r(2);const c=new o.b("rlp/5.4.0");function l(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t;}function d(data,e,t){let r=0;for(let i=0;ie+1+r&&c.throwError("child data too short",o.b.errors.BUFFER_OVERRUN,{});}return{consumed:1+r,result:n};}function y(data,e){if(0===data.length&&c.throwError("data too short",o.b.errors.BUFFER_OVERRUN,{}),data[e]>=248){const t=data[e]-247;e+1+t>data.length&&c.throwError("data short segment too short",o.b.errors.BUFFER_OVERRUN,{});const r=d(data,e+1,t);return e+1+t+r>data.length&&c.throwError("data long segment too short",o.b.errors.BUFFER_OVERRUN,{}),m(data,e,e+1+t,t+r);}if(data[e]>=192){const t=data[e]-192;return e+1+t>data.length&&c.throwError("data array too short",o.b.errors.BUFFER_OVERRUN,{}),m(data,e,e+1,t);}if(data[e]>=184){const t=data[e]-183;e+1+t>data.length&&c.throwError("data array too short",o.b.errors.BUFFER_OVERRUN,{});const r=d(data,e+1,t);e+1+t+r>data.length&&c.throwError("data array too short",o.b.errors.BUFFER_OVERRUN,{});return{consumed:1+t+r,result:Object(n.i)(data.slice(e+1+t,e+1+t+r))};}if(data[e]>=128){const t=data[e]-128;e+1+t>data.length&&c.throwError("data too short",o.b.errors.BUFFER_OVERRUN,{});return{consumed:1+t,result:Object(n.i)(data.slice(e+1,e+1+t))};}return{consumed:1,result:Object(n.i)(data[e])};}function v(data){const e=Object(n.a)(data),t=y(e,0);return t.consumed!==e.length&&c.throwArgumentError("invalid rlp data","data",data),t.result;}},function(e,t,r){var n=r(44),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(n(e),t);};},function(e,t,r){var n=r(24);e.exports=!n(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7;}})[1];});},function(e,t,r){"use strict";r.d(t,"a",function(){return f;}),r.d(t,"b",function(){return h;});var n=r(12),o=(r(0),r(1)),c=r(2);var l=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function l(e){try{f(n.next(e));}catch(e){c(e);}}function d(e){try{f(n.throw(e));}catch(e){c(e);}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(l,d);}f((n=n.apply(e,t||[])).next());});};const d=new c.b("abstract-provider/5.4.1");class f extends o.a{static isForkEvent(e){return!(!e||!e._isForkEvent);}}class h{constructor(){d.checkAbstract(new.target,h),Object(o.d)(this,"_isProvider",!0);}getFeeData(){return l(this,void 0,void 0,function*(){const{block:e,gasPrice:t}=yield Object(o.f)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(e=>null)});let r=null,c=null;return e&&e.baseFeePerGas&&(c=n.a.from("2500000000"),r=e.baseFeePerGas.mul(2).add(c)),{maxFeePerGas:r,maxPriorityFeePerGas:c,gasPrice:t};});}addListener(e,t){return this.on(e,t);}removeListener(e,t){return this.off(e,t);}static isProvider(e){return!(!e||!e._isProvider);}}},function(e,t,r){"use strict";!function(t){function r(e){return parseInt(e)===e;}function n(e){if(!r(e.length))return!1;for(var i=0;i255)return!1;return!0;}function o(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e);}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object");}function c(e){return new Uint8Array(e);}function l(e,t,r,n,o){null==n&&null==o||(e=e.slice?e.slice(n,o):Array.prototype.slice.call(e,n,o)),t.set(e,r);}var d,f={toBytes:function(text){var e=[],i=0;for(text=encodeURI(text);i191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3);}return t.join("");}},h=(d="0123456789abcdef",{toBytes:function(text){for(var e=[],i=0;i>4]+d[15&r]);}return t.join("");}}),m={16:10,24:12,32:14},y=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],v=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],T=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],w=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],A=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],E=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],S=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],O=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],_=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],M=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],k=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],C=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],P=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],F=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],L=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function R(e){for(var t=[],i=0;i>2,this._Ke[t][i%4]=o[i],this._Kd[e-t][i%4]=o[i];for(var c,l=0,d=n;d>16&255]<<24^v[c>>8&255]<<16^v[255&c]<<8^v[c>>24&255]^y[l]<<24,l+=1,8!=n)for(i=1;i>8&255]<<8^v[c>>16&255]<<16^v[c>>24&255]<<24;for(i=n/2+1;i>2,h=d%4,this._Ke[f][h]=o[i],this._Kd[e-f][h]=o[i++],d++;}for(var f=1;f>24&255]^P[c>>16&255]^F[c>>8&255]^L[255&c];},B.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,a=[0,0,0,0],r=R(e),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var n=1;n>24&255]^A[r[(i+1)%4]>>16&255]^E[r[(i+2)%4]>>8&255]^S[255&r[(i+3)%4]]^this._Ke[n][i];r=a.slice();}var o,l=c(16);for(i=0;i<4;i++)o=this._Ke[t][i],l[4*i]=255&(v[r[i]>>24&255]^o>>24),l[4*i+1]=255&(v[r[(i+1)%4]>>16&255]^o>>16),l[4*i+2]=255&(v[r[(i+2)%4]>>8&255]^o>>8),l[4*i+3]=255&(v[255&r[(i+3)%4]]^o);return l;},B.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,a=[0,0,0,0],r=R(e),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var n=1;n>24&255]^_[r[(i+3)%4]>>16&255]^M[r[(i+2)%4]>>8&255]^k[255&r[(i+1)%4]]^this._Kd[n][i];r=a.slice();}var o,l=c(16);for(i=0;i<4;i++)o=this._Kd[t][i],l[4*i]=255&(T[r[i]>>24&255]^o>>24),l[4*i+1]=255&(T[r[(i+3)%4]>>16&255]^o>>16),l[4*i+2]=255&(T[r[(i+2)%4]>>8&255]^o>>8),l[4*i+3]=255&(T[255&r[(i+1)%4]]^o);return l;};var N=function(e){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new B(e);};N.prototype.encrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=c(e.length),r=c(16),i=0;i=0;--t)this._counter[t]=e%256,e>>=8;},J.prototype.setBytes=function(e){if(16!=(e=o(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e;},J.prototype.increment=function(){for(var i=15;i>=0;i--){if(255!==this._counter[i]){this._counter[i]++;break;}this._counter[i]=0;}};var D=function(e,t){if(!(this instanceof D))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof J||(t=new J(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new B(e);};D.prototype.encrypt=function(e){for(var t=o(e,!0),i=0;i16)throw new Error("PKCS#7 padding byte out of range");for(var t=data.length-e,i=0;i=e.length)&&56320==(64512&e.charCodeAt(i+1));}function l(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0;}function d(e){return 1===e.length?"0"+e:e;}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e;}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e){if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[p++]=63&n|128):c(e,i)?(n=65536+((1023&n)<<10)+(1023&e.charCodeAt(++i)),r[p++]=n>>18|240,r[p++]=n>>12&63|128,r[p++]=n>>6&63|128,r[p++]=63&n|128):(r[p++]=n>>12|224,r[p++]=n>>6&63|128,r[p++]=63&n|128);}}else for(i=0;i>>0;}return l;},t.split32=function(e,t){for(var r=new Array(4*e.length),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o);}return r;},t.rotr32=function(e,b){return e>>>b|e<<32-b;},t.rotl32=function(e,b){return e<>>32-b;},t.sum32=function(a,b){return a+b>>>0;},t.sum32_3=function(a,b,e){return a+b+e>>>0;},t.sum32_4=function(a,b,e,t){return a+b+e+t>>>0;},t.sum32_5=function(a,b,e,t,r){return a+b+e+t+r>>>0;},t.sum64=function(e,t,r,n){var o=e[t],c=n+e[t+1]>>>0,l=(c>>0,e[t+1]=c;},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0;},t.sum64_lo=function(e,t,r,n){return t+n>>>0;},t.sum64_4_hi=function(e,t,r,n,o,c,l,dl){var d=0,f=t;return d+=(f=f+n>>>0)>>0)>>0)>>0;},t.sum64_4_lo=function(e,t,r,n,o,c,l,dl){return t+n+c+dl>>>0;},t.sum64_5_hi=function(e,t,r,n,o,c,l,dl,d,f){var h=0,m=t;return h+=(m=m+n>>>0)>>0)>>0)>>0)>>0;},t.sum64_5_lo=function(e,t,r,n,o,c,l,dl,d,f){return t+n+c+dl+f>>>0;},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0;},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0;},t.shr64_hi=function(e,t,r){return e>>>r;},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0;};},function(e,t,r){var n=r(30),o=r(121),c=r(36),l=r(68),d=Object.defineProperty;t.f=n?d:function(e,t,r){if(c(e),t=l(t),c(r),o)try{return d(e,t,r);}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e;};},function(e,t,r){var n=r(33);e.exports=function(e){if(n(e))return e;throw TypeError(String(e)+" is not an object");};},function(e,t,r){"use strict";r.d(t,"d",function(){return o;}),r.d(t,"h",function(){return c;}),r.d(t,"e",function(){return l;}),r.d(t,"f",function(){return d;}),r.d(t,"g",function(){return f;}),r.d(t,"b",function(){return h;}),r.d(t,"c",function(){return m;}),r.d(t,"a",function(){return y;});var n=r(12);const o=n.a.from(-1),c=n.a.from(0),l=n.a.from(1),d=n.a.from(2),f=n.a.from("1000000000000000000"),h=n.a.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),m=n.a.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),y=n.a.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");},function(e,t,r){var n=r(115),o=r(58);e.exports=function(e){return n(o(e));};},function(e,t,r){"use strict";r.r(t),r.d(t,"AddressZero",function(){return n.a;}),r.d(t,"NegativeOne",function(){return o.d;}),r.d(t,"Zero",function(){return o.h;}),r.d(t,"One",function(){return o.e;}),r.d(t,"Two",function(){return o.f;}),r.d(t,"WeiPerEther",function(){return o.g;}),r.d(t,"MaxUint256",function(){return o.b;}),r.d(t,"MinInt256",function(){return o.c;}),r.d(t,"MaxInt256",function(){return o.a;}),r.d(t,"HashZero",function(){return c.a;}),r.d(t,"EtherSymbol",function(){return l;});var n=r(112),o=r(37),c=r(111);const l="Ξ";},function(e,t,r){"use strict";r.r(t),r.d(t,"Signer",function(){return d.a;}),r.d(t,"Wallet",function(){return f.a;}),r.d(t,"VoidSigner",function(){return d.b;}),r.d(t,"getDefaultProvider",function(){return m.getDefaultProvider;}),r.d(t,"providers",function(){return m;}),r.d(t,"BaseContract",function(){return o.a;}),r.d(t,"Contract",function(){return o.b;}),r.d(t,"ContractFactory",function(){return o.c;}),r.d(t,"BigNumber",function(){return c.a;}),r.d(t,"FixedNumber",function(){return l.a;}),r.d(t,"constants",function(){return h;}),r.d(t,"errors",function(){return A.a;}),r.d(t,"logger",function(){return ht;}),r.d(t,"utils",function(){return n;}),r.d(t,"wordlists",function(){return y.a;}),r.d(t,"version",function(){return ft.a;}),r.d(t,"Wordlist",function(){return v.a;});var n={};r.r(n),r.d(n,"AbiCoder",function(){return ve;}),r.d(n,"defaultAbiCoder",function(){return Te;}),r.d(n,"Fragment",function(){return ne;}),r.d(n,"ConstructorFragment",function(){return ue;}),r.d(n,"ErrorFragment",function(){return de;}),r.d(n,"EventFragment",function(){return ie;}),r.d(n,"FunctionFragment",function(){return ce;}),r.d(n,"ParamType",function(){return te;}),r.d(n,"FormatTypes",function(){return $;}),r.d(n,"checkResultErrors",function(){return O;}),r.d(n,"Logger",function(){return A.b;}),r.d(n,"RLP",function(){return Ke;}),r.d(n,"_fetchData",function(){return ct.a;}),r.d(n,"fetchJson",function(){return ct.b;}),r.d(n,"poll",function(){return ct.c;}),r.d(n,"checkProperties",function(){return w.b;}),r.d(n,"deepCopy",function(){return w.c;}),r.d(n,"defineReadOnly",function(){return w.d;}),r.d(n,"getStatic",function(){return w.e;}),r.d(n,"resolveProperties",function(){return w.f;}),r.d(n,"shallowCopy",function(){return w.g;}),r.d(n,"arrayify",function(){return T.a;}),r.d(n,"concat",function(){return T.b;}),r.d(n,"stripZeros",function(){return T.o;}),r.d(n,"zeroPad",function(){return T.p;}),r.d(n,"isBytes",function(){return T.j;}),r.d(n,"isBytesLike",function(){return T.k;}),r.d(n,"defaultPath",function(){return xe.b;}),r.d(n,"HDNode",function(){return xe.a;}),r.d(n,"SigningKey",function(){return qe.a;}),r.d(n,"Interface",function(){return Pe;}),r.d(n,"LogDescription",function(){return Se;}),r.d(n,"TransactionDescription",function(){return Oe;}),r.d(n,"base58",function(){return Le.a;}),r.d(n,"base64",function(){return Fe;}),r.d(n,"hexlify",function(){return T.i;}),r.d(n,"isHexString",function(){return T.l;}),r.d(n,"hexConcat",function(){return T.c;}),r.d(n,"hexStripZeros",function(){return T.f;}),r.d(n,"hexValue",function(){return T.g;}),r.d(n,"hexZeroPad",function(){return T.h;}),r.d(n,"hexDataLength",function(){return T.d;}),r.d(n,"hexDataSlice",function(){return T.e;}),r.d(n,"nameprep",function(){return Qe.a;}),r.d(n,"_toEscapedUtf8String",function(){return H.d;}),r.d(n,"toUtf8Bytes",function(){return H.f;}),r.d(n,"toUtf8CodePoints",function(){return H.g;}),r.d(n,"toUtf8String",function(){return H.h;}),r.d(n,"Utf8ErrorFuncs",function(){return H.b;}),r.d(n,"formatBytes32String",function(){return Ye;}),r.d(n,"parseBytes32String",function(){return $e;}),r.d(n,"hashMessage",function(){return Re.a;}),r.d(n,"namehash",function(){return Be.b;}),r.d(n,"isValidName",function(){return Be.a;}),r.d(n,"id",function(){return we.a;}),r.d(n,"_TypedDataEncoder",function(){return Ne.a;}),r.d(n,"getAddress",function(){return C.a;}),r.d(n,"getIcapAddress",function(){return C.d;}),r.d(n,"getContractAddress",function(){return C.b;}),r.d(n,"getCreate2Address",function(){return C.c;}),r.d(n,"isAddress",function(){return C.e;}),r.d(n,"formatEther",function(){return st;}),r.d(n,"parseEther",function(){return ut;}),r.d(n,"formatUnits",function(){return at;}),r.d(n,"parseUnits",function(){return ot;}),r.d(n,"commify",function(){return it;}),r.d(n,"computeHmac",function(){return Ie.a;}),r.d(n,"keccak256",function(){return Ae.a;}),r.d(n,"ripemd160",function(){return Ie.b;}),r.d(n,"sha256",function(){return Ie.c;}),r.d(n,"sha512",function(){return Ie.d;}),r.d(n,"randomBytes",function(){return ze.a;}),r.d(n,"shuffled",function(){return Ze.a;}),r.d(n,"solidityPack",function(){return He;}),r.d(n,"solidityKeccak256",function(){return Ue;}),r.d(n,"soliditySha256",function(){return Ve;}),r.d(n,"splitSignature",function(){return T.n;}),r.d(n,"joinSignature",function(){return T.m;}),r.d(n,"accessListify",function(){return et.b;}),r.d(n,"parseTransaction",function(){return et.d;}),r.d(n,"serializeTransaction",function(){return et.f;}),r.d(n,"TransactionTypes",function(){return et.a;}),r.d(n,"getJsonWalletAddress",function(){return je.a;}),r.d(n,"computeAddress",function(){return et.c;}),r.d(n,"recoverAddress",function(){return et.e;}),r.d(n,"computePublicKey",function(){return qe.b;}),r.d(n,"recoverPublicKey",function(){return qe.c;}),r.d(n,"verifyMessage",function(){return f.b;}),r.d(n,"verifyTypedData",function(){return f.c;}),r.d(n,"getAccountPath",function(){return xe.d;}),r.d(n,"mnemonicToEntropy",function(){return xe.f;}),r.d(n,"entropyToMnemonic",function(){return xe.c;}),r.d(n,"isValidMnemonic",function(){return xe.e;}),r.d(n,"mnemonicToSeed",function(){return xe.g;}),r.d(n,"SupportedAlgorithm",function(){return lt.a;}),r.d(n,"UnicodeNormalizationForm",function(){return H.a;}),r.d(n,"Utf8ErrorReason",function(){return H.c;}),r.d(n,"Indexed",function(){return Me;});var o=r(46),c=r(12),l=r(159),d=r(27),f=r(52),h=r(39),m=r(62),y=r(211),v=r(7),T=r(0),w=r(1),A=r(2);const E="abi/5.4.1",S=new A.b(E);function O(e){const t=[],r=function(path,object){if(Array.isArray(object))for(let e in object){const n=path.slice();n.push(e);try{r(n,object[e]);}catch(e){t.push({path:n,error:e});}}};return r([],e),t;}class _{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n;}_throwError(e,t){S.throwArgumentError(e,this.localName,t);}}class M{constructor(e){Object(w.d)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e);}get data(){return Object(T.c)(this._data);}get length(){return this._dataLength;}_writeData(data){return this._data.push(data),this._dataLength+=data.length,data.length;}appendWriter(e){return this._writeData(Object(T.b)(e._data));}writeBytes(e){let t=Object(T.a)(e);const r=t.length%this.wordSize;return r&&(t=Object(T.b)([t,this._padding.slice(r)])),this._writeData(t);}_getValue(e){let t=Object(T.a)(c.a.from(e));return t.length>this.wordSize&&S.throwError("value out-of-bounds",A.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(T.b)([this._padding.slice(t.length%this.wordSize),t])),t;}writeValue(e){return this._writeData(this._getValue(e));}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t);};}}class k{constructor(data,e,t,r){Object(w.d)(this,"_data",Object(T.a)(data)),Object(w.d)(this,"wordSize",e||32),Object(w.d)(this,"_coerceFunc",t),Object(w.d)(this,"allowLoose",r),this._offset=0;}get data(){return Object(T.i)(this._data);}get consumed(){return this._offset;}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t;}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):k.coerce(e,t);}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:S.throwError("data out-of-bounds",A.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n);}subReader(e){return new k(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose);}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e);}readValue(){return c.a.from(this.readBytes(this.wordSize));}}var C=r(3);class P extends _{constructor(e){super("address","address",e,!1);}defaultValue(){return"0x0000000000000000000000000000000000000000";}encode(e,t){try{t=Object(C.a)(t);}catch(e){this._throwError(e.message,t);}return e.writeValue(t);}decode(e){return Object(C.a)(Object(T.h)(e.readValue().toHexString(),20));}}class F extends _{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e;}defaultValue(){return this.coder.defaultValue();}encode(e,t){return this.coder.encode(e,t);}decode(e){return this.coder.decode(e);}}const L=new A.b(E);function R(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map(t=>{const n=t.localName;return n||L.throwError("cannot encode object for signature with missing names",A.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&L.throwError("cannot encode object for signature with duplicate names",A.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n];});}else L.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&L.throwArgumentError("types/value length mismatch","tuple",r);let o=new M(e.wordSize),c=new M(e.wordSize),l=[];t.forEach((e,t)=>{let r=n[t];if(e.dynamic){let t=c.length;e.encode(c,r);let n=o.writeUpdatableValue();l.push(e=>{n(e+t);});}else e.encode(o,r);}),l.forEach(e=>{e(o.length);});let d=e.appendWriter(o);return d+=e.appendWriter(c),d;}function B(e,t){let r=[],n=e.subReader(0);t.forEach(t=>{let o=null;if(t.dynamic){let r=e.readValue(),c=n.subReader(r.toNumber());try{o=t.decode(c);}catch(e){if(e.code===A.b.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type;}}else try{o=t.decode(e);}catch(e){if(e.code===A.b.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type;}null!=o&&r.push(o);});const o=t.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e;},{});t.forEach((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const c=r[t];c instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw c;}}):r[n]=c;});for(let i=0;i{throw e;}});}return Object.freeze(r);}class N extends _{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t;}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let i=0;ie._data.length&&L.throwError("insufficient data length",A.b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let i=0;i{e.dynamic&&(r=!0),n.push(e.type);});super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e;}defaultValue(){const e=[];this.coders.forEach(t=>{e.push(t.defaultValue());});const t=this.coders.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e;},{});return this.coders.forEach((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]));}),Object.freeze(e);}encode(e,t){return R(e,this.coders,t);}decode(e){return e.coerce(this.name,B(e,this.coders));}}const z=new A.b(E),Z={};let K={calldata:!0,memory:!0,storage:!0},Q={calldata:!0,memory:!0};function W(e,t){if("bytes"===e||"string"===e){if(K[t])return!0;}else if("address"===e){if("payable"===t)return!0;}else if((e.indexOf("[")>=0||"tuple"===e)&&Q[t])return!0;return(K[t]||"payable"===t)&&z.throwArgumentError("invalid modifier","name",t),!1;}function Y(object,e){for(let t in e)Object(w.d)(object,t,e[t]);}const $=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),ee=new RegExp(/^(.*)\[([0-9]*)\]$/);class te{constructor(e,t){e!==Z&&z.throwError("use fromString",A.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Y(this,t);let r=this.type.match(ee);Y(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:te.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this);}format(e){if(e||(e=$.sighash),$[e]||z.throwArgumentError("invalid format type","format",e),e===$.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t);}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==$.sighash&&(t+=this.type),t+="("+this.components.map(t=>t.format(e)).join(e===$.full?", ":",")+")"):t+=this.type,e!==$.sighash&&(!0===this.indexed&&(t+=" indexed"),e===$.full&&this.name&&(t+=" "+this.name)),t;}static from(e,t){return"string"==typeof e?te.fromString(e,t):te.fromObject(e);}static fromObject(e){return te.isParamType(e)?e:new te(Z,{name:e.name||null,type:fe(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(te.fromObject):null});}static fromString(e,t){return r=function(param,e){let t=param;function r(i){z.throwArgumentError(`unexpected character at position ${i}`,"param",param);}function n(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r;}param=param.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},c=o;for(let i=0;ite.fromString(param,t));}class ne{constructor(e,t){e!==Z&&z.throwError("use a static from method",A.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Y(this,t),this._isFragment=!0,Object.freeze(this);}static from(e){return ne.isFragment(e)?e:"string"==typeof e?ne.fromString(e):ne.fromObject(e);}static fromObject(e){if(ne.isFragment(e))return e;switch(e.type){case"function":return ce.fromObject(e);case"event":return ie.fromObject(e);case"constructor":return ue.fromObject(e);case"error":return de.fromObject(e);case"fallback":case"receive":return null;}return z.throwArgumentError("invalid fragment object","value",e);}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?ie.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?ce.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?ue.fromString(e.trim()):"error"===e.split(" ")[0]?de.fromString(e.substring(5).trim()):z.throwArgumentError("unsupported fragment","value",e);}static isFragment(e){return!(!e||!e._isFragment);}}class ie extends ne{format(e){if(e||(e=$.sighash),$[e]||z.throwArgumentError("invalid format type","format",e),e===$.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});let t="";return e!==$.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===$.full?", ":",")+") ",e!==$.sighash&&this.anonymous&&(t+="anonymous "),t.trim();}static from(e){return"string"==typeof e?ie.fromString(e):ie.fromObject(e);}static fromObject(e){if(ie.isEventFragment(e))return e;"event"!==e.type&&z.throwArgumentError("invalid event object","value",e);const t={name:pe(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(te.fromObject):[],type:"event"};return new ie(Z,t);}static fromString(e){let t=e.match(me);t||z.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach(e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:z.warn("unknown modifier: "+e);}}),ie.fromObject({name:t[1].trim(),anonymous:r,inputs:re(t[2],!0),type:"event"});}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type;}}function ae(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&z.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||z.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=c.a.from(r[1]),r[0]):e;}function oe(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach(e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e);}});}function se(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&z.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&z.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||z.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&z.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&z.throwArgumentError("unable to determine stateMutability","value",e),t;}class ue extends ne{format(e){if(e||(e=$.sighash),$[e]||z.throwArgumentError("invalid format type","format",e),e===$.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});e===$.sighash&&z.throwError("cannot format a constructor for sighash",A.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(input=>input.format(e)).join(e===$.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim();}static from(e){return"string"==typeof e?ue.fromString(e):ue.fromObject(e);}static fromObject(e){if(ue.isConstructorFragment(e))return e;"constructor"!==e.type&&z.throwArgumentError("invalid constructor object","value",e);let t=se(e);t.constant&&z.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(te.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.a.from(e.gas):null};return new ue(Z,r);}static fromString(e){let t={type:"constructor"},r=(e=ae(e,t)).match(me);return r&&"constructor"===r[1].trim()||z.throwArgumentError("invalid constructor string","value",e),t.inputs=re(r[2].trim(),!1),oe(r[3].trim(),t),ue.fromObject(t);}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type;}}class ce extends ue{format(e){if(e||(e=$.sighash),$[e]||z.throwArgumentError("invalid format type","format",e),e===$.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(input=>JSON.parse(input.format(e))),outputs:this.outputs.map(output=>JSON.parse(output.format(e)))});let t="";return e!==$.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===$.full?", ":",")+") ",e!==$.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(output=>output.format(e)).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim();}static from(e){return"string"==typeof e?ce.fromString(e):ce.fromObject(e);}static fromObject(e){if(ce.isFunctionFragment(e))return e;"function"!==e.type&&z.throwArgumentError("invalid function object","value",e);let t=se(e);const r={type:e.type,name:pe(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(te.fromObject):[],outputs:e.outputs?e.outputs.map(te.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?c.a.from(e.gas):null};return new ce(Z,r);}static fromString(e){let t={type:"function"},r=(e=ae(e,t)).split(" returns ");r.length>2&&z.throwArgumentError("invalid function string","value",e);let n=r[0].match(me);if(n||z.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&pe(t.name),t.inputs=re(n[2],!1),oe(n[3].trim(),t),r.length>1){let n=r[1].match(me);""==n[1].trim()&&""==n[3].trim()||z.throwArgumentError("unexpected tokens","value",e),t.outputs=re(n[2],!1);}else t.outputs=[];return ce.fromObject(t);}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type;}}function le(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||z.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e;}class de extends ne{format(e){if(e||(e=$.sighash),$[e]||z.throwArgumentError("invalid format type","format",e),e===$.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});let t="";return e!==$.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===$.full?", ":",")+") ",t.trim();}static from(e){return"string"==typeof e?de.fromString(e):de.fromObject(e);}static fromObject(e){if(de.isErrorFragment(e))return e;"error"!==e.type&&z.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:pe(e.name),inputs:e.inputs?e.inputs.map(te.fromObject):[]};return le(new de(Z,t));}static fromString(e){let t={type:"error"},r=e.match(me);return r||z.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&pe(t.name),t.inputs=re(r[2],!1),le(de.fromObject(t));}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type;}}function fe(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e;}const he=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function pe(e){return e&&e.match(he)||z.throwArgumentError(`invalid identifier "${e}"`,"value",e),e;}const me=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const ye=new A.b(E),ge=new RegExp(/^bytes([0-9]*)$/),be=new RegExp(/^(u?int)([0-9]*)$/);class ve{constructor(e){ye.checkNew(new.target,ve),Object(w.d)(this,"coerceFunc",e||null);}_getCoder(param){switch(param.baseType){case"address":return new P(param.name);case"bool":return new x(param.name);case"string":return new U(param.name);case"bytes":return new I(param.name);case"array":return new N(this._getCoder(param.arrayChildren),param.arrayLength,param.name);case"tuple":return new V((param.components||[]).map(component=>this._getCoder(component)),param.name);case"":return new D(param.name);}let e=param.type.match(be);if(e){let t=parseInt(e[2]||"256");return(0===t||t>256||t%8!=0)&&ye.throwArgumentError("invalid "+e[1]+" bit length","param",param),new G(t/8,"int"===e[1],param.name);}if(e=param.type.match(ge),e){let t=parseInt(e[1]);return(0===t||t>32)&&ye.throwArgumentError("invalid bytes length","param",param),new J(t,param.name);}return ye.throwArgumentError("invalid type","type",param.type);}_getWordSize(){return 32;}_getReader(data,e){return new k(data,this._getWordSize(),this.coerceFunc,e);}_getWriter(){return new M(this._getWordSize());}getDefaultValue(e){const t=e.map(e=>this._getCoder(te.from(e)));return new V(t,"_").defaultValue();}encode(e,t){e.length!==t.length&&ye.throwError("types/values length mismatch",A.b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map(e=>this._getCoder(te.from(e))),n=new V(r,"_"),o=this._getWriter();return n.encode(o,t),o.data;}decode(e,data,t){const r=e.map(e=>this._getCoder(te.from(e)));return new V(r,"_").decode(this._getReader(Object(T.a)(data),t));}}const Te=new ve();var we=r(103),Ae=r(5);const Ee=new A.b(E);class Se extends w.a{}class Oe extends w.a{}class _e extends w.a{}class Me extends w.a{static isIndexed(e){return!(!e||!e._isIndexed);}}const ke={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Ce(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r;}class Pe{constructor(e){Ee.checkNew(new.target,Pe);let t=[];t="string"==typeof e?JSON.parse(e):e,Object(w.d)(this,"fragments",t.map(e=>ne.from(e)).filter(e=>null!=e)),Object(w.d)(this,"_abiCoder",Object(w.e)(new.target,"getAbiCoder")()),Object(w.d)(this,"functions",{}),Object(w.d)(this,"errors",{}),Object(w.d)(this,"events",{}),Object(w.d)(this,"structs",{}),this.fragments.forEach(e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void Ee.warn("duplicate definition - constructor"):void Object(w.d)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return;}let r=e.format();t[r]?Ee.warn("duplicate definition - "+r):t[r]=e;}),this.deploy||Object(w.d)(this,"deploy",ue.from({payable:!1,type:"constructor"})),Object(w.d)(this,"_isInterface",!0);}format(e){e||(e=$.full),e===$.sighash&&Ee.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(t=>t.format(e));return e===$.json?JSON.stringify(t.map(e=>JSON.parse(e))):t;}static getAbiCoder(){return Te;}static getAddress(address){return Object(C.a)(address);}static getSighash(e){return Object(T.e)(Object(we.a)(e.format()),0,4);}static getEventTopic(e){return Object(we.a)(e.format());}getFunction(e){if(Object(T.l)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];Ee.throwArgumentError("no matching function","sighash",e);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter(e=>e.split("(")[0]===t);return 0===r.length?Ee.throwArgumentError("no matching function","name",t):r.length>1&&Ee.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]];}const t=this.functions[ce.fromString(e).format()];return t||Ee.throwArgumentError("no matching function","signature",e),t;}getEvent(e){if(Object(T.l)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];Ee.throwArgumentError("no matching event","topichash",t);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter(e=>e.split("(")[0]===t);return 0===r.length?Ee.throwArgumentError("no matching event","name",t):r.length>1&&Ee.throwArgumentError("multiple matching events","name",t),this.events[r[0]];}const t=this.events[ie.fromString(e).format()];return t||Ee.throwArgumentError("no matching event","signature",e),t;}getError(e){if(Object(T.l)(e)){const t=Object(w.e)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r];}Ee.throwArgumentError("no matching error","sighash",e);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter(e=>e.split("(")[0]===t);return 0===r.length?Ee.throwArgumentError("no matching error","name",t):r.length>1&&Ee.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]];}const t=this.errors[ce.fromString(e).format()];return t||Ee.throwArgumentError("no matching error","signature",e),t;}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e);}catch(t){try{e=this.getError(e);}catch(e){throw t;}}return Object(w.e)(this.constructor,"getSighash")(e);}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),Object(w.e)(this.constructor,"getEventTopic")(e);}_decodeParams(e,data){return this._abiCoder.decode(e,data);}_encodeParams(e,t){return this._abiCoder.encode(e,t);}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[]);}decodeErrorResult(e,data){"string"==typeof e&&(e=this.getError(e));const t=Object(T.a)(data);return Object(T.i)(t.slice(0,4))!==this.getSighash(e)&&Ee.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Object(T.i)(t)),this._decodeParams(e.inputs,t.slice(4));}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),Object(T.i)(Object(T.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]));}decodeFunctionData(e,data){"string"==typeof e&&(e=this.getFunction(e));const t=Object(T.a)(data);return Object(T.i)(t.slice(0,4))!==this.getSighash(e)&&Ee.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Object(T.i)(t)),this._decodeParams(e.inputs,t.slice(4));}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(T.i)(Object(T.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]));}decodeFunctionResult(e,data){"string"==typeof e&&(e=this.getFunction(e));let t=Object(T.a)(data),r=null,n=null,o=null,c=null;switch(t.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,t);}catch(e){}break;case 4:{const e=Object(T.i)(t.slice(0,4)),l=ke[e];if(l)n=this._abiCoder.decode(l.inputs,t.slice(4)),o=l.name,c=l.signature,l.reason&&(r=n[0]);else try{const r=this.getError(e);n=this._abiCoder.decode(r.inputs,t.slice(4)),o=r.name,c=r.format();}catch(e){console.log(e);}break;}}return Ee.throwError("call revert exception",A.b.errors.CALL_EXCEPTION,{method:e.format(),errorArgs:n,errorName:o,errorSignature:c,reason:r});}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(T.i)(this._abiCoder.encode(e.outputs,t||[]));}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Ee.throwError("too many arguments for "+e.format(),A.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(param,e)=>"string"===param.type?Object(we.a)(e):"bytes"===param.type?Object(Ae.a)(Object(T.i)(e)):("address"===param.type&&this._abiCoder.encode(["address"],[e]),Object(T.h)(Object(T.i)(e),32));for(t.forEach((t,o)=>{let param=e.inputs[o];param.indexed?null==t?r.push(null):"array"===param.baseType||"tuple"===param.baseType?Ee.throwArgumentError("filtering with tuples or arrays not supported","contract."+param.name,t):Array.isArray(t)?r.push(t.map(e=>n(param,e))):r.push(n(param,t)):null!=t&&Ee.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+param.name,t);});r.length&&null===r[r.length-1];)r.pop();return r;}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Ee.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((param,e)=>{const c=t[e];if(param.indexed){if("string"===param.type)r.push(Object(we.a)(c));else if("bytes"===param.type)r.push(Object(Ae.a)(c));else{if("tuple"===param.baseType||"array"===param.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([param.type],[c]));}}else n.push(param),o.push(c);}),{data:this._abiCoder.encode(n,o),topics:r};}decodeEventLog(e,data,t){if("string"==typeof e&&(e=this.getEvent(e)),null!=t&&!e.anonymous){let r=this.getEventTopic(e);Object(T.l)(t[0],32)&&t[0].toLowerCase()===r||Ee.throwError("fragment/topic mismatch",A.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:r,value:t[0]}),t=t.slice(1);}let r=[],n=[],o=[];e.inputs.forEach((param,e)=>{param.indexed?"string"===param.type||"bytes"===param.type||"tuple"===param.baseType||"array"===param.baseType?(r.push(te.fromObject({type:"bytes32",name:param.name})),o.push(!0)):(r.push(param),o.push(!1)):(n.push(param),o.push(!1));});let c=null!=t?this._abiCoder.decode(r,Object(T.b)(t)):null,l=this._abiCoder.decode(n,data,!0),d=[],f=0,h=0;e.inputs.forEach((param,e)=>{if(param.indexed){if(null==c)d[e]=new Me({_isIndexed:!0,hash:null});else if(o[e])d[e]=new Me({_isIndexed:!0,hash:c[h++]});else try{d[e]=c[h++];}catch(t){d[e]=t;}}else try{d[e]=l[f++];}catch(t){d[e]=t;}if(param.name&&null==d[param.name]){const t=d[e];t instanceof Error?Object.defineProperty(d,param.name,{enumerable:!0,get:()=>{throw Ce(`property ${JSON.stringify(param.name)}`,t);}}):d[param.name]=t;}});for(let i=0;i{throw Ce(`index ${i}`,e);}});}return Object.freeze(d);}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new Oe({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:c.a.from(e.value||"0")}):null;}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new Se({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)});}parseError(data){const e=Object(T.i)(data);let t=this.getError(e.substring(0,10).toLowerCase());return t?new _e({args:this._abiCoder.decode(t.inputs,"0x"+e.substring(10)),errorFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t)}):null;}static isInterface(e){return!(!e||!e._isInterface);}}var Fe=r(84),Le=r(41),Re=r(217),Be=r(219),Ne=r(218),xe=r(14),je=r(42),Ie=r(145);const Je=new RegExp("^bytes([0-9]+)$"),De=new RegExp("^(u?int)([0-9]*)$"),Xe=new RegExp("^(.*)\\[([0-9]*)\\]$");function Ge(e,t,r){switch(e){case"address":return r?Object(T.p)(t,32):Object(T.a)(t);case"string":return Object(H.f)(t);case"bytes":return Object(T.a)(t);case"bool":return t=t?"0x01":"0x00",r?Object(T.p)(t,32):Object(T.a)(t);}let n=e.match(De);if(n){let o=parseInt(n[2]||"256");if(n[2]&&String(o)!==n[2]||o%8!=0||0===o||o>256)throw new Error("invalid number type - "+e);return r&&(o=256),t=c.a.from(t).toTwos(o),Object(T.p)(t,o/8);}if(n=e.match(Je),n){const o=parseInt(n[1]);if(String(o)!==n[1]||0===o||o>32)throw new Error("invalid bytes type - "+e);if(Object(T.a)(t).byteLength!==o)throw new Error("invalid value for "+e);return r?Object(T.a)((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t;}if(n=e.match(Xe),n&&Array.isArray(t)){const r=n[1];if(parseInt(n[2]||String(t.length))!=t.length)throw new Error("invalid value for "+e);const o=[];return t.forEach(function(e){o.push(Ge(r,e,!0));}),Object(T.b)(o);}throw new Error("invalid type - "+e);}function He(e,t){if(e.length!=t.length)throw new Error("type/value count mismatch");const r=[];return e.forEach(function(e,n){r.push(Ge(e,t[n]));}),Object(T.i)(Object(T.b)(r));}function Ue(e,t){return Object(Ae.a)(He(e,t));}function Ve(e,t){return Object(Ie.c)(He(e,t));}var ze=r(81),Ze=r(220),Ke=r(28),qe=r(25),Qe=r(144),We=r(111);function Ye(text){const e=Object(H.f)(text);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(T.i)(Object(T.b)([e,We.a]).slice(0,32));}function $e(e){const data=Object(T.a)(e);if(32!==data.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==data[31])throw new Error("invalid bytes32 string - no null terminator");let t=31;for(;0===data[t-1];)t--;return Object(H.h)(data.slice(0,t));}var et=r(11);const tt=new A.b("units/5.4.0"),nt=["wei","kwei","mwei","gwei","szabo","finney","ether"];function it(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&tt.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let o="";for(2===t.length&&(o="."+(t[1]||"0"));o.length>2&&"0"===o[o.length-1];)o=o.substring(0,o.length-1);const c=[];for(;r.length;){if(r.length<=3){c.unshift(r);break;}{const e=r.length-3;c.unshift(r.substring(e)),r=r.substring(0,e);}}return n+c.join(",")+o;}function at(e,t){if("string"==typeof t){const e=nt.indexOf(t);-1!==e&&(t=3*e);}return Object(l.b)(e,null!=t?t:18);}function ot(e,t){if("string"!=typeof e&&tt.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=nt.indexOf(t);-1!==e&&(t=3*e);}return Object(l.c)(e,null!=t?t:18);}function st(e){return at(e,18);}function ut(e){return ot(e,18);}var ct=r(15),lt=r(141),ft=r(75);const ht=new A.b(ft.a);},function(e,t,r){"use strict";r.d(t,"a",function(){return l;});var n=r(0),o=r(1);class c{constructor(e){Object(o.d)(this,"alphabet",e),Object(o.d)(this,"base",e.length),Object(o.d)(this,"_alphabetMap",{}),Object(o.d)(this,"_leader",e.charAt(0));for(let i=0;i0;)t.push(e%this.base),e=e/this.base|0;}let r="";for(let e=0;0===source[e]&&e=0;--q)r+=this.alphabet[t[q]];return r;}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let i=0;i>=8;for(;n>0;)t.push(255&n),n>>=8;}for(let r=0;e[r]===this._leader&&rthis.wordSize&&f.throwError("value out-of-bounds",l.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(n.b)([this._padding.slice(t.length%this.wordSize),t])),t;}writeValue(e){return this._writeData(this._getValue(e));}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t);};}}class y{constructor(data,e,t,r){Object(c.d)(this,"_data",Object(n.a)(data)),Object(c.d)(this,"wordSize",e||32),Object(c.d)(this,"_coerceFunc",t),Object(c.d)(this,"allowLoose",r),this._offset=0;}get data(){return Object(n.i)(this._data);}get consumed(){return this._offset;}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t;}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):y.coerce(e,t);}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:f.throwError("data out-of-bounds",l.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n);}subReader(e){return new y(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose);}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e);}readValue(){return o.a.from(this.readBytes(this.wordSize));}}var v=r(3),T=r(103),w=r(5);class A extends h{constructor(e){super("address","address",e,!1);}defaultValue(){return"0x0000000000000000000000000000000000000000";}encode(e,t){try{t=Object(v.a)(t);}catch(e){this._throwError(e.message,t);}return e.writeValue(t);}decode(e){return Object(v.a)(Object(n.h)(e.readValue().toHexString(),20));}}class E extends h{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e;}defaultValue(){return this.coder.defaultValue();}encode(e,t){return this.coder.encode(e,t);}decode(e){return this.coder.decode(e);}}const S=new l.b(d);function O(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map(t=>{const n=t.localName;return n||S.throwError("cannot encode object for signature with missing names",l.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&S.throwError("cannot encode object for signature with duplicate names",l.b.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n];});}else S.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&S.throwArgumentError("types/value length mismatch","tuple",r);let o=new m(e.wordSize),c=new m(e.wordSize),d=[];t.forEach((e,t)=>{let r=n[t];if(e.dynamic){let t=c.length;e.encode(c,r);let n=o.writeUpdatableValue();d.push(e=>{n(e+t);});}else e.encode(o,r);}),d.forEach(e=>{e(o.length);});let f=e.appendWriter(o);return f+=e.appendWriter(c),f;}function _(e,t){let r=[],n=e.subReader(0);t.forEach(t=>{let o=null;if(t.dynamic){let r=e.readValue(),c=n.subReader(r.toNumber());try{o=t.decode(c);}catch(e){if(e.code===l.b.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type;}}else try{o=t.decode(e);}catch(e){if(e.code===l.b.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type;}null!=o&&r.push(o);});const o=t.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e;},{});t.forEach((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const c=r[t];c instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw c;}}):r[n]=c;});for(let i=0;i{throw e;}});}return Object.freeze(r);}class M extends h{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t;}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let i=0;ie._data.length&&S.throwError("insufficient data length",l.b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let i=0;i{e.dynamic&&(r=!0),n.push(e.type);});super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e;}defaultValue(){const e=[];this.coders.forEach(t=>{e.push(t.defaultValue());});const t=this.coders.reduce((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e;},{});return this.coders.forEach((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]));}),Object.freeze(e);}encode(e,t){return O(e,this.coders,t);}decode(e){return e.coerce(this.name,_(e,this.coders));}}const I=new l.b(d),J={};let D={calldata:!0,memory:!0,storage:!0},X={calldata:!0,memory:!0};function G(e,t){if("bytes"===e||"string"===e){if(D[t])return!0;}else if("address"===e){if("payable"===t)return!0;}else if((e.indexOf("[")>=0||"tuple"===e)&&X[t])return!0;return(D[t]||"payable"===t)&&I.throwArgumentError("invalid modifier","name",t),!1;}function H(object,e){for(let t in e)Object(c.d)(object,t,e[t]);}const U=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),V=new RegExp(/^(.*)\[([0-9]*)\]$/);class z{constructor(e,t){e!==J&&I.throwError("use fromString",l.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),H(this,t);let r=this.type.match(V);H(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:z.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this);}format(e){if(e||(e=U.sighash),U[e]||I.throwArgumentError("invalid format type","format",e),e===U.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map(t=>JSON.parse(t.format(e)))),JSON.stringify(t);}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==U.sighash&&(t+=this.type),t+="("+this.components.map(t=>t.format(e)).join(e===U.full?", ":",")+")"):t+=this.type,e!==U.sighash&&(!0===this.indexed&&(t+=" indexed"),e===U.full&&this.name&&(t+=" "+this.name)),t;}static from(e,t){return"string"==typeof e?z.fromString(e,t):z.fromObject(e);}static fromObject(e){return z.isParamType(e)?e:new z(J,{name:e.name||null,type:ie(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(z.fromObject):null});}static fromString(e,t){return r=function(param,e){let t=param;function r(i){I.throwArgumentError(`unexpected character at position ${i}`,"param",param);}function n(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r;}param=param.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},c=o;for(let i=0;iz.fromString(param,t));}class K{constructor(e,t){e!==J&&I.throwError("use a static from method",l.b.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),H(this,t),this._isFragment=!0,Object.freeze(this);}static from(e){return K.isFragment(e)?e:"string"==typeof e?K.fromString(e):K.fromObject(e);}static fromObject(e){if(K.isFragment(e))return e;switch(e.type){case"function":return te.fromObject(e);case"event":return Q.fromObject(e);case"constructor":return ee.fromObject(e);case"error":return ne.fromObject(e);case"fallback":case"receive":return null;}return I.throwArgumentError("invalid fragment object","value",e);}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?Q.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?te.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?ee.fromString(e.trim()):"error"===e.split(" ")[0]?ne.fromString(e.substring(5).trim()):I.throwArgumentError("unsupported fragment","value",e);}static isFragment(e){return!(!e||!e._isFragment);}}class Q extends K{format(e){if(e||(e=U.sighash),U[e]||I.throwArgumentError("invalid format type","format",e),e===U.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});let t="";return e!==U.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===U.full?", ":",")+") ",e!==U.sighash&&this.anonymous&&(t+="anonymous "),t.trim();}static from(e){return"string"==typeof e?Q.fromString(e):Q.fromObject(e);}static fromObject(e){if(Q.isEventFragment(e))return e;"event"!==e.type&&I.throwArgumentError("invalid event object","value",e);const t={name:oe(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(z.fromObject):[],type:"event"};return new Q(J,t);}static fromString(e){let t=e.match(se);t||I.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach(e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:I.warn("unknown modifier: "+e);}}),Q.fromObject({name:t[1].trim(),anonymous:r,inputs:Z(t[2],!0),type:"event"});}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type;}}function W(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&I.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||I.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=o.a.from(r[1]),r[0]):e;}function Y(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach(e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e);}});}function $(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&I.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&I.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||I.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&I.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&I.throwArgumentError("unable to determine stateMutability","value",e),t;}class ee extends K{format(e){if(e||(e=U.sighash),U[e]||I.throwArgumentError("invalid format type","format",e),e===U.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});e===U.sighash&&I.throwError("cannot format a constructor for sighash",l.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(input=>input.format(e)).join(e===U.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim();}static from(e){return"string"==typeof e?ee.fromString(e):ee.fromObject(e);}static fromObject(e){if(ee.isConstructorFragment(e))return e;"constructor"!==e.type&&I.throwArgumentError("invalid constructor object","value",e);let t=$(e);t.constant&&I.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(z.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?o.a.from(e.gas):null};return new ee(J,r);}static fromString(e){let t={type:"constructor"},r=(e=W(e,t)).match(se);return r&&"constructor"===r[1].trim()||I.throwArgumentError("invalid constructor string","value",e),t.inputs=Z(r[2].trim(),!1),Y(r[3].trim(),t),ee.fromObject(t);}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type;}}class te extends ee{format(e){if(e||(e=U.sighash),U[e]||I.throwArgumentError("invalid format type","format",e),e===U.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(input=>JSON.parse(input.format(e))),outputs:this.outputs.map(output=>JSON.parse(output.format(e)))});let t="";return e!==U.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===U.full?", ":",")+") ",e!==U.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map(output=>output.format(e)).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim();}static from(e){return"string"==typeof e?te.fromString(e):te.fromObject(e);}static fromObject(e){if(te.isFunctionFragment(e))return e;"function"!==e.type&&I.throwArgumentError("invalid function object","value",e);let t=$(e);const r={type:e.type,name:oe(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(z.fromObject):[],outputs:e.outputs?e.outputs.map(z.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?o.a.from(e.gas):null};return new te(J,r);}static fromString(e){let t={type:"function"},r=(e=W(e,t)).split(" returns ");r.length>2&&I.throwArgumentError("invalid function string","value",e);let n=r[0].match(se);if(n||I.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&oe(t.name),t.inputs=Z(n[2],!1),Y(n[3].trim(),t),r.length>1){let n=r[1].match(se);""==n[1].trim()&&""==n[3].trim()||I.throwArgumentError("unexpected tokens","value",e),t.outputs=Z(n[2],!1);}else t.outputs=[];return te.fromObject(t);}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type;}}function re(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||I.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e;}class ne extends K{format(e){if(e||(e=U.sighash),U[e]||I.throwArgumentError("invalid format type","format",e),e===U.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(input=>JSON.parse(input.format(e)))});let t="";return e!==U.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(input=>input.format(e)).join(e===U.full?", ":",")+") ",t.trim();}static from(e){return"string"==typeof e?ne.fromString(e):ne.fromObject(e);}static fromObject(e){if(ne.isErrorFragment(e))return e;"error"!==e.type&&I.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:oe(e.name),inputs:e.inputs?e.inputs.map(z.fromObject):[]};return re(new ne(J,t));}static fromString(e){let t={type:"error"},r=e.match(se);return r||I.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&oe(t.name),t.inputs=Z(r[2],!1),re(ne.fromObject(t));}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type;}}function ie(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e;}const ae=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function oe(e){return e&&e.match(ae)||I.throwArgumentError(`invalid identifier "${e}"`,"value",e),e;}const se=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const ue=new l.b(d),ce=new RegExp(/^bytes([0-9]*)$/),le=new RegExp(/^(u?int)([0-9]*)$/);class de{constructor(e){ue.checkNew(new.target,de),Object(c.d)(this,"coerceFunc",e||null);}_getCoder(param){switch(param.baseType){case"address":return new A(param.name);case"bool":return new k(param.name);case"string":return new x(param.name);case"bytes":return new P(param.name);case"array":return new M(this._getCoder(param.arrayChildren),param.arrayLength,param.name);case"tuple":return new j((param.components||[]).map(component=>this._getCoder(component)),param.name);case"":return new L(param.name);}let e=param.type.match(le);if(e){let t=parseInt(e[2]||"256");return(0===t||t>256||t%8!=0)&&ue.throwArgumentError("invalid "+e[1]+" bit length","param",param),new B(t/8,"int"===e[1],param.name);}if(e=param.type.match(ce),e){let t=parseInt(e[1]);return(0===t||t>32)&&ue.throwArgumentError("invalid bytes length","param",param),new F(t,param.name);}return ue.throwArgumentError("invalid type","type",param.type);}_getWordSize(){return 32;}_getReader(data,e){return new y(data,this._getWordSize(),this.coerceFunc,e);}_getWriter(){return new m(this._getWordSize());}getDefaultValue(e){const t=e.map(e=>this._getCoder(z.from(e)));return new j(t,"_").defaultValue();}encode(e,t){e.length!==t.length&&ue.throwError("types/values length mismatch",l.b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map(e=>this._getCoder(z.from(e))),n=new j(r,"_"),o=this._getWriter();return n.encode(o,t),o.data;}decode(e,data,t){const r=e.map(e=>this._getCoder(z.from(e)));return new j(r,"_").decode(this._getReader(Object(n.a)(data),t));}}const fe=new de(),he=new l.b(d);class pe extends c.a{}class me extends c.a{}class ye extends c.a{}class ge extends c.a{static isIndexed(e){return!(!e||!e._isIndexed);}}const be={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ve(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r;}class Te{constructor(e){he.checkNew(new.target,Te);let t=[];t="string"==typeof e?JSON.parse(e):e,Object(c.d)(this,"fragments",t.map(e=>K.from(e)).filter(e=>null!=e)),Object(c.d)(this,"_abiCoder",Object(c.e)(new.target,"getAbiCoder")()),Object(c.d)(this,"functions",{}),Object(c.d)(this,"errors",{}),Object(c.d)(this,"events",{}),Object(c.d)(this,"structs",{}),this.fragments.forEach(e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void he.warn("duplicate definition - constructor"):void Object(c.d)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return;}let r=e.format();t[r]?he.warn("duplicate definition - "+r):t[r]=e;}),this.deploy||Object(c.d)(this,"deploy",ee.from({payable:!1,type:"constructor"})),Object(c.d)(this,"_isInterface",!0);}format(e){e||(e=U.full),e===U.sighash&&he.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map(t=>t.format(e));return e===U.json?JSON.stringify(t.map(e=>JSON.parse(e))):t;}static getAbiCoder(){return fe;}static getAddress(address){return Object(v.a)(address);}static getSighash(e){return Object(n.e)(Object(T.a)(e.format()),0,4);}static getEventTopic(e){return Object(T.a)(e.format());}getFunction(e){if(Object(n.l)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];he.throwArgumentError("no matching function","sighash",e);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter(e=>e.split("(")[0]===t);return 0===r.length?he.throwArgumentError("no matching function","name",t):r.length>1&&he.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]];}const t=this.functions[te.fromString(e).format()];return t||he.throwArgumentError("no matching function","signature",e),t;}getEvent(e){if(Object(n.l)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];he.throwArgumentError("no matching event","topichash",t);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter(e=>e.split("(")[0]===t);return 0===r.length?he.throwArgumentError("no matching event","name",t):r.length>1&&he.throwArgumentError("multiple matching events","name",t),this.events[r[0]];}const t=this.events[Q.fromString(e).format()];return t||he.throwArgumentError("no matching event","signature",e),t;}getError(e){if(Object(n.l)(e)){const t=Object(c.e)(this.constructor,"getSighash");for(const r in this.errors){if(e===t(this.errors[r]))return this.errors[r];}he.throwArgumentError("no matching error","sighash",e);}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter(e=>e.split("(")[0]===t);return 0===r.length?he.throwArgumentError("no matching error","name",t):r.length>1&&he.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]];}const t=this.errors[te.fromString(e).format()];return t||he.throwArgumentError("no matching error","signature",e),t;}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e);}catch(t){try{e=this.getError(e);}catch(e){throw t;}}return Object(c.e)(this.constructor,"getSighash")(e);}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),Object(c.e)(this.constructor,"getEventTopic")(e);}_decodeParams(e,data){return this._abiCoder.decode(e,data);}_encodeParams(e,t){return this._abiCoder.encode(e,t);}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[]);}decodeErrorResult(e,data){"string"==typeof e&&(e=this.getError(e));const t=Object(n.a)(data);return Object(n.i)(t.slice(0,4))!==this.getSighash(e)&&he.throwArgumentError(`data signature does not match error ${e.name}.`,"data",Object(n.i)(t)),this._decodeParams(e.inputs,t.slice(4));}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),Object(n.i)(Object(n.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]));}decodeFunctionData(e,data){"string"==typeof e&&(e=this.getFunction(e));const t=Object(n.a)(data);return Object(n.i)(t.slice(0,4))!==this.getSighash(e)&&he.throwArgumentError(`data signature does not match function ${e.name}.`,"data",Object(n.i)(t)),this._decodeParams(e.inputs,t.slice(4));}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(n.i)(Object(n.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]));}decodeFunctionResult(e,data){"string"==typeof e&&(e=this.getFunction(e));let t=Object(n.a)(data),r=null,o=null,c=null,d=null;switch(t.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,t);}catch(e){}break;case 4:{const e=Object(n.i)(t.slice(0,4)),l=be[e];if(l)o=this._abiCoder.decode(l.inputs,t.slice(4)),c=l.name,d=l.signature,l.reason&&(r=o[0]);else try{const r=this.getError(e);o=this._abiCoder.decode(r.inputs,t.slice(4)),c=r.name,d=r.format();}catch(e){console.log(e);}break;}}return he.throwError("call revert exception",l.b.errors.CALL_EXCEPTION,{method:e.format(),errorArgs:o,errorName:c,errorSignature:d,reason:r});}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),Object(n.i)(this._abiCoder.encode(e.outputs,t||[]));}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&he.throwError("too many arguments for "+e.format(),l.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const o=(param,e)=>"string"===param.type?Object(T.a)(e):"bytes"===param.type?Object(w.a)(Object(n.i)(e)):("address"===param.type&&this._abiCoder.encode(["address"],[e]),Object(n.h)(Object(n.i)(e),32));for(t.forEach((t,n)=>{let param=e.inputs[n];param.indexed?null==t?r.push(null):"array"===param.baseType||"tuple"===param.baseType?he.throwArgumentError("filtering with tuples or arrays not supported","contract."+param.name,t):Array.isArray(t)?r.push(t.map(e=>o(param,e))):r.push(o(param,t)):null!=t&&he.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+param.name,t);});r.length&&null===r[r.length-1];)r.pop();return r;}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&he.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((param,e)=>{const c=t[e];if(param.indexed){if("string"===param.type)r.push(Object(T.a)(c));else if("bytes"===param.type)r.push(Object(w.a)(c));else{if("tuple"===param.baseType||"array"===param.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([param.type],[c]));}}else n.push(param),o.push(c);}),{data:this._abiCoder.encode(n,o),topics:r};}decodeEventLog(e,data,t){if("string"==typeof e&&(e=this.getEvent(e)),null!=t&&!e.anonymous){let r=this.getEventTopic(e);Object(n.l)(t[0],32)&&t[0].toLowerCase()===r||he.throwError("fragment/topic mismatch",l.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:r,value:t[0]}),t=t.slice(1);}let r=[],o=[],c=[];e.inputs.forEach((param,e)=>{param.indexed?"string"===param.type||"bytes"===param.type||"tuple"===param.baseType||"array"===param.baseType?(r.push(z.fromObject({type:"bytes32",name:param.name})),c.push(!0)):(r.push(param),c.push(!1)):(o.push(param),c.push(!1));});let d=null!=t?this._abiCoder.decode(r,Object(n.b)(t)):null,f=this._abiCoder.decode(o,data,!0),h=[],m=0,y=0;e.inputs.forEach((param,e)=>{if(param.indexed){if(null==d)h[e]=new ge({_isIndexed:!0,hash:null});else if(c[e])h[e]=new ge({_isIndexed:!0,hash:d[y++]});else try{h[e]=d[y++];}catch(t){h[e]=t;}}else try{h[e]=f[m++];}catch(t){h[e]=t;}if(param.name&&null==h[param.name]){const t=h[e];t instanceof Error?Object.defineProperty(h,param.name,{enumerable:!0,get:()=>{throw ve(`property ${JSON.stringify(param.name)}`,t);}}):h[param.name]=t;}});for(let i=0;i{throw ve(`index ${i}`,e);}});}return Object.freeze(h);}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new me({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:o.a.from(e.value||"0")}):null;}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new pe({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)});}parseError(data){const e=Object(n.i)(data);let t=this.getError(e.substring(0,10).toLowerCase());return t?new ye({args:this._abiCoder.decode(t.inputs,"0x"+e.substring(10)),errorFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t)}):null;}static isInterface(e){return!(!e||!e._isInterface);}}var we=r(31),Ae=r(27),Ee=r(11);var Se=function(e,t,r,n){return new(r||(r=Promise))(function(o,c){function l(e){try{f(n.next(e));}catch(e){c(e);}}function d(e){try{f(n.throw(e));}catch(e){c(e);}}function f(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t);})).then(l,d);}f((n=n.apply(e,t||[])).next());});};const Oe=new l.b("contracts/5.4.1"),_e={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};function Me(e,t){return Se(this,void 0,void 0,function*(){const r=yield t;try{return Object(v.a)(r);}catch(e){}e||Oe.throwError("a provider or signer is needed to resolve ENS names",l.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const address=yield e.resolveName(r);return null==address&&Oe.throwArgumentError("resolver or addr is not configured for ENS name","name",r),address;});}function ke(e,t,r){return Se(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((r,n)=>ke(e,Array.isArray(t)?t[n]:t[r.name],r))):"address"===r.type?yield Me(e,t):"tuple"===r.type?yield ke(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map(t=>ke(e,t,r.arrayChildren))):Promise.reject(new Error("invalid value for array")):t;});}function Ce(e,t,r){return Se(this,void 0,void 0,function*(){let d={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(d=Object(c.g)(r.pop())),Oe.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?d.from?d.from=Object(c.f)({override:Me(e.signer,d.from),signer:e.signer.getAddress()}).then(e=>Se(this,void 0,void 0,function*(){return Object(v.a)(e.signer)!==e.override&&Oe.throwError("Contract with a Signer cannot override from",l.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override;})):d.from=e.signer.getAddress():d.from&&(d.from=Me(e.provider,d.from));const f=yield Object(c.f)({args:ke(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:Object(c.f)(d)||{}}),data=e.interface.encodeFunctionData(t,f.args),h={data:data,to:f.address},m=f.overrides;if(null!=m.nonce&&(h.nonce=o.a.from(m.nonce).toNumber()),null!=m.gasLimit&&(h.gasLimit=o.a.from(m.gasLimit)),null!=m.gasPrice&&(h.gasPrice=o.a.from(m.gasPrice)),null!=m.maxFeePerGas&&(h.maxFeePerGas=o.a.from(m.maxFeePerGas)),null!=m.maxPriorityFeePerGas&&(h.maxPriorityFeePerGas=o.a.from(m.maxPriorityFeePerGas)),null!=m.from&&(h.from=m.from),null!=m.type&&(h.type=m.type),null!=m.accessList&&(h.accessList=Object(Ee.b)(m.accessList)),null==h.gasLimit&&null!=t.gas){let e=21e3;const r=Object(n.a)(data);for(let i=0;inull!=d[e]);return y.length&&Oe.throwError(`cannot override ${y.map(e=>JSON.stringify(e)).join(",")}`,l.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:y}),h;});}function Pe(e,t,r){const n=e.signer||e.provider;return function(...o){return Se(this,void 0,void 0,function*(){let d;if(o.length===t.inputs.length+1&&"object"==typeof o[o.length-1]){const e=Object(c.g)(o.pop());null!=e.blockTag&&(d=yield e.blockTag),delete e.blockTag,o.push(e);}null!=e.deployTransaction&&(yield e._deployed(d));const f=yield Ce(e,t,o),h=yield n.call(f,d);try{let n=e.interface.decodeFunctionResult(t,h);return r&&1===t.outputs.length&&(n=n[0]),n;}catch(t){throw t.code===l.b.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=o,t.transaction=f),t;}});};}function Fe(e,t,r){return t.constant?Pe(e,t,r):function(e,t){return function(...r){return Se(this,void 0,void 0,function*(){e.signer||Oe.throwError("sending a transaction requires a signer",l.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield Ce(e,t,r),o=yield e.signer.sendTransaction(n),d=o.wait.bind(o);return o.wait=t=>d(t).then(t=>(t.events=t.logs.map(r=>{let n=Object(c.c)(r),o=null;try{o=e.interface.parseLog(r);}catch(e){}return o&&(n.args=o.args,n.decode=(data,t)=>e.interface.decodeEventLog(o.eventFragment,data,t),n.event=o.name,n.eventSignature=o.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n;}),t)),o;});};}(e,t);}function Le(filter){return!filter.address||null!=filter.topics&&0!==filter.topics.length?(filter.address||"*")+"@"+(filter.topics?filter.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):""):"*";}class Re{constructor(e,filter){Object(c.d)(this,"tag",e),Object(c.d)(this,"filter",filter),this._listeners=[];}addListener(e,t){this._listeners.push({listener:e,once:t});}removeListener(e){let t=!1;this._listeners=this._listeners.filter(r=>!(!t&&r.listener===e)||(t=!0,!1));}removeAllListeners(){this._listeners=[];}listeners(){return this._listeners.map(i=>i.listener);}listenerCount(){return this._listeners.length;}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter(t=>{const r=e.slice();return setTimeout(()=>{t.listener.apply(this,r);},0),!t.once;}),t;}prepareEvent(e){}getEmit(e){return[e];}}class Be extends Re{constructor(){super("error",null);}}class Ne extends Re{constructor(address,e,t,r){const filter={address:address};let n=e.getEventTopic(t);r?(n!==r[0]&&Oe.throwArgumentError("topic mismatch","topics",r),filter.topics=r.slice()):filter.topics=[n],super(Le(filter),filter),Object(c.d)(this,"address",address),Object(c.d)(this,"interface",e),Object(c.d)(this,"fragment",t);}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(data,e)=>this.interface.decodeEventLog(this.fragment,data,e);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics);}catch(t){e.args=null,e.decodeError=t;}}getEmit(e){const t=function(e){const t=[],r=function(path,object){if(Array.isArray(object))for(let e in object){const n=path.slice();n.push(e);try{r(n,object[e]);}catch(e){t.push({path:n,error:e});}}};return r([],e),t;}(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r;}}class xe extends Re{constructor(address,e){super("*",{address:address}),Object(c.d)(this,"address",address),Object(c.d)(this,"interface",e);}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(data,e)=>this.interface.decodeEventLog(t.eventFragment,data,e),e.args=t.args;}catch(e){}}}class je{constructor(e,t,r){Oe.checkNew(new.target,Ie),Object(c.d)(this,"interface",Object(c.e)(new.target,"getInterface")(t)),null==r?(Object(c.d)(this,"provider",null),Object(c.d)(this,"signer",null)):Ae.a.isSigner(r)?(Object(c.d)(this,"provider",r.provider||null),Object(c.d)(this,"signer",r)):we.b.isProvider(r)?(Object(c.d)(this,"provider",r),Object(c.d)(this,"signer",null)):Oe.throwArgumentError("invalid signer or provider","signerOrProvider",r),Object(c.d)(this,"callStatic",{}),Object(c.d)(this,"estimateGas",{}),Object(c.d)(this,"functions",{}),Object(c.d)(this,"populateTransaction",{}),Object(c.d)(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach(t=>{const r=this.interface.events[t];Object(c.d)(this.filters,t,(...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)})),e[r.name]||(e[r.name]=[]),e[r.name].push(t);}),Object.keys(e).forEach(t=>{const r=e[t];1===r.length?Object(c.d)(this.filters,t,this.filters[r[0]]):Oe.warn(`Duplicate definition of ${t} (${r.join(", ")})`);});}if(Object(c.d)(this,"_runningEvents",{}),Object(c.d)(this,"_wrappedEmits",{}),null==e&&Oe.throwArgumentError("invalid contract address or ENS name","addressOrName",e),Object(c.d)(this,"address",e),this.provider)Object(c.d)(this,"resolvedAddress",Me(this.provider,e));else try{Object(c.d)(this,"resolvedAddress",Promise.resolve(Object(v.a)(e)));}catch(e){Oe.throwError("provider is required to use ENS name as contract address",l.b.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"});}const n={},o={};Object.keys(this.interface.functions).forEach(e=>{const t=this.interface.functions[e];if(o[e])Oe.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{o[e]=!0;{const r=t.name;n[r]||(n[r]=[]),n[r].push(e);}null==this[e]&&Object(c.d)(this,e,Fe(this,t,!0)),null==this.functions[e]&&Object(c.d)(this.functions,e,Fe(this,t,!1)),null==this.callStatic[e]&&Object(c.d)(this.callStatic,e,Pe(this,t,!0)),null==this.populateTransaction[e]&&Object(c.d)(this.populateTransaction,e,function(e,t){return function(...r){return Ce(e,t,r);};}(this,t)),null==this.estimateGas[e]&&Object(c.d)(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return Se(this,void 0,void 0,function*(){r||Oe.throwError("estimate require a provider or signer",l.b.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const o=yield Ce(e,t,n);return yield r.estimateGas(o);});};}(this,t));}}),Object.keys(n).forEach(e=>{const t=n[e];if(t.length>1)return;const r=t[0];try{null==this[e]&&Object(c.d)(this,e,this[r]);}catch(e){}null==this.functions[e]&&Object(c.d)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&Object(c.d)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&Object(c.d)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&Object(c.d)(this.estimateGas,e,this.estimateGas[r]);});}static getContractAddress(e){return Object(v.b)(e);}static getInterface(e){return Te.isInterface(e)?e:new Te(e);}deployed(){return this._deployed();}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(code=>("0x"===code&&Oe.throwError("contract not deployed",l.b.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise;}fallback(e){this.signer||Oe.throwError("sending a transactions require a signer",l.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=Object(c.g)(e||{});return["from","to"].forEach(function(e){null!=t[e]&&Oe.throwError("cannot override "+e,l.b.errors.UNSUPPORTED_OPERATION,{operation:e});}),t.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(t));}connect(e){"string"==typeof e&&(e=new Ae.b(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&Object(c.d)(t,"deployTransaction",this.deployTransaction),t;}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider);}static isIndexed(e){return ge.isIndexed(e);}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e;}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new Be());if("event"===e)return this._normalizeRunningEvent(new Re("event",null));if("*"===e)return this._normalizeRunningEvent(new xe(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Ne(this.address,this.interface,t));}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new Ne(this.address,this.interface,r,e.topics));}catch(e){}const filter={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Re(Le(filter),filter));}return this._normalizeRunningEvent(new xe(this.address,this.interface));}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag]);}}_wrapEvent(e,t,r){const n=Object(c.c)(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e));},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n;}_addEventListener(e,t,r){if(this.provider||Oe.throwError("events require a provider or a signer with a provider",l.b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t);}catch(e){n.decodeError=e.error;}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n);};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r);}}queryFilter(e,t,r){const o=this._getRunningEvent(e),filter=Object(c.g)(o.filter);return"string"==typeof t&&Object(n.l)(t,32)?(null!=r&&Oe.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),filter.blockHash=t):(filter.fromBlock=null!=t?t:0,filter.toBlock=null!=r?r:"latest"),this.provider.getLogs(filter).then(e=>e.map(e=>this._wrapEvent(o,e,null)));}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this;}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this;}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n;}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce((e,t)=>e+this._runningEvents[t].listenerCount(),0):this._getRunningEvent(e).listenerCount():0;}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach(t=>{e.push(t);});return e;}return this._getRunningEvent(e).listeners();}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t);}return this;}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this;}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this;}removeListener(e,t){return this.off(e,t);}}class Ie extends je{}class Je{constructor(e,t,r){let o=null;o="string"==typeof t?t:Object(n.j)(t)?Object(n.i)(t):t&&"string"==typeof t.object?t.object:"!","0x"!==o.substring(0,2)&&(o="0x"+o),(!Object(n.l)(o)||o.length%2)&&Oe.throwArgumentError("invalid bytecode","bytecode",t),r&&!Ae.a.isSigner(r)&&Oe.throwArgumentError("invalid signer","signer",r),Object(c.d)(this,"bytecode",o),Object(c.d)(this,"interface",Object(c.e)(new.target,"getInterface")(e)),Object(c.d)(this,"signer",r||null);}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=Object(c.g)(e.pop());for(const e in t)if(!_e[e])throw new Error("unknown transaction override "+e);}if(["data","from","to"].forEach(e=>{null!=t[e]&&Oe.throwError("cannot override "+e,l.b.errors.UNSUPPORTED_OPERATION,{operation:e});}),t.value){o.a.from(t.value).isZero()||this.interface.deploy.payable||Oe.throwError("non-payable constructor cannot override value",l.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value});}return Oe.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=Object(n.i)(Object(n.b)([this.bytecode,this.interface.encodeDeploy(e)])),t;}deploy(...e){return Se(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),Oe.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield ke(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),o=yield this.signer.sendTransaction(n),address=Object(c.e)(this.constructor,"getContractAddress")(o),l=Object(c.e)(this.constructor,"getContract")(address,this.interface,this.signer);return Object(c.d)(l,"deployTransaction",o),l;});}attach(address){return this.constructor.getContract(address,this.interface,this.signer);}connect(e){return new this.constructor(this.interface,this.bytecode,e);}static fromSolidity(e,t){null==e&&Oe.throwError("missing compiler output",l.b.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t);}static getInterface(e){return Ie.getInterface(e);}static getContractAddress(e){return Object(v.b)(e);}static getContract(address,e,t){return new Ie(address,e,t);}}},function(e,t,r){"use strict";r.r(t),r.d(t,"workerEvents",function(){return n;}),r.d(t,"numbers",function(){return o;});var n={INIT_WORKER:"initWorker",GET_COMMITMENT_EVENTS:"get_commitment_events",GET_UNSPENT_EVENTS:"get_unspent_events",GET_NULLIFIER_EVENT:"get_nullifier_event",GET_NULLIFIER_EVENTS_FROM_TX_HASH:"get_nullifier_events_from_tx_hash",UPDATE_NULLIFIER_EVENTS:"update_nullifier_events",GET_BATCH_EVENTS:"get_batch_events",GET_BATCH_COMMITMENTS_EVENTS:"get_batch_commitments_events",GET_EVENTS_FROM_TX_HASH:"get_events_from_tx_hash",SAVE_EVENTS:"save_events",GET_CACHED_EVENTS:"get_cached_events",GET_CACHED_COMMITMENTS_EVENTS:"get_cached_commitments_events",SAVE_LAST_SYNC_BLOCK:"save_last_sync_block"},o={ZERO:0,TWO:2,ONE:1,BYTES_31:31,BYTES_62:62,IS_SPENT_INDEX:1,OX_LENGTH:2,RECALL_DELAY:500,NULLIFIER_LENGTH:66,NONCE_BUF_LENGTH:24,COMMITMENTS_CHAIN:100,DEPLOYED_BLOCK:19097755,DECRYPT_WORKERS_COUNT:8,MIN_BLOCKS_INTERVAL_LINE:2e5,EPHEM_PUBLIC_KEY_BUF_LENGTH:56};},,function(e,t,r){var n=r(30),o=r(97),c=r(60),l=r(38),d=r(68),f=r(29),h=r(121),m=Object.getOwnPropertyDescriptor;t.f=n?m:function(e,t){if(e=l(e),t=d(t),h)try{return m(e,t);}catch(e){}if(f(e,t))return c(!o.f.call(e,t),e[t]);};},function(e,t,r){var n=r(23),o=r(18),c=r(29),l=r(59),d=r(92),f=r(95),h=r(98),m=r(99).CONFIGURABLE,y=h.get,v=h.enforce,T=String(String).split("String");(e.exports=function(e,t,r,f){var h,y=!!f&&!!f.unsafe,w=!!f&&!!f.enumerable,A=!!f&&!!f.noTargetGet,E=f&&void 0!==f.name?f.name:t;o(r)&&("Symbol("===String(E).slice(0,7)&&(E="["+String(E).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!c(r,"name")||m&&r.name!==E)&&l(r,"name",E),(h=v(r)).source||(h.source=T.join("string"==typeof E?E:""))),e!==n?(y?!A&&e[t]&&(w=!0):delete e[t],w?e[t]=r:l(e,t,r)):w?e[t]=r:d(t,r);})(Function.prototype,"toString",function(){return o(this)&&y(this).source||f(this);});},function(e,t,r){var n,o=r(36),c=r(173),l=r(100),d=r(71),html=r(174),f=r(86),h=r(70),m=h("IE_PROTO"),y=function(){},v=function(content){return"