{div:e,mod:h.mod}):0!==(this.negative&a.negative)?(h=this.neg().divmod(a.neg(),b),"div"!==b&&(g=h.mod.neg(),c&&0!==g.negative&&g.isub(a)),{div:h.div,mod:g}):a.length>this.length||this.cmp(a)<0?{div:newf(0),mod:this}:1===a.length?"div"===b?{div:this.divn(a.words[0]),mod:null}:"mod"===b?{div:null,mod:newf(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:newf(this.modn(a.words[0]))}:this._wordDiv(a,b)},f.prototype.div=function(a){returnthis.divmod(a,"div",!1).div},f.prototype.mod=function(a){returnthis.divmod(a,"mod",!1).mod},f.prototype.umod=function(a){returnthis.divmod(a,"mod",!0).mod},f.prototype.divRound=function(a){varb=this.divmod(a);if(b.mod.isZero())returnb.div;varc=0!==b.div.negative?b.mod.isub(a):b.mod,d=a.ushrn(1),e=a.andln(1),f=c.cmp(d);returnf<0||1===e&&0===f?b.div:0!==b.div.negative?b.div.isubn(1):b.div.iaddn(1)},f.prototype.modn=function(a){d(a<=67108863);for(varb=(1<<26)%a,c=0,e=this.length-1;e>=0;e--)c=(b*c+(0|this.words[e]))%a;returnc},f.prototype.idivn=function(a){d(a<=67108863);for(varb=0,c=this.length-1;c>=0;c--){vare=(0|this.words[c])+67108864*b;this.words[c]=e/a|0,b=e%a}returnthis.strip()},f.prototype.divn=function(a){returnthis.clone().idivn(a)},f.prototype.egcd=function(a){d(0===a.negative),d(!a.isZero());varb=this,c=a.clone();b=0!==b.negative?b.umod(a):b.clone();for(vare=newf(1),g=newf(0),h=newf(0),i=newf(1),j=0;b.isEven()&&c.isEven();)b.iushrn(1),c.iushrn(1),++j;for(vark=c.clone(),l=b.clone();!b.isZero();){for(varm=0,n=1;0===(b.words[0]&n)&&m<26;++m,n<<=1);if(m>0)for(b.iushrn(m);m-->0;)(e.isOdd()||g.isOdd())&&(e.iadd(k),g.isub(l)),e.iushrn(1),g.iushrn(1);for(varo=0,p=1;0===(c.words[0]&p)&&o<26;++o,p<<=1);if(o>0)for(c.iushrn(o);o-->0;)(h.isOdd()||i.isOdd())&&(h.iadd(k),i.isub(l)),h.iushrn(1),i.iushrn(1);b.cmp(c)>=0?(b.isub(c),e.isub(h),g.isub(i)):(c.isub(b),h.isub(e),i.isub(g))}return{a:h,b:i,gcd:c.iushln(j)}},f.prototype._invmp=function(a){d(0===a.negative),d(!a.isZero());varb=this,c=a.clone();b=0!==b.negative?b.umod(a):b.clone();for(vare=newf(1),g=newf(0),h=c.clone();b.cmpn(1)>0&&c.cmpn(1)>0;){for(vari=0,j=1;0===(b.words[0]&j)&&i<26;++i,j<<=1);if(i>0)for(b.iushrn(i);i-->0;)e.isOdd()&&e.iadd(h),e.iushrn(1);for(vark=0,l=1;0===(c.words[0]&l)&&k<26;++k,l<<=1);if(k>0)for(c.iushrn(k);k-->0;)g.isOdd()&&g.iadd(h),g.iushrn(1);b.cmp(c)>=0?(b.isub(c),e.isub(g)):(c.isub(b),g.isub(e))}varm;returnm=0===b.cmpn(1)?e:g,m.cmpn(0)<0&&m.iadd(a),m},f.prototype.gcd=function(a){if(this.isZero())returna.abs();if(a.isZero())returnthis.abs();varb=this.clone(),c=a.clone();b.negative=0,c.negative=0;for(vard=0;b.isEven()&&c.isEven();d++)b.iushrn(1),c.iushrn(1);for(;;){for(;b.isEven();)b.iushrn(1);for(;c.isEven();)c.iushrn(1);vare=b.cmp(c);if(e<0){varf=b;b=c,c=f}elseif(0===e||0===c.cmpn(1))break;b.isub(c)}returnc.iushln(d)},f.prototype.invm=function(a){returnthis.egcd(a).a.umod(a)},f.prototype.isEven=function(){return0===(1&this.words[0])},f.prototype.isOdd=function(){return1===(1&this.words[0])},f.prototype.andln=function(a){returnthis.words[0]&a},f.prototype.bincn=function(a){d("number"==typeofa);varb=a%26,c=(a-b)/26,e=1<<b;if(this.length<=c)returnthis._expand(c+1),this.words[c]|=e,this;for(varf=e,g=c;0!==f&&g<this.length;g++){varh=0|this.words[g];h+=f,f=h>>>26,h&=67108863,this.words[g]=h}return0!==f&&(this.words[g]=f,this.length++),this},f.prototype.isZero=function(){return1===this.length&&0===this.words[0]},f.prototype.cmpn=function(a){varb=a<0;if(0!==this.negative&&!b)return-1;if(0===this.negative&&b)return1;this.strip();varc;if(this.length>1)c=1;else{b&&(a=-a),d(a<=67108863,"Number is too big");vare=0|this.words[0];c=e===a?0:e<a?-1:1}return0!==this.negative?0|-c:c},f.prototype.cmp=function(a){if(0!==this.negative&&0===a.negative)return-1;if(0===this.negative&&0!==a.negative)return1;varb=this.ucmp(a);return0!==this.negative?0|-b:b},f.prototype.ucmp=function(a){if(this.length>a.length)return1;if(this.length<a.length)return-1;for(varb=0,c=this.length-1;c>=0;c--){vard=0|this.words[c],e=0|a.words[c];if(d!==e){d<e?b=-1:d>e&&(b=1);break}}returnb},f.pro
a[26]=P^~R&J,a[27]=Q^~S&K,a[36]=Z^~_&T,a[37]=$^~aa&U,a[46]=ha^~ja&ba,a[47]=ia^~ka&ca,a[8]=x^~p&r,a[9]=y^~q&s,a[18]=H^~z&B,a[19]=I^~A&C,a[28]=R^~J&L,a[29]=S^~K&M,a[38]=_^~T&V,a[39]=aa^~U&W,a[48]=ja^~ba&da,a[49]=ka^~ca&ea,a[0]^=m[d],a[1]^=m[d+1]};if(g)b.exports=v;elsefor(varx=0;x<w.length;++x)e[w[x]]=v[w[x]]}()}).call(this,a("_process"),"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{_process:18}],17:[function(a,b,c){functiond(a,b){if(!a)thrownewError(b||"Assertion failed")}b.exports=d,d.equal=function(a,b,c){if(a!=b)thrownewError(c||"Assertion failed: "+a+" != "+b)}},{}],18:[function(a,b,c){b.exports=void0},{}],19:[function(a,b,c){"use strict";functiond(a){varb=parseInt(32*Math.ceil(a.length/32)),c=newUint8Array(b-a.length);returnn.concat([v.encode(a.length),a,c])}functione(a,b,c){a.length<b+32&&o.throwError("insufficient data for dynamicBytes length",o.INVALID_ARGUMENT,{arg:c,coderType:"dynamicBytes",value:n.hexlify(a.slice(b,b+32))});vard=v.decode(a,b).value;try{d=d.toNumber()}catch(e){o.throwError("dynamic bytes count too large",o.INVALID_ARGUMENT,{arg:c,coderType:"dynamicBytes",value:d.toString()})}returna.length<b+32+d&&o.throwError("insufficient data for dynamicBytes type",o.INVALID_ARGUMENT,{arg:c,coderType:"dynamicBytes",value:n.hexlify(a.slice(b,b+32+d))}),{consumed:parseInt(32+32*Math.ceil(d/32)),value:a.slice(b+32,b+32+d)}}functionf(a){returnparseInt(32*Math.ceil(a/32))}functiong(a,b){if(Array.isArray(b));elseif(b&&"object"==typeofb){varc=[];a.forEach(function(a){c.push(b[a.localName])}),b=c}elseo.throwError("invalid tuple value",o.INVALID_ARGUMENT,{coderType:"tuple",type:typeofb,value:b});a.length!==b.length&&o.throwError("types/value length mismatch",o.INVALID_ARGUMENT,{coderType:"tuple",value:b});vard=[];a.forEach(function(a,c){d.push({dynamic:a.dynamic,value:a.encode(b[c])})});vare=0,g=0;d.forEach(function(a,b){a.dynamic?(e+=32,g+=f(a.value.length)):e+=f(a.value.length)});varh=0,i=e,j=newUint8Array(e+g);returnd.forEach(function(a,b){a.dynamic?(j.set(v.encode(i),h),h+=32,j.set(a.value,i),i+=f(a.value.length)):(j.set(a.value,h),h+=f(a.value.length))}),j}functionh(a,b,c){vard=c,e=0,f=[];returna.forEach(function(a){if(a.dynamic){varg=v.decode(b,c),h=a.decode(b,d+g.value.toNumber());h.consumed=g.consumed}elsevarh=a.decode(b,c);void0!=h.value&&f.push(h.value),c+=h.consumed,e+=h.consumed}),a.forEach(function(a,b){varc=a.localName;c&&("object"==typeofc&&(c=c.name),c&&("length"===c&&(c="_length"),null==f[c]&&(f[c]=f[b])))}),{value:f,consumed:e}}functioni(a,b,c,d){vare=b.type+"["+(c>=0?c:"")+"]";return{coder:b,localName:d,length:c,name:"array",type:e,encode:function(a){Array.isArray(a)||o.throwError("expected array value",o.INVALID_ARGUMENT,{arg:d,coderType:"array",type:typeofa,value:a});vare=c,f=newUint8Array(0);e===-1&&(e=a.length,f=v.encode(e)),e!==a.length&&error.throwError("array value length mismatch",o.INVALID_ARGUMENT,{arg:d,coderType:"array",count:a.length,expectedCount:e,value:a});varh=[];returna.forEach(function(a){h.push(b)}),n.concat([f,g(h,a)])},decode:function(f,g){vari=0,j=c;if(j===-1){try{vark=v.decode(f,g)}catch(l){o.throwError("insufficient data for dynamic array length",o.INVALID_ARGUMENT,{arg:d,coderType:"array",value:l.value})}try{j=k.value.toNumber()}catch(l){o.throwError("array count too large",o.INVALID_ARGUMENT,{arg:d,coderType:"array",value:k.value.toString()})}i+=k.consumed,g+=k.consumed}for(varm=[],n=0;n<j;n++)m.push(b);varp=h(m,f,g);returnp.consumed+=i,p.value=a(e,p.value),p},dynamic:c===-1||b.dynamic}}functionj(a,b,c){vard=!1,e=[];b.forEach(function(a){a.dynamic&&(d=!0),e.push(a.type)});varf="tuple("+e.join(",")+")";return{coders:b,localName:c,name:"tuple",type:f,encode:function(a){returng(b,a)},decode:function(c,d){vare=h(b,c,d);returne.value=a(f,e.value),e},dynamic:d}}functionk(a){for(varb=[],c="",d=0,e=0;e<a.length;e++){varf=a[e];if(","===f&&0===d)b.push(c),c="";elseif(c+=f,"("===f)d++;elseif(")"===f&&(d--,d===-1))thrownewError("unbalanced parenthsis")}returnb.push(