UNPKG

@swtc/wallet

Version:
2 lines 270 kB
/*! For license information please see swtc-wallet.js.LICENSE.txt */ var swtc_wallet;(()=>{var t={6823(t,e,r){var i=e;i.Signature=r(9297),i.sm2=r(7521),i.sm3=r(9634),i.version=r(3164).rE},9297(t,e,r){"use strict";var i=r(2823),n=r(9042),o=r(7784);function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new i(t.r,16),this.s=new i(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function f(t,e){var r=t[e.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;for(var n=0,o=0,s=e.place;o<i;o++,s++)n<<=8,n|=t[s],n>>>=0;return!(n<=127)&&(e.place=s,n)}function h(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function c(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=n.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=f(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=f(t,r);if(!1===s)return!1;var h=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var c=f(t,r);if(!1===c)return!1;if(t.length!==c+r.place)return!1;var d=t.slice(r.place,c+r.place);if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new i(h),this.s=new i(d),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=h(e),r=h(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];c(i,e.length),(i=i.concat(e)).push(2),c(i,r.length);var o=i.concat(r),s=[48];return c(s,o.length),s=s.concat(o),n.encode(s,t)}},7521(t,e,r){var i,n=r(9634),o=r(3154),s=r(3360),a=r(2823),f=r(4742),c=r(9499),d=r(5615),u=new f({hash:c.sha256,entropy:"UQi4W3Y2bJfzleYy+oEZ2kA9A+9jrmwewST9vmBZNgMmFyzzH0S9Vol/UK",nonce:"0123456789avcdef",pers:"0123456789abcdef"});function l(t){if(!(this instanceof l))return new l(t);s.curve.short.call(this,t)}function p(t,e,r){if(null==t)return i.point();var n;if(null!=e){if(n=i.point(t,e),!i.validate(n))throw"point is not on curve"}else{var o=new a(t,16).toRed(i.red),s=o.redSqr().redMul(o);"odd"===r!=(s=s.redIAdd(o.redMul(i.a)).redIAdd(i.b).redSqrt()).fromRed().isOdd()&&(s=s.redNeg()),n=i.point(o,s)}return n}function b(t,e){if(!(this instanceof b))return new b(t,e);this.curve=i,this.pub=null,this.pri=null;var r=!1,n=!1;if(null!=t)if("string"==typeof t)this._pubFromString(t);else if(Array.isArray(t))this._pubFromBytes(t);else{if(!("x"in t&&a.isBN(t.x)&&"y"in t&&a.isBN(t.y)))throw"invalid public key";this.pub=t,r=!0}if(null!=e){if("string"==typeof e)this.pri=new a(e,16);else{if(!a.isBN(e))throw"invalid private key";this.pri=e,n=!0}null==this.pub&&(this.pub=i.g.mul(this.pri))}if(!(r&&n||this.validate()))throw"invalid key"}d(l,s.curve.short),i=l({type:"SM2",prime:null,p:"FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFF",a:"FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 FFFFFFFF FFFFFFFC",b:"28E9FA9E 9D9F5E34 4D5A9E4B CF6509A7 F39789F5 15AB8F92 DDBCBD41 4D940E93",n:"FFFFFFFE FFFFFFFF FFFFFFFF FFFFFFFF 7203DF6B 21C6052B 53BBF409 39D54123",hash:n,gRed:!1,g:["32C4AE2C 1F198119 5F990446 6A39C994 8FE30BBF F2660BE1 715A4589 334C74C7","BC3736A2 F4F6779C 59BDCEE3 6B692153 D0A9877C C62A4740 02DF32E5 2139F0A0"]}),e.curve=i,e.SM2KeyPair=b,e.genKeyPair=function(){var t=0,e=i.n.sub(new a(2));do{t=new a(u.generate(32,"hex",o.random(64)))}while(t.cmp(e)>0);return new b(null,t)},b.prototype._pubFromString=function(t){var e="invalid key string";if(t.length<66)throw e;var r=t.slice(2,66);switch(t.slice(0,2)){case"00":throw"public key should not be infinity";case"02":this.pub=p(r,null,"even");break;case"03":this.pub=p(r,null,"odd");break;case"04":case"06":case"07":if(t.length<130)throw e;this.pub=p(r,t.slice(66,130));break;default:throw e}},b.prototype._pubFromBytes=function(t){var e="unrecognized key";if(t.length<33)throw e;var r=t.slice(1,33);switch(t[0]){case 0:throw"public key should not be infinity";case 2:this.pub=p(r,null,"even");break;case 3:this.pub=p(r,null,"odd");break;case 4:case 6:case 7:if(t.length<65)throw e;this.pub=p(r,t.slice(33,65));break;default:throw e}},b.prototype.validate=function(){if(null!=this.pub){if(this.pub.isInfinity())return!1;if(!this.curve.validate(this.pub))return!1;if(!this.pub.mul(this.curve.n).isInfinity())return!1}if(null!=this.pri){if(this.pri.cmp(this.curve.n.sub(new a(2)))>0)return!1;if(null!=this.pub&&!this.pub.eq(this.curve.g.mul(this.pri)))return!1}return!0},b.prototype.pubToString=function(t){var e="";switch(t){case"compress":return(e=this.pub.getY().isEven()?"02":"03")+this.pub.getX().toString(16,32);case"mix":e=this.pub.getY().isEven()?"06":"07";break;default:e="04"}return e+this.pub.getX().toString(16,32)+this.pub.getY().toString(16,32)},b.prototype.pubToBytes=function(t){var e=[];switch(t){case"compress":return this.pub.getY().isEven()?e.push(2):e.push(3),e.concat(this.pub.getX().toArray("be",32));case"mix":this.pub.getY().isEven()?e.push(6):e.push(7);break;default:e.push(4)}return e.concat(this.pub.getX().toArray("be",32)).concat(this.pub.getY().toArray("be",32))},b.prototype.sign=function(t){if(null==this.pri)throw"cannot sign message without private key";return"string"==typeof t?this.signDigest((new n).sum(this._combine(o.strToBytes(t)))):this.signDigest((new n).sum(this._combine(t)))},b.prototype.verify=function(t,e,r){if(null==this.pub)throw"cannot verify signature without public key";return this.verifyDigest((new n).sum(this._combine(t)),e,r)},b.prototype.signRaw=function(t){return this.signDigest((new n).sum(t))},b.prototype.verifyRaw=function(t,e,r){return this.verifyDigest((new n).sum(t),e,r)},b.prototype.signDigest=function(t){for(var e={r:"",s:""};;){var r=new a(u.generate(32,"hex",o.random(64)),16).umod(this.curve.n),i=this.curve.g.mul(r),n=o.hashToBN(t).add(i.getX()).umod(this.curve.n);if(!n.isZero()&&!n.add(r).eq(this.curve.n)){var s=new a(1).add(this.pri).invm(this.curve.n),f=r.sub(n.mul(this.pri)).umod(this.curve.n),h=s.mul(f).umod(this.curve.n);if(!h.isZero()){e.r=o.padStart(n.toString(16),64,"0"),e.s=o.padStart(h.toString(16),64,"0");break}}}return e},b.prototype.verifyDigest=function(t,e,r){var i=new a(e,16);if(i.cmp(this.curve.n)>=0)return!1;var n=new a(r,16);if(n.cmp(this.curve.n)>=0)return!1;var s=i.add(n).umod(this.curve.n);if(s.isZero())return!1;var f=this.curve.g.mul(n).add(this.pub.mul(s));return!!o.hashToBN(t).add(f.getX()).umod(this.curve.n).eq(i)},b.prototype._combine=function(t){var e=[0,128,49,50,51,52,53,54,55,56,49,50,51,52,53,54,55,56];return e=(e=(e=(e=(e=(e=e.concat(this.curve.a.fromRed().toArray())).concat(this.curve.b.fromRed().toArray())).concat(this.curve.g.getX().toArray())).concat(this.curve.g.getY().toArray())).concat(this.pub.getX().toArray())).concat(this.pub.getY().toArray()),h=new n,e=h.sum(e),"string"==typeof t?e.concat(o.strToBytes(t)):e.concat(t)},b.prototype.toString=function(){var t="public: ";return this.pub?t+="("+this.pub.getX().toString(16)+", "+this.pub.getY().toString(16)+")":t+="null",t+=", private: ",this.pri?t+=o.padStart(this.pri.toString(16),64,"0"):t+="null",t}},9634(t,e,r){var i=r(3154);function n(){if(!(this instanceof n))return new n;this.reg=new Array(8),this.chunk=[],this.size=0,this.reset()}function o(t,e){return(t<<(e%=32)|t>>>32-e)>>>0}function s(t){return 0<=t&&t<16?2043430169:16<=t&&t<64?2055708042:void console.error("invalid j for constant Tj")}function a(t,e,r,i){return 0<=t&&t<16?(e^r^i)>>>0:16<=t&&t<64?(e&r|e&i|r&i)>>>0:(console.error("invalid j for bool function FF"),0)}function f(t,e,r,i){return 0<=t&&t<16?(e^r^i)>>>0:16<=t&&t<64?(e&r|~e&i)>>>0:(console.error("invalid j for bool function GG"),0)}t.exports=n,n.prototype.reset=function(){this.reg[0]=1937774191,this.reg[1]=1226093241,this.reg[2]=388252375,this.reg[3]=3666478592,this.reg[4]=2842636476,this.reg[5]=372324522,this.reg[6]=3817729613,this.reg[7]=2969243214,this.chunk=[],this.size=0},n.prototype.write=function(t){var e="string"==typeof t?i.strToBytes(t):t;this.size+=e.length;var r=64-this.chunk.length;if(e.length<r)this.chunk=this.chunk.concat(e);else for(this.chunk=this.chunk.concat(e.slice(0,r));this.chunk.length>=64;)this._compress(this.chunk),r<e.length?this.chunk=e.slice(r,Math.min(r+64,e.length)):this.chunk=[],r+=64},n.prototype.sum=function(t,e){t&&(this.reset(),this.write(t)),this._fill();for(var r=0;r<this.chunk.length;r+=64)this._compress(this.chunk.slice(r,r+64));var n=null;if("hex"==e)for(n="",r=0;r<8;r++)n+=i.padStart(this.reg[r].toString(16),8,"0");else for(n=new Array(32),r=0;r<8;r++)h=this.reg[r],n[4*r+3]=(255&h)>>>0,h>>>=8,n[4*r+2]=(255&h)>>>0,h>>>=8,n[4*r+1]=(255&h)>>>0,h>>>=8,n[4*r]=(255&h)>>>0;return this.reset(),n},n.prototype._compress=function(t){if(t<64)console.error("compress error: not enough data");else{for(var e=function(t){for(var e=new Array(132),r=0;r<16;r++)e[r]=t[4*r]<<24,e[r]|=t[4*r+1]<<16,e[r]|=t[4*r+2]<<8,e[r]|=t[4*r+3],e[r]>>>=0;for(var i=16;i<68;i++)x=e[i-16]^e[i-9]^o(e[i-3],15),x=x^o(x,15)^o(x,23),e[i]=(x^o(e[i-13],7)^e[i-6])>>>0;for(i=0;i<64;i++)e[i+68]=(e[i]^e[i+4])>>>0;return e}(t),r=this.reg.slice(0),i=0;i<64;i++){var n=o(r[0],12)+r[4]+o(s(i),i),h=((n=o(n=(4294967295&n)>>>0,7))^o(r[0],12))>>>0,c=a(i,r[0],r[1],r[2]);c=(4294967295&(c=c+r[3]+h+e[i+68]))>>>0;var d=f(i,r[4],r[5],r[6]);d=(4294967295&(d=d+r[7]+n+e[i]))>>>0,r[3]=r[2],r[2]=o(r[1],9),r[1]=r[0],r[0]=c,r[7]=r[6],r[6]=o(r[5],19),r[5]=r[4],r[4]=(d^o(d,9)^o(d,17))>>>0}for(var u=0;u<8;u++)this.reg[u]=(this.reg[u]^r[u])>>>0}},n.prototype._fill=function(){var t=8*this.size,e=this.chunk.push(128)%64;for(64-e<8&&(e-=64);e<56;e++)this.chunk.push(0);for(var r=0;r<4;r++){var i=Math.floor(t/4294967296);this.chunk.push(i>>>8*(3-r)&255)}for(r=0;r<4;r++)this.chunk.push(t>>>8*(3-r)&255)}},3154(t,e,r){var i=e,n=r(2823),o=r(7048);i.strToBytes=function(t){for(var e,r,i=[],n=0;n<t.length;n++){e=t.charCodeAt(n),r=[];do{r.push(255&e),e>>=8}while(e);i=i.concat(r.reverse())}return i},i.hashToBN=function(t){if("string"==typeof t)return new n(t,16);for(var e="",r=0;r<t.length;r++){var i=t[r].toString(16);1==i.length&&(e+="0"),e+=i}return new n(e,16)},i.random=function(t){return o(t).toString("hex")},i.padStart=function(t,e,r){return t.length>=e?t:r.repeat(e-t.length)+t}},7403(t,e,r){"use strict";var i=r(5636).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var o=t.charAt(n),s=o.charCodeAt(0);if(255!==e[s])throw new TypeError(o+" is ambiguous");e[s]=n}var a=t.length,f=t.charAt(0),h=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function d(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return i.alloc(0);for(var r=0,n=0,o=0;t[r]===f;)n++,r++;for(var s=(t.length-r)*h+1>>>0,c=new Uint8Array(s);r<t.length;){var d=t.charCodeAt(r);if(d>255)return;var u=e[d];if(255===u)return;for(var l=0,p=s-1;(0!==u||l<o)&&-1!==p;p--,l++)u+=a*c[p]>>>0,c[p]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");o=l,r++}for(var b=s-o;b!==s&&0===c[b];)b++;var y=i.allocUnsafe(n+(s-b));y.fill(0,0,n);for(var g=n;b!==s;)y[g++]=c[b++];return y}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=i.from(e)),!i.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,n=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var h=(s-o)*c+1>>>0,d=new Uint8Array(h);o!==s;){for(var u=e[o],l=0,p=h-1;(0!==u||l<n)&&-1!==p;p--,l++)u+=256*d[p]>>>0,d[p]=u%a>>>0,u=u/a>>>0;if(0!==u)throw new Error("Non-zero carry");n=l,o++}for(var b=h-n;b!==h&&0===d[b];)b++;for(var y=f.repeat(r);b<h;++b)y+=t.charAt(d[b]);return y},decodeUnsafe:d,decode:function(t){var e=d(t);if(e)return e;throw new Error("Non-base"+a+" character")}}}},7991(t,e){"use strict";e.byteLength=function(t){var e=a(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],f=o[1],h=new n(function(t,e,r){return 3*(e+r)/4-r}(0,s,f)),c=0,d=f>0?s-4:s;for(r=0;r<d;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],h[c++]=e>>16&255,h[c++]=e>>8&255,h[c++]=255&e;return 2===f&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,h[c++]=255&e),1===f&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e),h},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,o=[],s=16383,a=0,f=i-n;a<f;a+=s)o.push(h(t,a,a+s>f?f:a+s));return 1===n?(e=t[i-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function h(t,e,r){for(var i,n=[],o=e;o<r;o+=3)i=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),n.push(f(i));return n.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},2823(t,e,r){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8379).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function f(t,e,r){var i=a(t,r);return r-1>=e&&(i|=a(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;n*=i,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===e?this._parseHex(t,n,r):(this._parseBase(t,e,n),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===r)for(n=t.length-1,o=0;n>=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(n=0,o=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o=0,s=0;if("be"===r)for(i=t.length-1;i>=e;i-=2)n=f(t,e,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i<t.length;i+=2)n=f(t,e,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,f=0,c=r;c<a;c+=i)f=h(t,c,c+i,e),this.imuln(n),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var d=1;for(f=h(t,c,t.length,e),c=0;c<s;c++)d*=e;this.imuln(d),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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"],d=[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],u=[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 l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,f=s/67108864|0;r.words[0]=a;for(var h=1;h<i;h++){for(var c=f>>>26,d=67108863&f,u=Math.min(h,e.length-1),l=Math.max(0,h-t.length+1);l<=u;l++){var p=h-l|0;c+=(s=(n=0|t.words[p])*(o=0|e.words[l])+d)/67108864|0,d=67108863&s}r.words[h]=0|d,f=0|c}return 0!==f?r.words[h]=0|f:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],f=(16777215&(a<<n|o)).toString(16);o=a>>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),r=0!==o||s!==this.length-1?c[6-f.length]+f+r:f+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=d[t],l=u[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(l).toString(t);r=(p=p.idivn(l)).isZero()?b+r:c[h-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||Math.max(1,n);i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip();var s,a,f="le"===e,h=new t(o),c=this.clone();if(f){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-n;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return i(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return i(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;i<r.length;i++)this.words[i]=e.words[i]^r.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return i(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<n:this.words[r]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var e,r,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o<i.length;o++)e=(0|r.words[o])+(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<r.length;o++)e=(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s<i.length;s++)o=(e=(0|r.words[s])-(0|i.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var i,n,o,s=t.words,a=e.words,f=r.words,h=0,c=0|s[0],d=8191&c,u=c>>>13,l=0|s[1],p=8191&l,b=l>>>13,y=0|s[2],g=8191&y,v=y>>>13,m=0|s[3],w=8191&m,_=m>>>13,M=0|s[4],S=8191&M,A=M>>>13,x=0|s[5],E=8191&x,k=x>>>13,I=0|s[6],B=8191&I,P=I>>>13,R=0|s[7],C=8191&R,j=R>>>13,F=0|s[8],T=8191&F,O=F>>>13,L=0|s[9],N=8191&L,U=L>>>13,z=0|a[0],q=8191&z,D=z>>>13,K=0|a[1],W=8191&K,H=K>>>13,V=0|a[2],X=8191&V,J=V>>>13,Z=0|a[3],Y=8191&Z,G=Z>>>13,Q=0|a[4],$=8191&Q,tt=Q>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ft=8191&at,ht=at>>>13,ct=0|a[8],dt=8191&ct,ut=ct>>>13,lt=0|a[9],pt=8191&lt,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(h+(i=Math.imul(d,q))|0)+((8191&(n=(n=Math.imul(d,D))+Math.imul(u,q)|0))<<13)|0;h=((o=Math.imul(u,D))+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(p,q),n=(n=Math.imul(p,D))+Math.imul(b,q)|0,o=Math.imul(b,D);var gt=(h+(i=i+Math.imul(d,W)|0)|0)+((8191&(n=(n=n+Math.imul(d,H)|0)+Math.imul(u,W)|0))<<13)|0;h=((o=o+Math.imul(u,H)|0)+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(g,q),n=(n=Math.imul(g,D))+Math.imul(v,q)|0,o=Math.imul(v,D),i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,H)|0;var vt=(h+(i=i+Math.imul(d,X)|0)|0)+((8191&(n=(n=n+Math.imul(d,J)|0)+Math.imul(u,X)|0))<<13)|0;h=((o=o+Math.imul(u,J)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(w,q),n=(n=Math.imul(w,D))+Math.imul(_,q)|0,o=Math.imul(_,D),i=i+Math.imul(g,W)|0,n=(n=n+Math.imul(g,H)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,H)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,J)|0;var mt=(h+(i=i+Math.imul(d,Y)|0)|0)+((8191&(n=(n=n+Math.imul(d,G)|0)+Math.imul(u,Y)|0))<<13)|0;h=((o=o+Math.imul(u,G)|0)+(n>>>13)|0)+(mt>>>26)|0,mt&=67108863,i=Math.imul(S,q),n=(n=Math.imul(S,D))+Math.imul(A,q)|0,o=Math.imul(A,D),i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,H)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,i=i+Math.imul(g,X)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,J)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,G)|0;var wt=(h+(i=i+Math.imul(d,$)|0)|0)+((8191&(n=(n=n+Math.imul(d,tt)|0)+Math.imul(u,$)|0))<<13)|0;h=((o=o+Math.imul(u,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(E,q),n=(n=Math.imul(E,D))+Math.imul(k,q)|0,o=Math.imul(k,D),i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,H)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,H)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,J)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,J)|0,i=i+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,G)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0;var _t=(h+(i=i+Math.imul(d,rt)|0)|0)+((8191&(n=(n=n+Math.imul(d,it)|0)+Math.imul(u,rt)|0))<<13)|0;h=((o=o+Math.imul(u,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(B,q),n=(n=Math.imul(B,D))+Math.imul(P,q)|0,o=Math.imul(P,D),i=i+Math.imul(E,W)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,J)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,J)|0,i=i+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,G)|0,i=i+Math.imul(g,$)|0,n=(n=n+Math.imul(g,tt)|0)+Math.imul(v,$)|0,o=o+Math.imul(v,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0;var Mt=(h+(i=i+Math.imul(d,ot)|0)|0)+((8191&(n=(n=n+Math.imul(d,st)|0)+Math.imul(u,ot)|0))<<13)|0;h=((o=o+Math.imul(u,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(C,q),n=(n=Math.imul(C,D))+Math.imul(j,q)|0,o=Math.imul(j,D),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,H)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,i=i+Math.imul(E,X)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,J)|0,i=i+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,G)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(g,rt)|0,n=(n=n+Math.imul(g,it)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var St=(h+(i=i+Math.imul(d,ft)|0)|0)+((8191&(n=(n=n+Math.imul(d,ht)|0)+Math.imul(u,ft)|0))<<13)|0;h=((o=o+Math.imul(u,ht)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(T,q),n=(n=Math.imul(T,D))+Math.imul(O,q)|0,o=Math.imul(O,D),i=i+Math.imul(C,W)|0,n=(n=n+Math.imul(C,H)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,H)|0,i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,J)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,J)|0,i=i+Math.imul(E,Y)|0,n=(n=n+Math.imul(E,G)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,G)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(g,ot)|0,n=(n=n+Math.imul(g,st)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,i=i+Math.imul(p,ft)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var At=(h+(i=i+Math.imul(d,dt)|0)|0)+((8191&(n=(n=n+Math.imul(d,ut)|0)+Math.imul(u,dt)|0))<<13)|0;h=((o=o+Math.imul(u,ut)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(N,q),n=(n=Math.imul(N,D))+Math.imul(U,q)|0,o=Math.imul(U,D),i=i+Math.imul(T,W)|0,n=(n=n+Math.imul(T,H)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,H)|0,i=i+Math.imul(C,X)|0,n=(n=n+Math.imul(C,J)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,J)|0,i=i+Math.imul(B,Y)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,G)|0,i=i+Math.imul(E,$)|0,n=(n=n+Math.imul(E,tt)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(g,ft)|0,n=(n=n+Math.imul(g,ht)|0)+Math.imul(v,ft)|0,o=o+Math.imul(v,ht)|0,i=i+Math.imul(p,dt)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(b,dt)|0,o=o+Math.imul(b,ut)|0;var xt=(h+(i=i+Math.imul(d,pt)|0)|0)+((8191&(n=(n=n+Math.imul(d,bt)|0)+Math.imul(u,pt)|0))<<13)|0;h=((o=o+Math.imul(u,bt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(N,W),n=(n=Math.imul(N,H))+Math.imul(U,W)|0,o=Math.imul(U,H),i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,J)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,J)|0,i=i+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,G)|0,i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,tt)|0,i=i+Math.imul(E,rt)|0,n=(n=n+Math.imul(E,it)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,i=i+Math.imul(w,ft)|0,n=(n=n+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0,i=i+Math.imul(g,dt)|0,n=(n=n+Math.imul(g,ut)|0)+Math.imul(v,dt)|0,o=o+Math.imul(v,ut)|0;var Et=(h+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,bt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(N,X),n=(n=Math.imul(N,J))+Math.imul(U,X)|0,o=Math.imul(U,J),i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,G)|0,i=i+Math.imul(C,$)|0,n=(n=n+Math.imul(C,tt)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,tt)|0,i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,it)|0,i=i+Math.imul(E,ot)|0,n=(n=n+Math.imul(E,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,i=i+Math.imul(S,ft)|0,n=(n=n+Math.imul(S,ht)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ht)|0,i=i+Math.imul(w,dt)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,dt)|0,o=o+Math.imul(_,ut)|0;var kt=(h+(i=i+Math.imul(g,pt)|0)|0)+((8191&(n=(n=n+Math.imul(g,bt)|0)+Math.imul(v,pt)|0))<<13)|0;h=((o=o+Math.imul(v,bt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(N,Y),n=(n=Math.imul(N,G))+Math.imul(U,Y)|0,o=Math.imul(U,G),i=i+Math.imul(T,$)|0,n=(n=n+Math.imul(T,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(C,rt)|0,n=(n=n+Math.imul(C,it)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,it)|0,i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,i=i+Math.imul(E,ft)|0,n=(n=n+Math.imul(E,ht)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,ht)|0,i=i+Math.imul(S,dt)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(A,dt)|0,o=o+Math.imul(A,ut)|0;var It=(h+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,bt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(N,$),n=(n=Math.imul(N,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(T,rt)|0,n=(n=n+Math.imul(T,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(C,ot)|0,n=(n=n+Math.imul(C,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,i=i+Math.imul(B,ft)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(P,ft)|0,o=o+Math.imul(P,ht)|0,i=i+Math.imul(E,dt)|0,n=(n=n+Math.imul(E,ut)|0)+Math.imul(k,dt)|0,o=o+Math.imul(k,ut)|0;var Bt=(h+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,bt)|0)+Math.imul(A,pt)|0))<<13)|0;h=((o=o+Math.imul(A,bt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,i=Math.imul(N,rt),n=(n=Math.imul(N,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(T,ot)|0,n=(n=n+Math.imul(T,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(C,ft)|0,n=(n=n+Math.imul(C,ht)|0)+Math.imul(j,ft)|0,o=o+Math.imul(j,ht)|0,i=i+Math.imul(B,dt)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(P,dt)|0,o=o+Math.imul(P,ut)|0;var Pt=(h+(i=i+Math.imul(E,pt)|0)|0)+((8191&(n=(n=n+Math.imul(E,bt)|0)+Math.imul(k,pt)|0))<<13)|0;h=((o=o+Math.imul(k,bt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(N,ot),n=(n=Math.imul(N,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(T,ft)|0,n=(n=n+Math.imul(T,ht)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ht)|0,i=i+Math.imul(C,dt)|0,n=(n=n+Math.imul(C,ut)|0)+Math.imul(j,dt)|0,o=o+Math.imul(j,ut)|0;var Rt=(h+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,bt)|0)+Math.imul(P,pt)|0))<<13)|0;h=((o=o+Math.imul(P,bt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(N,ft),n=(n=Math.imul(N,ht))+Math.imul(U,ft)|0,o=Math.imul(U,ht),i=i+Math.imul(T,dt)|0,n=(n=n+Math.imul(T,ut)|0)+Math.imul(O,dt)|0,o=o+Math.imul(O,ut)|0;var Ct=(h+(i=i+Math.imul(C,pt)|0)|0)+((8191&(n=(n=n+Math.imul(C,bt)|0)+Math.imul(j,pt)|0))<<13)|0;h=((o=o+Math.imul(j,bt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(N,dt),n=(n=Math.imul(N,ut))+Math.imul(U,dt)|0,o=Math.imul(U,ut);var jt=(h+(i=i+Math.imul(T,pt)|0)|0)+((8191&(n=(n=n+Math.imul(T,bt)|0)+Math.imul(O,pt)|0))<<13)|0;h=((o=o+Math.imul(O,bt)|0)+(n>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ft=(h+(i=Math.imul(N,pt))|0)+((8191&(n=(n=Math.imul(N,bt))+Math.imul(U,pt)|0))<<13)|0;return h=((o=Math.imul(U,bt))+(n>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,f[0]=yt,f[1]=gt,f[2]=vt,f[3]=mt,f[4]=wt,f[5]=_t,f[6]=Mt,f[7]=St,f[8]=At,f[9]=xt,f[10]=Et,f[11]=kt,f[12]=It,f[13]=Bt,f[14]=Pt,f[15]=Rt,f[16]=Ct,f[17]=jt,f[18]=Ft,0!==h&&(f[19]=h,r.length++),r};function b(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):i<63?l(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o<r.length-1;o++){var s=n;n=0;for(var a=67108863&i,f=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=f;h++){var c=o-h,d=(0|t.words[c])*(0|e.words[h]),u=67108863&d;a=67108863&(u=u+a|0),n+=(s=(s=s+(d/67108864|0)|0)+(u>>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):b(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,r,t);return e},y.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var i=0,n=0;n<e;n++)i|=(1&t)<<e-n-1,t>>=1;return i},y.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s<o;s++)i[s]=e[t[s]],n[s]=r[t[s]]},y.prototype.transform=function(t,e,r,i,n,o){this.permute(o,t,e,r,i,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,f=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<n;c+=a)for(var d=f,u=h,l=0;l<s;l++){var p=r[c+l],b=i[c+l],y=r[c+l+s],g=i[c+l+s],v=d*y-u*g;g=d*g+u*y,y=v,r[c+l]=p+y,i[c+l]=b+g,r[c+l+s]=p-y,i[c+l+s]=b-g,l!==a&&(v=f*d-h*u,u=f*u+h*d,d=v)}},y.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),i=1&r,n=0;for(r=r/2|0;r;r>>>=1)n++;return 1<<n+1+i},y.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var i=0;i<r/2;i++){var n=t[i];t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n}},y.prototype.normalize13b=function(t,e){for(var r=0,i=0;i<e/2;i++){var n=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+r;t[i]=67108863&n,r=n<67108864?0:n/67108864|0}return t},y.prototype.convert13b=function(t,e,r,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)r[s]=0;i(0===o),i(!(-8192&o))},y.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},y.prototype.mulp=function(t,e,r){var i=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(i),o=this.stub(i),s=new Array(i),a=new Array(i),f=new Array(i),h=new Array(i),c=new Array(i),d=new Array(i),u=r.words;u.length=i,this.convert13b(t.words,t.length,s,i),this.convert13b(e.words,e.length,h,i),this.transform(s,o,a,f,i,n),this.transform(h,o,c,d,i,n);for(var l=0;l<i;l++){var p=a[l]*c[l]-f[l]*d[l];f[l]=a[l]*d[l]+f[l]*c[l],a[l]=p}return this.conjugate(a,f,i),this.transform(a,f,u,o,i,n),this.conjugate(u,o,i),this.normalize13b(u,i),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),b(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this.length=0===t?1:this.length,this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var i=r/26|0,n=r%26;e[r]=(t.words[i]&1<<n)>>>n}return e}(t);if(0===e.length)return new o(1);for(var r=this,i=0;i<e.length&&0===e[i];i++,r=r.sqr());if(++i<e.length)for(var n=r.sqr();i<e.length;i++,n=n.sqr())0!==e[i]&&(r=r.mul(n));return r},o.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,f=(0|this.words[e])-a<<r;this.words[e]=f|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var n;i("number"==typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,f=r;if(n-=s,n=Math.max(0,n),f){for(var h=0;h<s;h++)f.words[h]=this.words[h];f.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=n);h--){var d=0|this.words[h];this.words[h]=c<<26-o|d>>>o,c=d&a}return f&&0!==c&&(f.words[f.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<<e;return!(this.length<=r||!(this.words[r]&n))},o.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return 0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var n,o,s=t.length+r;this._expand(s);var a=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+a;var f=(0|t.words[n])*e;a=((o-=67108863&f)>>26)-(f/67108864|0),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)a=(o=(0|this.words[n+r])+a)>>26,this.words[n+r]=67108863&o;if(0===a)return this.strip();for(i(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),n=t,s=0|n.words[n.length-1];0!=(r=26-this._countBits(s))&&(n=n.ushln(r),i.iushln(r),s=0|n.words[n.length-1]);var a,f=i.length-n.length;if("mod"!==e){(a=new o(null)).length=f+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=i.clone()._ishlnsubmul(n,1,f);0===c.negative&&(i=c,a&&(a.words[f]=1));for(var d=f-1;d>=0;d--){var u=67108864*(0|i.words[n.length+d])+(0|i.words[n.length+d-1]);for(u=Math.min(u/s|0,67108863),i._ishlnsubmul(n,u,d);0!==i.negative;)u--,i.negative=0,i._ishlnsubmul(n,1,d),i.isZero()||(i.negative^=1);a&&(a.words[d]=u)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},o.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},o.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),s=new o(0),a=new o(0),f=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),d=e.clone();!e.isZero();){for(var u=0,l=1;0===(e.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(e.iushrn(u);u-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(c),s.isub(d)),n.iushrn(1),s.iushrn(1);for(var p=0,b=1;0===(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||f.isOdd())&&(a.iadd(c),f.isub(d)),a.iushrn(1),f.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(a),s.isub(f)):(r.isub(e),a.isub(n),f.isub(s))}return{a,b:f,gcd:r.iushln(h)}},o.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new o(1),a=new o(0),f=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);for(var d=0,u=1;0===(r.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(r.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(n=0===e.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/26,n=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var o=n,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:n<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){i<n?e=-1:i>n&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)}