UNPKG

node-rsa-build

Version:

这是node-rsa的构建版本,解决原依赖在vite构建工具中不支持问题,如果你使用vite,那么还需要在vite.config.js中配置下optimizeDeps。

1 lines 758 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["NodeRSA"]=e():t["NodeRSA"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="fb15")}({0:function(t,e){},"00dc":function(t,e,i){(function(t){var r=i("58a2"),n=i("c24d"),o=i("561d");function s(e){var i=new t(n[e].prime,"hex"),r=new t(n[e].gen,"hex");return new o(i,r)}var h={binary:!0,hex:!0,base64:!0};function a(e,i,n,s){return t.isBuffer(i)||void 0===h[i]?a(e,"binary",i,n):(i=i||"binary",s=s||"binary",n=n||new t([2]),t.isBuffer(n)||(n=new t(n,s)),"number"===typeof e?new o(r(e,n),n,!0):(t.isBuffer(e)||(e=new t(e,i)),new o(e,n,!0)))}e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=s,e.createDiffieHellman=e.DiffieHellman=a}).call(this,i("b639").Buffer)},"00ee":function(t,e,i){var r=i("b622"),n=r("toStringTag"),o={};o[n]="z",t.exports="[object z]"===String(o)},"0106":function(t,e,i){(function(t){(function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var s;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=i(13).Buffer}catch(A){}function h(t,e,i){for(var r=0,n=Math.min(t.length,i),o=e;o<n;o++){var s=t.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function a(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s<o;s++){var h=t.charCodeAt(s)-48;n*=r,n+=h>=49?h-49+10:h>=17?h-17+10:h}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,i){if("number"===typeof t)return this._initNumber(t,e,i);if("object"===typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var n=0;"-"===t[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initNumber=function(t,e,i){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),e,i)},o.prototype._initArray=function(t,e,i){if(r("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,h=0;if("be"===i)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<<h&67108863,this.words[o+1]=s>>>26-h&67108863,h+=24,h>=26&&(h-=26,o++);else if("le"===i)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<<h&67108863,this.words[o+1]=s>>>26-h&67108863,h+=24,h>=26&&(h-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){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 r,n,o=0;for(i=t.length-6,r=0;i>=e;i-=6)n=h(t,i,i+6),this.words[r]|=n<<o&67108863,this.words[r+1]|=n>>>26-o&4194303,o+=24,o>=26&&(o-=26,r++);i+6!==e&&(n=h(t,e,i+6),this.words[r]|=n<<o&67108863,this.words[r+1]|=n>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,u=0,f=i;f<h;f+=r)u=a(t,f,f+r,e),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=a(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},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){while(this.length<t)this.words[this.length++]=0;return this},o.prototype.strip=function(){while(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 u=["","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"],f=[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],l=[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 c(t){for(var e=new Array(t.bitLength()),i=0;i<e.length;i++){var r=i/26|0,n=i%26;e[i]=(t.words[r]&1<<n)>>>n}return e}function d(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u<r;u++){for(var f=a>>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;n=0|t.words[p],o=0|e.words[d],s=n*o+l,f+=s/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(t=t||10,e=0|e||1,16===t||"hex"===t){i="";for(var n=0,o=0,s=0;s<this.length;s++){var h=this.words[s],a=(16777215&(h<<n|o)).toString(16);o=h>>>24-n&16777215,i=0!==o||s!==this.length-1?u[6-a.length]+a+i:a+i,n+=2,n>=26&&(n-=26,s--)}0!==o&&(i=o.toString(16)+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(d).toString(t);p=p.idivn(d),i=p.isZero()?m+i:u[c-m.length]+m+i}this.isZero()&&(i="0"+i);while(i.length%e!==0)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!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&&r(!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 r("undefined"!==typeof s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h<o;h++)u[h]=0}else{for(h=0;h<o-n;h++)u[h]=0;for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[o-h-1]=s}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0===(8191&e)&&(i+=13,e>>>=13),0===(127&e)&&(i+=7,e>>>=7),0===(15&e)&&(i+=4,e>>>=4),0===(3&e)&&(i+=2,e>>>=2),0===(1&e)&&i++,i},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 i=this._zeroBits(this.words[e]);if(t+=i,26!==i)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){while(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 r(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 i=0;i<e.length;i++)this.words[i]=this.words[i]&t.words[i];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(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,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;r<i.length;r++)this.words[r]=e.words[r]^i.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(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){r("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"===typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(t){var e,i,r;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?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o<r.length;o++)e=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&e,n=e>>>26;for(;0!==n&&o<i.length;o++)e=(0|i.words[o])+n,this.words[o]=67108863&e,n=e>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.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 i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s<r.length;s++)e=(0|i.words[s])-(0|r.words[s])+o,o=e>>26,this.words[s]=67108863&e;for(;0!==o&&s<i.length;s++)e=(0|i.words[s])+o,o=e>>26,this.words[s]=67108863&e;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,i){var r,n,o,s=t.words,h=e.words,a=i.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,b=0|s[2],g=8191&b,v=b>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,E=_>>>13,k=0|s[5],A=8191&k,x=k>>>13,R=0|s[6],O=8191&R,T=R>>>13,B=0|s[7],I=8191&B,P=B>>>13,L=0|s[8],N=8191&L,D=L>>>13,j=0|s[9],C=8191&j,q=j>>>13,U=0|h[0],z=8191&U,F=U>>>13,K=0|h[1],H=8191&K,Z=K>>>13,G=0|h[2],W=8191&G,V=G>>>13,Y=0|h[3],$=8191&Y,X=Y>>>13,J=0|h[4],Q=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19,r=Math.imul(l,z),n=Math.imul(l,F),n=n+Math.imul(c,z)|0,o=Math.imul(c,F);var bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(p,z),n=Math.imul(p,F),n=n+Math.imul(m,z)|0,o=Math.imul(m,F),r=r+Math.imul(l,H)|0,n=n+Math.imul(l,Z)|0,n=n+Math.imul(c,H)|0,o=o+Math.imul(c,Z)|0;var gt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,z),n=Math.imul(g,F),n=n+Math.imul(v,z)|0,o=Math.imul(v,F),r=r+Math.imul(p,H)|0,n=n+Math.imul(p,Z)|0,n=n+Math.imul(m,H)|0,o=o+Math.imul(m,Z)|0,r=r+Math.imul(l,W)|0,n=n+Math.imul(l,V)|0,n=n+Math.imul(c,W)|0,o=o+Math.imul(c,V)|0;var vt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(w,z),n=Math.imul(w,F),n=n+Math.imul(M,z)|0,o=Math.imul(M,F),r=r+Math.imul(g,H)|0,n=n+Math.imul(g,Z)|0,n=n+Math.imul(v,H)|0,o=o+Math.imul(v,Z)|0,r=r+Math.imul(p,W)|0,n=n+Math.imul(p,V)|0,n=n+Math.imul(m,W)|0,o=o+Math.imul(m,V)|0,r=r+Math.imul(l,$)|0,n=n+Math.imul(l,X)|0,n=n+Math.imul(c,$)|0,o=o+Math.imul(c,X)|0;var yt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,z),n=Math.imul(S,F),n=n+Math.imul(E,z)|0,o=Math.imul(E,F),r=r+Math.imul(w,H)|0,n=n+Math.imul(w,Z)|0,n=n+Math.imul(M,H)|0,o=o+Math.imul(M,Z)|0,r=r+Math.imul(g,W)|0,n=n+Math.imul(g,V)|0,n=n+Math.imul(v,W)|0,o=o+Math.imul(v,V)|0,r=r+Math.imul(p,$)|0,n=n+Math.imul(p,X)|0,n=n+Math.imul(m,$)|0,o=o+Math.imul(m,X)|0,r=r+Math.imul(l,Q)|0,n=n+Math.imul(l,tt)|0,n=n+Math.imul(c,Q)|0,o=o+Math.imul(c,tt)|0;var wt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(A,z),n=Math.imul(A,F),n=n+Math.imul(x,z)|0,o=Math.imul(x,F),r=r+Math.imul(S,H)|0,n=n+Math.imul(S,Z)|0,n=n+Math.imul(E,H)|0,o=o+Math.imul(E,Z)|0,r=r+Math.imul(w,W)|0,n=n+Math.imul(w,V)|0,n=n+Math.imul(M,W)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(g,$)|0,n=n+Math.imul(g,X)|0,n=n+Math.imul(v,$)|0,o=o+Math.imul(v,X)|0,r=r+Math.imul(p,Q)|0,n=n+Math.imul(p,tt)|0,n=n+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(l,it)|0,n=n+Math.imul(l,rt)|0,n=n+Math.imul(c,it)|0,o=o+Math.imul(c,rt)|0;var Mt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(O,z),n=Math.imul(O,F),n=n+Math.imul(T,z)|0,o=Math.imul(T,F),r=r+Math.imul(A,H)|0,n=n+Math.imul(A,Z)|0,n=n+Math.imul(x,H)|0,o=o+Math.imul(x,Z)|0,r=r+Math.imul(S,W)|0,n=n+Math.imul(S,V)|0,n=n+Math.imul(E,W)|0,o=o+Math.imul(E,V)|0,r=r+Math.imul(w,$)|0,n=n+Math.imul(w,X)|0,n=n+Math.imul(M,$)|0,o=o+Math.imul(M,X)|0,r=r+Math.imul(g,Q)|0,n=n+Math.imul(g,tt)|0,n=n+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,it)|0,n=n+Math.imul(p,rt)|0,n=n+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(l,ot)|0,n=n+Math.imul(l,st)|0,n=n+Math.imul(c,ot)|0,o=o+Math.imul(c,st)|0;var _t=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,z),n=Math.imul(I,F),n=n+Math.imul(P,z)|0,o=Math.imul(P,F),r=r+Math.imul(O,H)|0,n=n+Math.imul(O,Z)|0,n=n+Math.imul(T,H)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(A,W)|0,n=n+Math.imul(A,V)|0,n=n+Math.imul(x,W)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(S,$)|0,n=n+Math.imul(S,X)|0,n=n+Math.imul(E,$)|0,o=o+Math.imul(E,X)|0,r=r+Math.imul(w,Q)|0,n=n+Math.imul(w,tt)|0,n=n+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(g,it)|0,n=n+Math.imul(g,rt)|0,n=n+Math.imul(v,it)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,n=n+Math.imul(p,st)|0,n=n+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(l,at)|0,n=n+Math.imul(l,ut)|0,n=n+Math.imul(c,at)|0,o=o+Math.imul(c,ut)|0;var St=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,z),n=Math.imul(N,F),n=n+Math.imul(D,z)|0,o=Math.imul(D,F),r=r+Math.imul(I,H)|0,n=n+Math.imul(I,Z)|0,n=n+Math.imul(P,H)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(O,W)|0,n=n+Math.imul(O,V)|0,n=n+Math.imul(T,W)|0,o=o+Math.imul(T,V)|0,r=r+Math.imul(A,$)|0,n=n+Math.imul(A,X)|0,n=n+Math.imul(x,$)|0,o=o+Math.imul(x,X)|0,r=r+Math.imul(S,Q)|0,n=n+Math.imul(S,tt)|0,n=n+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,it)|0,n=n+Math.imul(w,rt)|0,n=n+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(g,ot)|0,n=n+Math.imul(g,st)|0,n=n+Math.imul(v,ot)|0,o=o+Math.imul(v,st)|0,r=r+Math.imul(p,at)|0,n=n+Math.imul(p,ut)|0,n=n+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0,r=r+Math.imul(l,lt)|0,n=n+Math.imul(l,ct)|0,n=n+Math.imul(c,lt)|0,o=o+Math.imul(c,ct)|0;var Et=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(C,z),n=Math.imul(C,F),n=n+Math.imul(q,z)|0,o=Math.imul(q,F),r=r+Math.imul(N,H)|0,n=n+Math.imul(N,Z)|0,n=n+Math.imul(D,H)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(I,W)|0,n=n+Math.imul(I,V)|0,n=n+Math.imul(P,W)|0,o=o+Math.imul(P,V)|0,r=r+Math.imul(O,$)|0,n=n+Math.imul(O,X)|0,n=n+Math.imul(T,$)|0,o=o+Math.imul(T,X)|0,r=r+Math.imul(A,Q)|0,n=n+Math.imul(A,tt)|0,n=n+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,it)|0,n=n+Math.imul(S,rt)|0,n=n+Math.imul(E,it)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,n=n+Math.imul(w,st)|0,n=n+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(g,at)|0,n=n+Math.imul(g,ut)|0,n=n+Math.imul(v,at)|0,o=o+Math.imul(v,ut)|0,r=r+Math.imul(p,lt)|0,n=n+Math.imul(p,ct)|0,n=n+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0,r=r+Math.imul(l,pt)|0,n=n+Math.imul(l,mt)|0,n=n+Math.imul(c,pt)|0,o=o+Math.imul(c,mt)|0;var kt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(C,H),n=Math.imul(C,Z),n=n+Math.imul(q,H)|0,o=Math.imul(q,Z),r=r+Math.imul(N,W)|0,n=n+Math.imul(N,V)|0,n=n+Math.imul(D,W)|0,o=o+Math.imul(D,V)|0,r=r+Math.imul(I,$)|0,n=n+Math.imul(I,X)|0,n=n+Math.imul(P,$)|0,o=o+Math.imul(P,X)|0,r=r+Math.imul(O,Q)|0,n=n+Math.imul(O,tt)|0,n=n+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(A,it)|0,n=n+Math.imul(A,rt)|0,n=n+Math.imul(x,it)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,n=n+Math.imul(S,st)|0,n=n+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,at)|0,n=n+Math.imul(w,ut)|0,n=n+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(g,lt)|0,n=n+Math.imul(g,ct)|0,n=n+Math.imul(v,lt)|0,o=o+Math.imul(v,ct)|0,r=r+Math.imul(p,pt)|0,n=n+Math.imul(p,mt)|0,n=n+Math.imul(m,pt)|0,o=o+Math.imul(m,mt)|0;var At=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(C,W),n=Math.imul(C,V),n=n+Math.imul(q,W)|0,o=Math.imul(q,V),r=r+Math.imul(N,$)|0,n=n+Math.imul(N,X)|0,n=n+Math.imul(D,$)|0,o=o+Math.imul(D,X)|0,r=r+Math.imul(I,Q)|0,n=n+Math.imul(I,tt)|0,n=n+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(O,it)|0,n=n+Math.imul(O,rt)|0,n=n+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(A,ot)|0,n=n+Math.imul(A,st)|0,n=n+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,r=r+Math.imul(S,at)|0,n=n+Math.imul(S,ut)|0,n=n+Math.imul(E,at)|0,o=o+Math.imul(E,ut)|0,r=r+Math.imul(w,lt)|0,n=n+Math.imul(w,ct)|0,n=n+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0,r=r+Math.imul(g,pt)|0,n=n+Math.imul(g,mt)|0,n=n+Math.imul(v,pt)|0,o=o+Math.imul(v,mt)|0;var xt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(C,$),n=Math.imul(C,X),n=n+Math.imul(q,$)|0,o=Math.imul(q,X),r=r+Math.imul(N,Q)|0,n=n+Math.imul(N,tt)|0,n=n+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,it)|0,n=n+Math.imul(I,rt)|0,n=n+Math.imul(P,it)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(O,ot)|0,n=n+Math.imul(O,st)|0,n=n+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(A,at)|0,n=n+Math.imul(A,ut)|0,n=n+Math.imul(x,at)|0,o=o+Math.imul(x,ut)|0,r=r+Math.imul(S,lt)|0,n=n+Math.imul(S,ct)|0,n=n+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(w,pt)|0,n=n+Math.imul(w,mt)|0,n=n+Math.imul(M,pt)|0,o=o+Math.imul(M,mt)|0;var Rt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(C,Q),n=Math.imul(C,tt),n=n+Math.imul(q,Q)|0,o=Math.imul(q,tt),r=r+Math.imul(N,it)|0,n=n+Math.imul(N,rt)|0,n=n+Math.imul(D,it)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,n=n+Math.imul(I,st)|0,n=n+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(O,at)|0,n=n+Math.imul(O,ut)|0,n=n+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(A,lt)|0,n=n+Math.imul(A,ct)|0,n=n+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(S,pt)|0,n=n+Math.imul(S,mt)|0,n=n+Math.imul(E,pt)|0,o=o+Math.imul(E,mt)|0;var Ot=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(C,it),n=Math.imul(C,rt),n=n+Math.imul(q,it)|0,o=Math.imul(q,rt),r=r+Math.imul(N,ot)|0,n=n+Math.imul(N,st)|0,n=n+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(I,at)|0,n=n+Math.imul(I,ut)|0,n=n+Math.imul(P,at)|0,o=o+Math.imul(P,ut)|0,r=r+Math.imul(O,lt)|0,n=n+Math.imul(O,ct)|0,n=n+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0,r=r+Math.imul(A,pt)|0,n=n+Math.imul(A,mt)|0,n=n+Math.imul(x,pt)|0,o=o+Math.imul(x,mt)|0;var Tt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(C,ot),n=Math.imul(C,st),n=n+Math.imul(q,ot)|0,o=Math.imul(q,st),r=r+Math.imul(N,at)|0,n=n+Math.imul(N,ut)|0,n=n+Math.imul(D,at)|0,o=o+Math.imul(D,ut)|0,r=r+Math.imul(I,lt)|0,n=n+Math.imul(I,ct)|0,n=n+Math.imul(P,lt)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(O,pt)|0,n=n+Math.imul(O,mt)|0,n=n+Math.imul(T,pt)|0,o=o+Math.imul(T,mt)|0;var Bt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(C,at),n=Math.imul(C,ut),n=n+Math.imul(q,at)|0,o=Math.imul(q,ut),r=r+Math.imul(N,lt)|0,n=n+Math.imul(N,ct)|0,n=n+Math.imul(D,lt)|0,o=o+Math.imul(D,ct)|0,r=r+Math.imul(I,pt)|0,n=n+Math.imul(I,mt)|0,n=n+Math.imul(P,pt)|0,o=o+Math.imul(P,mt)|0;var It=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(C,lt),n=Math.imul(C,ct),n=n+Math.imul(q,lt)|0,o=Math.imul(q,ct),r=r+Math.imul(N,pt)|0,n=n+Math.imul(N,mt)|0,n=n+Math.imul(D,pt)|0,o=o+Math.imul(D,mt)|0;var Pt=(u+r|0)+((8191&n)<<13)|0;u=(o+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(C,pt),n=Math.imul(C,mt),n=n+Math.imul(q,pt)|0,o=Math.imul(q,mt);var Lt=(u+r|0)+((8191&n)<<13)|0;return u=(o+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,a[0]=bt,a[1]=gt,a[2]=vt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=Et,a[9]=kt,a[10]=At,a[11]=xt,a[12]=Rt,a[13]=Ot,a[14]=Tt,a[15]=Bt,a[16]=It,a[17]=Pt,a[18]=Lt,0!==u&&(a[19]=u,i.length++),i};function m(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var h=67108863&r,a=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=a;u++){var f=o-u,l=0|t.words[f],c=0|e.words[u],d=l*c,p=67108863&d;s=s+(d/67108864|0)|0,p=p+h|0,h=67108863&p,s=s+(p>>>26)|0,n+=s>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}function b(t,e,i){var r=new g;return r.mulp(t,e,i)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var i,r=this.length+t.length;return i=10===this.length&&10===t.length?p(this,t,e):r<63?d(this,t,e):r<1024?m(this,t,e):b(this,t,e),i},g.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,i,t);return e},g.prototype.revBin=function(t,e,i){if(0===t||t===i-1)return t;for(var r=0,n=0;n<e;n++)r|=(1&t)<<e-n-1,t>>=1;return r},g.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s<o;s++)r[s]=e[t[s]],n[s]=i[t[s]]},g.prototype.transform=function(t,e,i,r,n,o){this.permute(o,t,e,i,r,n);for(var s=1;s<n;s<<=1)for(var h=s<<1,a=Math.cos(2*Math.PI/h),u=Math.sin(2*Math.PI/h),f=0;f<n;f+=h)for(var l=a,c=u,d=0;d<s;d++){var p=i[f+d],m=r[f+d],b=i[f+d+s],g=r[f+d+s],v=l*b-c*g;g=l*g+c*b,b=v,i[f+d]=p+b,r[f+d]=m+g,i[f+d+s]=p-b,r[f+d+s]=m-g,d!==h&&(v=a*l-u*c,c=a*c+u*l,l=v)}},g.prototype.guessLen13b=function(t,e){var i=1|Math.max(e,t),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},g.prototype.conjugate=function(t,e,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=t[r];t[r]=t[i-r-1],t[i-r-1]=n,n=e[r],e[r]=-e[i-r-1],e[i-r-1]=-n}},g.prototype.normalize13b=function(t,e){for(var i=0,r=0;r<e/2;r++){var n=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+i;t[r]=67108863&n,i=n<67108864?0:n/67108864|0}return t},g.prototype.convert13b=function(t,e,i,n){for(var o=0,s=0;s<e;s++)o+=0|t[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<n;++s)i[s]=0;r(0===o),r(0===(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),i=0;i<t;i++)e[i]=0;return e},g.prototype.mulp=function(t,e,i){var r=2*this.guessLen13b(t.length,e.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),h=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),c=i.words;c.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,u,r),this.transform(s,o,h,a,r,n),this.transform(u,o,f,l,r,n);for(var d=0;d<r;d++){var p=h[d]*f[d]-a[d]*l[d];a[d]=h[d]*l[d]+a[d]*f[d],h[d]=p}return this.conjugate(h,a,r),this.transform(h,a,c,o,r,n),this.conjugate(c,o,r),this.normalize13b(c,r),i.negative=t.negative^e.negative,i.length=t.length+e.length,i.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){r("number"===typeof t),r(t<67108864);for(var e=0,i=0;i<this.length;i++){var n=(0|this.words[i])*t,o=(67108863&n)+(67108863&e);e>>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,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=c(t);if(0===e.length)return new o(1);for(var i=this,r=0;r<e.length;r++,i=i.sqr())if(0!==e[r])break;if(++r<e.length)for(var n=i.sqr();r<e.length;r++,n=n.sqr())0!==e[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(t){r("number"===typeof t&&t>=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e<this.length;e++){var h=this.words[e]&o,a=(0|this.words[e])-h<<i;this.words[e]=a|s,s=h>>>26-i}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 r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,i){var n;r("number"===typeof t&&t>=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<<o,a=i;if(n-=s,n=Math.max(0,n),a){for(var u=0;u<s;u++)a.words[u]=this.words[u];a.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},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){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return!1;var o=this.words[i];return!!(o&n)},o.prototype.imaskn=function(t){r("number"===typeof t&&t>=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<<e;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"===typeof t),r(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(r("number"===typeof t),r(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,i){var n,o,s=t.length+i;this._expand(s);var h=0;for(n=0;n<t.length;n++){o=(0|this.words[n+i])+h;var a=(0|t.words[n])*e;o-=67108863&a,h=(o>>26)-(a/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)o=(0|this.words[n+i])+h,h=o>>26,this.words[n+i]=67108863&o;if(0===h)return this.strip();for(r(-1===h),h=0,n=0;n<this.length;n++)o=-(0|this.words[n])+h,h=o>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=this.length-t.length,r=this.clone(),n=t,s=0|n.words[n.length-1],h=this._countBits(s);i=26-h,0!==i&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var a,u=r.length-n.length;if("mod"!==e){a=new o(null),a.length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var l=r.clone()._ishlnsubmul(n,1,u);0===l.negative&&(r=l,a&&(a.words[u]=1));for(var c=u-1;c>=0;c--){var d=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);d=Math.min(d/s|0,67108863),r._ishlnsubmul(n,d,c);while(0!==r.negative)d--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);a&&(a.words[c]=d)}return a&&a.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(n=h.div.neg()),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(n=h.div.neg()),{div:n,mod:h.mod}):0!==(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:h.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,h},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 i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n=new o(1),s=new o(0),h=new o(0),a=new o(1),u=0;while(e.isEven()&&i.isEven())e.iushrn(1),i.iushrn(1),++u;var f=i.clone(),l=e.clone();while(!e.isZero()){for(var c=0,d=1;0===(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0){e.iushrn(c);while(c-- >0)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1)}for(var p=0,m=1;0===(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0){i.iushrn(p);while(p-- >0)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1)}e.cmp(i)>=0?(e.isub(i),n.isub(h),s.isub(a)):(i.isub(e),h.isub(n),a.isub(s))}return{a:h,b:a,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();var n,s=new o(1),h=new o(0),a=i.clone();while(e.cmpn(1)>0&&i.cmpn(1)>0){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0){e.iushrn(u);while(u-- >0)s.isOdd()&&s.iadd(a),s.iushrn(1)}for(var l=0,c=1;0===(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0){i.iushrn(l);while(l-- >0)h.isOdd()&&h.iadd(a),h.iushrn(1)}e.cmp(i)>=0?(e.isub(i),s.isub(h)):(i.isub(e),h.isub(s))}return n=0===e.cmpn(1)?s:h,n.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(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);do{while(e.isEven())e.iushrn(1);while(i.isEven())i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}while(1);return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"===typeof t);var e=t%26,i=(t-e)/26,n=1<<e;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var h=0|this.words[s];h+=o,o=h>>>26,h&=67108863,this.words[s]=h}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,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(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,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){r<n?e=-1:r>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 E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(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)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),e=i.bitLength()}while(e>this.n);var r=e<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},n(w,y),w.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n<r;n++)e.words[n]=t.words[n];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&i,n=10;n<t.length;n++){var s=0|t.words[n];t.words[n-10]=(s&i)<<4|o>>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i<t.length;i++){var r=0|t.words[i];e+=977*r,t.words[i]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(M,y),n(_,y),n(S,y),S.prototype.imulK=function(t){for(var e=0,i=0;i<t.length;i++){var r=19*(0|t.words[i])+e,n=67108863&r;r>>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new M;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return v[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0===(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2===1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}var n=this.m.subn(1),s=0;while(!n.isZero()&&0===n.andln(1))s++,n.iushrn(1);r(!n.isZero());var h=new o(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new o(2*f*f).toRed(this);while(0!==this.pow(f,u).cmp(a))f.redIAdd(a);var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;while(0!==d.cmp(h)){for(var m=d,b=0;0!==m.cmp(h);b++)m=m.redSqr();r(b<p);var g=this.pow(l,new o(1).iushln(p-b-1));c=c.redMul(g),l=g.redSqr(),d=d.redMul(l),p=b}return c},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var i=4,r=new Array(1<<i);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var s=r[0],h=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var f=e.words[n],l=u-1;l>=0;l--){var c=f>>l&1;s!==r[0]&&(s=this.sqr(s)),0!==c||0!==h?(h<<=1,h|=c,a++,(a===i||0===n&&0===l)&&(s=this.mul(s,r[h]),a=0,h=0)):a=0}u=26}return s},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},n(k,E),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(t){var e=this.imod(t._invmp(this.m).mul(this.r2));return e._forceRed(this)}})(t,this)}).call(this,i("62e4")(t))},"0145":function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},"0184":function(t,e,i){"use strict";var r=i("da3e");function n(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=n,n.prototype._init=function(){},n.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},n.prototype._buffer=function(t,e){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<i;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=i,i},n.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(t){var e=0,i=0,r=(this.bufferOff+t.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,n,i),i+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return n},n.prototype._updateDecrypt=function(t){for(var e=0,i=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),i+=this._flushBuffer(n,i);return e+=this._buffer(t,e),n},n.prototype.final=function(t){var e,i;return t&&(e=this.update(t)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(i):i},n.prototype._pad=function(t,e){if(0===e)return!1;while(e<t.length)t[e++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},n.prototype._unpad=function(t){return t},n.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},"0211":function(t,e,i){"use strict";const r=e;r._reverse=function(t){const e={};return Object.keys(t).forEach((function(i){(0|i)==i&&(i|=0);const r=t[i];e[r]=i})),e},r.der=i("8b71")},"02b9":function(t,e,i){(function(e){i("c975"),i("fb6a"),i("d3b7"),i("ac1f"),i("25f0"),i("5319");var r=i("89b7")._,n=i("89b7"),o=i("60cd"),s="-----BEGIN OPENSSH PRIVATE KEY-----",h="-----END OPENSSH PRIVATE KEY-----";function a(t){var e=t.buf.readInt32BE(t.off);t.off+=4;var i=t.buf.slice(t.off,t.off+e);return t.off+=e,i}function u(t,e){t.buf.writeInt32BE(e.byteLength,t.off),t.off+=4,t.off+=e.copy(t.buf,t.off)}t.exports={privateExport:function(t,i){var r=t.n.toBuffer(),o=e.alloc(4);o.writeUInt32BE(t.e,0);while(0===o[0])o=o.slice(1);var a,f=t.d.toBuffer(),l=t.coeff.toBuffer(),c=t.p.toBuffer(),d=t.q.toBuffer();a="undefined"!==typeof t.sshcomment?e.from(t.sshcomment):e.from([]);var p=15+o.byteLength+4+r.byteLength,m=23+r.byteLength+4+o.byteLength+4+f.byteLength+4+l.byteLength+4+c.byteLength+4+d.byteLength+4+a.byteLength,b=43+p+4+m,g=8*Math.ceil(m/8)-m;b+=g;var v=e.alloc(b),y={buf:v,off:0};v.write("openssh-key-v1","utf8"),v.writeUInt8(0,14),y.off+=15,u(y,e.from("none")),u(y,e.from("none")),u(y,e.from("")),y.off=y.buf.writeUInt32BE(1,y.off),y.off=y.buf.writeUInt32BE(p,y.off),u(y,e.from("ssh-rsa")),u(y,o),u(y,r),y.off=y.buf.writeUInt32BE(b-47-p,y.off),y.off+=8,u(y,e.from("ssh-rsa")),u(y,r),u(y,o),u(y,f),u(y,l),u(y,c),u(y,d),u(y,a);var w=1;while(y.off<b)y.off=y.buf.writeUInt8(w++,y.off);return"der"===i.type?y.buf:s+"\n"+n.linebrk(v.toString("base64"),70)+"\n"+h+"\n"},privateImport:function(t,i,u){var f;if(u=u||{},"der"!==u.type){if(e.isBuffer(i)&&(i=i.toString("utf8")),!r.isString(i))throw Error("Unsupported key format");var l=n.trimSurroundingText(i,s,h).replace(/\s+|\n\r|\n|\r$/gm,"");f=e.from(l,"base64")}else{if(!e.isBuffer(i))throw Error("Unsupported key format");f=i}var c={buf:f,off:0};if("openssh-key-v1"!==f.slice(0,14).toString("ascii"))throw"Invalid file format.";if(c.off+=15,"none"!==a(c).toString("ascii"))throw Error("Unsupported key type");if("none"!==a(c).toString("ascii"))throw Error("Unsupported key type");if(""!==a(c).toString("ascii"))throw Error("Unsupported key type");if(c.off+=4,c.off+=4,"ssh-rsa"!==a(c).toString("ascii"))throw Error("Unsupported key type");if(a(c),a(c),c.off+=12,"ssh-rsa"!==a(c).toString("ascii"))throw Error("Unsupported key type");var d=a(c),p=a(c),m=a(c),b=a(c),g=a(c),v=a(c),y=new o(m),w=new o(v),M=new o(g),_=y.mod(M.subtract(o.ONE)),S=y.mod(w.subtract(o.ONE));t.setPrivate(d,p,m,g,v,_.toBuffer(),S.toBuffer(),b),t.sshcomment=a(c).toString("ascii")},publicExport:function(t,i){var r=e.alloc(4);r.writeUInt32BE(t.e,0);while(0===r[0])r=r.slice(1);var n=t.n.toBuffer(),o=e.alloc(r.byteLength+4+n.byteLength+4+"ssh-rsa".length+4),s={buf:o,off:0};u(s,e.from("ssh-rsa")),u(s,r),u(s,n);var h=t.sshcomment||"";return"de