@swapkit/wallet-keystore 1.8.2 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -17
- package/dist/index.js.map +3 -9
- package/package.json +9 -9
- package/dist/chunk-54v0n09z.js +0 -6
- package/dist/chunk-54v0n09z.js.map +0 -141
- package/dist/chunk-newnqy8q.js +0 -4
- package/dist/chunk-newnqy8q.js.map +0 -9
package/dist/index.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import{a as dU,b as y0,c as IX,d as ZX,e as wU}from"./chunk-newnqy8q.js";var xU={};IX(xU,{versions:()=>tZ,version:()=>mZ,umask:()=>GQ,title:()=>bZ,removeListener:()=>UQ,removeAllListeners:()=>XQ,prependOnceListener:()=>QQ,prependListener:()=>ZQ,once:()=>eZ,on:()=>rZ,off:()=>iZ,nextTick:()=>dZ,listeners:()=>$Q,env:()=>nZ,emit:()=>IQ,cwd:()=>VQ,chdir:()=>OQ,browser:()=>oZ,binding:()=>YQ,argv:()=>sZ,addListener:()=>aZ});function lZ(){if(!XX||!mU)return;if(XX=!1,mU.length)fU=mU.concat(fU);else DX=-1;if(fU.length)LI()}function LI(){if(XX)return;var E=setTimeout(lZ,0);XX=!0;var G=fU.length;while(G){mU=fU,fU=[];while(++DX<G)if(mU){var W=mU[DX];W.fun.apply(null,W.array)}DX=-1,G=fU.length}mU=null,XX=!1,clearTimeout(E,0)}function dZ(E){var G=new Array(arguments.length-1);if(arguments.length>1)for(var W=1;W<arguments.length;W++)G[W-1]=arguments[W];if(fU.push({fun:E,args:G}),fU.length===1&&!XX)setTimeout(LI,0)}function cU(){}var fU,XX=!1,mU,DX=-1,bZ="browser",oZ=!0,nZ,sZ,mZ="",tZ,rZ,aZ,eZ,iZ,UQ,XQ,IQ,ZQ,QQ,$Q=function(E){return[]},YQ=function(E){throw new Error("process.binding is not supported in browser polyfill")},VQ=function(){return"/"},OQ=function(E){throw new Error("process.chdir is not supported in browser polyfill")},GQ=function(){return 0};var gU=ZX(()=>{fU=[];nZ={},sZ=[],tZ={};rZ=cU,aZ=cU,eZ=cU,iZ=cU,UQ=cU,XQ=cU,IQ=cU,ZQ=cU,QQ=cU});var FU={};IX(FU,{transcode:()=>tQ,resolveObjectURL:()=>nQ,kStringMaxLength:()=>kI,kMaxLength:()=>GX,isUtf8:()=>sQ,isAscii:()=>mQ,default:()=>rQ,constants:()=>LQ,btoa:()=>EQ,atob:()=>CQ,INSPECT_MAX_BYTES:()=>AQ,File:()=>TQ,Buffer:()=>K0,Blob:()=>DQ});function KQ(E){var G=E.length;if(G%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var W=E.indexOf("=");if(W===-1)W=G;var C=W===G?0:4-W%4;return[W,C]}function WQ(E,G){return(E+G)*3/4-G}function JQ(E){var G,W=KQ(E),C=W[0],H=W[1],z=new Uint8Array(WQ(C,H)),V=0,P=H>0?C-4:C,k;for(k=0;k<P;k+=4)G=jU[E.charCodeAt(k)]<<18|jU[E.charCodeAt(k+1)]<<12|jU[E.charCodeAt(k+2)]<<6|jU[E.charCodeAt(k+3)],z[V++]=G>>16&255,z[V++]=G>>8&255,z[V++]=G&255;if(H===2)G=jU[E.charCodeAt(k)]<<2|jU[E.charCodeAt(k+1)]>>4,z[V++]=G&255;if(H===1)G=jU[E.charCodeAt(k)]<<10|jU[E.charCodeAt(k+1)]<<4|jU[E.charCodeAt(k+2)]>>2,z[V++]=G>>8&255,z[V++]=G&255;return z}function FQ(E){return NU[E>>18&63]+NU[E>>12&63]+NU[E>>6&63]+NU[E&63]}function HQ(E,G,W){var C,H=[];for(var z=G;z<W;z+=3)C=(E[z]<<16&16711680)+(E[z+1]<<8&65280)+(E[z+2]&255),H.push(FQ(C));return H.join("")}function MI(E){var G,W=E.length,C=W%3,H=[],z=16383;for(var V=0,P=W-C;V<P;V+=z)H.push(HQ(E,V,V+z>P?P:V+z));if(C===1)G=E[W-1],H.push(NU[G>>2]+NU[G<<4&63]+"==");else if(C===2)G=(E[W-2]<<8)+E[W-1],H.push(NU[G>>10]+NU[G>>4&63]+NU[G<<2&63]+"=");return H.join("")}function LX(E,G,W,C,H){var z,V,P=H*8-C-1,k=(1<<P)-1,R=k>>1,S=-7,D=W?H-1:0,A=W?-1:1,L=E[G+D];D+=A,z=L&(1<<-S)-1,L>>=-S,S+=P;for(;S>0;z=z*256+E[G+D],D+=A,S-=8);V=z&(1<<-S)-1,z>>=-S,S+=C;for(;S>0;V=V*256+E[G+D],D+=A,S-=8);if(z===0)z=1-R;else if(z===k)return V?NaN:(L?-1:1)*(1/0);else V=V+Math.pow(2,C),z=z-R;return(L?-1:1)*V*Math.pow(2,z-C)}function vI(E,G,W,C,H,z){var V,P,k,R=z*8-H-1,S=(1<<R)-1,D=S>>1,A=H===23?Math.pow(2,-24)-Math.pow(2,-77):0,L=C?0:z-1,M=C?1:-1,q=G<0||G===0&&1/G<0?1:0;if(G=Math.abs(G),isNaN(G)||G===1/0)P=isNaN(G)?1:0,V=S;else{if(V=Math.floor(Math.log(G)/Math.LN2),G*(k=Math.pow(2,-V))<1)V--,k*=2;if(V+D>=1)G+=A/k;else G+=A*Math.pow(2,1-D);if(G*k>=2)V++,k/=2;if(V+D>=S)P=0,V=S;else if(V+D>=1)P=(G*k-1)*Math.pow(2,H),V=V+D;else P=G*Math.pow(2,D-1)*Math.pow(2,H),V=0}for(;H>=8;E[W+L]=P&255,L+=M,P/=256,H-=8);V=V<<H|P,R+=H;for(;R>0;E[W+L]=V&255,L+=M,V/=256,R-=8);E[W+L-M]|=q*128}function pU(E){if(E>GX)throw new RangeError('The value "'+E+'" is invalid for option "size"');let G=new Uint8Array(E);return Object.setPrototypeOf(G,K0.prototype),G}function bX(E,G,W){return class C extends W{constructor(){super();Object.defineProperty(this,"message",{value:G.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,this.stack,delete this.name}get code(){return E}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}function K0(E,G,W){if(typeof E==="number"){if(typeof G==="string")throw new TypeError('The "string" argument must be of type string. Received type number');return oX(E)}return jI(E,G,W)}function jI(E,G,W){if(typeof E==="string")return SQ(E,G);if(ArrayBuffer.isView(E))return PQ(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(_U(E,ArrayBuffer)||E&&_U(E.buffer,ArrayBuffer))return lX(E,G,W);if(typeof SharedArrayBuffer!=="undefined"&&(_U(E,SharedArrayBuffer)||E&&_U(E.buffer,SharedArrayBuffer)))return lX(E,G,W);if(typeof E==="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let C=E.valueOf&&E.valueOf();if(C!=null&&C!==E)return K0.from(C,G,W);let H=qQ(E);if(H)return H;if(typeof Symbol!=="undefined"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]==="function")return K0.from(E[Symbol.toPrimitive]("string"),G,W);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}function BI(E){if(typeof E!=="number")throw new TypeError('"size" argument must be of type number');else if(E<0)throw new RangeError('The value "'+E+'" is invalid for option "size"')}function RQ(E,G,W){if(BI(E),E<=0)return pU(E);if(G!==void 0)return typeof W==="string"?pU(E).fill(G,W):pU(E).fill(G);return pU(E)}function oX(E){return BI(E),pU(E<0?0:nX(E)|0)}function SQ(E,G){if(typeof G!=="string"||G==="")G="utf8";if(!K0.isEncoding(G))throw new TypeError("Unknown encoding: "+G);let W=xI(E,G)|0,C=pU(W),H=C.write(E,G);if(H!==W)C=C.slice(0,H);return C}function uX(E){let G=E.length<0?0:nX(E.length)|0,W=pU(G);for(let C=0;C<G;C+=1)W[C]=E[C]&255;return W}function PQ(E){if(_U(E,Uint8Array)){let G=new Uint8Array(E);return lX(G.buffer,G.byteOffset,G.byteLength)}return uX(E)}function lX(E,G,W){if(G<0||E.byteLength<G)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<G+(W||0))throw new RangeError('"length" is outside of buffer bounds');let C;if(G===void 0&&W===void 0)C=new Uint8Array(E);else if(W===void 0)C=new Uint8Array(E,G);else C=new Uint8Array(E,G,W);return Object.setPrototypeOf(C,K0.prototype),C}function qQ(E){if(K0.isBuffer(E)){let G=nX(E.length)|0,W=pU(G);if(W.length===0)return W;return E.copy(W,0,0,G),W}if(E.length!==void 0){if(typeof E.length!=="number"||numberIsNaN(E.length))return pU(0);return uX(E)}if(E.type==="Buffer"&&Array.isArray(E.data))return uX(E.data)}function nX(E){if(E>=GX)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+GX.toString(16)+" bytes");return E|0}function xI(E,G){if(K0.isBuffer(E))return E.length;if(ArrayBuffer.isView(E)||_U(E,ArrayBuffer))return E.byteLength;if(typeof E!=="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);let W=E.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&W===0)return 0;let H=!1;for(;;)switch(G){case"ascii":case"latin1":case"binary":return W;case"utf8":case"utf-8":return dX(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W*2;case"hex":return W>>>1;case"base64":return hI(E).length;default:if(H)return C?-1:dX(E).length;G=(""+G).toLowerCase(),H=!0}}function vQ(E,G,W){let C=!1;if(G===void 0||G<0)G=0;if(G>this.length)return"";if(W===void 0||W>this.length)W=this.length;if(W<=0)return"";if(W>>>=0,G>>>=0,W<=G)return"";if(!E)E="utf8";while(!0)switch(E){case"hex":return fQ(this,G,W);case"utf8":case"utf-8":return NI(this,G,W);case"ascii":return wQ(this,G,W);case"latin1":case"binary":return yQ(this,G,W);case"base64":return NQ(this,G,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cQ(this,G,W);default:if(C)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),C=!0}}function rU(E,G,W){let C=E[G];E[G]=E[W],E[W]=C}function gI(E,G,W,C,H){if(E.length===0)return-1;if(typeof W==="string")C=W,W=0;else if(W>2147483647)W=2147483647;else if(W<-2147483648)W=-2147483648;if(W=+W,Number.isNaN(W))W=H?0:E.length-1;if(W<0)W=E.length+W;if(W>=E.length)if(H)return-1;else W=E.length-1;else if(W<0)if(H)W=0;else return-1;if(typeof G==="string")G=K0.from(G,C);if(K0.isBuffer(G)){if(G.length===0)return-1;return SI(E,G,W,C,H)}else if(typeof G==="number"){if(G=G&255,typeof Uint8Array.prototype.indexOf==="function")if(H)return Uint8Array.prototype.indexOf.call(E,G,W);else return Uint8Array.prototype.lastIndexOf.call(E,G,W);return SI(E,[G],W,C,H)}throw new TypeError("val must be string, number or Buffer")}function SI(E,G,W,C,H){let z=1,V=E.length,P=G.length;if(C!==void 0){if(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le"){if(E.length<2||G.length<2)return-1;z=2,V/=2,P/=2,W/=2}}function k(S,D){if(z===1)return S[D];else return S.readUInt16BE(D*z)}let R;if(H){let S=-1;for(R=W;R<V;R++)if(k(E,R)===k(G,S===-1?0:R-S)){if(S===-1)S=R;if(R-S+1===P)return S*z}else{if(S!==-1)R-=R-S;S=-1}}else{if(W+P>V)W=V-P;for(R=W;R>=0;R--){let S=!0;for(let D=0;D<P;D++)if(k(E,R+D)!==k(G,D)){S=!1;break}if(S)return R}}return-1}function kQ(E,G,W,C){W=Number(W)||0;let H=E.length-W;if(!C)C=H;else if(C=Number(C),C>H)C=H;let z=G.length;if(C>z/2)C=z/2;let V;for(V=0;V<C;++V){let P=parseInt(G.substr(V*2,2),16);if(numberIsNaN(P))return V;E[W+V]=P}return V}function jQ(E,G,W,C){return zX(dX(G,E.length-W),E,W,C)}function BQ(E,G,W,C){return zX(lQ(G),E,W,C)}function xQ(E,G,W,C){return zX(hI(G),E,W,C)}function gQ(E,G,W,C){return zX(dQ(G,E.length-W),E,W,C)}function NQ(E,G,W){if(G===0&&W===E.length)return MI(E);else return MI(E.slice(G,W))}function NI(E,G,W){W=Math.min(E.length,W);let C=[],H=G;while(H<W){let z=E[H],V=null,P=z>239?4:z>223?3:z>191?2:1;if(H+P<=W){let k,R,S,D;switch(P){case 1:if(z<128)V=z;break;case 2:if(k=E[H+1],(k&192)===128){if(D=(z&31)<<6|k&63,D>127)V=D}break;case 3:if(k=E[H+1],R=E[H+2],(k&192)===128&&(R&192)===128){if(D=(z&15)<<12|(k&63)<<6|R&63,D>2047&&(D<55296||D>57343))V=D}break;case 4:if(k=E[H+1],R=E[H+2],S=E[H+3],(k&192)===128&&(R&192)===128&&(S&192)===128){if(D=(z&15)<<18|(k&63)<<12|(R&63)<<6|S&63,D>65535&&D<1114112)V=D}}}if(V===null)V=65533,P=1;else if(V>65535)V-=65536,C.push(V>>>10&1023|55296),V=56320|V&1023;C.push(V),H+=P}return _Q(C)}function _Q(E){let G=E.length;if(G<=PI)return String.fromCharCode.apply(String,E);let W="",C=0;while(C<G)W+=String.fromCharCode.apply(String,E.slice(C,C+=PI));return W}function wQ(E,G,W){let C="";W=Math.min(E.length,W);for(let H=G;H<W;++H)C+=String.fromCharCode(E[H]&127);return C}function yQ(E,G,W){let C="";W=Math.min(E.length,W);for(let H=G;H<W;++H)C+=String.fromCharCode(E[H]);return C}function fQ(E,G,W){let C=E.length;if(!G||G<0)G=0;if(!W||W<0||W>C)W=C;let H="";for(let z=G;z<W;++z)H+=bQ[E[z]];return H}function cQ(E,G,W){let C=E.slice(G,W),H="";for(let z=0;z<C.length-1;z+=2)H+=String.fromCharCode(C[z]+C[z+1]*256);return H}function JU(E,G,W){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+G>W)throw new RangeError("Trying to access beyond buffer length")}function RU(E,G,W,C,H,z){if(!K0.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(G>H||G<z)throw new RangeError('"value" argument is out of bounds');if(W+C>E.length)throw new RangeError("Index out of range")}function _I(E,G,W,C,H){pI(G,C,H,E,W,7);let z=Number(G&BigInt(4294967295));E[W++]=z,z=z>>8,E[W++]=z,z=z>>8,E[W++]=z,z=z>>8,E[W++]=z;let V=Number(G>>BigInt(32)&BigInt(4294967295));return E[W++]=V,V=V>>8,E[W++]=V,V=V>>8,E[W++]=V,V=V>>8,E[W++]=V,W}function wI(E,G,W,C,H){pI(G,C,H,E,W,7);let z=Number(G&BigInt(4294967295));E[W+7]=z,z=z>>8,E[W+6]=z,z=z>>8,E[W+5]=z,z=z>>8,E[W+4]=z;let V=Number(G>>BigInt(32)&BigInt(4294967295));return E[W+3]=V,V=V>>8,E[W+2]=V,V=V>>8,E[W+1]=V,V=V>>8,E[W]=V,W+8}function yI(E,G,W,C,H,z){if(W+C>E.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("Index out of range")}function fI(E,G,W,C,H){if(G=+G,W=W>>>0,!H)yI(E,G,W,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return vI(E,G,W,C,23,4),W+4}function cI(E,G,W,C,H){if(G=+G,W=W>>>0,!H)yI(E,G,W,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return vI(E,G,W,C,52,8),W+8}function qI(E){let G="",W=E.length,C=E[0]==="-"?1:0;for(;W>=C+4;W-=3)G=`_${E.slice(W-3,W)}${G}`;return`${E.slice(0,W)}${G}`}function pQ(E,G,W){if(QX(G,"offset"),E[G]===void 0||E[G+W]===void 0)KX(G,E.length-(W+1))}function pI(E,G,W,C,H,z){if(E>W||E<G){let V=typeof G==="bigint"?"n":"",P;if(z>3)if(G===0||G===BigInt(0))P=`>= 0${V} and < 2${V} ** ${(z+1)*8}${V}`;else P=`>= -(2${V} ** ${(z+1)*8-1}${V}) and < 2 ** ${(z+1)*8-1}${V}`;else P=`>= ${G}${V} and <= ${W}${V}`;throw new hX("value",P,E)}pQ(C,H,z)}function QX(E,G){if(typeof E!=="number")throw new MQ(G,"number",E)}function KX(E,G,W){if(Math.floor(E)!==E)throw QX(E,W),new hX(W||"offset","an integer",E);if(G<0)throw new zQ;throw new hX(W||"offset",`>= ${W?1:0} and <= ${G}`,E)}function uQ(E){if(E=E.split("=")[0],E=E.trim().replace(hQ,""),E.length<2)return"";while(E.length%4!==0)E=E+"=";return E}function dX(E,G){G=G||1/0;let W,C=E.length,H=null,z=[];for(let V=0;V<C;++V){if(W=E.charCodeAt(V),W>55295&&W<57344){if(!H){if(W>56319){if((G-=3)>-1)z.push(239,191,189);continue}else if(V+1===C){if((G-=3)>-1)z.push(239,191,189);continue}H=W;continue}if(W<56320){if((G-=3)>-1)z.push(239,191,189);H=W;continue}W=(H-55296<<10|W-56320)+65536}else if(H){if((G-=3)>-1)z.push(239,191,189)}if(H=null,W<128){if((G-=1)<0)break;z.push(W)}else if(W<2048){if((G-=2)<0)break;z.push(W>>6|192,W&63|128)}else if(W<65536){if((G-=3)<0)break;z.push(W>>12|224,W>>6&63|128,W&63|128)}else if(W<1114112){if((G-=4)<0)break;z.push(W>>18|240,W>>12&63|128,W>>6&63|128,W&63|128)}else throw new Error("Invalid code point")}return z}function lQ(E){let G=[];for(let W=0;W<E.length;++W)G.push(E.charCodeAt(W)&255);return G}function dQ(E,G){let W,C,H,z=[];for(let V=0;V<E.length;++V){if((G-=2)<0)break;W=E.charCodeAt(V),C=W>>8,H=W%256,z.push(H),z.push(C)}return z}function hI(E){return JQ(uQ(E))}function zX(E,G,W,C){let H;for(H=0;H<C;++H){if(H+W>=G.length||H>=E.length)break;G[H+W]=E[H]}return H}function _U(E,G){return E instanceof G||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===G.name}function bU(E){return typeof BigInt==="undefined"?oQ:E}function oQ(){throw new Error("BigInt not supported")}function sX(E){return()=>{throw new Error(E+" is not implemented for node:buffer browser polyfill")}}var NU,jU,pX="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tU,zI,RI,AQ=50,GX=2147483647,kI=536870888,EQ,CQ,TQ,DQ,LQ,zQ,MQ,hX,PI=4096,hQ,bQ,nQ,sQ,mQ=(E)=>{for(let G of E)if(G.charCodeAt(0)>127)return!1;return!0},tQ,rQ;var HU=ZX(()=>{NU=[],jU=[];for(tU=0,zI=pX.length;tU<zI;++tU)NU[tU]=pX[tU],jU[pX.charCodeAt(tU)]=tU;jU[45]=62;jU[95]=63;RI=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,EQ=globalThis.btoa,CQ=globalThis.atob,TQ=globalThis.File,DQ=globalThis.Blob,LQ={MAX_LENGTH:GX,MAX_STRING_LENGTH:kI};zQ=bX("ERR_BUFFER_OUT_OF_BOUNDS",function(E){if(E)return`${E} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),MQ=bX("ERR_INVALID_ARG_TYPE",function(E,G){return`The "${E}" argument must be of type number. Received type ${typeof G}`},TypeError),hX=bX("ERR_OUT_OF_RANGE",function(E,G,W){let C=`The value of "${E}" is out of range.`,H=W;if(Number.isInteger(W)&&Math.abs(W)>4294967296)H=qI(String(W));else if(typeof W==="bigint"){if(H=String(W),W>BigInt(2)**BigInt(32)||W<-(BigInt(2)**BigInt(32)))H=qI(H);H+="n"}return C+=` It must be ${G}. Received ${H}`,C},RangeError);Object.defineProperty(K0.prototype,"parent",{enumerable:!0,get:function(){if(!K0.isBuffer(this))return;return this.buffer}});Object.defineProperty(K0.prototype,"offset",{enumerable:!0,get:function(){if(!K0.isBuffer(this))return;return this.byteOffset}});K0.poolSize=8192;K0.from=function(E,G,W){return jI(E,G,W)};Object.setPrototypeOf(K0.prototype,Uint8Array.prototype);Object.setPrototypeOf(K0,Uint8Array);K0.alloc=function(E,G,W){return RQ(E,G,W)};K0.allocUnsafe=function(E){return oX(E)};K0.allocUnsafeSlow=function(E){return oX(E)};K0.isBuffer=function E(G){return G!=null&&G._isBuffer===!0&&G!==K0.prototype};K0.compare=function E(G,W){if(_U(G,Uint8Array))G=K0.from(G,G.offset,G.byteLength);if(_U(W,Uint8Array))W=K0.from(W,W.offset,W.byteLength);if(!K0.isBuffer(G)||!K0.isBuffer(W))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(G===W)return 0;let C=G.length,H=W.length;for(let z=0,V=Math.min(C,H);z<V;++z)if(G[z]!==W[z]){C=G[z],H=W[z];break}if(C<H)return-1;if(H<C)return 1;return 0};K0.isEncoding=function E(G){switch(String(G).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};K0.concat=function E(G,W){if(!Array.isArray(G))throw new TypeError('"list" argument must be an Array of Buffers');if(G.length===0)return K0.alloc(0);let C;if(W===void 0){W=0;for(C=0;C<G.length;++C)W+=G[C].length}let H=K0.allocUnsafe(W),z=0;for(C=0;C<G.length;++C){let V=G[C];if(_U(V,Uint8Array))if(z+V.length>H.length){if(!K0.isBuffer(V))V=K0.from(V);V.copy(H,z)}else Uint8Array.prototype.set.call(H,V,z);else if(!K0.isBuffer(V))throw new TypeError('"list" argument must be an Array of Buffers');else V.copy(H,z);z+=V.length}return H};K0.byteLength=xI;K0.prototype._isBuffer=!0;K0.prototype.swap16=function E(){let G=this.length;if(G%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let W=0;W<G;W+=2)rU(this,W,W+1);return this};K0.prototype.swap32=function E(){let G=this.length;if(G%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let W=0;W<G;W+=4)rU(this,W,W+3),rU(this,W+1,W+2);return this};K0.prototype.swap64=function E(){let G=this.length;if(G%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let W=0;W<G;W+=8)rU(this,W,W+7),rU(this,W+1,W+6),rU(this,W+2,W+5),rU(this,W+3,W+4);return this};K0.prototype.toString=function E(){let G=this.length;if(G===0)return"";if(arguments.length===0)return NI(this,0,G);return vQ.apply(this,arguments)};K0.prototype.toLocaleString=K0.prototype.toString;K0.prototype.equals=function E(G){if(!K0.isBuffer(G))throw new TypeError("Argument must be a Buffer");if(this===G)return!0;return K0.compare(this,G)===0};K0.prototype.inspect=function E(){let G="",W=exports_buffer.INSPECT_MAX_BYTES;if(G=this.toString("hex",0,W).replace(/(.{2})/g,"$1 ").trim(),this.length>W)G+=" ... ";return"<Buffer "+G+">"};if(RI)K0.prototype[RI]=K0.prototype.inspect;K0.prototype.compare=function E(G,W,C,H,z){if(_U(G,Uint8Array))G=K0.from(G,G.offset,G.byteLength);if(!K0.isBuffer(G))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof G);if(W===void 0)W=0;if(C===void 0)C=G?G.length:0;if(H===void 0)H=0;if(z===void 0)z=this.length;if(W<0||C>G.length||H<0||z>this.length)throw new RangeError("out of range index");if(H>=z&&W>=C)return 0;if(H>=z)return-1;if(W>=C)return 1;if(W>>>=0,C>>>=0,H>>>=0,z>>>=0,this===G)return 0;let V=z-H,P=C-W,k=Math.min(V,P),R=this.slice(H,z),S=G.slice(W,C);for(let D=0;D<k;++D)if(R[D]!==S[D]){V=R[D],P=S[D];break}if(V<P)return-1;if(P<V)return 1;return 0};K0.prototype.includes=function E(G,W,C){return this.indexOf(G,W,C)!==-1};K0.prototype.indexOf=function E(G,W,C){return gI(this,G,W,C,!0)};K0.prototype.lastIndexOf=function E(G,W,C){return gI(this,G,W,C,!1)};K0.prototype.write=function E(G,W,C,H){if(W===void 0)H="utf8",C=this.length,W=0;else if(C===void 0&&typeof W==="string")H=W,C=this.length,W=0;else if(isFinite(W))if(W=W>>>0,isFinite(C)){if(C=C>>>0,H===void 0)H="utf8"}else H=C,C=void 0;else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let z=this.length-W;if(C===void 0||C>z)C=z;if(G.length>0&&(C<0||W<0)||W>this.length)throw new RangeError("Attempt to write outside buffer bounds");if(!H)H="utf8";let V=!1;for(;;)switch(H){case"hex":return kQ(this,G,W,C);case"utf8":case"utf-8":return jQ(this,G,W,C);case"ascii":case"latin1":case"binary":return BQ(this,G,W,C);case"base64":return xQ(this,G,W,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gQ(this,G,W,C);default:if(V)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),V=!0}};K0.prototype.toJSON=function E(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};K0.prototype.slice=function E(G,W){let C=this.length;if(G=~~G,W=W===void 0?C:~~W,G<0){if(G+=C,G<0)G=0}else if(G>C)G=C;if(W<0){if(W+=C,W<0)W=0}else if(W>C)W=C;if(W<G)W=G;let H=this.subarray(G,W);return Object.setPrototypeOf(H,K0.prototype),H};K0.prototype.readUintLE=K0.prototype.readUIntLE=function E(G,W,C){if(G=G>>>0,W=W>>>0,!C)JU(G,W,this.length);let H=this[G],z=1,V=0;while(++V<W&&(z*=256))H+=this[G+V]*z;return H};K0.prototype.readUintBE=K0.prototype.readUIntBE=function E(G,W,C){if(G=G>>>0,W=W>>>0,!C)JU(G,W,this.length);let H=this[G+--W],z=1;while(W>0&&(z*=256))H+=this[G+--W]*z;return H};K0.prototype.readUint8=K0.prototype.readUInt8=function E(G,W){if(G=G>>>0,!W)JU(G,1,this.length);return this[G]};K0.prototype.readUint16LE=K0.prototype.readUInt16LE=function E(G,W){if(G=G>>>0,!W)JU(G,2,this.length);return this[G]|this[G+1]<<8};K0.prototype.readUint16BE=K0.prototype.readUInt16BE=function E(G,W){if(G=G>>>0,!W)JU(G,2,this.length);return this[G]<<8|this[G+1]};K0.prototype.readUint32LE=K0.prototype.readUInt32LE=function E(G,W){if(G=G>>>0,!W)JU(G,4,this.length);return(this[G]|this[G+1]<<8|this[G+2]<<16)+this[G+3]*16777216};K0.prototype.readUint32BE=K0.prototype.readUInt32BE=function E(G,W){if(G=G>>>0,!W)JU(G,4,this.length);return this[G]*16777216+(this[G+1]<<16|this[G+2]<<8|this[G+3])};K0.prototype.readBigUInt64LE=bU(function E(G){G=G>>>0,QX(G,"offset");let W=this[G],C=this[G+7];if(W===void 0||C===void 0)KX(G,this.length-8);let H=W+this[++G]*256+this[++G]*65536+this[++G]*16777216,z=this[++G]+this[++G]*256+this[++G]*65536+C*16777216;return BigInt(H)+(BigInt(z)<<BigInt(32))});K0.prototype.readBigUInt64BE=bU(function E(G){G=G>>>0,QX(G,"offset");let W=this[G],C=this[G+7];if(W===void 0||C===void 0)KX(G,this.length-8);let H=W*16777216+this[++G]*65536+this[++G]*256+this[++G],z=this[++G]*16777216+this[++G]*65536+this[++G]*256+C;return(BigInt(H)<<BigInt(32))+BigInt(z)});K0.prototype.readIntLE=function E(G,W,C){if(G=G>>>0,W=W>>>0,!C)JU(G,W,this.length);let H=this[G],z=1,V=0;while(++V<W&&(z*=256))H+=this[G+V]*z;if(z*=128,H>=z)H-=Math.pow(2,8*W);return H};K0.prototype.readIntBE=function E(G,W,C){if(G=G>>>0,W=W>>>0,!C)JU(G,W,this.length);let H=W,z=1,V=this[G+--H];while(H>0&&(z*=256))V+=this[G+--H]*z;if(z*=128,V>=z)V-=Math.pow(2,8*W);return V};K0.prototype.readInt8=function E(G,W){if(G=G>>>0,!W)JU(G,1,this.length);if(!(this[G]&128))return this[G];return(255-this[G]+1)*-1};K0.prototype.readInt16LE=function E(G,W){if(G=G>>>0,!W)JU(G,2,this.length);let C=this[G]|this[G+1]<<8;return C&32768?C|4294901760:C};K0.prototype.readInt16BE=function E(G,W){if(G=G>>>0,!W)JU(G,2,this.length);let C=this[G+1]|this[G]<<8;return C&32768?C|4294901760:C};K0.prototype.readInt32LE=function E(G,W){if(G=G>>>0,!W)JU(G,4,this.length);return this[G]|this[G+1]<<8|this[G+2]<<16|this[G+3]<<24};K0.prototype.readInt32BE=function E(G,W){if(G=G>>>0,!W)JU(G,4,this.length);return this[G]<<24|this[G+1]<<16|this[G+2]<<8|this[G+3]};K0.prototype.readBigInt64LE=bU(function E(G){G=G>>>0,QX(G,"offset");let W=this[G],C=this[G+7];if(W===void 0||C===void 0)KX(G,this.length-8);let H=this[G+4]+this[G+5]*256+this[G+6]*65536+(C<<24);return(BigInt(H)<<BigInt(32))+BigInt(W+this[++G]*256+this[++G]*65536+this[++G]*16777216)});K0.prototype.readBigInt64BE=bU(function E(G){G=G>>>0,QX(G,"offset");let W=this[G],C=this[G+7];if(W===void 0||C===void 0)KX(G,this.length-8);let H=(W<<24)+this[++G]*65536+this[++G]*256+this[++G];return(BigInt(H)<<BigInt(32))+BigInt(this[++G]*16777216+this[++G]*65536+this[++G]*256+C)});K0.prototype.readFloatLE=function E(G,W){if(G=G>>>0,!W)JU(G,4,this.length);return LX(this,G,!0,23,4)};K0.prototype.readFloatBE=function E(G,W){if(G=G>>>0,!W)JU(G,4,this.length);return LX(this,G,!1,23,4)};K0.prototype.readDoubleLE=function E(G,W){if(G=G>>>0,!W)JU(G,8,this.length);return LX(this,G,!0,52,8)};K0.prototype.readDoubleBE=function E(G,W){if(G=G>>>0,!W)JU(G,8,this.length);return LX(this,G,!1,52,8)};K0.prototype.writeUintLE=K0.prototype.writeUIntLE=function E(G,W,C,H){if(G=+G,W=W>>>0,C=C>>>0,!H){let P=Math.pow(2,8*C)-1;RU(this,G,W,C,P,0)}let z=1,V=0;this[W]=G&255;while(++V<C&&(z*=256))this[W+V]=G/z&255;return W+C};K0.prototype.writeUintBE=K0.prototype.writeUIntBE=function E(G,W,C,H){if(G=+G,W=W>>>0,C=C>>>0,!H){let P=Math.pow(2,8*C)-1;RU(this,G,W,C,P,0)}let z=C-1,V=1;this[W+z]=G&255;while(--z>=0&&(V*=256))this[W+z]=G/V&255;return W+C};K0.prototype.writeUint8=K0.prototype.writeUInt8=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,1,255,0);return this[W]=G&255,W+1};K0.prototype.writeUint16LE=K0.prototype.writeUInt16LE=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,2,65535,0);return this[W]=G&255,this[W+1]=G>>>8,W+2};K0.prototype.writeUint16BE=K0.prototype.writeUInt16BE=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,2,65535,0);return this[W]=G>>>8,this[W+1]=G&255,W+2};K0.prototype.writeUint32LE=K0.prototype.writeUInt32LE=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,4,4294967295,0);return this[W+3]=G>>>24,this[W+2]=G>>>16,this[W+1]=G>>>8,this[W]=G&255,W+4};K0.prototype.writeUint32BE=K0.prototype.writeUInt32BE=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,4,4294967295,0);return this[W]=G>>>24,this[W+1]=G>>>16,this[W+2]=G>>>8,this[W+3]=G&255,W+4};K0.prototype.writeBigUInt64LE=bU(function E(G,W=0){return _I(this,G,W,BigInt(0),BigInt("0xffffffffffffffff"))});K0.prototype.writeBigUInt64BE=bU(function E(G,W=0){return wI(this,G,W,BigInt(0),BigInt("0xffffffffffffffff"))});K0.prototype.writeIntLE=function E(G,W,C,H){if(G=+G,W=W>>>0,!H){let k=Math.pow(2,8*C-1);RU(this,G,W,C,k-1,-k)}let z=0,V=1,P=0;this[W]=G&255;while(++z<C&&(V*=256)){if(G<0&&P===0&&this[W+z-1]!==0)P=1;this[W+z]=(G/V>>0)-P&255}return W+C};K0.prototype.writeIntBE=function E(G,W,C,H){if(G=+G,W=W>>>0,!H){let k=Math.pow(2,8*C-1);RU(this,G,W,C,k-1,-k)}let z=C-1,V=1,P=0;this[W+z]=G&255;while(--z>=0&&(V*=256)){if(G<0&&P===0&&this[W+z+1]!==0)P=1;this[W+z]=(G/V>>0)-P&255}return W+C};K0.prototype.writeInt8=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,1,127,-128);if(G<0)G=255+G+1;return this[W]=G&255,W+1};K0.prototype.writeInt16LE=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,2,32767,-32768);return this[W]=G&255,this[W+1]=G>>>8,W+2};K0.prototype.writeInt16BE=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,2,32767,-32768);return this[W]=G>>>8,this[W+1]=G&255,W+2};K0.prototype.writeInt32LE=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,4,2147483647,-2147483648);return this[W]=G&255,this[W+1]=G>>>8,this[W+2]=G>>>16,this[W+3]=G>>>24,W+4};K0.prototype.writeInt32BE=function E(G,W,C){if(G=+G,W=W>>>0,!C)RU(this,G,W,4,2147483647,-2147483648);if(G<0)G=4294967295+G+1;return this[W]=G>>>24,this[W+1]=G>>>16,this[W+2]=G>>>8,this[W+3]=G&255,W+4};K0.prototype.writeBigInt64LE=bU(function E(G,W=0){return _I(this,G,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});K0.prototype.writeBigInt64BE=bU(function E(G,W=0){return wI(this,G,W,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});K0.prototype.writeFloatLE=function E(G,W,C){return fI(this,G,W,!0,C)};K0.prototype.writeFloatBE=function E(G,W,C){return fI(this,G,W,!1,C)};K0.prototype.writeDoubleLE=function E(G,W,C){return cI(this,G,W,!0,C)};K0.prototype.writeDoubleBE=function E(G,W,C){return cI(this,G,W,!1,C)};K0.prototype.copy=function E(G,W,C,H){if(!K0.isBuffer(G))throw new TypeError("argument should be a Buffer");if(!C)C=0;if(!H&&H!==0)H=this.length;if(W>=G.length)W=G.length;if(!W)W=0;if(H>0&&H<C)H=C;if(H===C)return 0;if(G.length===0||this.length===0)return 0;if(W<0)throw new RangeError("targetStart out of bounds");if(C<0||C>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");if(H>this.length)H=this.length;if(G.length-W<H-C)H=G.length-W+C;let z=H-C;if(this===G&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(W,C,H);else Uint8Array.prototype.set.call(G,this.subarray(C,H),W);return z};K0.prototype.fill=function E(G,W,C,H){if(typeof G==="string"){if(typeof W==="string")H=W,W=0,C=this.length;else if(typeof C==="string")H=C,C=this.length;if(H!==void 0&&typeof H!=="string")throw new TypeError("encoding must be a string");if(typeof H==="string"&&!K0.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(G.length===1){let V=G.charCodeAt(0);if(H==="utf8"&&V<128||H==="latin1")G=V}}else if(typeof G==="number")G=G&255;else if(typeof G==="boolean")G=Number(G);if(W<0||this.length<W||this.length<C)throw new RangeError("Out of range index");if(C<=W)return this;if(W=W>>>0,C=C===void 0?this.length:C>>>0,!G)G=0;let z;if(typeof G==="number")for(z=W;z<C;++z)this[z]=G;else{let V=K0.isBuffer(G)?G:K0.from(G,H),P=V.length;if(P===0)throw new TypeError('The value "'+G+'" is invalid for argument "value"');for(z=0;z<C-W;++z)this[z+W]=V[z%P]}return this};hQ=/[^+/0-9A-Za-z-_]/g;bQ=function(){let E=new Array(256);for(let G=0;G<16;++G){let W=G*16;for(let C=0;C<16;++C)E[W+C]="0123456789abcdef"[G]+"0123456789abcdef"[C]}return E}();nQ=sX("resolveObjectURL"),sQ=sX("isUtf8"),tQ=sX("transcode"),rQ=K0});var nI={};IX(nI,{types:()=>Y$,promisify:()=>A$,log:()=>F$,isUndefined:()=>$X,isSymbol:()=>O$,isString:()=>vX,isRegExp:()=>MX,isPrimitive:()=>G$,isObject:()=>YX,isNumber:()=>lI,isNullOrUndefined:()=>V$,isNull:()=>qX,isFunction:()=>SX,isError:()=>RX,isDate:()=>aX,isBuffer:()=>K$,isBoolean:()=>iX,isArray:()=>uI,inspect:()=>aU,inherits:()=>H$,format:()=>eX,deprecate:()=>eQ,debuglog:()=>iQ,callbackifyOnRejected:()=>oI,callbackify:()=>E$,_extend:()=>dI,TextEncoder:()=>C$,TextDecoder:()=>T$});function eX(E,...G){if(!vX(E)){var W=[E];for(var C=0;C<G.length;C++)W.push(aU(G[C]));return W.join(" ")}var C=0,H=G.length,z=String(E).replace(aQ,function(P){if(P==="%%")return"%";if(C>=H)return P;switch(P){case"%s":return String(G[C++]);case"%d":return Number(G[C++]);case"%j":try{return JSON.stringify(G[C++])}catch(k){return"[Circular]"}default:return P}});for(var V=G[C];C<H;V=G[++C])if(qX(V)||!YX(V))z+=" "+V;else z+=" "+aU(V);return z}function eQ(E,G){if(typeof process==="undefined"||process?.noDeprecation===!0)return E;var W=!1;function C(...H){if(!W){if(process.throwDeprecation)throw new Error(G);else if(process.traceDeprecation)console.trace(G);else console.error(G);W=!0}return E.apply(this,...H)}return C}function U$(E,G){var W=aU.styles[G];if(W)return"\x1B["+aU.colors[W][0]+"m"+E+"\x1B["+aU.colors[W][1]+"m";else return E}function X$(E,G){return E}function I$(E){var G={};return E.forEach(function(W,C){G[W]=!0}),G}function PX(E,G,W){if(E.customInspect&&G&&SX(G.inspect)&&G.inspect!==aU&&!(G.constructor&&G.constructor.prototype===G)){var C=G.inspect(W,E);if(!vX(C))C=PX(E,C,W);return C}var H=Z$(E,G);if(H)return H;var z=Object.keys(G),V=I$(z);if(E.showHidden)z=Object.getOwnPropertyNames(G);if(RX(G)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return mX(G);if(z.length===0){if(SX(G)){var P=G.name?": "+G.name:"";return E.stylize("[Function"+P+"]","special")}if(MX(G))return E.stylize(RegExp.prototype.toString.call(G),"regexp");if(aX(G))return E.stylize(Date.prototype.toString.call(G),"date");if(RX(G))return mX(G)}var k="",R=!1,S=["{","}"];if(uI(G))R=!0,S=["[","]"];if(SX(G)){var D=G.name?": "+G.name:"";k=" [Function"+D+"]"}if(MX(G))k=" "+RegExp.prototype.toString.call(G);if(aX(G))k=" "+Date.prototype.toUTCString.call(G);if(RX(G))k=" "+mX(G);if(z.length===0&&(!R||G.length==0))return S[0]+k+S[1];if(W<0)if(MX(G))return E.stylize(RegExp.prototype.toString.call(G),"regexp");else return E.stylize("[Object]","special");E.seen.push(G);var A;if(R)A=Q$(E,G,W,V,z);else A=z.map(function(L){return rX(E,G,W,V,L,R)});return E.seen.pop(),$$(A,k,S)}function Z$(E,G){if($X(G))return E.stylize("undefined","undefined");if(vX(G)){var W="'"+JSON.stringify(G).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return E.stylize(W,"string")}if(lI(G))return E.stylize(""+G,"number");if(iX(G))return E.stylize(""+G,"boolean");if(qX(G))return E.stylize("null","null")}function mX(E){return"["+Error.prototype.toString.call(E)+"]"}function Q$(E,G,W,C,H){var z=[];for(var V=0,P=G.length;V<P;++V)if(bI(G,String(V)))z.push(rX(E,G,W,C,String(V),!0));else z.push("");return H.forEach(function(k){if(!k.match(/^\d+$/))z.push(rX(E,G,W,C,k,!0))}),z}function rX(E,G,W,C,H,z){var V,P,k;if(k=Object.getOwnPropertyDescriptor(G,H)||{value:G[H]},k.get)if(k.set)P=E.stylize("[Getter/Setter]","special");else P=E.stylize("[Getter]","special");else if(k.set)P=E.stylize("[Setter]","special");if(!bI(C,H))V="["+H+"]";if(!P)if(E.seen.indexOf(k.value)<0){if(qX(W))P=PX(E,k.value,null);else P=PX(E,k.value,W-1);if(P.indexOf(`
|
|
2
|
-
`)>-1)if(z)P=P.split(`
|
|
3
|
-
`).map(function(R){return" "+R}).join(`
|
|
4
|
-
`).slice(2);else P=`
|
|
5
|
-
`+P.split(`
|
|
6
|
-
`).map(function(R){return" "+R}).join(`
|
|
7
|
-
`)}else P=E.stylize("[Circular]","special");if($X(V)){if(z&&H.match(/^\d+$/))return P;if(V=JSON.stringify(""+H),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))V=V.slice(1,-1),V=E.stylize(V,"name");else V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=E.stylize(V,"string")}return V+": "+P}function $$(E,G,W){var C=0,H=E.reduce(function(z,V){if(C++,V.indexOf(`
|
|
8
|
-
`)>=0)C++;return z+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(H>60)return W[0]+(G===""?"":G+`
|
|
9
|
-
`)+" "+E.join(`,
|
|
10
|
-
`)+" "+W[1];return W[0]+G+" "+E.join(", ")+" "+W[1]}function uI(E){return Array.isArray(E)}function iX(E){return typeof E==="boolean"}function qX(E){return E===null}function V$(E){return E==null}function lI(E){return typeof E==="number"}function vX(E){return typeof E==="string"}function O$(E){return typeof E==="symbol"}function $X(E){return E===void 0}function MX(E){return YX(E)&&UI(E)==="[object RegExp]"}function YX(E){return typeof E==="object"&&E!==null}function aX(E){return YX(E)&&UI(E)==="[object Date]"}function RX(E){return YX(E)&&(UI(E)==="[object Error]"||E instanceof Error)}function SX(E){return typeof E==="function"}function G$(E){return E===null||typeof E==="boolean"||typeof E==="number"||typeof E==="string"||typeof E==="symbol"||typeof E==="undefined"}function K$(E){return E instanceof Buffer}function UI(E){return Object.prototype.toString.call(E)}function tX(E){return E<10?"0"+E.toString(10):E.toString(10)}function J$(){var E=new Date,G=[tX(E.getHours()),tX(E.getMinutes()),tX(E.getSeconds())].join(":");return[E.getDate(),W$[E.getMonth()],G].join(" ")}function F$(...E){console.log("%s - %s",J$(),eX.apply(null,E))}function H$(E,G){if(G)E.super_=G,E.prototype=Object.create(G.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}})}function dI(E,G){if(!G||!YX(G))return E;var W=Object.keys(G),C=W.length;while(C--)E[W[C]]=G[W[C]];return E}function bI(E,G){return Object.prototype.hasOwnProperty.call(E,G)}function oI(E,G){if(!E){var W=new Error("Promise was rejected with a falsy value");W.reason=E,E=W}return G(E)}function E$(E){if(typeof E!=="function")throw new TypeError('The "original" argument must be of type Function');function G(...W){var C=W.pop();if(typeof C!=="function")throw new TypeError("The last argument must be of type Function");var H=this,z=function(...V){return C.apply(H,...V)};E.apply(this,W).then(function(V){process.nextTick(z.bind(null,null,V))},function(V){process.nextTick(oI.bind(null,V,z))})}return Object.setPrototypeOf(G,Object.getPrototypeOf(E)),Object.defineProperties(G,Object.getOwnPropertyDescriptors(E)),G}var aQ,iQ,aU,Y$=()=>{},W$,A$,C$,T$;var sI=ZX(()=>{aQ=/%[sdj%]/g;iQ=((E={},G={},W)=>((W=typeof process!=="undefined"&&process.env.NODE_DEBUG)&&(W=W.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()),G=new RegExp("^"+W+"$","i"),(C)=>{if(C=C.toUpperCase(),!E[C])if(G.test(C))E[C]=function(...H){console.error("%s: %s",C,pid,eX.apply(null,...H))};else E[C]=function(){};return E[C]}))(),aU=((E)=>(E.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},E.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},E.custom=Symbol.for("nodejs.util.inspect.custom"),E))(function E(G,W,...C){var H={seen:[],stylize:X$};if(C.length>=1)H.depth=C[0];if(C.length>=2)H.colors=C[1];if(iX(W))H.showHidden=W;else if(W)dI(H,W);if($X(H.showHidden))H.showHidden=!1;if($X(H.depth))H.depth=2;if($X(H.colors))H.colors=!1;if(H.colors)H.stylize=U$;return PX(H,G,H.depth)});W$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];A$=((E)=>(E.custom=Symbol.for("nodejs.util.promisify.custom"),E))(function E(G){if(typeof G!=="function")throw new TypeError('The "original" argument must be of type Function');if(kCustomPromisifiedSymbol&&G[kCustomPromisifiedSymbol]){var W=G[kCustomPromisifiedSymbol];if(typeof W!=="function")throw new TypeError('The "nodejs.util.promisify.custom" argument must be of type Function');return Object.defineProperty(W,kCustomPromisifiedSymbol,{value:W,enumerable:!1,writable:!1,configurable:!0}),W}function W(...C){var H,z,V=new Promise(function(P,k){H=P,z=k});C.push(function(P,k){if(P)z(P);else H(k)});try{G.apply(this,C)}catch(P){z(P)}return V}if(Object.setPrototypeOf(W,Object.getPrototypeOf(G)),kCustomPromisifiedSymbol)Object.defineProperty(W,kCustomPromisifiedSymbol,{value:W,enumerable:!1,writable:!1,configurable:!0});return Object.defineProperties(W,Object.getOwnPropertyDescriptors(G))});({TextEncoder:C$,TextDecoder:T$}=globalThis)});var JX={};IX(JX,{setMaxListeners:()=>QZ,once:()=>IZ,listenerCount:()=>$Z,init:()=>oU,getMaxListeners:()=>VZ,getEventListeners:()=>ZZ,default:()=>v$,captureRejectionSymbol:()=>eI,addAbortListener:()=>OZ,EventEmitter:()=>oU});function iI(E,G){var{_events:W}=E;if(G[0]??=new Error("Unhandled error."),!W)throw G[0];var C=W[aI];if(C)for(var H of tI.$call(C))H.$apply(E,G);var z=W.error;if(!z)throw G[0];for(var H of tI.$call(z))H.$apply(E,G);return!0}function z$(E,G,W,C){G.then(void 0,function(H){process.nextTick(M$,E,H,W,C)})}function M$(E,G,W,C){if(typeof E[mI]==="function")E[mI](G,W,...C);else try{E[eU]=!1,E.emit("error",G)}finally{E[eU]=!0}}function UZ(E,G,W){W.warned=!0;let C=new Error(`Possible EventEmitter memory leak detected. ${W.length} ${String(G)} listeners added to [${E.constructor.name}]. Use emitter.setMaxListeners() to increase limit`);C.name="MaxListenersExceededWarning",C.emitter=E,C.type=G,C.count=W.length,process.emitWarning(C)}function XZ(E,G,...W){this.removeListener(E,G),G.$apply(this,W)}function IZ(E,G,W){var C=W?.signal;if(YZ(C,"options.signal"),C?.aborted)throw new XI(void 0,{cause:C?.reason});let{resolve:H,reject:z,promise:V}=$newPromiseCapability(Promise),P=(S)=>{if(E.removeListener(G,k),C!=null)kX(C,"abort",R);z(S)},k=(...S)=>{if(typeof E.removeListener==="function")E.removeListener("error",P);if(C!=null)kX(C,"abort",R);H(S)};if(rI(E,G,k,{once:!0}),G!=="error"&&typeof E.once==="function")E.once("error",P);function R(){kX(E,G,k),kX(E,"error",P),z(new XI(void 0,{cause:C?.reason}))}if(C!=null)rI(C,"abort",R,{once:!0});return V}function ZZ(E,G){return E.listeners(G)}function QZ(E,...G){ZI(E,"setMaxListeners",0);var W;if(G&&(W=G.length))for(let C=0;C<W;C++)G[C].setMaxListeners(E);else iU=E}function $Z(E,G){return E.listenerCount(G)}function kX(E,G,W,C){if(typeof E.removeListener==="function")E.removeListener(G,W);else E.removeEventListener(G,W,C)}function rI(E,G,W,C){if(typeof E.on==="function")if(C.once)E.once(G,W);else E.on(G,W);else E.addEventListener(G,W,C)}function VX(E,G,W){let C=new TypeError(`The "${E}" argument must be of type ${G}. Received ${W}`);return C.code="ERR_INVALID_ARG_TYPE",C}function P$(E,G,W){let C=new RangeError(`The "${E}" argument is out of range. It must be ${G}. Received ${W}`);return C.code="ERR_OUT_OF_RANGE",C}function YZ(E,G){if(E!==void 0&&(E===null||typeof E!=="object"||!("aborted"in E)))throw VX(G,"AbortSignal",E)}function ZI(E,G,W,C){if(typeof E!=="number")throw VX(G,"number",E);if(W!=null&&E<W||C!=null&&E>C||(W!=null||C!=null)&&Number.isNaN(E))throw P$(G,`${W!=null?`>= ${W}`:""}${W!=null&&C!=null?" && ":""}${C!=null?`<= ${C}`:""}`,E)}function WX(E){if(typeof E!=="function")throw new TypeError("The listener must be a function")}function q$(E,G){if(typeof E!=="boolean")throw VX(G,"boolean",E)}function VZ(E){return E?._maxListeners??iU}function OZ(E,G){if(E===void 0)throw VX("signal","AbortSignal",E);if(YZ(E,"signal"),typeof G!=="function")throw VX("listener","function",G);let W;if(E.aborted)queueMicrotask(()=>G());else E.addEventListener("abort",G,{__proto__:null,once:!0}),W=()=>{E.removeEventListener("abort",G)};return{__proto__:null,[Symbol.dispose](){W?.()}}}var II,eU,aI,D$,L$,mI,eI,tI,iU=10,oU=function E(G){if(this._events===void 0||this._events===this.__proto__._events)this._events={__proto__:null},this._eventsCount=0;if(this._maxListeners??=void 0,this[eU]=G?.captureRejections?Boolean(G?.captureRejections):n0[eU])this.emit=S$},n0,R$=function E(G,...W){if(G==="error")return iI(this,W);var{_events:C}=this;if(C===void 0)return!1;var H=C[G];if(H===void 0)return!1;let z=H.length>1?H.slice():H;for(let V=0,{length:P}=z;V<P;V++){let k=z[V];switch(W.length){case 0:k.$call(this);break;case 1:k.$call(this,W[0]);break;case 2:k.$call(this,W[0],W[1]);break;case 3:k.$call(this,W[0],W[1],W[2]);break;default:k.$apply(this,W);break}}return!0},S$=function E(G,...W){if(G==="error")return iI(this,W);var{_events:C}=this;if(C===void 0)return!1;var H=C[G];if(H===void 0)return!1;let z=H.length>1?H.slice():H;for(let V=0,{length:P}=z;V<P;V++){let k=z[V],R;switch(W.length){case 0:R=k.$call(this);break;case 1:R=k.$call(this,W[0]);break;case 2:R=k.$call(this,W[0],W[1]);break;case 3:R=k.$call(this,W[0],W[1],W[2]);break;default:R=k.$apply(this,W);break}if(R!==void 0&&$isPromise(R))z$(this,R,G,W)}return!0},XI,v$;var FX=ZX(()=>{II=Symbol.for,eU=Symbol("kCapture"),aI=II("events.errorMonitor"),D$=Symbol("events.maxEventTargetListeners"),L$=Symbol("events.maxEventTargetListenersWarned"),mI=II("nodejs.rejection"),eI=II("nodejs.rejection"),tI=Array.prototype.slice,n0=oU.prototype={};n0._events=void 0;n0._eventsCount=0;n0._maxListeners=void 0;n0.setMaxListeners=function E(G){return ZI(G,"setMaxListeners",0),this._maxListeners=G,this};n0.constructor=oU;n0.getMaxListeners=function E(){return this?._maxListeners??iU};n0.emit=R$;n0.addListener=function E(G,W){WX(W);var C=this._events;if(!C)C=this._events={__proto__:null},this._eventsCount=0;else if(C.newListener)this.emit("newListener",G,W.listener??W);var H=C[G];if(!H)C[G]=[W],this._eventsCount++;else{H.push(W);var z=this._maxListeners??iU;if(z>0&&H.length>z&&!H.warned)UZ(this,G,H)}return this};n0.on=n0.addListener;n0.prependListener=function E(G,W){WX(W);var C=this._events;if(!C)C=this._events={__proto__:null},this._eventsCount=0;else if(C.newListener)this.emit("newListener",G,W.listener??W);var H=C[G];if(!H)C[G]=[W],this._eventsCount++;else{H.unshift(W);var z=this._maxListeners??iU;if(z>0&&H.length>z&&!H.warned)UZ(this,G,H)}return this};n0.once=function E(G,W){WX(W);let C=XZ.bind(this,G,W);return C.listener=W,this.addListener(G,C),this};n0.prependOnceListener=function E(G,W){WX(W);let C=XZ.bind(this,G,W);return C.listener=W,this.prependListener(G,C),this};n0.removeListener=function E(G,W){WX(W);var{_events:C}=this;if(!C)return this;var H=C[G];if(!H)return this;var z=H.length;let V=-1;for(let P=z-1;P>=0;P--)if(H[P]===W||H[P].listener===W){V=P;break}if(V<0)return this;if(V===0)H.shift();else H.splice(V,1);if(H.length===0)delete C[G],this._eventsCount--;return this};n0.off=n0.removeListener;n0.removeAllListeners=function E(G){var{_events:W}=this;if(G&&W){if(W[G])delete W[G],this._eventsCount--}else this._events={__proto__:null};return this};n0.listeners=function E(G){var{_events:W}=this;if(!W)return[];var C=W[G];if(!C)return[];return C.map((H)=>H.listener??H)};n0.rawListeners=function E(G){var{_events:W}=this;if(!W)return[];var C=W[G];if(!C)return[];return C.slice()};n0.listenerCount=function E(G){var{_events:W}=this;if(!W)return 0;return W[G]?.length??0};n0.eventNames=function E(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};n0[eU]=!1;XI=class XI extends Error{constructor(E="The operation was aborted",G=void 0){if(G!==void 0&&typeof G!=="object")throw VX("options","Object",G);super(E,G);this.code="ABORT_ERR",this.name="AbortError"}};Object.defineProperties(oU,{captureRejections:{get(){return n0[eU]},set(E){q$(E,"EventEmitter.captureRejections"),n0[eU]=E},enumerable:!0},defaultMaxListeners:{enumerable:!0,get:()=>{return iU},set:(E)=>{ZI(E,"defaultMaxListeners",0),iU=E}},kMaxEventTargetListeners:{value:D$,enumerable:!1,configurable:!1,writable:!1},kMaxEventTargetListenersWarned:{value:L$,enumerable:!1,configurable:!1,writable:!1}});Object.assign(oU,{once:IZ,getEventListeners:ZZ,getMaxListeners:VZ,setMaxListeners:QZ,EventEmitter:oU,usingDomains:!1,captureRejectionSymbol:eI,errorMonitor:aI,addAbortListener:OZ,init:oU,listenerCount:$Z});v$=oU});var VI={};IX(VI,{wrap:()=>o$,toWeb:()=>b$,pipeline:()=>$Y,isReadable:()=>r$,isErrored:()=>t$,isDisturbed:()=>m$,fromWeb:()=>d$,from:()=>l$,finished:()=>ZY,destroy:()=>QY,default:()=>OY,compose:()=>YY,addAbortSignal:()=>IY,_uint8ArrayToBuffer:()=>n$,_isUint8Array:()=>s$,_fromList:()=>u$,Writable:()=>e$,Transform:()=>UY,Stream:()=>VY,ReadableState:()=>h$,Readable:()=>a$,PassThrough:()=>XY,Duplex:()=>i$});var k$,j$,GZ,B$,x$,g$=(E,G,W)=>{W=E!=null?k$(j$(E)):{};let C=G||!E||!E.__esModule?GZ(W,"default",{value:E,enumerable:!0}):W;for(let H of B$(E))if(!x$.call(C,H))GZ(C,H,{get:()=>E[H],enumerable:!0});return C},d0=(E,G)=>()=>(G||E((G={exports:{}}).exports,G),G.exports),s0,KZ,MU,N$,HX,SU,AX,UX,uU,nU,OX,QI,jX,_$,BX,w$,y$,WZ,xX,$I,f$,hU,JZ,FZ,YI,HZ,c$,AZ,EZ,p$,m0,h$,u$,l$,d$,b$,o$,n$,s$,m$,t$,r$,a$,e$,i$,UY,XY,IY,ZY,QY,$Y,YY,VY,OY;var OI=ZX(()=>{k$=Object.create,{getPrototypeOf:j$,defineProperty:GZ,getOwnPropertyNames:B$}=Object,x$=Object.prototype.hasOwnProperty,s0=d0((E,G)=>{class W extends Error{constructor(C){if(!Array.isArray(C))throw new TypeError(`Expected input to be an Array, got ${typeof C}`);let H="";for(let z=0;z<C.length;z++)H+=` ${C[z].stack}
|
|
11
|
-
`;super(H);this.name="AggregateError",this.errors=C}}G.exports={AggregateError:W,ArrayIsArray(C){return Array.isArray(C)},ArrayPrototypeIncludes(C,H){return C.includes(H)},ArrayPrototypeIndexOf(C,H){return C.indexOf(H)},ArrayPrototypeJoin(C,H){return C.join(H)},ArrayPrototypeMap(C,H){return C.map(H)},ArrayPrototypePop(C,H){return C.pop(H)},ArrayPrototypePush(C,H){return C.push(H)},ArrayPrototypeSlice(C,H,z){return C.slice(H,z)},Error,FunctionPrototypeCall(C,H,...z){return C.call(H,...z)},FunctionPrototypeSymbolHasInstance(C,H){return Function.prototype[Symbol.hasInstance].call(C,H)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(C,H){return Object.defineProperties(C,H)},ObjectDefineProperty(C,H,z){return Object.defineProperty(C,H,z)},ObjectGetOwnPropertyDescriptor(C,H){return Object.getOwnPropertyDescriptor(C,H)},ObjectKeys(C){return Object.keys(C)},ObjectSetPrototypeOf(C,H){return Object.setPrototypeOf(C,H)},Promise,PromisePrototypeCatch(C,H){return C.catch(H)},PromisePrototypeThen(C,H,z){return C.then(H,z)},PromiseReject(C){return Promise.reject(C)},PromiseResolve(C){return Promise.resolve(C)},ReflectApply:Reflect.apply,RegExpPrototypeTest(C,H){return C.test(H)},SafeSet:Set,String,StringPrototypeSlice(C,H,z){return C.slice(H,z)},StringPrototypeToLowerCase(C){return C.toLowerCase()},StringPrototypeToUpperCase(C){return C.toUpperCase()},StringPrototypeTrim(C){return C.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(C,H,z){return C.set(H,z)},Boolean,Uint8Array}}),KZ=d0((E,G)=>{G.exports={format(W,...C){return W.replace(/%([sdifj])/g,function(...[H,z]){let V=C.shift();if(z==="f")return V.toFixed(6);else if(z==="j")return JSON.stringify(V);else if(z==="s"&&typeof V==="object")return`${V.constructor!==Object?V.constructor.name:""} {}`.trim();else return V.toString()})},inspect(W){switch(typeof W){case"string":if(W.includes("'")){if(!W.includes('"'))return`"${W}"`;else if(!W.includes("`")&&!W.includes("${"))return`\`${W}\``}return`'${W}'`;case"number":if(isNaN(W))return"NaN";else if(Object.is(W,-0))return String(W);return W;case"bigint":return`${String(W)}n`;case"boolean":case"undefined":return String(W);case"object":return"{}"}}}}),MU=d0((E,G)=>{var{format:W,inspect:C}=KZ(),{AggregateError:H}=s0(),z=globalThis.AggregateError||H,V=Symbol("kIsNodeError"),P=["string","function","number","object","Function","Object","boolean","bigint","symbol"],k=/^([A-Z][a-z0-9]*)+$/,R={};function S(x,g){if(!x)throw new R.ERR_INTERNAL_ASSERTION(g)}function D(x){let g="",N=x.length,y=x[0]==="-"?1:0;for(;N>=y+4;N-=3)g=`_${x.slice(N-3,N)}${g}`;return`${x.slice(0,N)}${g}`}function A(x,g,N){if(typeof g==="function")return S(g.length<=N.length,`Code: ${x}; The provided arguments length (${N.length}) does not match the required ones (${g.length}).`),g(...N);let y=(g.match(/%[dfijoOs]/g)||[]).length;if(S(y===N.length,`Code: ${x}; The provided arguments length (${N.length}) does not match the required ones (${y}).`),N.length===0)return g;return W(g,...N)}function L(x,g,N){if(!N)N=Error;class y extends N{constructor(...f){super(A(x,g,f))}toString(){return`${this.name} [${x}]: ${this.message}`}}Object.defineProperties(y.prototype,{name:{value:N.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${x}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),y.prototype.code=x,y.prototype[V]=!0,R[x]=y}function M(x){let g="__node_internal_"+x.name;return Object.defineProperty(x,"name",{value:g}),x}function q(x,g){if(x&&g&&x!==g){if(Array.isArray(g.errors))return g.errors.push(x),g;let N=new z([g,x],g.message);return N.code=g.code,N}return x||g}class j extends Error{constructor(x="The operation was aborted",g=void 0){if(g!==void 0&&typeof g!=="object")throw new R.ERR_INVALID_ARG_TYPE("options","Object",g);super(x,g);this.code="ABORT_ERR",this.name="AbortError"}}L("ERR_ASSERTION","%s",Error),L("ERR_INVALID_ARG_TYPE",(x,g,N)=>{if(S(typeof x==="string","'name' must be a string"),!Array.isArray(g))g=[g];let y="The ";if(x.endsWith(" argument"))y+=`${x} `;else y+=`"${x}" ${x.includes(".")?"property":"argument"} `;y+="must be ";let f=[],o=[],r=[];for(let Y0 of g)if(S(typeof Y0==="string","All expected entries have to be of type string"),P.includes(Y0))f.push(Y0.toLowerCase());else if(k.test(Y0))o.push(Y0);else S(Y0!=="object",'The value "object" should be written as "Object"'),r.push(Y0);if(o.length>0){let Y0=f.indexOf("object");if(Y0!==-1)f.splice(f,Y0,1),o.push("Object")}if(f.length>0){switch(f.length){case 1:y+=`of type ${f[0]}`;break;case 2:y+=`one of type ${f[0]} or ${f[1]}`;break;default:{let Y0=f.pop();y+=`one of type ${f.join(", ")}, or ${Y0}`}}if(o.length>0||r.length>0)y+=" or "}if(o.length>0){switch(o.length){case 1:y+=`an instance of ${o[0]}`;break;case 2:y+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let Y0=o.pop();y+=`an instance of ${o.join(", ")}, or ${Y0}`}}if(r.length>0)y+=" or "}switch(r.length){case 0:break;case 1:if(r[0].toLowerCase()!==r[0])y+="an ";y+=`${r[0]}`;break;case 2:y+=`one of ${r[0]} or ${r[1]}`;break;default:{let Y0=r.pop();y+=`one of ${r.join(", ")}, or ${Y0}`}}if(N==null)y+=`. Received ${N}`;else if(typeof N==="function"&&N.name)y+=`. Received function ${N.name}`;else if(typeof N==="object"){var V0;if((V0=N.constructor)!==null&&V0!==void 0&&V0.name)y+=`. Received an instance of ${N.constructor.name}`;else{let Y0=C(N,{depth:-1});y+=`. Received ${Y0}`}}else{let Y0=C(N,{colors:!1});if(Y0.length>25)Y0=`${Y0.slice(0,25)}...`;y+=`. Received type ${typeof N} (${Y0})`}return y},TypeError),L("ERR_INVALID_ARG_VALUE",(x,g,N="is invalid")=>{let y=C(g);if(y.length>128)y=y.slice(0,128)+"...";return`The ${x.includes(".")?"property":"argument"} '${x}' ${N}. Received ${y}`},TypeError),L("ERR_INVALID_RETURN_VALUE",(x,g,N)=>{var y;let f=N!==null&&N!==void 0&&(y=N.constructor)!==null&&y!==void 0&&y.name?`instance of ${N.constructor.name}`:`type ${typeof N}`;return`Expected ${x} to be returned from the "${g}" function but got ${f}.`},TypeError),L("ERR_MISSING_ARGS",(...x)=>{S(x.length>0,"At least one arg needs to be specified");let g,N=x.length;switch(x=(Array.isArray(x)?x:[x]).map((y)=>`"${y}"`).join(" or "),N){case 1:g+=`The ${x[0]} argument`;break;case 2:g+=`The ${x[0]} and ${x[1]} arguments`;break;default:{let y=x.pop();g+=`The ${x.join(", ")}, and ${y} arguments`}break}return`${g} must be specified`},TypeError),L("ERR_OUT_OF_RANGE",(x,g,N)=>{S(g,'Missing "range" argument');let y;if(Number.isInteger(N)&&Math.abs(N)>4294967296)y=D(String(N));else if(typeof N==="bigint"){y=String(N);let f=BigInt(2)**BigInt(32);if(N>f||N<-f)y=D(y);y+="n"}else y=C(N);return`The value of "${x}" is out of range. It must be ${g}. Received ${y}`},RangeError),L("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),L("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),L("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),L("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),L("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),L("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),L("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),L("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),L("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),L("ERR_STREAM_WRITE_AFTER_END","write after end",Error),L("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),G.exports={AbortError:j,aggregateTwoErrors:M(q),hideStackFrames:M,codes:R}}),N$=d0((E,G)=>{Object.defineProperty(E,"__esModule",{value:!0});var W=new WeakMap,C=new WeakMap;function H(u){let a=W.get(u);return console.assert(a!=null,"'this' is expected an Event object, but got",u),a}function z(u){if(u.passiveListener!=null){if(typeof console!=="undefined"&&typeof console.error==="function")console.error("Unable to preventDefault inside passive event listener invocation.",u.passiveListener);return}if(!u.event.cancelable)return;if(u.canceled=!0,typeof u.event.preventDefault==="function")u.event.preventDefault()}function V(u,a){W.set(this,{eventTarget:u,event:a,eventPhase:2,currentTarget:u,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:a.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let F=Object.keys(a);for(let U=0;U<F.length;++U){let Z=F[U];if(!(Z in this))Object.defineProperty(this,Z,P(Z))}}if(V.prototype={get type(){return H(this).event.type},get target(){return H(this).eventTarget},get currentTarget(){return H(this).currentTarget},composedPath(){let u=H(this).currentTarget;if(u==null)return[];return[u]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return H(this).eventPhase},stopPropagation(){let u=H(this);if(u.stopped=!0,typeof u.event.stopPropagation==="function")u.event.stopPropagation()},stopImmediatePropagation(){let u=H(this);if(u.stopped=!0,u.immediateStopped=!0,typeof u.event.stopImmediatePropagation==="function")u.event.stopImmediatePropagation()},get bubbles(){return Boolean(H(this).event.bubbles)},get cancelable(){return Boolean(H(this).event.cancelable)},preventDefault(){z(H(this))},get defaultPrevented(){return H(this).canceled},get composed(){return Boolean(H(this).event.composed)},get timeStamp(){return H(this).timeStamp},get srcElement(){return H(this).eventTarget},get cancelBubble(){return H(this).stopped},set cancelBubble(u){if(!u)return;let a=H(this);if(a.stopped=!0,typeof a.event.cancelBubble==="boolean")a.event.cancelBubble=!0},get returnValue(){return!H(this).canceled},set returnValue(u){if(!u)z(H(this))},initEvent(){}},Object.defineProperty(V.prototype,"constructor",{value:V,configurable:!0,writable:!0}),typeof window!=="undefined"&&typeof window.Event!=="undefined")Object.setPrototypeOf(V.prototype,window.Event.prototype),C.set(window.Event.prototype,V);function P(u){return{get(){return H(this).event[u]},set(a){H(this).event[u]=a},configurable:!0,enumerable:!0}}function k(u){return{value(){let a=H(this).event;return a[u].apply(a,arguments)},configurable:!0,enumerable:!0}}function R(u,a){let F=Object.keys(a);if(F.length===0)return u;function U(Z,Q){u.call(this,Z,Q)}U.prototype=Object.create(u.prototype,{constructor:{value:U,configurable:!0,writable:!0}});for(let Z=0;Z<F.length;++Z){let Q=F[Z];if(!(Q in u.prototype)){let I=typeof Object.getOwnPropertyDescriptor(a,Q).value==="function";Object.defineProperty(U.prototype,Q,I?k(Q):P(Q))}}return U}function S(u){if(u==null||u===Object.prototype)return V;let a=C.get(u);if(a==null)a=R(S(Object.getPrototypeOf(u)),u),C.set(u,a);return a}function D(u,a){return new(S(Object.getPrototypeOf(a)))(u,a)}function A(u){return H(u).immediateStopped}function L(u,a){H(u).eventPhase=a}function M(u,a){H(u).currentTarget=a}function q(u,a){H(u).passiveListener=a}var j=new WeakMap,x=1,g=2,N=3;function y(u){return u!==null&&typeof u==="object"}function f(u){let a=j.get(u);if(a==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return a}function o(u){return{get(){let a=f(this).get(u);while(a!=null){if(a.listenerType===N)return a.listener;a=a.next}return null},set(a){if(typeof a!=="function"&&!y(a))a=null;let F=f(this),U=null,Z=F.get(u);while(Z!=null){if(Z.listenerType===N)if(U!==null)U.next=Z.next;else if(Z.next!==null)F.set(u,Z.next);else F.delete(u);else U=Z;Z=Z.next}if(a!==null){let Q={listener:a,listenerType:N,passive:!1,once:!1,next:null};if(U===null)F.set(u,Q);else U.next=Q}},configurable:!0,enumerable:!0}}function r(u,a){Object.defineProperty(u,`on${a}`,o(a))}function V0(u){function a(){Y0.call(this)}a.prototype=Object.create(Y0.prototype,{constructor:{value:a,configurable:!0,writable:!0}});for(let F=0;F<u.length;++F)r(a.prototype,u[F]);return a}function Y0(){if(this instanceof Y0){j.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return V0(arguments[0]);if(arguments.length>0){let u=new Array(arguments.length);for(let a=0;a<arguments.length;++a)u[a]=arguments[a];return V0(u)}throw new TypeError("Cannot call a class as a function")}if(Y0.prototype={addEventListener(u,a,F){if(a==null)return;if(typeof a!=="function"&&!y(a))throw new TypeError("'listener' should be a function or an object.");let U=f(this),Z=y(F),Q=(Z?Boolean(F.capture):Boolean(F))?x:g,I={listener:a,listenerType:Q,passive:Z&&Boolean(F.passive),once:Z&&Boolean(F.once),next:null},$=U.get(u);if($===void 0){U.set(u,I);return}let K=null;while($!=null){if($.listener===a&&$.listenerType===Q)return;K=$,$=$.next}K.next=I},removeEventListener(u,a,F){if(a==null)return;let U=f(this),Z=(y(F)?Boolean(F.capture):Boolean(F))?x:g,Q=null,I=U.get(u);while(I!=null){if(I.listener===a&&I.listenerType===Z){if(Q!==null)Q.next=I.next;else if(I.next!==null)U.set(u,I.next);else U.delete(u);return}Q=I,I=I.next}},dispatchEvent(u){if(u==null||typeof u.type!=="string")throw new TypeError('"event.type" should be a string.');let a=f(this),F=u.type,U=a.get(F);if(U==null)return!0;let Z=D(this,u),Q=null;while(U!=null){if(U.once)if(Q!==null)Q.next=U.next;else if(U.next!==null)a.set(F,U.next);else a.delete(F);else Q=U;if(q(Z,U.passive?U.listener:null),typeof U.listener==="function")try{U.listener.call(this,Z)}catch(I){if(typeof console!=="undefined"&&typeof console.error==="function")console.error(I)}else if(U.listenerType!==N&&typeof U.listener.handleEvent==="function")U.listener.handleEvent(Z);if(A(Z))break;U=U.next}return q(Z,null),L(Z,0),M(Z,null),!Z.defaultPrevented}},Object.defineProperty(Y0.prototype,"constructor",{value:Y0,configurable:!0,writable:!0}),typeof window!=="undefined"&&typeof window.EventTarget!=="undefined")Object.setPrototypeOf(Y0.prototype,window.EventTarget.prototype);E.defineEventAttribute=r,E.EventTarget=Y0,E.default=Y0,G.exports=Y0,G.exports.EventTarget=G.exports.default=Y0,G.exports.defineEventAttribute=r}),HX=d0((E,G)=>{Object.defineProperty(E,"__esModule",{value:!0});var W=N$();class C extends W.EventTarget{constructor(){super();throw new TypeError("AbortSignal cannot be constructed directly")}get aborted(){let S=V.get(this);if(typeof S!=="boolean")throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return S}}W.defineEventAttribute(C.prototype,"abort");function H(){let S=Object.create(C.prototype);return W.EventTarget.call(S),V.set(S,!1),S}function z(S){if(V.get(S)!==!1)return;V.set(S,!0),S.dispatchEvent({type:"abort"})}var V=new WeakMap;if(Object.defineProperties(C.prototype,{aborted:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(C.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class P{constructor(){k.set(this,H())}get signal(){return R(this)}abort(){z(R(this))}}var k=new WeakMap;function R(S){let D=k.get(S);if(D==null)throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${S===null?"null":typeof S}`);return D}if(Object.defineProperties(P.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol")Object.defineProperty(P.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});E.AbortController=P,E.AbortSignal=C,E.default=P,G.exports=P,G.exports.AbortController=G.exports.default=P,G.exports.AbortSignal=C}),SU=d0((E,G)=>{var W=(HU(),y0(FU)),{format:C,inspect:H}=KZ(),{codes:{ERR_INVALID_ARG_TYPE:z}}=MU(),{kResistStopPropagation:V,AggregateError:P,SymbolDispose:k}=s0(),R=globalThis.AbortSignal||HX().AbortSignal,S=globalThis.AbortController||HX().AbortController,D=Object.getPrototypeOf(async function(){}).constructor,A=globalThis.Blob||W.Blob,L=typeof A!=="undefined"?function j(x){return x instanceof A}:function j(x){return!1},M=(j,x)=>{if(j!==void 0&&(j===null||typeof j!=="object"||!("aborted"in j)))throw new z(x,"AbortSignal",j)},q=(j,x)=>{if(typeof j!=="function")throw new z(x,"Function",j)};G.exports={AggregateError:P,kEmptyObject:Object.freeze({}),once(j){let x=!1;return function(...g){if(x)return;x=!0,j.apply(this,g)}},createDeferredPromise:function(){let j,x;return{promise:new Promise((g,N)=>{j=g,x=N}),resolve:j,reject:x}},promisify(j){return new Promise((x,g)=>{j((N,...y)=>{if(N)return g(N);return x(...y)})})},debuglog(){return function(){}},format:C,inspect:H,types:{isAsyncFunction(j){return j instanceof D},isArrayBufferView(j){return ArrayBuffer.isView(j)}},isBlob:L,deprecate(j,x){return j},addAbortListener:(FX(),y0(JX)).addAbortListener||function j(x,g){if(x===void 0)throw new z("signal","AbortSignal",x);M(x,"signal"),q(g,"listener");let N;if(x.aborted)queueMicrotask(()=>g());else x.addEventListener("abort",g,{__proto__:null,once:!0,[V]:!0}),N=()=>{x.removeEventListener("abort",g)};return{__proto__:null,[k](){var y;(y=N)===null||y===void 0||y()}}},AbortSignalAny:R.any||function j(x){if(x.length===1)return x[0];let g=new S,N=()=>g.abort();return x.forEach((y)=>{M(y,"signals"),y.addEventListener("abort",N,{once:!0})}),g.signal.addEventListener("abort",()=>{x.forEach((y)=>y.removeEventListener("abort",N))},{once:!0}),g.signal}},G.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),AX=d0((E,G)=>{var{ArrayIsArray:W,ArrayPrototypeIncludes:C,ArrayPrototypeJoin:H,ArrayPrototypeMap:z,NumberIsInteger:V,NumberIsNaN:P,NumberMAX_SAFE_INTEGER:k,NumberMIN_SAFE_INTEGER:R,NumberParseInt:S,ObjectPrototypeHasOwnProperty:D,RegExpPrototypeExec:A,String:L,StringPrototypeToUpperCase:M,StringPrototypeTrim:q}=s0(),{hideStackFrames:j,codes:{ERR_SOCKET_BAD_PORT:x,ERR_INVALID_ARG_TYPE:g,ERR_INVALID_ARG_VALUE:N,ERR_OUT_OF_RANGE:y,ERR_UNKNOWN_SIGNAL:f}}=MU(),{normalizeEncoding:o}=SU(),{isAsyncFunction:r,isArrayBufferView:V0}=SU().types,Y0={};function u(t){return t===(t|0)}function a(t){return t===t>>>0}var F=/^[0-7]+$/,U="must be a 32-bit unsigned integer or an octal string";function Z(t,n,X0){if(typeof t==="undefined")t=X0;if(typeof t==="string"){if(A(F,t)===null)throw new N(n,t,U);t=S(t,8)}return $(t,n),t}var Q=j((t,n,X0=R,H0=k)=>{if(typeof t!=="number")throw new g(n,"number",t);if(!V(t))throw new y(n,"an integer",t);if(t<X0||t>H0)throw new y(n,`>= ${X0} && <= ${H0}`,t)}),I=j((t,n,X0=-2147483648,H0=2147483647)=>{if(typeof t!=="number")throw new g(n,"number",t);if(!V(t))throw new y(n,"an integer",t);if(t<X0||t>H0)throw new y(n,`>= ${X0} && <= ${H0}`,t)}),$=j((t,n,X0=!1)=>{if(typeof t!=="number")throw new g(n,"number",t);if(!V(t))throw new y(n,"an integer",t);let H0=X0?1:0,Z0=4294967295;if(t<H0||t>Z0)throw new y(n,`>= ${H0} && <= ${Z0}`,t)});function K(t,n){if(typeof t!=="string")throw new g(n,"string",t)}function J(t,n,X0=void 0,H0){if(typeof t!=="number")throw new g(n,"number",t);if(X0!=null&&t<X0||H0!=null&&t>H0||(X0!=null||H0!=null)&&P(t))throw new y(n,`${X0!=null?`>= ${X0}`:""}${X0!=null&&H0!=null?" && ":""}${H0!=null?`<= ${H0}`:""}`,t)}var Y=j((t,n,X0)=>{if(!C(X0,t)){let H0="must be one of: "+H(z(X0,(Z0)=>typeof Z0==="string"?`'${Z0}'`:L(Z0)),", ");throw new N(n,t,H0)}});function X(t,n){if(typeof t!=="boolean")throw new g(n,"boolean",t)}function O(t,n,X0){return t==null||!D(t,n)?X0:t[n]}var v=j((t,n,X0=null)=>{let H0=O(X0,"allowArray",!1),Z0=O(X0,"allowFunction",!1);if(!O(X0,"nullable",!1)&&t===null||!H0&&W(t)||typeof t!=="object"&&(!Z0||typeof t!=="function"))throw new g(n,"Object",t)}),T=j((t,n)=>{if(t!=null&&typeof t!=="object"&&typeof t!=="function")throw new g(n,"a dictionary",t)}),B=j((t,n,X0=0)=>{if(!W(t))throw new g(n,"Array",t);if(t.length<X0){let H0=`must be longer than ${X0}`;throw new N(n,t,H0)}});function c(t,n){B(t,n);for(let X0=0;X0<t.length;X0++)K(t[X0],`${n}[${X0}]`)}function l(t,n){B(t,n);for(let X0=0;X0<t.length;X0++)X(t[X0],`${n}[${X0}]`)}function s(t,n){B(t,n);for(let X0=0;X0<t.length;X0++){let H0=t[X0],Z0=`${n}[${X0}]`;if(H0==null)throw new g(Z0,"AbortSignal",H0);Q0(H0,Z0)}}function O0(t,n="signal"){if(K(t,n),Y0[t]===void 0){if(Y0[M(t)]!==void 0)throw new f(t+" (signals must use all capital letters)");throw new f(t)}}var h=j((t,n="buffer")=>{if(!V0(t))throw new g(n,["Buffer","TypedArray","DataView"],t)});function d(t,n){let X0=o(n),H0=t.length;if(X0==="hex"&&H0%2!==0)throw new N("encoding",n,`is invalid for data of length ${H0}`)}function g0(t,n="Port",X0=!0){if(typeof t!=="number"&&typeof t!=="string"||typeof t==="string"&&q(t).length===0||+t!==+t>>>0||t>65535||t===0&&!X0)throw new x(n,t,X0);return t|0}var Q0=j((t,n)=>{if(t!==void 0&&(t===null||typeof t!=="object"||!("aborted"in t)))throw new g(n,"AbortSignal",t)}),$0=j((t,n)=>{if(typeof t!=="function")throw new g(n,"Function",t)}),m=j((t,n)=>{if(typeof t!=="function"||r(t))throw new g(n,"Function",t)}),p=j((t,n)=>{if(t!==void 0)throw new g(n,"undefined",t)});function b(t,n,X0){if(!C(X0,t))throw new g(n,`('${H(X0,"|")}')`,t)}var N0=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function i(t,n){if(typeof t==="undefined"||!A(N0,t))throw new N(n,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function e(t){if(typeof t==="string")return i(t,"hints"),t;else if(W(t)){let n=t.length,X0="";if(n===0)return X0;for(let H0=0;H0<n;H0++){let Z0=t[H0];if(i(Z0,"hints"),X0+=Z0,H0!==n-1)X0+=", "}return X0}throw new N("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}G.exports={isInt32:u,isUint32:a,parseFileMode:Z,validateArray:B,validateStringArray:c,validateBooleanArray:l,validateAbortSignalArray:s,validateBoolean:X,validateBuffer:h,validateDictionary:T,validateEncoding:d,validateFunction:$0,validateInt32:I,validateInteger:Q,validateNumber:J,validateObject:v,validateOneOf:Y,validatePlainFunction:m,validatePort:g0,validateSignalName:O0,validateString:K,validateUint32:$,validateUndefined:p,validateUnion:b,validateAbortSignal:Q0,validateLinkHeaderValue:e}}),UX=d0((E,G)=>{G.exports=(gU(),y0(xU))}),uU=d0((E,G)=>{var{SymbolAsyncIterator:W,SymbolIterator:C,SymbolFor:H}=s0(),z=H("nodejs.stream.destroyed"),V=H("nodejs.stream.errored"),P=H("nodejs.stream.readable"),k=H("nodejs.stream.writable"),R=H("nodejs.stream.disturbed"),S=H("nodejs.webstream.isClosedPromise"),D=H("nodejs.webstream.controllerErrorFunction");function A(O,v=!1){var T;return!!(O&&typeof O.pipe==="function"&&typeof O.on==="function"&&(!v||typeof O.pause==="function"&&typeof O.resume==="function")&&(!O._writableState||((T=O._readableState)===null||T===void 0?void 0:T.readable)!==!1)&&(!O._writableState||O._readableState))}function L(O){var v;return!!(O&&typeof O.write==="function"&&typeof O.on==="function"&&(!O._readableState||((v=O._writableState)===null||v===void 0?void 0:v.writable)!==!1))}function M(O){return!!(O&&typeof O.pipe==="function"&&O._readableState&&typeof O.on==="function"&&typeof O.write==="function")}function q(O){return O&&(O._readableState||O._writableState||typeof O.write==="function"&&typeof O.on==="function"||typeof O.pipe==="function"&&typeof O.on==="function")}function j(O){return!!(O&&!q(O)&&typeof O.pipeThrough==="function"&&typeof O.getReader==="function"&&typeof O.cancel==="function")}function x(O){return!!(O&&!q(O)&&typeof O.getWriter==="function"&&typeof O.abort==="function")}function g(O){return!!(O&&!q(O)&&typeof O.readable==="object"&&typeof O.writable==="object")}function N(O){return j(O)||x(O)||g(O)}function y(O,v){if(O==null)return!1;if(v===!0)return typeof O[W]==="function";if(v===!1)return typeof O[C]==="function";return typeof O[W]==="function"||typeof O[C]==="function"}function f(O){if(!q(O))return null;let{_writableState:v,_readableState:T}=O,B=v||T;return!!(O.destroyed||O[z]||B!==null&&B!==void 0&&B.destroyed)}function o(O){if(!L(O))return null;if(O.writableEnded===!0)return!0;let v=O._writableState;if(v!==null&&v!==void 0&&v.errored)return!1;if(typeof(v===null||v===void 0?void 0:v.ended)!=="boolean")return null;return v.ended}function r(O,v){if(!L(O))return null;if(O.writableFinished===!0)return!0;let T=O._writableState;if(T!==null&&T!==void 0&&T.errored)return!1;if(typeof(T===null||T===void 0?void 0:T.finished)!=="boolean")return null;return!!(T.finished||v===!1&&T.ended===!0&&T.length===0)}function V0(O){if(!A(O))return null;if(O.readableEnded===!0)return!0;let v=O._readableState;if(!v||v.errored)return!1;if(typeof(v===null||v===void 0?void 0:v.ended)!=="boolean")return null;return v.ended}function Y0(O,v){if(!A(O))return null;let T=O._readableState;if(T!==null&&T!==void 0&&T.errored)return!1;if(typeof(T===null||T===void 0?void 0:T.endEmitted)!=="boolean")return null;return!!(T.endEmitted||v===!1&&T.ended===!0&&T.length===0)}function u(O){if(O&&O[P]!=null)return O[P];if(typeof(O===null||O===void 0?void 0:O.readable)!=="boolean")return null;if(f(O))return!1;return A(O)&&O.readable&&!Y0(O)}function a(O){if(O&&O[k]!=null)return O[k];if(typeof(O===null||O===void 0?void 0:O.writable)!=="boolean")return null;if(f(O))return!1;return L(O)&&O.writable&&!o(O)}function F(O,v){if(!q(O))return null;if(f(O))return!0;if((v===null||v===void 0?void 0:v.readable)!==!1&&u(O))return!1;if((v===null||v===void 0?void 0:v.writable)!==!1&&a(O))return!1;return!0}function U(O){var v,T;if(!q(O))return null;if(O.writableErrored)return O.writableErrored;return(v=(T=O._writableState)===null||T===void 0?void 0:T.errored)!==null&&v!==void 0?v:null}function Z(O){var v,T;if(!q(O))return null;if(O.readableErrored)return O.readableErrored;return(v=(T=O._readableState)===null||T===void 0?void 0:T.errored)!==null&&v!==void 0?v:null}function Q(O){if(!q(O))return null;if(typeof O.closed==="boolean")return O.closed;let{_writableState:v,_readableState:T}=O;if(typeof(v===null||v===void 0?void 0:v.closed)==="boolean"||typeof(T===null||T===void 0?void 0:T.closed)==="boolean")return(v===null||v===void 0?void 0:v.closed)||(T===null||T===void 0?void 0:T.closed);if(typeof O._closed==="boolean"&&I(O))return O._closed;return null}function I(O){return typeof O._closed==="boolean"&&typeof O._defaultKeepAlive==="boolean"&&typeof O._removedConnection==="boolean"&&typeof O._removedContLen==="boolean"}function $(O){return typeof O._sent100==="boolean"&&I(O)}function K(O){var v;return typeof O._consuming==="boolean"&&typeof O._dumped==="boolean"&&((v=O.req)===null||v===void 0?void 0:v.upgradeOrConnect)===void 0}function J(O){if(!q(O))return null;let{_writableState:v,_readableState:T}=O,B=v||T;return!B&&$(O)||!!(B&&B.autoDestroy&&B.emitClose&&B.closed===!1)}function Y(O){var v;return!!(O&&((v=O[R])!==null&&v!==void 0?v:O.readableDidRead||O.readableAborted))}function X(O){var v,T,B,c,l,s,O0,h,d,g0;return!!(O&&((v=(T=(B=(c=(l=(s=O[V])!==null&&s!==void 0?s:O.readableErrored)!==null&&l!==void 0?l:O.writableErrored)!==null&&c!==void 0?c:(O0=O._readableState)===null||O0===void 0?void 0:O0.errorEmitted)!==null&&B!==void 0?B:(h=O._writableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&T!==void 0?T:(d=O._readableState)===null||d===void 0?void 0:d.errored)!==null&&v!==void 0?v:(g0=O._writableState)===null||g0===void 0?void 0:g0.errored))}G.exports={isDestroyed:f,kIsDestroyed:z,isDisturbed:Y,kIsDisturbed:R,isErrored:X,kIsErrored:V,isReadable:u,kIsReadable:P,kIsClosedPromise:S,kControllerErrorFunction:D,kIsWritable:k,isClosed:Q,isDuplexNodeStream:M,isFinished:F,isIterable:y,isReadableNodeStream:A,isReadableStream:j,isReadableEnded:V0,isReadableFinished:Y0,isReadableErrored:Z,isNodeStream:q,isWebStream:N,isWritable:a,isWritableNodeStream:L,isWritableStream:x,isWritableEnded:o,isWritableFinished:r,isWritableErrored:U,isServerRequest:K,isServerResponse:$,willEmitClose:J,isTransformStream:g}}),nU=d0((E,G)=>{var W=UX(),{AbortError:C,codes:H}=MU(),{ERR_INVALID_ARG_TYPE:z,ERR_STREAM_PREMATURE_CLOSE:V}=H,{kEmptyObject:P,once:k}=SU(),{validateAbortSignal:R,validateFunction:S,validateObject:D,validateBoolean:A}=AX(),{Promise:L,PromisePrototypeThen:M,SymbolDispose:q}=s0(),{isClosed:j,isReadable:x,isReadableNodeStream:g,isReadableStream:N,isReadableFinished:y,isReadableErrored:f,isWritable:o,isWritableNodeStream:r,isWritableStream:V0,isWritableFinished:Y0,isWritableErrored:u,isNodeStream:a,willEmitClose:F,kIsClosedPromise:U}=uU(),Z;function Q(Y){return Y.setHeader&&typeof Y.abort==="function"}var I=()=>{};function $(Y,X,O){var v,T;if(arguments.length===2)O=X,X=P;else if(X==null)X=P;else D(X,"options");if(S(O,"callback"),R(X.signal,"options.signal"),O=k(O),N(Y)||V0(Y))return K(Y,X,O);if(!a(Y))throw new z("stream",["ReadableStream","WritableStream","Stream"],Y);let B=(v=X.readable)!==null&&v!==void 0?v:g(Y),c=(T=X.writable)!==null&&T!==void 0?T:r(Y),l=Y._writableState,s=Y._readableState,O0=()=>{if(!Y.writable)g0()},h=F(Y)&&g(Y)===B&&r(Y)===c,d=Y0(Y,!1),g0=()=>{if(d=!0,Y.destroyed)h=!1;if(h&&(!Y.readable||B))return;if(!B||Q0)O.call(Y)},Q0=y(Y,!1),$0=()=>{if(Q0=!0,Y.destroyed)h=!1;if(h&&(!Y.writable||c))return;if(!c||d)O.call(Y)},m=(t)=>{O.call(Y,t)},p=j(Y),b=()=>{p=!0;let t=u(Y)||f(Y);if(t&&typeof t!=="boolean")return O.call(Y,t);if(B&&!Q0&&g(Y,!0)){if(!y(Y,!1))return O.call(Y,new V)}if(c&&!d){if(!Y0(Y,!1))return O.call(Y,new V)}O.call(Y)},N0=()=>{p=!0;let t=u(Y)||f(Y);if(t&&typeof t!=="boolean")return O.call(Y,t);O.call(Y)},i=()=>{Y.req.on("finish",g0)};if(Q(Y)){if(Y.on("complete",g0),!h)Y.on("abort",b);if(Y.req)i();else Y.on("request",i)}else if(c&&!l)Y.on("end",O0),Y.on("close",O0);if(!h&&typeof Y.aborted==="boolean")Y.on("aborted",b);if(Y.on("end",$0),Y.on("finish",g0),X.error!==!1)Y.on("error",m);if(Y.on("close",b),p)W.nextTick(b);else if(l!==null&&l!==void 0&&l.errorEmitted||s!==null&&s!==void 0&&s.errorEmitted){if(!h)W.nextTick(N0)}else if(!B&&(!h||x(Y))&&(d||o(Y)===!1))W.nextTick(N0);else if(!c&&(!h||o(Y))&&(Q0||x(Y)===!1))W.nextTick(N0);else if(s&&Y.req&&Y.aborted)W.nextTick(N0);let e=()=>{if(O=I,Y.removeListener("aborted",b),Y.removeListener("complete",g0),Y.removeListener("abort",b),Y.removeListener("request",i),Y.req)Y.req.removeListener("finish",g0);Y.removeListener("end",O0),Y.removeListener("close",O0),Y.removeListener("finish",g0),Y.removeListener("end",$0),Y.removeListener("error",m),Y.removeListener("close",b)};if(X.signal&&!p){let t=()=>{let n=O;e(),n.call(Y,new C(void 0,{cause:X.signal.reason}))};if(X.signal.aborted)W.nextTick(t);else{Z=Z||SU().addAbortListener;let n=Z(X.signal,t),X0=O;O=k((...H0)=>{n[q](),X0.apply(Y,H0)})}}return e}function K(Y,X,O){let v=!1,T=I;if(X.signal)if(T=()=>{v=!0,O.call(Y,new C(void 0,{cause:X.signal.reason}))},X.signal.aborted)W.nextTick(T);else{Z=Z||SU().addAbortListener;let c=Z(X.signal,T),l=O;O=k((...s)=>{c[q](),l.apply(Y,s)})}let B=(...c)=>{if(!v)W.nextTick(()=>O.apply(Y,c))};return M(Y[U].promise,B,B),I}function J(Y,X){var O;let v=!1;if(X===null)X=P;if((O=X)!==null&&O!==void 0&&O.cleanup)A(X.cleanup,"cleanup"),v=X.cleanup;return new L((T,B)=>{let c=$(Y,X,(l)=>{if(v)c();if(l)B(l);else T()})})}G.exports=$,G.exports.finished=J}),OX=d0((E,G)=>{var W=UX(),{aggregateTwoErrors:C,codes:{ERR_MULTIPLE_CALLBACK:H},AbortError:z}=MU(),{Symbol:V}=s0(),{kIsDestroyed:P,isDestroyed:k,isFinished:R,isServerRequest:S}=uU(),D=V("kDestroy"),A=V("kConstruct");function L(F,U,Z){if(F){if(F.stack,U&&!U.errored)U.errored=F;if(Z&&!Z.errored)Z.errored=F}}function M(F,U){let Z=this._readableState,Q=this._writableState,I=Q||Z;if(Q!==null&&Q!==void 0&&Q.destroyed||Z!==null&&Z!==void 0&&Z.destroyed){if(typeof U==="function")U();return this}if(L(F,Q,Z),Q)Q.destroyed=!0;if(Z)Z.destroyed=!0;if(!I.constructed)this.once(D,function($){q(this,C($,F),U)});else q(this,F,U);return this}function q(F,U,Z){let Q=!1;function I($){if(Q)return;Q=!0;let{_readableState:K,_writableState:J}=F;if(L($,J,K),J)J.closed=!0;if(K)K.closed=!0;if(typeof Z==="function")Z($);if($)W.nextTick(j,F,$);else W.nextTick(x,F)}try{F._destroy(U||null,I)}catch($){I($)}}function j(F,U){g(F,U),x(F)}function x(F){let{_readableState:U,_writableState:Z}=F;if(Z)Z.closeEmitted=!0;if(U)U.closeEmitted=!0;if(Z!==null&&Z!==void 0&&Z.emitClose||U!==null&&U!==void 0&&U.emitClose)F.emit("close")}function g(F,U){let{_readableState:Z,_writableState:Q}=F;if(Q!==null&&Q!==void 0&&Q.errorEmitted||Z!==null&&Z!==void 0&&Z.errorEmitted)return;if(Q)Q.errorEmitted=!0;if(Z)Z.errorEmitted=!0;F.emit("error",U)}function N(){let F=this._readableState,U=this._writableState;if(F)F.constructed=!0,F.closed=!1,F.closeEmitted=!1,F.destroyed=!1,F.errored=null,F.errorEmitted=!1,F.reading=!1,F.ended=F.readable===!1,F.endEmitted=F.readable===!1;if(U)U.constructed=!0,U.destroyed=!1,U.closed=!1,U.closeEmitted=!1,U.errored=null,U.errorEmitted=!1,U.finalCalled=!1,U.prefinished=!1,U.ended=U.writable===!1,U.ending=U.writable===!1,U.finished=U.writable===!1}function y(F,U,Z){let{_readableState:Q,_writableState:I}=F;if(I!==null&&I!==void 0&&I.destroyed||Q!==null&&Q!==void 0&&Q.destroyed)return this;if(Q!==null&&Q!==void 0&&Q.autoDestroy||I!==null&&I!==void 0&&I.autoDestroy)F.destroy(U);else if(U){if(U.stack,I&&!I.errored)I.errored=U;if(Q&&!Q.errored)Q.errored=U;if(Z)W.nextTick(g,F,U);else g(F,U)}}function f(F,U){if(typeof F._construct!=="function")return;let{_readableState:Z,_writableState:Q}=F;if(Z)Z.constructed=!1;if(Q)Q.constructed=!1;if(F.once(A,U),F.listenerCount(A)>1)return;W.nextTick(o,F)}function o(F){let U=!1;function Z(Q){if(U){y(F,Q!==null&&Q!==void 0?Q:new H);return}U=!0;let{_readableState:I,_writableState:$}=F,K=$||I;if(I)I.constructed=!0;if($)$.constructed=!0;if(K.destroyed)F.emit(D,Q);else if(Q)y(F,Q,!0);else W.nextTick(r,F)}try{F._construct((Q)=>{W.nextTick(Z,Q)})}catch(Q){W.nextTick(Z,Q)}}function r(F){F.emit(A)}function V0(F){return(F===null||F===void 0?void 0:F.setHeader)&&typeof F.abort==="function"}function Y0(F){F.emit("close")}function u(F,U){F.emit("error",U),W.nextTick(Y0,F)}function a(F,U){if(!F||k(F))return;if(!U&&!R(F))U=new z;if(S(F))F.socket=null,F.destroy(U);else if(V0(F))F.abort();else if(V0(F.req))F.req.abort();else if(typeof F.destroy==="function")F.destroy(U);else if(typeof F.close==="function")F.close();else if(U)W.nextTick(u,F,U);else W.nextTick(Y0,F);if(!F.destroyed)F[P]=!0}G.exports={construct:f,destroyer:a,destroy:M,undestroy:N,errorOrDestroy:y}}),QI=d0((E,G)=>{var{ArrayIsArray:W,ObjectSetPrototypeOf:C}=s0(),{EventEmitter:H}=(FX(),y0(JX));function z(P){H.call(this,P)}C(z.prototype,H.prototype),C(z,H),z.prototype.pipe=function(P,k){let R=this;function S(x){if(P.writable&&P.write(x)===!1&&R.pause)R.pause()}R.on("data",S);function D(){if(R.readable&&R.resume)R.resume()}if(P.on("drain",D),!P._isStdio&&(!k||k.end!==!1))R.on("end",L),R.on("close",M);let A=!1;function L(){if(A)return;A=!0,P.end()}function M(){if(A)return;if(A=!0,typeof P.destroy==="function")P.destroy()}function q(x){if(j(),H.listenerCount(this,"error")===0)this.emit("error",x)}V(R,"error",q),V(P,"error",q);function j(){R.removeListener("data",S),P.removeListener("drain",D),R.removeListener("end",L),R.removeListener("close",M),R.removeListener("error",q),P.removeListener("error",q),R.removeListener("end",j),R.removeListener("close",j),P.removeListener("close",j)}return R.on("end",j),R.on("close",j),P.on("close",j),P.emit("pipe",R),P};function V(P,k,R){if(typeof P.prependListener==="function")return P.prependListener(k,R);if(!P._events||!P._events[k])P.on(k,R);else if(W(P._events[k]))P._events[k].unshift(R);else P._events[k]=[R,P._events[k]]}G.exports={Stream:z,prependListener:V}}),jX=d0((E,G)=>{var{SymbolDispose:W}=s0(),{AbortError:C,codes:H}=MU(),{isNodeStream:z,isWebStream:V,kControllerErrorFunction:P}=uU(),k=nU(),{ERR_INVALID_ARG_TYPE:R}=H,S,D=(A,L)=>{if(typeof A!=="object"||!("aborted"in A))throw new R(L,"AbortSignal",A)};E.addAbortSignal=function A(L,M){if(D(L,"signal"),!z(M)&&!V(M))throw new R("stream",["ReadableStream","WritableStream","Stream"],M);return E.addAbortSignalNoValidate(L,M)},E.addAbortSignalNoValidate=function(A,L){if(typeof A!=="object"||!("aborted"in A))return L;let M=z(L)?()=>{L.destroy(new C(void 0,{cause:A.reason}))}:()=>{L[P](new C(void 0,{cause:A.reason}))};if(A.aborted)M();else{S=S||SU().addAbortListener;let q=S(A,M);k(L,q[W])}return L}}),_$=d0((E,G)=>{var{StringPrototypeSlice:W,SymbolIterator:C,TypedArrayPrototypeSet:H,Uint8Array:z}=s0(),{Buffer:V}=(HU(),y0(FU)),{inspect:P}=SU();G.exports=class k{constructor(){this.head=null,this.tail=null,this.length=0}push(R){let S={data:R,next:null};if(this.length>0)this.tail.next=S;else this.head=S;this.tail=S,++this.length}unshift(R){let S={data:R,next:this.head};if(this.length===0)this.tail=S;this.head=S,++this.length}shift(){if(this.length===0)return;let R=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,R}clear(){this.head=this.tail=null,this.length=0}join(R){if(this.length===0)return"";let S=this.head,D=""+S.data;while((S=S.next)!==null)D+=R+S.data;return D}concat(R){if(this.length===0)return V.alloc(0);let S=V.allocUnsafe(R>>>0),D=this.head,A=0;while(D)H(S,D.data,A),A+=D.data.length,D=D.next;return S}consume(R,S){let D=this.head.data;if(R<D.length){let A=D.slice(0,R);return this.head.data=D.slice(R),A}if(R===D.length)return this.shift();return S?this._getString(R):this._getBuffer(R)}first(){return this.head.data}*[C](){for(let R=this.head;R;R=R.next)yield R.data}_getString(R){let S="",D=this.head,A=0;do{let L=D.data;if(R>L.length)S+=L,R-=L.length;else{if(R===L.length)if(S+=L,++A,D.next)this.head=D.next;else this.head=this.tail=null;else S+=W(L,0,R),this.head=D,D.data=W(L,R);break}++A}while((D=D.next)!==null);return this.length-=A,S}_getBuffer(R){let S=V.allocUnsafe(R),D=R,A=this.head,L=0;do{let M=A.data;if(R>M.length)H(S,M,D-R),R-=M.length;else{if(R===M.length)if(H(S,M,D-R),++L,A.next)this.head=A.next;else this.head=this.tail=null;else H(S,new z(M.buffer,M.byteOffset,R),D-R),this.head=A,A.data=M.slice(R);break}++L}while((A=A.next)!==null);return this.length-=L,S}[Symbol.for("nodejs.util.inspect.custom")](R,S){return P(this,{...S,depth:0,customInspect:!1})}}}),BX=d0((E,G)=>{var{MathFloor:W,NumberIsInteger:C}=s0(),{validateInteger:H}=AX(),{ERR_INVALID_ARG_VALUE:z}=MU().codes,V=16384,P=16;function k(A,L,M){return A.highWaterMark!=null?A.highWaterMark:L?A[M]:null}function R(A){return A?P:V}function S(A,L){if(H(L,"value",0),A)P=L;else V=L}function D(A,L,M,q){let j=k(L,q,M);if(j!=null){if(!C(j)||j<0){let x=q?`options.${M}`:"options.highWaterMark";throw new z(x,j)}return W(j)}return R(A.objectMode)}G.exports={getHighWaterMark:D,getDefaultHighWaterMark:R,setDefaultHighWaterMark:S}}),w$=d0((E,G)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var W=(HU(),y0(FU)),C=W.Buffer;function H(V,P){for(var k in V)P[k]=V[k]}if(C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow)G.exports=W;else H(W,E),E.Buffer=z;function z(V,P,k){return C(V,P,k)}z.prototype=Object.create(C.prototype),H(C,z),z.from=function(V,P,k){if(typeof V==="number")throw new TypeError("Argument must not be a number");return C(V,P,k)},z.alloc=function(V,P,k){if(typeof V!=="number")throw new TypeError("Argument must be a number");var R=C(V);if(P!==void 0)if(typeof k==="string")R.fill(P,k);else R.fill(P);else R.fill(0);return R},z.allocUnsafe=function(V){if(typeof V!=="number")throw new TypeError("Argument must be a number");return C(V)},z.allocUnsafeSlow=function(V){if(typeof V!=="number")throw new TypeError("Argument must be a number");return W.SlowBuffer(V)}}),y$=d0((E)=>{var G=w$().Buffer,W=G.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function C(g){if(!g)return"utf8";var N;while(!0)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(N)return;g=(""+g).toLowerCase(),N=!0}}function H(g){var N=C(g);if(typeof N!=="string"&&(G.isEncoding===W||!W(g)))throw new Error("Unknown encoding: "+g);return N||g}E.StringDecoder=z;function z(g){this.encoding=H(g);var N;switch(this.encoding){case"utf16le":this.text=A,this.end=L,N=4;break;case"utf8":this.fillLast=R,N=4;break;case"base64":this.text=M,this.end=q,N=3;break;default:this.write=j,this.end=x;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=G.allocUnsafe(N)}z.prototype.write=function(g){if(g.length===0)return"";var N,y;if(this.lastNeed){if(N=this.fillLast(g),N===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;if(y<g.length)return N?N+this.text(g,y):this.text(g,y);return N||""},z.prototype.end=D,z.prototype.text=S,z.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function V(g){if(g<=127)return 0;else if(g>>5===6)return 2;else if(g>>4===14)return 3;else if(g>>3===30)return 4;return g>>6===2?-1:-2}function P(g,N,y){var f=N.length-1;if(f<y)return 0;var o=V(N[f]);if(o>=0){if(o>0)g.lastNeed=o-1;return o}if(--f<y||o===-2)return 0;if(o=V(N[f]),o>=0){if(o>0)g.lastNeed=o-2;return o}if(--f<y||o===-2)return 0;if(o=V(N[f]),o>=0){if(o>0)if(o===2)o=0;else g.lastNeed=o-3;return o}return 0}function k(g,N,y){if((N[0]&192)!==128)return g.lastNeed=0,"�";if(g.lastNeed>1&&N.length>1){if((N[1]&192)!==128)return g.lastNeed=1,"�";if(g.lastNeed>2&&N.length>2){if((N[2]&192)!==128)return g.lastNeed=2,"�"}}}function R(g){var N=this.lastTotal-this.lastNeed,y=k(this,g,N);if(y!==void 0)return y;if(this.lastNeed<=g.length)return g.copy(this.lastChar,N,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,N,0,g.length),this.lastNeed-=g.length}function S(g,N){var y=P(this,g,N);if(!this.lastNeed)return g.toString("utf8",N);this.lastTotal=y;var f=g.length-(y-this.lastNeed);return g.copy(this.lastChar,0,f),g.toString("utf8",N,f)}function D(g){var N=g&&g.length?this.write(g):"";if(this.lastNeed)return N+"�";return N}function A(g,N){if((g.length-N)%2===0){var y=g.toString("utf16le",N);if(y){var f=y.charCodeAt(y.length-1);if(f>=55296&&f<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",N,g.length-1)}function L(g){var N=g&&g.length?this.write(g):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return N+this.lastChar.toString("utf16le",0,y)}return N}function M(g,N){var y=(g.length-N)%3;if(y===0)return g.toString("base64",N);if(this.lastNeed=3-y,this.lastTotal=3,y===1)this.lastChar[0]=g[g.length-1];else this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1];return g.toString("base64",N,g.length-y)}function q(g){var N=g&&g.length?this.write(g):"";if(this.lastNeed)return N+this.lastChar.toString("base64",0,3-this.lastNeed);return N}function j(g){return g.toString(this.encoding)}function x(g){return g&&g.length?this.write(g):""}}),WZ=d0((E,G)=>{var W=UX(),{PromisePrototypeThen:C,SymbolAsyncIterator:H,SymbolIterator:z}=s0(),{Buffer:V}=(HU(),y0(FU)),{ERR_INVALID_ARG_TYPE:P,ERR_STREAM_NULL_VALUES:k}=MU().codes;function R(S,D,A){let L;if(typeof D==="string"||D instanceof V)return new S({objectMode:!0,...A,read(){this.push(D),this.push(null)}});let M;if(D&&D[H])M=!0,L=D[H]();else if(D&&D[z])M=!1,L=D[z]();else throw new P("iterable",["Iterable"],D);let q=new S({objectMode:!0,highWaterMark:1,...A}),j=!1;q._read=function(){if(!j)j=!0,g()},q._destroy=function(N,y){C(x(N),()=>W.nextTick(y,N),(f)=>W.nextTick(y,f||N))};async function x(N){let y=N!==void 0&&N!==null,f=typeof L.throw==="function";if(y&&f){let{value:o,done:r}=await L.throw(N);if(await o,r)return}if(typeof L.return==="function"){let{value:o}=await L.return();await o}}async function g(){for(;;){try{let{value:N,done:y}=M?await L.next():L.next();if(y)q.push(null);else{let f=N&&typeof N.then==="function"?await N:N;if(f===null)throw j=!1,new k;else if(q.push(f))continue;else j=!1}}catch(N){q.destroy(N)}break}}return q}G.exports=R}),xX=d0((E,G)=>{var W=UX(),{ArrayPrototypeIndexOf:C,NumberIsInteger:H,NumberIsNaN:z,NumberParseInt:V,ObjectDefineProperties:P,ObjectKeys:k,ObjectSetPrototypeOf:R,Promise:S,SafeSet:D,SymbolAsyncDispose:A,SymbolAsyncIterator:L,Symbol:M}=s0();G.exports=H0,H0.ReadableState=X0;var{EventEmitter:q}=(FX(),y0(JX)),{Stream:j,prependListener:x}=QI(),{Buffer:g}=(HU(),y0(FU)),{addAbortSignal:N}=jX(),y=nU(),f=SU().debuglog("stream",(_)=>{f=_}),o=_$(),r=OX(),{getHighWaterMark:V0,getDefaultHighWaterMark:Y0}=BX(),{aggregateTwoErrors:u,codes:{ERR_INVALID_ARG_TYPE:a,ERR_METHOD_NOT_IMPLEMENTED:F,ERR_OUT_OF_RANGE:U,ERR_STREAM_PUSH_AFTER_EOF:Z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:Q},AbortError:I}=MU(),{validateObject:$}=AX(),K=M("kPaused"),{StringDecoder:J}=y$(),Y=WZ();R(H0.prototype,j.prototype),R(H0,j);var X=()=>{},{errorOrDestroy:O}=r,v=1,T=2,B=4,c=8,l=16,s=32,O0=64,h=128,d=256,g0=512,Q0=1024,$0=2048,m=4096,p=8192,b=16384,N0=32768,i=65536,e=131072,t=262144;function n(_){return{enumerable:!1,get(){return(this.state&_)!==0},set(w){if(w)this.state|=_;else this.state&=~_}}}P(X0.prototype,{objectMode:n(v),ended:n(T),endEmitted:n(B),reading:n(c),constructed:n(l),sync:n(s),needReadable:n(O0),emittedReadable:n(h),readableListening:n(d),resumeScheduled:n(g0),errorEmitted:n(Q0),emitClose:n($0),autoDestroy:n(m),destroyed:n(p),closed:n(b),closeEmitted:n(N0),multiAwaitDrain:n(i),readingMore:n(e),dataEmitted:n(t)});function X0(_,w,_0){if(typeof _0!=="boolean")_0=w instanceof hU();if(this.state=$0|m|l|s,_&&_.objectMode)this.state|=v;if(_0&&_&&_.readableObjectMode)this.state|=v;if(this.highWaterMark=_?V0(this,_,"readableHighWaterMark",_0):Y0(!1),this.buffer=new o,this.length=0,this.pipes=[],this.flowing=null,this[K]=null,_&&_.emitClose===!1)this.state&=~$0;if(_&&_.autoDestroy===!1)this.state&=~m;if(this.errored=null,this.defaultEncoding=_&&_.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,_&&_.encoding)this.decoder=new J(_.encoding),this.encoding=_.encoding}function H0(_){if(!(this instanceof H0))return new H0(_);let w=this instanceof hU();if(this._readableState=new X0(_,this,w),_){if(typeof _.read==="function")this._read=_.read;if(typeof _.destroy==="function")this._destroy=_.destroy;if(typeof _.construct==="function")this._construct=_.construct;if(_.signal&&!w)N(_.signal,this)}j.call(this,_),r.construct(this,()=>{if(this._readableState.needReadable)r0(this,this._readableState)})}H0.prototype.destroy=r.destroy,H0.prototype._undestroy=r.undestroy,H0.prototype._destroy=function(_,w){w(_)},H0.prototype[q.captureRejectionSymbol]=function(_){this.destroy(_)},H0.prototype[A]=function(){let _;if(!this.destroyed)_=this.readableEnded?null:new I,this.destroy(_);return new S((w,_0)=>y(this,(U0)=>U0&&U0!==_?_0(U0):w(null)))},H0.prototype.push=function(_,w){return Z0(this,_,w,!1)},H0.prototype.unshift=function(_,w){return Z0(this,_,w,!0)};function Z0(_,w,_0,U0){f("readableAddChunk",w);let I0=_._readableState,l0;if((I0.state&v)===0){if(typeof w==="string"){if(_0=_0||I0.defaultEncoding,I0.encoding!==_0)if(U0&&I0.encoding)w=g.from(w,_0).toString(I0.encoding);else w=g.from(w,_0),_0=""}else if(w instanceof g)_0="";else if(j._isUint8Array(w))w=j._uint8ArrayToBuffer(w),_0="";else if(w!=null)l0=new a("chunk",["string","Buffer","Uint8Array"],w)}if(l0)O(_,l0);else if(w===null)I0.state&=~c,u0(_,I0);else if((I0.state&v)!==0||w&&w.length>0)if(U0)if((I0.state&B)!==0)O(_,new Q);else if(I0.destroyed||I0.errored)return!1;else W0(_,I0,w,!0);else if(I0.ended)O(_,new Z);else if(I0.destroyed||I0.errored)return!1;else if(I0.state&=~c,I0.decoder&&!_0)if(w=I0.decoder.write(w),I0.objectMode||w.length!==0)W0(_,I0,w,!1);else r0(_,I0);else W0(_,I0,w,!1);else if(!U0)I0.state&=~c,r0(_,I0);return!I0.ended&&(I0.length<I0.highWaterMark||I0.length===0)}function W0(_,w,_0,U0){if(w.flowing&&w.length===0&&!w.sync&&_.listenerCount("data")>0){if((w.state&i)!==0)w.awaitDrainWriters.clear();else w.awaitDrainWriters=null;w.dataEmitted=!0,_.emit("data",_0)}else{if(w.length+=w.objectMode?1:_0.length,U0)w.buffer.unshift(_0);else w.buffer.push(_0);if((w.state&O0)!==0)J0(_)}r0(_,w)}H0.prototype.isPaused=function(){let _=this._readableState;return _[K]===!0||_.flowing===!1},H0.prototype.setEncoding=function(_){let w=new J(_);this._readableState.decoder=w,this._readableState.encoding=this._readableState.decoder.encoding;let _0=this._readableState.buffer,U0="";for(let I0 of _0)U0+=w.write(I0);if(_0.clear(),U0!=="")_0.push(U0);return this._readableState.length=U0.length,this};var c0=1073741824;function G0(_){if(_>c0)throw new U("size","<= 1GiB",_);else _--,_|=_>>>1,_|=_>>>2,_|=_>>>4,_|=_>>>8,_|=_>>>16,_++;return _}function A0(_,w){if(_<=0||w.length===0&&w.ended)return 0;if((w.state&v)!==0)return 1;if(z(_)){if(w.flowing&&w.length)return w.buffer.first().length;return w.length}if(_<=w.length)return _;return w.ended?w.length:0}H0.prototype.read=function(_){if(f("read",_),_===void 0)_=NaN;else if(!H(_))_=V(_,10);let w=this._readableState,_0=_;if(_>w.highWaterMark)w.highWaterMark=G0(_);if(_!==0)w.state&=~h;if(_===0&&w.needReadable&&((w.highWaterMark!==0?w.length>=w.highWaterMark:w.length>0)||w.ended)){if(f("read: emitReadable",w.length,w.ended),w.length===0&&w.ended)D0(this);else J0(this);return null}if(_=A0(_,w),_===0&&w.ended){if(w.length===0)D0(this);return null}let U0=(w.state&O0)!==0;if(f("need readable",U0),w.length===0||w.length-_<w.highWaterMark)U0=!0,f("length less than watermark",U0);if(w.ended||w.reading||w.destroyed||w.errored||!w.constructed)U0=!1,f("reading, ended or constructing",U0);else if(U0){if(f("do read"),w.state|=c|s,w.length===0)w.state|=O0;try{this._read(w.highWaterMark)}catch(l0){O(this,l0)}if(w.state&=~s,!w.reading)_=A0(_0,w)}let I0;if(_>0)I0=P0(_,w);else I0=null;if(I0===null)w.needReadable=w.length<=w.highWaterMark,_=0;else if(w.length-=_,w.multiAwaitDrain)w.awaitDrainWriters.clear();else w.awaitDrainWriters=null;if(w.length===0){if(!w.ended)w.needReadable=!0;if(_0!==_&&w.ended)D0(this)}if(I0!==null&&!w.errorEmitted&&!w.closeEmitted)w.dataEmitted=!0,this.emit("data",I0);return I0};function u0(_,w){if(f("onEofChunk"),w.ended)return;if(w.decoder){let _0=w.decoder.end();if(_0&&_0.length)w.buffer.push(_0),w.length+=w.objectMode?1:_0.length}if(w.ended=!0,w.sync)J0(_);else w.needReadable=!1,w.emittedReadable=!0,T0(_)}function J0(_){let w=_._readableState;if(f("emitReadable",w.needReadable,w.emittedReadable),w.needReadable=!1,!w.emittedReadable)f("emitReadable",w.flowing),w.emittedReadable=!0,W.nextTick(T0,_)}function T0(_){let w=_._readableState;if(f("emitReadable_",w.destroyed,w.length,w.ended),!w.destroyed&&!w.errored&&(w.length||w.ended))_.emit("readable"),w.emittedReadable=!1;w.needReadable=!w.flowing&&!w.ended&&w.length<=w.highWaterMark,R0(_)}function r0(_,w){if(!w.readingMore&&w.constructed)w.readingMore=!0,W.nextTick(E0,_,w)}function E0(_,w){while(!w.reading&&!w.ended&&(w.length<w.highWaterMark||w.flowing&&w.length===0)){let _0=w.length;if(f("maybeReadMore read 0"),_.read(0),_0===w.length)break}w.readingMore=!1}H0.prototype._read=function(_){throw new F("_read()")},H0.prototype.pipe=function(_,w){let _0=this,U0=this._readableState;if(U0.pipes.length===1){if(!U0.multiAwaitDrain)U0.multiAwaitDrain=!0,U0.awaitDrainWriters=new D(U0.awaitDrainWriters?[U0.awaitDrainWriters]:[])}U0.pipes.push(_),f("pipe count=%d opts=%j",U0.pipes.length,w);let I0=(!w||w.end!==!1)&&_!==W.stdout&&_!==W.stderr?F0:p0;if(U0.endEmitted)W.nextTick(I0);else _0.once("end",I0);_.on("unpipe",l0);function l0(f0,b0){if(f("onunpipe"),f0===_0){if(b0&&b0.hasUnpiped===!1)b0.hasUnpiped=!0,x0()}}function F0(){f("onend"),_.end()}let C0,CU=!1;function x0(){if(f("cleanup"),_.removeListener("close",M0),_.removeListener("finish",t0),C0)_.removeListener("drain",C0);if(_.removeListener("error",z0),_.removeListener("unpipe",l0),_0.removeListener("end",F0),_0.removeListener("end",p0),_0.removeListener("data",TU),CU=!0,C0&&U0.awaitDrainWriters&&(!_._writableState||_._writableState.needDrain))C0()}function q0(){if(!CU){if(U0.pipes.length===1&&U0.pipes[0]===_)f("false write response, pause",0),U0.awaitDrainWriters=_,U0.multiAwaitDrain=!1;else if(U0.pipes.length>1&&U0.pipes.includes(_))f("false write response, pause",U0.awaitDrainWriters.size),U0.awaitDrainWriters.add(_);_0.pause()}if(!C0)C0=v0(_0,_),_.on("drain",C0)}_0.on("data",TU);function TU(f0){f("ondata");let b0=_.write(f0);if(f("dest.write",b0),b0===!1)q0()}function z0(f0){if(f("onerror",f0),p0(),_.removeListener("error",z0),_.listenerCount("error")===0){let b0=_._writableState||_._readableState;if(b0&&!b0.errorEmitted)O(_,f0);else _.emit("error",f0)}}x(_,"error",z0);function M0(){_.removeListener("finish",t0),p0()}_.once("close",M0);function t0(){f("onfinish"),_.removeListener("close",M0),p0()}_.once("finish",t0);function p0(){f("unpipe"),_0.unpipe(_)}if(_.emit("pipe",_0),_.writableNeedDrain===!0)q0();else if(!U0.flowing)f("pipe resume"),_0.resume();return _};function v0(_,w){return function _0(){let U0=_._readableState;if(U0.awaitDrainWriters===w)f("pipeOnDrain",1),U0.awaitDrainWriters=null;else if(U0.multiAwaitDrain)f("pipeOnDrain",U0.awaitDrainWriters.size),U0.awaitDrainWriters.delete(w);if((!U0.awaitDrainWriters||U0.awaitDrainWriters.size===0)&&_.listenerCount("data"))_.resume()}}H0.prototype.unpipe=function(_){let w=this._readableState,_0={hasUnpiped:!1};if(w.pipes.length===0)return this;if(!_){let I0=w.pipes;w.pipes=[],this.pause();for(let l0=0;l0<I0.length;l0++)I0[l0].emit("unpipe",this,{hasUnpiped:!1});return this}let U0=C(w.pipes,_);if(U0===-1)return this;if(w.pipes.splice(U0,1),w.pipes.length===0)this.pause();return _.emit("unpipe",this,_0),this},H0.prototype.on=function(_,w){let _0=j.prototype.on.call(this,_,w),U0=this._readableState;if(_==="data"){if(U0.readableListening=this.listenerCount("readable")>0,U0.flowing!==!1)this.resume()}else if(_==="readable"){if(!U0.endEmitted&&!U0.readableListening){if(U0.readableListening=U0.needReadable=!0,U0.flowing=!1,U0.emittedReadable=!1,f("on readable",U0.length,U0.reading),U0.length)J0(this);else if(!U0.reading)W.nextTick(k0,this)}}return _0},H0.prototype.addListener=H0.prototype.on,H0.prototype.removeListener=function(_,w){let _0=j.prototype.removeListener.call(this,_,w);if(_==="readable")W.nextTick(AU,this);return _0},H0.prototype.off=H0.prototype.removeListener,H0.prototype.removeAllListeners=function(_){let w=j.prototype.removeAllListeners.apply(this,arguments);if(_==="readable"||_===void 0)W.nextTick(AU,this);return w};function AU(_){let w=_._readableState;if(w.readableListening=_.listenerCount("readable")>0,w.resumeScheduled&&w[K]===!1)w.flowing=!0;else if(_.listenerCount("data")>0)_.resume();else if(!w.readableListening)w.flowing=null}function k0(_){f("readable nexttick read 0"),_.read(0)}H0.prototype.resume=function(){let _=this._readableState;if(!_.flowing)f("resume"),_.flowing=!_.readableListening,j0(this,_);return _[K]=!1,this};function j0(_,w){if(!w.resumeScheduled)w.resumeScheduled=!0,W.nextTick(DU,_,w)}function DU(_,w){if(f("resume",w.reading),!w.reading)_.read(0);if(w.resumeScheduled=!1,_.emit("resume"),R0(_),w.flowing&&!w.reading)_.read(0)}H0.prototype.pause=function(){if(f("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)f("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState[K]=!0,this};function R0(_){let w=_._readableState;f("flow",w.flowing);while(w.flowing&&_.read()!==null);}H0.prototype.wrap=function(_){let w=!1;_.on("data",(U0)=>{if(!this.push(U0)&&_.pause)w=!0,_.pause()}),_.on("end",()=>{this.push(null)}),_.on("error",(U0)=>{O(this,U0)}),_.on("close",()=>{this.destroy()}),_.on("destroy",()=>{this.destroy()}),this._read=()=>{if(w&&_.resume)w=!1,_.resume()};let _0=k(_);for(let U0=1;U0<_0.length;U0++){let I0=_0[U0];if(this[I0]===void 0&&typeof _[I0]==="function")this[I0]=_[I0].bind(_)}return this},H0.prototype[L]=function(){return S0(this)},H0.prototype.iterator=function(_){if(_!==void 0)$(_,"options");return S0(this,_)};function S0(_,w){if(typeof _.read!=="function")_=H0.wrap(_,{objectMode:!0});let _0=LU(_,w);return _0.stream=_,_0}async function*LU(_,w){let _0=X;function U0(F0){if(this===_)_0(),_0=X;else _0=F0}_.on("readable",U0);let I0,l0=y(_,{writable:!1},(F0)=>{I0=F0?u(I0,F0):null,_0(),_0=X});try{while(!0){let F0=_.destroyed?null:_.read();if(F0!==null)yield F0;else if(I0)throw I0;else if(I0===null)return;else await new S(U0)}}catch(F0){throw I0=u(I0,F0),I0}finally{if((I0||(w===null||w===void 0?void 0:w.destroyOnReturn)!==!1)&&(I0===void 0||_._readableState.autoDestroy))r.destroyer(_,null);else _.off("readable",U0),l0()}}P(H0.prototype,{readable:{__proto__:null,get(){let _=this._readableState;return!!_&&_.readable!==!1&&!_.destroyed&&!_.errorEmitted&&!_.endEmitted},set(_){if(this._readableState)this._readableState.readable=!!_}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(_){if(this._readableState)this._readableState.flowing=_}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(_){if(!this._readableState)return;this._readableState.destroyed=_}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),P(X0.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[K]!==!1},set(_){this[K]=!!_}}}),H0._fromList=P0;function P0(_,w){if(w.length===0)return null;let _0;if(w.objectMode)_0=w.buffer.shift();else if(!_||_>=w.length){if(w.decoder)_0=w.buffer.join("");else if(w.buffer.length===1)_0=w.buffer.first();else _0=w.buffer.concat(w.length);w.buffer.clear()}else _0=w.buffer.consume(_,w.decoder);return _0}function D0(_){let w=_._readableState;if(f("endReadable",w.endEmitted),!w.endEmitted)w.ended=!0,W.nextTick(zU,w,_)}function zU(_,w){if(f("endReadableNT",_.endEmitted,_.length),!_.errored&&!_.closeEmitted&&!_.endEmitted&&_.length===0){if(_.endEmitted=!0,w.emit("end"),w.writable&&w.allowHalfOpen===!1)W.nextTick(B0,w);else if(_.autoDestroy){let _0=w._writableState;if(!_0||_0.autoDestroy&&(_0.finished||_0.writable===!1))w.destroy()}}}function B0(_){if(_.writable&&!_.writableEnded&&!_.destroyed)_.end()}H0.from=function(_,w){return Y(H0,_,w)};var L0;function EU(){if(L0===void 0)L0={};return L0}H0.fromWeb=function(_,w){return EU().newStreamReadableFromReadableStream(_,w)},H0.toWeb=function(_,w){return EU().newReadableStreamFromStreamReadable(_,w)},H0.wrap=function(_,w){var _0,U0;return new H0({objectMode:(_0=(U0=_.readableObjectMode)!==null&&U0!==void 0?U0:_.objectMode)!==null&&_0!==void 0?_0:!0,...w,destroy(I0,l0){r.destroyer(_,I0),l0(I0)}}).wrap(_)}}),$I=d0((E,G)=>{var W=UX(),{ArrayPrototypeSlice:C,Error:H,FunctionPrototypeSymbolHasInstance:z,ObjectDefineProperty:V,ObjectDefineProperties:P,ObjectSetPrototypeOf:k,StringPrototypeToLowerCase:R,Symbol:S,SymbolHasInstance:D}=s0();G.exports=$,$.WritableState=Q;var{EventEmitter:A}=(FX(),y0(JX)),L=QI().Stream,{Buffer:M}=(HU(),y0(FU)),q=OX(),{addAbortSignal:j}=jX(),{getHighWaterMark:x,getDefaultHighWaterMark:g}=BX(),{ERR_INVALID_ARG_TYPE:N,ERR_METHOD_NOT_IMPLEMENTED:y,ERR_MULTIPLE_CALLBACK:f,ERR_STREAM_CANNOT_PIPE:o,ERR_STREAM_DESTROYED:r,ERR_STREAM_ALREADY_FINISHED:V0,ERR_STREAM_NULL_VALUES:Y0,ERR_STREAM_WRITE_AFTER_END:u,ERR_UNKNOWN_ENCODING:a}=MU().codes,{errorOrDestroy:F}=q;k($.prototype,L.prototype),k($,L);function U(){}var Z=S("kOnFinished");function Q(m,p,b){if(typeof b!=="boolean")b=p instanceof hU();if(this.objectMode=!!(m&&m.objectMode),b)this.objectMode=this.objectMode||!!(m&&m.writableObjectMode);this.highWaterMark=m?x(this,m,"writableHighWaterMark",b):g(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let N0=!!(m&&m.decodeStrings===!1);this.decodeStrings=!N0,this.defaultEncoding=m&&m.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=O.bind(void 0,p),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,I(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!m||m.emitClose!==!1,this.autoDestroy=!m||m.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Z]=[]}function I(m){m.buffered=[],m.bufferedIndex=0,m.allBuffers=!0,m.allNoop=!0}Q.prototype.getBuffer=function m(){return C(this.buffered,this.bufferedIndex)},V(Q.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function $(m){let p=this instanceof hU();if(!p&&!z($,this))return new $(m);if(this._writableState=new Q(m,this,p),m){if(typeof m.write==="function")this._write=m.write;if(typeof m.writev==="function")this._writev=m.writev;if(typeof m.destroy==="function")this._destroy=m.destroy;if(typeof m.final==="function")this._final=m.final;if(typeof m.construct==="function")this._construct=m.construct;if(m.signal)j(m.signal,this)}L.call(this,m),q.construct(this,()=>{let b=this._writableState;if(!b.writing)c(this,b);h(this,b)})}V($,D,{__proto__:null,value:function(m){if(z(this,m))return!0;if(this!==$)return!1;return m&&m._writableState instanceof Q}}),$.prototype.pipe=function(){F(this,new o)};function K(m,p,b,N0){let i=m._writableState;if(typeof b==="function")N0=b,b=i.defaultEncoding;else{if(!b)b=i.defaultEncoding;else if(b!=="buffer"&&!M.isEncoding(b))throw new a(b);if(typeof N0!=="function")N0=U}if(p===null)throw new Y0;else if(!i.objectMode)if(typeof p==="string"){if(i.decodeStrings!==!1)p=M.from(p,b),b="buffer"}else if(p instanceof M)b="buffer";else if(L._isUint8Array(p))p=L._uint8ArrayToBuffer(p),b="buffer";else throw new N("chunk",["string","Buffer","Uint8Array"],p);let e;if(i.ending)e=new u;else if(i.destroyed)e=new r("write");if(e)return W.nextTick(N0,e),F(m,e,!0),e;return i.pendingcb++,J(m,i,p,b,N0)}$.prototype.write=function(m,p,b){return K(this,m,p,b)===!0},$.prototype.cork=function(){this._writableState.corked++},$.prototype.uncork=function(){let m=this._writableState;if(m.corked){if(m.corked--,!m.writing)c(this,m)}},$.prototype.setDefaultEncoding=function m(p){if(typeof p==="string")p=R(p);if(!M.isEncoding(p))throw new a(p);return this._writableState.defaultEncoding=p,this};function J(m,p,b,N0,i){let e=p.objectMode?1:b.length;p.length+=e;let t=p.length<p.highWaterMark;if(!t)p.needDrain=!0;if(p.writing||p.corked||p.errored||!p.constructed){if(p.buffered.push({chunk:b,encoding:N0,callback:i}),p.allBuffers&&N0!=="buffer")p.allBuffers=!1;if(p.allNoop&&i!==U)p.allNoop=!1}else p.writelen=e,p.writecb=i,p.writing=!0,p.sync=!0,m._write(b,N0,p.onwrite),p.sync=!1;return t&&!p.errored&&!p.destroyed}function Y(m,p,b,N0,i,e,t){if(p.writelen=N0,p.writecb=t,p.writing=!0,p.sync=!0,p.destroyed)p.onwrite(new r("write"));else if(b)m._writev(i,p.onwrite);else m._write(i,e,p.onwrite);p.sync=!1}function X(m,p,b,N0){--p.pendingcb,N0(b),B(p),F(m,b)}function O(m,p){let b=m._writableState,N0=b.sync,i=b.writecb;if(typeof i!=="function"){F(m,new f);return}if(b.writing=!1,b.writecb=null,b.length-=b.writelen,b.writelen=0,p){if(p.stack,!b.errored)b.errored=p;if(m._readableState&&!m._readableState.errored)m._readableState.errored=p;if(N0)W.nextTick(X,m,b,p,i);else X(m,b,p,i)}else{if(b.buffered.length>b.bufferedIndex)c(m,b);if(N0)if(b.afterWriteTickInfo!==null&&b.afterWriteTickInfo.cb===i)b.afterWriteTickInfo.count++;else b.afterWriteTickInfo={count:1,cb:i,stream:m,state:b},W.nextTick(v,b.afterWriteTickInfo);else T(m,b,1,i)}}function v({stream:m,state:p,count:b,cb:N0}){return p.afterWriteTickInfo=null,T(m,p,b,N0)}function T(m,p,b,N0){if(!p.ending&&!m.destroyed&&p.length===0&&p.needDrain)p.needDrain=!1,m.emit("drain");while(b-- >0)p.pendingcb--,N0();if(p.destroyed)B(p);h(m,p)}function B(m){if(m.writing)return;for(let i=m.bufferedIndex;i<m.buffered.length;++i){var p;let{chunk:e,callback:t}=m.buffered[i],n=m.objectMode?1:e.length;m.length-=n,t((p=m.errored)!==null&&p!==void 0?p:new r("write"))}let b=m[Z].splice(0);for(let i=0;i<b.length;i++){var N0;b[i]((N0=m.errored)!==null&&N0!==void 0?N0:new r("end"))}I(m)}function c(m,p){if(p.corked||p.bufferProcessing||p.destroyed||!p.constructed)return;let{buffered:b,bufferedIndex:N0,objectMode:i}=p,e=b.length-N0;if(!e)return;let t=N0;if(p.bufferProcessing=!0,e>1&&m._writev){p.pendingcb-=e-1;let n=p.allNoop?U:(H0)=>{for(let Z0=t;Z0<b.length;++Z0)b[Z0].callback(H0)},X0=p.allNoop&&t===0?b:C(b,t);X0.allBuffers=p.allBuffers,Y(m,p,!0,p.length,X0,"",n),I(p)}else{do{let{chunk:n,encoding:X0,callback:H0}=b[t];b[t++]=null;let Z0=i?1:n.length;Y(m,p,!1,Z0,n,X0,H0)}while(t<b.length&&!p.writing);if(t===b.length)I(p);else if(t>256)b.splice(0,t),p.bufferedIndex=0;else p.bufferedIndex=t}p.bufferProcessing=!1}$.prototype._write=function(m,p,b){if(this._writev)this._writev([{chunk:m,encoding:p}],b);else throw new y("_write()")},$.prototype._writev=null,$.prototype.end=function(m,p,b){let N0=this._writableState;if(typeof m==="function")b=m,m=null,p=null;else if(typeof p==="function")b=p,p=null;let i;if(m!==null&&m!==void 0){let e=K(this,m,p);if(e instanceof H)i=e}if(N0.corked)N0.corked=1,this.uncork();if(i);else if(!N0.errored&&!N0.ending)N0.ending=!0,h(this,N0,!0),N0.ended=!0;else if(N0.finished)i=new V0("end");else if(N0.destroyed)i=new r("end");if(typeof b==="function")if(i||N0.finished)W.nextTick(b,i);else N0[Z].push(b);return this};function l(m){return m.ending&&!m.destroyed&&m.constructed&&m.length===0&&!m.errored&&m.buffered.length===0&&!m.finished&&!m.writing&&!m.errorEmitted&&!m.closeEmitted}function s(m,p){let b=!1;function N0(i){if(b){F(m,i!==null&&i!==void 0?i:f());return}if(b=!0,p.pendingcb--,i){let e=p[Z].splice(0);for(let t=0;t<e.length;t++)e[t](i);F(m,i,p.sync)}else if(l(p))p.prefinished=!0,m.emit("prefinish"),p.pendingcb++,W.nextTick(d,m,p)}p.sync=!0,p.pendingcb++;try{m._final(N0)}catch(i){N0(i)}p.sync=!1}function O0(m,p){if(!p.prefinished&&!p.finalCalled)if(typeof m._final==="function"&&!p.destroyed)p.finalCalled=!0,s(m,p);else p.prefinished=!0,m.emit("prefinish")}function h(m,p,b){if(l(p)){if(O0(m,p),p.pendingcb===0){if(b)p.pendingcb++,W.nextTick((N0,i)=>{if(l(i))d(N0,i);else i.pendingcb--},m,p);else if(l(p))p.pendingcb++,d(m,p)}}}function d(m,p){p.pendingcb--,p.finished=!0;let b=p[Z].splice(0);for(let N0=0;N0<b.length;N0++)b[N0]();if(m.emit("finish"),p.autoDestroy){let N0=m._readableState;if(!N0||N0.autoDestroy&&(N0.endEmitted||N0.readable===!1))m.destroy()}}P($.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(m){if(this._writableState)this._writableState.destroyed=m}},writable:{__proto__:null,get(){let m=this._writableState;return!!m&&m.writable!==!1&&!m.destroyed&&!m.errored&&!m.ending&&!m.ended},set(m){if(this._writableState)this._writableState.writable=!!m}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let m=this._writableState;if(!m)return!1;return!m.destroyed&&!m.ending&&m.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var g0=q.destroy;$.prototype.destroy=function(m,p){let b=this._writableState;if(!b.destroyed&&(b.bufferedIndex<b.buffered.length||b[Z].length))W.nextTick(B,b);return g0.call(this,m,p),this},$.prototype._undestroy=q.undestroy,$.prototype._destroy=function(m,p){p(m)},$.prototype[A.captureRejectionSymbol]=function(m){this.destroy(m)};var Q0;function $0(){if(Q0===void 0)Q0={};return Q0}$.fromWeb=function(m,p){return $0().newStreamWritableFromWritableStream(m,p)},$.toWeb=function(m){return $0().newWritableStreamFromStreamWritable(m)}}),f$=d0((E,G)=>{var W=UX(),C=(HU(),y0(FU)),{isReadable:H,isWritable:z,isIterable:V,isNodeStream:P,isReadableNodeStream:k,isWritableNodeStream:R,isDuplexNodeStream:S,isReadableStream:D,isWritableStream:A}=uU(),L=nU(),{AbortError:M,codes:{ERR_INVALID_ARG_TYPE:q,ERR_INVALID_RETURN_VALUE:j}}=MU(),{destroyer:x}=OX(),g=hU(),N=xX(),y=$I(),{createDeferredPromise:f}=SU(),o=WZ(),r=globalThis.Blob||C.Blob,V0=typeof r!=="undefined"?function Z(Q){return Q instanceof r}:function Z(Q){return!1},Y0=globalThis.AbortController||HX().AbortController,{FunctionPrototypeCall:u}=s0();class a extends g{constructor(Z){super(Z);if((Z===null||Z===void 0?void 0:Z.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((Z===null||Z===void 0?void 0:Z.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}G.exports=function Z(Q,I){if(S(Q))return Q;if(k(Q))return U({readable:Q});if(R(Q))return U({writable:Q});if(P(Q))return U({writable:!1,readable:!1});if(D(Q))return U({readable:N.fromWeb(Q)});if(A(Q))return U({writable:y.fromWeb(Q)});if(typeof Q==="function"){let{value:K,write:J,final:Y,destroy:X}=F(Q);if(V(K))return o(a,K,{objectMode:!0,write:J,final:Y,destroy:X});let O=K===null||K===void 0?void 0:K.then;if(typeof O==="function"){let v,T=u(O,K,(B)=>{if(B!=null)throw new j("nully","body",B)},(B)=>{x(v,B)});return v=new a({objectMode:!0,readable:!1,write:J,final(B){Y(async()=>{try{await T,W.nextTick(B,null)}catch(c){W.nextTick(B,c)}})},destroy:X})}throw new j("Iterable, AsyncIterable or AsyncFunction",I,K)}if(V0(Q))return Z(Q.arrayBuffer());if(V(Q))return o(a,Q,{objectMode:!0,writable:!1});if(D(Q===null||Q===void 0?void 0:Q.readable)&&A(Q===null||Q===void 0?void 0:Q.writable))return a.fromWeb(Q);if(typeof(Q===null||Q===void 0?void 0:Q.writable)==="object"||typeof(Q===null||Q===void 0?void 0:Q.readable)==="object"){let K=Q!==null&&Q!==void 0&&Q.readable?k(Q===null||Q===void 0?void 0:Q.readable)?Q===null||Q===void 0?void 0:Q.readable:Z(Q.readable):void 0,J=Q!==null&&Q!==void 0&&Q.writable?R(Q===null||Q===void 0?void 0:Q.writable)?Q===null||Q===void 0?void 0:Q.writable:Z(Q.writable):void 0;return U({readable:K,writable:J})}let $=Q===null||Q===void 0?void 0:Q.then;if(typeof $==="function"){let K;return u($,Q,(J)=>{if(J!=null)K.push(J);K.push(null)},(J)=>{x(K,J)}),K=new a({objectMode:!0,writable:!1,read(){}})}throw new q(I,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],Q)};function F(Z){let{promise:Q,resolve:I}=f(),$=new Y0,K=$.signal;return{value:Z(async function*(){while(!0){let J=Q;Q=null;let{chunk:Y,done:X,cb:O}=await J;if(W.nextTick(O),X)return;if(K.aborted)throw new M(void 0,{cause:K.reason});({promise:Q,resolve:I}=f()),yield Y}}(),{signal:K}),write(J,Y,X){let O=I;I=null,O({chunk:J,done:!1,cb:X})},final(J){let Y=I;I=null,Y({done:!0,cb:J})},destroy(J,Y){$.abort(),Y(J)}}}function U(Z){let Q=Z.readable&&typeof Z.readable.read!=="function"?N.wrap(Z.readable):Z.readable,I=Z.writable,$=!!H(Q),K=!!z(I),J,Y,X,O,v;function T(B){let c=O;if(O=null,c)c(B);else if(B)v.destroy(B)}if(v=new a({readableObjectMode:!!(Q!==null&&Q!==void 0&&Q.readableObjectMode),writableObjectMode:!!(I!==null&&I!==void 0&&I.writableObjectMode),readable:$,writable:K}),K)L(I,(B)=>{if(K=!1,B)x(Q,B);T(B)}),v._write=function(B,c,l){if(I.write(B,c))l();else J=l},v._final=function(B){I.end(),Y=B},I.on("drain",function(){if(J){let B=J;J=null,B()}}),I.on("finish",function(){if(Y){let B=Y;Y=null,B()}});if($)L(Q,(B)=>{if($=!1,B)x(Q,B);T(B)}),Q.on("readable",function(){if(X){let B=X;X=null,B()}}),Q.on("end",function(){v.push(null)}),v._read=function(){while(!0){let B=Q.read();if(B===null){X=v._read;return}if(!v.push(B))return}};return v._destroy=function(B,c){if(!B&&O!==null)B=new M;if(X=null,J=null,Y=null,O===null)c(B);else O=c,x(I,B),x(Q,B)},v}}),hU=d0((E,G)=>{var{ObjectDefineProperties:W,ObjectGetOwnPropertyDescriptor:C,ObjectKeys:H,ObjectSetPrototypeOf:z}=s0();G.exports=k;var V=xX(),P=$I();z(k.prototype,V.prototype),z(k,V);{let A=H(P.prototype);for(let L=0;L<A.length;L++){let M=A[L];if(!k.prototype[M])k.prototype[M]=P.prototype[M]}}function k(A){if(!(this instanceof k))return new k(A);if(V.call(this,A),P.call(this,A),A){if(this.allowHalfOpen=A.allowHalfOpen!==!1,A.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(A.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}W(k.prototype,{writable:{__proto__:null,...C(P.prototype,"writable")},writableHighWaterMark:{__proto__:null,...C(P.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...C(P.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...C(P.prototype,"writableBuffer")},writableLength:{__proto__:null,...C(P.prototype,"writableLength")},writableFinished:{__proto__:null,...C(P.prototype,"writableFinished")},writableCorked:{__proto__:null,...C(P.prototype,"writableCorked")},writableEnded:{__proto__:null,...C(P.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...C(P.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(A){if(this._readableState&&this._writableState)this._readableState.destroyed=A,this._writableState.destroyed=A}}});var R;function S(){if(R===void 0)R={};return R}k.fromWeb=function(A,L){return S().newStreamDuplexFromReadableWritablePair(A,L)},k.toWeb=function(A){return S().newReadableWritablePairFromDuplex(A)};var D;k.from=function(A){if(!D)D=f$();return D(A,"body")}}),JZ=d0((E,G)=>{var{ObjectSetPrototypeOf:W,Symbol:C}=s0();G.exports=k;var{ERR_METHOD_NOT_IMPLEMENTED:H}=MU().codes,z=hU(),{getHighWaterMark:V}=BX();W(k.prototype,z.prototype),W(k,z);var P=C("kCallback");function k(D){if(!(this instanceof k))return new k(D);let A=D?V(this,D,"readableHighWaterMark",!0):null;if(A===0)D={...D,highWaterMark:null,readableHighWaterMark:A,writableHighWaterMark:D.writableHighWaterMark||0};if(z.call(this,D),this._readableState.sync=!1,this[P]=null,D){if(typeof D.transform==="function")this._transform=D.transform;if(typeof D.flush==="function")this._flush=D.flush}this.on("prefinish",S)}function R(D){if(typeof this._flush==="function"&&!this.destroyed)this._flush((A,L)=>{if(A){if(D)D(A);else this.destroy(A);return}if(L!=null)this.push(L);if(this.push(null),D)D()});else if(this.push(null),D)D()}function S(){if(this._final!==R)R.call(this)}k.prototype._final=R,k.prototype._transform=function(D,A,L){throw new H("_transform()")},k.prototype._write=function(D,A,L){let M=this._readableState,q=this._writableState,j=M.length;this._transform(D,A,(x,g)=>{if(x){L(x);return}if(g!=null)this.push(g);if(q.ended||j===M.length||M.length<M.highWaterMark)L();else this[P]=L})},k.prototype._read=function(){if(this[P]){let D=this[P];this[P]=null,D()}}}),FZ=d0((E,G)=>{var{ObjectSetPrototypeOf:W}=s0();G.exports=H;var C=JZ();W(H.prototype,C.prototype),W(H,C);function H(z){if(!(this instanceof H))return new H(z);C.call(this,z)}H.prototype._transform=function(z,V,P){P(null,z)}}),YI=d0((E,G)=>{var W=UX(),{ArrayIsArray:C,Promise:H,SymbolAsyncIterator:z,SymbolDispose:V}=s0(),P=nU(),{once:k}=SU(),R=OX(),S=hU(),{aggregateTwoErrors:D,codes:{ERR_INVALID_ARG_TYPE:A,ERR_INVALID_RETURN_VALUE:L,ERR_MISSING_ARGS:M,ERR_STREAM_DESTROYED:q,ERR_STREAM_PREMATURE_CLOSE:j},AbortError:x}=MU(),{validateFunction:g,validateAbortSignal:N}=AX(),{isIterable:y,isReadable:f,isReadableNodeStream:o,isNodeStream:r,isTransformStream:V0,isWebStream:Y0,isReadableStream:u,isReadableFinished:a}=uU(),F=globalThis.AbortController||HX().AbortController,U,Z,Q;function I(B,c,l){let s=!1;B.on("close",()=>{s=!0});let O0=P(B,{readable:c,writable:l},(h)=>{s=!h});return{destroy:(h)=>{if(s)return;s=!0,R.destroyer(B,h||new q("pipe"))},cleanup:O0}}function $(B){return g(B[B.length-1],"streams[stream.length - 1]"),B.pop()}function K(B){if(y(B))return B;else if(o(B))return J(B);throw new A("val",["Readable","Iterable","AsyncIterable"],B)}async function*J(B){if(!Z)Z=xX();yield*Z.prototype[z].call(B)}async function Y(B,c,l,{end:s}){let O0,h=null,d=($0)=>{if($0)O0=$0;if(h){let m=h;h=null,m()}},g0=()=>new H(($0,m)=>{if(O0)m(O0);else h=()=>{if(O0)m(O0);else $0()}});c.on("drain",d);let Q0=P(c,{readable:!1},d);try{if(c.writableNeedDrain)await g0();for await(let $0 of B)if(!c.write($0))await g0();if(s)c.end(),await g0();l()}catch($0){l(O0!==$0?D(O0,$0):$0)}finally{Q0(),c.off("drain",d)}}async function X(B,c,l,{end:s}){if(V0(c))c=c.writable;let O0=c.getWriter();try{for await(let h of B)await O0.ready,O0.write(h).catch(()=>{});if(await O0.ready,s)await O0.close();l()}catch(h){try{await O0.abort(h),l(h)}catch(d){l(d)}}}function O(...B){return v(B,k($(B)))}function v(B,c,l){if(B.length===1&&C(B[0]))B=B[0];if(B.length<2)throw new M("streams");let s=new F,O0=s.signal,h=l===null||l===void 0?void 0:l.signal,d=[];N(h,"options.signal");function g0(){i(new x)}Q=Q||SU().addAbortListener;let Q0;if(h)Q0=Q(h,g0);let $0,m,p=[],b=0;function N0(H0){i(H0,--b===0)}function i(H0,Z0){var W0;if(H0&&(!$0||$0.code==="ERR_STREAM_PREMATURE_CLOSE"))$0=H0;if(!$0&&!Z0)return;while(p.length)p.shift()($0);if((W0=Q0)===null||W0===void 0||W0[V](),s.abort(),Z0){if(!$0)d.forEach((c0)=>c0());W.nextTick(c,$0,m)}}let e;for(let H0=0;H0<B.length;H0++){let Z0=B[H0],W0=H0<B.length-1,c0=H0>0,G0=W0||(l===null||l===void 0?void 0:l.end)!==!1,A0=H0===B.length-1;if(r(Z0)){let u0=function(J0){if(J0&&J0.name!=="AbortError"&&J0.code!=="ERR_STREAM_PREMATURE_CLOSE")N0(J0)};var t=u0;if(G0){let{destroy:J0,cleanup:T0}=I(Z0,W0,c0);if(p.push(J0),f(Z0)&&A0)d.push(T0)}if(Z0.on("error",u0),f(Z0)&&A0)d.push(()=>{Z0.removeListener("error",u0)})}if(H0===0)if(typeof Z0==="function"){if(e=Z0({signal:O0}),!y(e))throw new L("Iterable, AsyncIterable or Stream","source",e)}else if(y(Z0)||o(Z0)||V0(Z0))e=Z0;else e=S.from(Z0);else if(typeof Z0==="function"){if(V0(e)){var n;e=K((n=e)===null||n===void 0?void 0:n.readable)}else e=K(e);if(e=Z0(e,{signal:O0}),W0){if(!y(e,!0))throw new L("AsyncIterable",`transform[${H0-1}]`,e)}else{var X0;if(!U)U=FZ();let u0=new U({objectMode:!0}),J0=(X0=e)===null||X0===void 0?void 0:X0.then;if(typeof J0==="function")b++,J0.call(e,(E0)=>{if(m=E0,E0!=null)u0.write(E0);if(G0)u0.end();W.nextTick(N0)},(E0)=>{u0.destroy(E0),W.nextTick(N0,E0)});else if(y(e,!0))b++,Y(e,u0,N0,{end:G0});else if(u(e)||V0(e)){let E0=e.readable||e;b++,Y(E0,u0,N0,{end:G0})}else throw new L("AsyncIterable or Promise","destination",e);e=u0;let{destroy:T0,cleanup:r0}=I(e,!1,!0);if(p.push(T0),A0)d.push(r0)}}else if(r(Z0)){if(o(e)){b+=2;let u0=T(e,Z0,N0,{end:G0});if(f(Z0)&&A0)d.push(u0)}else if(V0(e)||u(e)){let u0=e.readable||e;b++,Y(u0,Z0,N0,{end:G0})}else if(y(e))b++,Y(e,Z0,N0,{end:G0});else throw new A("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],e);e=Z0}else if(Y0(Z0)){if(o(e))b++,X(K(e),Z0,N0,{end:G0});else if(u(e)||y(e))b++,X(e,Z0,N0,{end:G0});else if(V0(e))b++,X(e.readable,Z0,N0,{end:G0});else throw new A("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],e);e=Z0}else e=S.from(Z0)}if(O0!==null&&O0!==void 0&&O0.aborted||h!==null&&h!==void 0&&h.aborted)W.nextTick(g0);return e}function T(B,c,l,{end:s}){let O0=!1;if(c.on("close",()=>{if(!O0)l(new j)}),B.pipe(c,{end:!1}),s){let d=function(){O0=!0,c.end()};var h=d;if(a(B))W.nextTick(d);else B.once("end",d)}else l();return P(B,{readable:!0,writable:!1},(d)=>{let g0=B._readableState;if(d&&d.code==="ERR_STREAM_PREMATURE_CLOSE"&&g0&&g0.ended&&!g0.errored&&!g0.errorEmitted)B.once("end",l).once("error",l);else l(d)}),P(c,{readable:!1,writable:!0},l)}G.exports={pipelineImpl:v,pipeline:O}}),HZ=d0((E,G)=>{var{pipeline:W}=YI(),C=hU(),{destroyer:H}=OX(),{isNodeStream:z,isReadable:V,isWritable:P,isWebStream:k,isTransformStream:R,isWritableStream:S,isReadableStream:D}=uU(),{AbortError:A,codes:{ERR_INVALID_ARG_VALUE:L,ERR_MISSING_ARGS:M}}=MU(),q=nU();G.exports=function j(...x){if(x.length===0)throw new M("streams");if(x.length===1)return C.from(x[0]);let g=[...x];if(typeof x[0]==="function")x[0]=C.from(x[0]);if(typeof x[x.length-1]==="function"){let U=x.length-1;x[U]=C.from(x[U])}for(let U=0;U<x.length;++U){if(!z(x[U])&&!k(x[U]))continue;if(U<x.length-1&&!(V(x[U])||D(x[U])||R(x[U])))throw new L(`streams[${U}]`,g[U],"must be readable");if(U>0&&!(P(x[U])||S(x[U])||R(x[U])))throw new L(`streams[${U}]`,g[U],"must be writable")}let N,y,f,o,r;function V0(U){let Z=o;if(o=null,Z)Z(U);else if(U)r.destroy(U);else if(!F&&!a)r.destroy()}let Y0=x[0],u=W(x,V0),a=!!(P(Y0)||S(Y0)||R(Y0)),F=!!(V(u)||D(u)||R(u));if(r=new C({writableObjectMode:!!(Y0!==null&&Y0!==void 0&&Y0.writableObjectMode),readableObjectMode:!!(u!==null&&u!==void 0&&u.readableObjectMode),writable:a,readable:F}),a){if(z(Y0))r._write=function(Z,Q,I){if(Y0.write(Z,Q))I();else N=I},r._final=function(Z){Y0.end(),y=Z},Y0.on("drain",function(){if(N){let Z=N;N=null,Z()}});else if(k(Y0)){let Z=(R(Y0)?Y0.writable:Y0).getWriter();r._write=async function(Q,I,$){try{await Z.ready,Z.write(Q).catch(()=>{}),$()}catch(K){$(K)}},r._final=async function(Q){try{await Z.ready,Z.close().catch(()=>{}),y=Q}catch(I){Q(I)}}}let U=R(u)?u.readable:u;q(U,()=>{if(y){let Z=y;y=null,Z()}})}if(F){if(z(u))u.on("readable",function(){if(f){let U=f;f=null,U()}}),u.on("end",function(){r.push(null)}),r._read=function(){while(!0){let U=u.read();if(U===null){f=r._read;return}if(!r.push(U))return}};else if(k(u)){let U=(R(u)?u.readable:u).getReader();r._read=async function(){while(!0)try{let{value:Z,done:Q}=await U.read();if(!r.push(Z))return;if(Q){r.push(null);return}}catch{return}}}}return r._destroy=function(U,Z){if(!U&&o!==null)U=new A;if(f=null,N=null,y=null,o===null)Z(U);else if(o=Z,z(u))H(u,U)},r}}),c$=d0((E,G)=>{var W=globalThis.AbortController||HX().AbortController,{codes:{ERR_INVALID_ARG_VALUE:C,ERR_INVALID_ARG_TYPE:H,ERR_MISSING_ARGS:z,ERR_OUT_OF_RANGE:V},AbortError:P}=MU(),{validateAbortSignal:k,validateInteger:R,validateObject:S}=AX(),D=s0().Symbol("kWeak"),A=s0().Symbol("kResistStopPropagation"),{finished:L}=nU(),M=HZ(),{addAbortSignalNoValidate:q}=jX(),{isWritable:j,isNodeStream:x}=uU(),{deprecate:g}=SU(),{ArrayPrototypePush:N,Boolean:y,MathFloor:f,Number:o,NumberIsNaN:r,Promise:V0,PromiseReject:Y0,PromiseResolve:u,PromisePrototypeThen:a,Symbol:F}=s0(),U=F("kEmpty"),Z=F("kEof");function Q(h,d){if(d!=null)S(d,"options");if((d===null||d===void 0?void 0:d.signal)!=null)k(d.signal,"options.signal");if(x(h)&&!j(h))throw new C("stream",h,"must be writable");let g0=M(this,h);if(d!==null&&d!==void 0&&d.signal)q(d.signal,g0);return g0}function I(h,d){if(typeof h!=="function")throw new H("fn",["Function","AsyncFunction"],h);if(d!=null)S(d,"options");if((d===null||d===void 0?void 0:d.signal)!=null)k(d.signal,"options.signal");let g0=1;if((d===null||d===void 0?void 0:d.concurrency)!=null)g0=f(d.concurrency);let Q0=g0-1;if((d===null||d===void 0?void 0:d.highWaterMark)!=null)Q0=f(d.highWaterMark);return R(g0,"options.concurrency",1),R(Q0,"options.highWaterMark",0),Q0+=g0,async function*$0(){let m=SU().AbortSignalAny([d===null||d===void 0?void 0:d.signal].filter(y)),p=this,b=[],N0={signal:m},i,e,t=!1,n=0;function X0(){t=!0,H0()}function H0(){n-=1,Z0()}function Z0(){if(e&&!t&&n<g0&&b.length<Q0)e(),e=null}async function W0(){try{for await(let c0 of p){if(t)return;if(m.aborted)throw new P;try{if(c0=h(c0,N0),c0===U)continue;c0=u(c0)}catch(G0){c0=Y0(G0)}if(n+=1,a(c0,H0,X0),b.push(c0),i)i(),i=null;if(!t&&(b.length>=Q0||n>=g0))await new V0((G0)=>{e=G0})}b.push(Z)}catch(c0){let G0=Y0(c0);a(G0,H0,X0),b.push(G0)}finally{if(t=!0,i)i(),i=null}}W0();try{while(!0){while(b.length>0){let c0=await b[0];if(c0===Z)return;if(m.aborted)throw new P;if(c0!==U)yield c0;b.shift(),Z0()}await new V0((c0)=>{i=c0})}}finally{if(t=!0,e)e(),e=null}}.call(this)}function $(h=void 0){if(h!=null)S(h,"options");if((h===null||h===void 0?void 0:h.signal)!=null)k(h.signal,"options.signal");return async function*d(){let g0=0;for await(let $0 of this){var Q0;if(h!==null&&h!==void 0&&(Q0=h.signal)!==null&&Q0!==void 0&&Q0.aborted)throw new P({cause:h.signal.reason});yield[g0++,$0]}}.call(this)}async function K(h,d=void 0){for await(let g0 of O.call(this,h,d))return!0;return!1}async function J(h,d=void 0){if(typeof h!=="function")throw new H("fn",["Function","AsyncFunction"],h);return!await K.call(this,async(...g0)=>{return!await h(...g0)},d)}async function Y(h,d){for await(let g0 of O.call(this,h,d))return g0;return}async function X(h,d){if(typeof h!=="function")throw new H("fn",["Function","AsyncFunction"],h);async function g0(Q0,$0){return await h(Q0,$0),U}for await(let Q0 of I.call(this,g0,d));}function O(h,d){if(typeof h!=="function")throw new H("fn",["Function","AsyncFunction"],h);async function g0(Q0,$0){if(await h(Q0,$0))return Q0;return U}return I.call(this,g0,d)}class v extends z{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}}async function T(h,d,g0){var Q0;if(typeof h!=="function")throw new H("reducer",["Function","AsyncFunction"],h);if(g0!=null)S(g0,"options");if((g0===null||g0===void 0?void 0:g0.signal)!=null)k(g0.signal,"options.signal");let $0=arguments.length>1;if(g0!==null&&g0!==void 0&&(Q0=g0.signal)!==null&&Q0!==void 0&&Q0.aborted){let i=new P(void 0,{cause:g0.signal.reason});throw this.once("error",()=>{}),await L(this.destroy(i)),i}let m=new W,p=m.signal;if(g0!==null&&g0!==void 0&&g0.signal){let i={once:!0,[D]:this,[A]:!0};g0.signal.addEventListener("abort",()=>m.abort(),i)}let b=!1;try{for await(let i of this){var N0;if(b=!0,g0!==null&&g0!==void 0&&(N0=g0.signal)!==null&&N0!==void 0&&N0.aborted)throw new P;if(!$0)d=i,$0=!0;else d=await h(d,i,{signal:p})}if(!b&&!$0)throw new v}finally{m.abort()}return d}async function B(h){if(h!=null)S(h,"options");if((h===null||h===void 0?void 0:h.signal)!=null)k(h.signal,"options.signal");let d=[];for await(let Q0 of this){var g0;if(h!==null&&h!==void 0&&(g0=h.signal)!==null&&g0!==void 0&&g0.aborted)throw new P(void 0,{cause:h.signal.reason});N(d,Q0)}return d}function c(h,d){let g0=I.call(this,h,d);return async function*Q0(){for await(let $0 of g0)yield*$0}.call(this)}function l(h){if(h=o(h),r(h))return 0;if(h<0)throw new V("number",">= 0",h);return h}function s(h,d=void 0){if(d!=null)S(d,"options");if((d===null||d===void 0?void 0:d.signal)!=null)k(d.signal,"options.signal");return h=l(h),async function*g0(){var Q0;if(d!==null&&d!==void 0&&(Q0=d.signal)!==null&&Q0!==void 0&&Q0.aborted)throw new P;for await(let m of this){var $0;if(d!==null&&d!==void 0&&($0=d.signal)!==null&&$0!==void 0&&$0.aborted)throw new P;if(h--<=0)yield m}}.call(this)}function O0(h,d=void 0){if(d!=null)S(d,"options");if((d===null||d===void 0?void 0:d.signal)!=null)k(d.signal,"options.signal");return h=l(h),async function*g0(){var Q0;if(d!==null&&d!==void 0&&(Q0=d.signal)!==null&&Q0!==void 0&&Q0.aborted)throw new P;for await(let m of this){var $0;if(d!==null&&d!==void 0&&($0=d.signal)!==null&&$0!==void 0&&$0.aborted)throw new P;if(h-- >0)yield m;if(h<=0)return}}.call(this)}E.streamReturningOperators={asIndexedPairs:g($,"readable.asIndexedPairs will be removed in a future version."),drop:s,filter:O,flatMap:c,map:I,take:O0,compose:Q},E.promiseReturningOperators={every:J,forEach:X,reduce:T,toArray:B,some:K,find:Y}}),AZ=d0((E,G)=>{var{ArrayPrototypePop:W,Promise:C}=s0(),{isIterable:H,isNodeStream:z,isWebStream:V}=uU(),{pipelineImpl:P}=YI(),{finished:k}=nU();EZ();function R(...S){return new C((D,A)=>{let L,M,q=S[S.length-1];if(q&&typeof q==="object"&&!z(q)&&!H(q)&&!V(q)){let j=W(S);L=j.signal,M=j.end}P(S,(j,x)=>{if(j)A(j);else D(x)},{signal:L,end:M})})}G.exports={finished:k,pipeline:R}}),EZ=d0((E,G)=>{var{Buffer:W}=(HU(),y0(FU)),{ObjectDefineProperty:C,ObjectKeys:H,ReflectApply:z}=s0(),{promisify:{custom:V}}=SU(),{streamReturningOperators:P,promiseReturningOperators:k}=c$(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:R}}=MU(),S=HZ(),{setDefaultHighWaterMark:D,getDefaultHighWaterMark:A}=BX(),{pipeline:L}=YI(),{destroyer:M}=OX(),q=nU(),j=AZ(),x=uU(),g=G.exports=QI().Stream;g.isDestroyed=x.isDestroyed,g.isDisturbed=x.isDisturbed,g.isErrored=x.isErrored,g.isReadable=x.isReadable,g.isWritable=x.isWritable,g.Readable=xX();for(let y of H(P)){let f=function(...r){if(new.target)throw R();return g.Readable.from(z(o,this,r))},o=P[y];C(f,"name",{__proto__:null,value:o.name}),C(f,"length",{__proto__:null,value:o.length}),C(g.Readable.prototype,y,{__proto__:null,value:f,enumerable:!1,configurable:!0,writable:!0})}for(let y of H(k)){let f=function(...r){if(new.target)throw R();return z(o,this,r)},o=k[y];C(f,"name",{__proto__:null,value:o.name}),C(f,"length",{__proto__:null,value:o.length}),C(g.Readable.prototype,y,{__proto__:null,value:f,enumerable:!1,configurable:!0,writable:!0})}g.Writable=$I(),g.Duplex=hU(),g.Transform=JZ(),g.PassThrough=FZ(),g.pipeline=L;var{addAbortSignal:N}=jX();g.addAbortSignal=N,g.finished=q,g.destroy=M,g.compose=S,g.setDefaultHighWaterMark=D,g.getDefaultHighWaterMark=A,C(g,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return j}}),C(L,V,{__proto__:null,enumerable:!0,get(){return j.pipeline}}),C(q,V,{__proto__:null,enumerable:!0,get(){return j.finished}}),g.Stream=g,g._isUint8Array=function y(f){return f instanceof Uint8Array},g._uint8ArrayToBuffer=function y(f){return W.from(f.buffer,f.byteOffset,f.byteLength)}}),p$=d0((E,G)=>{var W=(OI(),y0(VI));if(W&&process.env.READABLE_STREAM==="disable"){let C=W.promises;G.exports._uint8ArrayToBuffer=W._uint8ArrayToBuffer,G.exports._isUint8Array=W._isUint8Array,G.exports.isDisturbed=W.isDisturbed,G.exports.isErrored=W.isErrored,G.exports.isReadable=W.isReadable,G.exports.Readable=W.Readable,G.exports.Writable=W.Writable,G.exports.Duplex=W.Duplex,G.exports.Transform=W.Transform,G.exports.PassThrough=W.PassThrough,G.exports.addAbortSignal=W.addAbortSignal,G.exports.finished=W.finished,G.exports.destroy=W.destroy,G.exports.pipeline=W.pipeline,G.exports.compose=W.compose,Object.defineProperty(W,"promises",{configurable:!0,enumerable:!0,get(){return C}}),G.exports.Stream=W.Stream}else{let C=EZ(),H=AZ(),z=C.Readable.destroy;G.exports=C.Readable,G.exports._uint8ArrayToBuffer=C._uint8ArrayToBuffer,G.exports._isUint8Array=C._isUint8Array,G.exports.isDisturbed=C.isDisturbed,G.exports.isErrored=C.isErrored,G.exports.isReadable=C.isReadable,G.exports.Readable=C.Readable,G.exports.Writable=C.Writable,G.exports.Duplex=C.Duplex,G.exports.Transform=C.Transform,G.exports.PassThrough=C.PassThrough,G.exports.addAbortSignal=C.addAbortSignal,G.exports.finished=C.finished,G.exports.destroy=C.destroy,G.exports.destroy=z,G.exports.pipeline=C.pipeline,G.exports.compose=C.compose,Object.defineProperty(C,"promises",{configurable:!0,enumerable:!0,get(){return H}}),G.exports.Stream=C.Stream}G.exports.default=G.exports}),m0=g$(p$(),1),h$=m0.default.ReadableState,u$=m0.default._fromList,l$=m0.default.from,d$=m0.default.fromWeb,b$=m0.default.toWeb,o$=m0.default.wrap,n$=m0.default._uint8ArrayToBuffer,s$=m0.default._isUint8Array,m$=m0.default.isDisturbed,t$=m0.default.isErrored,r$=m0.default.isReadable,a$=m0.default.Readable,e$=m0.default.Writable,i$=m0.default.Duplex,UY=m0.default.Transform,XY=m0.default.PassThrough,IY=m0.default.addAbortSignal,ZY=m0.default.finished,QY=m0.default.destroy,$Y=m0.default.pipeline,YY=m0.default.compose,VY=m0.default.Stream,OY=m0.default});var kU={};IX(kU,{webcrypto:()=>aV,rng:()=>FV,randomUUID:()=>mV,randomFillSync:()=>dV,randomFill:()=>lV,randomBytes:()=>wX,publicEncrypt:()=>cV,publicDecrypt:()=>hV,pseudoRandomBytes:()=>JV,prng:()=>WV,privateEncrypt:()=>pV,privateDecrypt:()=>uV,pbkdf2Sync:()=>DV,pbkdf2:()=>EI,listCiphers:()=>vV,getRandomValues:()=>sV,getHashes:()=>TV,getDiffieHellman:()=>BV,getCurves:()=>rV,getCiphers:()=>qV,createVerify:()=>wV,createSign:()=>NV,createHmac:()=>CV,createHash:()=>AV,createECDH:()=>fV,createDiffieHellmanGroup:()=>jV,createDiffieHellman:()=>xV,createDecipheriv:()=>TI,createDecipher:()=>SV,createCredentials:()=>bV,createCipheriv:()=>CI,createCipher:()=>zV,constants:()=>oV,Verify:()=>yV,Sign:()=>_V,Hmac:()=>EV,Hash:()=>HV,DiffieHellmanGroup:()=>kV,DiffieHellman:()=>gV,Decipheriv:()=>PV,Decipher:()=>RV,DEFAULT_ENCODING:()=>nV,Cipheriv:()=>MV,Cipher:()=>LV});function rV(){return tV}var GY,KY,CZ,WY,JY,FY=(E,G,W)=>{W=E!=null?GY(KY(E)):{};let C=G||!E||!E.__esModule?CZ(W,"default",{value:E,enumerable:!0}):W;for(let H of WY(E))if(!JY.call(C,H))CZ(C,H,{get:()=>E[H],enumerable:!0});return C},w0=(E,G)=>()=>(G||E((G={exports:{}}).exports,G),G.exports),gX,NX,DZ,HY,KI,WI,PU,JI,LZ,AY,zZ,EY,CY,TY,DY,lU,sU,MZ,BU,RZ,_X,LY,vU,zY,MY,RY,SZ,yU,CX,PZ,SY,qZ,PY,vZ,qY,vY,kY,jY,FI,BY,HI,xY,gY,NY,_Y,wY,yY,fY,cY,pY,hY,uY,lY,dY,bY,TZ,oY,EX,nY,kZ,jZ,sY,mY,BZ,tY,rY,TX,aY,eY,iY,UV,XV,IV,xZ,ZV,gZ,NZ,_Z,AI,wZ,QV,yZ,$V,YV,GI,VV,OV,GV,KV,h0,WV,JV,FV,wX,HV,AV,EV,CV,TV,EI,DV,LV,zV,MV,CI,RV,SV,PV,TI,qV,vV,kV,jV,BV,xV,gV,NV,_V,wV,yV,fV,cV,pV,hV,uV,lV,dV,bV,oV,nV="buffer",sV=(E)=>{return crypto.getRandomValues(E)},mV=()=>{return crypto.randomUUID()},tV,aV;var qU=ZX(()=>{GY=Object.create,{getPrototypeOf:KY,defineProperty:CZ,getOwnPropertyNames:WY}=Object,JY=Object.prototype.hasOwnProperty,gX=w0((E,G)=>{G.exports=(qU(),y0(kU)).randomBytes}),NX=w0((E,G)=>{G.exports=(qU(),y0(kU)).createHash}),DZ=w0((E,G)=>{G.exports=(qU(),y0(kU)).createHmac}),HY=w0((E,G)=>{G.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}}),KI=w0((E,G)=>{var W=Math.pow(2,30)-1;G.exports=function(C,H){if(typeof C!=="number")throw new TypeError("Iterations not a number");if(C<0)throw new TypeError("Bad iterations");if(typeof H!=="number")throw new TypeError("Key length not a number");if(H<0||H>W||H!==H)throw new TypeError("Bad key length")}}),WI=w0((E,G)=>{var W;if((gU(),y0(xU))&&(gU(),y0(xU)).browser)W="utf-8";else if((gU(),y0(xU))&&(gU(),y0(xU)).version)C=parseInt(process.version.split(".")[0].slice(1),10),W=C>=6?"utf-8":"binary";else W="utf-8";var C;G.exports=W}),PU=w0((E,G)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var W=(HU(),y0(FU)),C=W.Buffer;function H(V,P){for(var k in V)P[k]=V[k]}if(C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow)G.exports=W;else H(W,E),E.Buffer=z;function z(V,P,k){return C(V,P,k)}z.prototype=Object.create(C.prototype),H(C,z),z.from=function(V,P,k){if(typeof V==="number")throw new TypeError("Argument must not be a number");return C(V,P,k)},z.alloc=function(V,P,k){if(typeof V!=="number")throw new TypeError("Argument must be a number");var R=C(V);if(P!==void 0)if(typeof k==="string")R.fill(P,k);else R.fill(P);else R.fill(0);return R},z.allocUnsafe=function(V){if(typeof V!=="number")throw new TypeError("Argument must be a number");return C(V)},z.allocUnsafeSlow=function(V){if(typeof V!=="number")throw new TypeError("Argument must be a number");return W.SlowBuffer(V)}}),JI=w0((E,G)=>{var W=PU().Buffer;G.exports=function(C,H,z){if(W.isBuffer(C))return C;else if(typeof C==="string")return W.from(C,H);else if(ArrayBuffer.isView(C))return W.from(C.buffer);else throw new TypeError(z+" must be a string, a Buffer, a typed array or a DataView")}}),LZ=w0((E,G)=>{var W={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20},C=DZ(),H=PU().Buffer,z=KI(),V=WI(),P=JI();function k(R,S,D,A,L){z(D,A),R=P(R,V,"Password"),S=P(S,V,"Salt"),L=L||"sha1";var M=H.allocUnsafe(A),q=H.allocUnsafe(S.length+4);S.copy(q,0,0,S.length);var j=0,x=W[L],g=Math.ceil(A/x);for(var N=1;N<=g;N++){q.writeUInt32BE(N,S.length);var y=C(L,R).update(q).digest(),f=y;for(var o=1;o<D;o++){f=C(L,R).update(f).digest();for(var r=0;r<x;r++)y[r]^=f[r]}y.copy(M,j),j+=x}return M}G.exports=k}),AY=w0((E,G)=>{var W=PU().Buffer,C=KI(),H=WI(),z=LZ(),V=JI(),P,k=global.crypto&&global.crypto.subtle,R={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},S=[];function D(j){if((gU(),y0(xU))&&!(gU(),y0(xU)).browser)return Promise.resolve(!1);if(!k||!k.importKey||!k.deriveBits)return Promise.resolve(!1);if(S[j]!==void 0)return S[j];P=P||W.alloc(8);var x=M(P,P,10,128,j).then(function(){return!0}).catch(function(){return!1});return S[j]=x,x}var A;function L(){if(A)return A;if((gU(),y0(xU))&&(gU(),y0(xU)).nextTick)A=(gU(),y0(xU)).nextTick;else if(global.queueMicrotask)A=global.queueMicrotask;else if(global.setImmediate)A=global.setImmediate;else A=global.setTimeout;return A}function M(j,x,g,N,y){return k.importKey("raw",j,{name:"PBKDF2"},!1,["deriveBits"]).then(function(f){return k.deriveBits({name:"PBKDF2",salt:x,iterations:g,hash:{name:y}},f,N<<3)}).then(function(f){return W.from(f)})}function q(j,x){j.then(function(g){L()(function(){x(null,g)})},function(g){L()(function(){x(g)})})}G.exports=function(j,x,g,N,y,f){if(typeof y==="function")f=y,y=void 0;y=y||"sha1";var o=R[y.toLowerCase()];if(!o||typeof global.Promise!=="function"){L()(function(){var r;try{r=z(j,x,g,N,y)}catch(V0){return f(V0)}f(null,r)});return}if(C(g,N),j=V(j,H,"Password"),x=V(x,H,"Salt"),typeof f!=="function")throw new Error("No callback provided to pbkdf2");q(D(o).then(function(r){if(r)return M(j,x,g,N,o);return z(j,x,g,N,y)}),f)}}),zZ=w0((E)=>{var G=(qU(),y0(kU)),W=KI(),C=WI(),H=JI();function z(P,k,R,S,D,A){if(W(R,S),P=H(P,C,"Password"),k=H(k,C,"Salt"),typeof D==="function")A=D,D="sha1";if(typeof A!=="function")throw new Error("No callback provided to pbkdf2");return G.pbkdf2(P,k,R,S,D,A)}function V(P,k,R,S,D){return W(R,S),P=H(P,C,"Password"),k=H(k,C,"Salt"),D=D||"sha1",G.pbkdf2Sync(P,k,R,S,D)}if(!G.pbkdf2Sync||G.pbkdf2Sync.toString().indexOf("keylen, digest")===-1)E.pbkdf2Sync=LZ(),E.pbkdf2=AY();else E.pbkdf2Sync=V,E.pbkdf2=z}),EY=w0((E)=>{var G=(qU(),y0(kU));E.createCipher=E.Cipher=G.createCipher,E.createCipheriv=E.Cipheriv=G.createCipheriv,E.createDecipher=E.Decipher=G.createDecipher,E.createDecipheriv=E.Decipheriv=G.createDecipheriv,E.listCiphers=E.getCiphers=G.getCiphers}),CY=w0((E)=>{var G=(qU(),y0(kU));E.DiffieHellmanGroup=G.DiffieHellmanGroup,E.createDiffieHellmanGroup=G.createDiffieHellmanGroup,E.getDiffieHellman=G.getDiffieHellman,E.createDiffieHellman=G.createDiffieHellman,E.DiffieHellman=G.DiffieHellman}),TY=w0((E)=>{var G=(qU(),y0(kU));E.createSign=G.createSign,E.Sign=G.Sign,E.createVerify=G.createVerify,E.Verify=G.Verify}),DY=w0((E,G)=>{G.exports={name:"elliptic",version:"6.6.1",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}}),lU=w0((E,G)=>{(function(W,C){function H(F,U){if(!F)throw new Error(U||"Assertion failed")}function z(F,U){F.super_=U;var Z=function(){};Z.prototype=U.prototype,F.prototype=new Z,F.prototype.constructor=F}function V(F,U,Z){if(V.isBN(F))return F;if(this.negative=0,this.words=null,this.length=0,this.red=null,F!==null){if(U==="le"||U==="be")Z=U,U=10;this._init(F||0,U||10,Z||"be")}}if(typeof W==="object")W.exports=V;else C.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined")P=window.Buffer;else P=(HU(),y0(FU)).Buffer}catch(F){}V.isBN=function F(U){if(U instanceof V)return!0;return U!==null&&typeof U==="object"&&U.constructor.wordSize===V.wordSize&&Array.isArray(U.words)},V.max=function F(U,Z){if(U.cmp(Z)>0)return U;return Z},V.min=function F(U,Z){if(U.cmp(Z)<0)return U;return Z},V.prototype._init=function F(U,Z,Q){if(typeof U==="number")return this._initNumber(U,Z,Q);if(typeof U==="object")return this._initArray(U,Z,Q);if(Z==="hex")Z=16;H(Z===(Z|0)&&Z>=2&&Z<=36),U=U.toString().replace(/\s+/g,"");var I=0;if(U[0]==="-")I++,this.negative=1;if(I<U.length){if(Z===16)this._parseHex(U,I,Q);else if(this._parseBase(U,Z,I),Q==="le")this._initArray(this.toArray(),Z,Q)}},V.prototype._initNumber=function F(U,Z,Q){if(U<0)this.negative=1,U=-U;if(U<67108864)this.words=[U&67108863],this.length=1;else if(U<4503599627370496)this.words=[U&67108863,U/67108864&67108863],this.length=2;else H(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3;if(Q!=="le")return;this._initArray(this.toArray(),Z,Q)},V.prototype._initArray=function F(U,Z,Q){if(H(typeof U.length==="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var $,K,J=0;if(Q==="be"){for(I=U.length-1,$=0;I>=0;I-=3)if(K=U[I]|U[I-1]<<8|U[I-2]<<16,this.words[$]|=K<<J&67108863,this.words[$+1]=K>>>26-J&67108863,J+=24,J>=26)J-=26,$++}else if(Q==="le"){for(I=0,$=0;I<U.length;I+=3)if(K=U[I]|U[I+1]<<8|U[I+2]<<16,this.words[$]|=K<<J&67108863,this.words[$+1]=K>>>26-J&67108863,J+=24,J>=26)J-=26,$++}return this.strip()};function k(F,U){var Z=F.charCodeAt(U);if(Z>=65&&Z<=70)return Z-55;else if(Z>=97&&Z<=102)return Z-87;else return Z-48&15}function R(F,U,Z){var Q=k(F,Z);if(Z-1>=U)Q|=k(F,Z-1)<<4;return Q}V.prototype._parseHex=function F(U,Z,Q){this.length=Math.ceil((U.length-Z)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var $=0,K=0,J;if(Q==="be")for(I=U.length-1;I>=Z;I-=2)if(J=R(U,Z,I)<<$,this.words[K]|=J&67108863,$>=18)$-=18,K+=1,this.words[K]|=J>>>26;else $+=8;else{var Y=U.length-Z;for(I=Y%2===0?Z+1:Z;I<U.length;I+=2)if(J=R(U,Z,I)<<$,this.words[K]|=J&67108863,$>=18)$-=18,K+=1,this.words[K]|=J>>>26;else $+=8}this.strip()};function S(F,U,Z,Q){var I=0,$=Math.min(F.length,Z);for(var K=U;K<$;K++){var J=F.charCodeAt(K)-48;if(I*=Q,J>=49)I+=J-49+10;else if(J>=17)I+=J-17+10;else I+=J}return I}V.prototype._parseBase=function F(U,Z,Q){this.words=[0],this.length=1;for(var I=0,$=1;$<=67108863;$*=Z)I++;I--,$=$/Z|0;var K=U.length-Q,J=K%I,Y=Math.min(K,K-J)+Q,X=0;for(var O=Q;O<Y;O+=I)if(X=S(U,O,O+I,Z),this.imuln($),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(J!==0){var v=1;X=S(U,O,U.length,Z);for(O=0;O<J;O++)v*=Z;if(this.imuln(v),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},V.prototype.copy=function F(U){U.words=new Array(this.length);for(var Z=0;Z<this.length;Z++)U.words[Z]=this.words[Z];U.length=this.length,U.negative=this.negative,U.red=this.red},V.prototype.clone=function F(){var U=new V(null);return this.copy(U),U},V.prototype._expand=function F(U){while(this.length<U)this.words[this.length++]=0;return this},V.prototype.strip=function F(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function F(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},V.prototype.inspect=function F(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var D=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function F(U,Z){U=U||10,Z=Z|0||1;var Q;if(U===16||U==="hex"){Q="";var I=0,$=0;for(var K=0;K<this.length;K++){var J=this.words[K],Y=((J<<I|$)&16777215).toString(16);if($=J>>>24-I&16777215,I+=2,I>=26)I-=26,K--;if($!==0||K!==this.length-1)Q=D[6-Y.length]+Y+Q;else Q=Y+Q}if($!==0)Q=$.toString(16)+Q;while(Q.length%Z!==0)Q="0"+Q;if(this.negative!==0)Q="-"+Q;return Q}if(U===(U|0)&&U>=2&&U<=36){var X=A[U],O=L[U];Q="";var v=this.clone();v.negative=0;while(!v.isZero()){var T=v.modn(O).toString(U);if(v=v.idivn(O),!v.isZero())Q=D[X-T.length]+T+Q;else Q=T+Q}if(this.isZero())Q="0"+Q;while(Q.length%Z!==0)Q="0"+Q;if(this.negative!==0)Q="-"+Q;return Q}H(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function F(){var U=this.words[0];if(this.length===2)U+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)U+=4503599627370496+this.words[1]*67108864;else if(this.length>2)H(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-U:U},V.prototype.toJSON=function F(){return this.toString(16)},V.prototype.toBuffer=function F(U,Z){return H(typeof P!=="undefined"),this.toArrayLike(P,U,Z)},V.prototype.toArray=function F(U,Z){return this.toArrayLike(Array,U,Z)},V.prototype.toArrayLike=function F(U,Z,Q){var I=this.byteLength(),$=Q||Math.max(1,I);H(I<=$,"byte array longer than desired length"),H($>0,"Requested array length <= 0"),this.strip();var K=Z==="le",J=new U($),Y,X,O=this.clone();if(!K){for(X=0;X<$-I;X++)J[X]=0;for(X=0;!O.isZero();X++)Y=O.andln(255),O.iushrn(8),J[$-X-1]=Y}else{for(X=0;!O.isZero();X++)Y=O.andln(255),O.iushrn(8),J[X]=Y;for(;X<$;X++)J[X]=0}return J},Math.clz32)V.prototype._countBits=function F(U){return 32-Math.clz32(U)};else V.prototype._countBits=function F(U){var Z=U,Q=0;if(Z>=4096)Q+=13,Z>>>=13;if(Z>=64)Q+=7,Z>>>=7;if(Z>=8)Q+=4,Z>>>=4;if(Z>=2)Q+=2,Z>>>=2;return Q+Z};V.prototype._zeroBits=function F(U){if(U===0)return 26;var Z=U,Q=0;if((Z&8191)===0)Q+=13,Z>>>=13;if((Z&127)===0)Q+=7,Z>>>=7;if((Z&15)===0)Q+=4,Z>>>=4;if((Z&3)===0)Q+=2,Z>>>=2;if((Z&1)===0)Q++;return Q},V.prototype.bitLength=function F(){var U=this.words[this.length-1],Z=this._countBits(U);return(this.length-1)*26+Z};function M(F){var U=new Array(F.bitLength());for(var Z=0;Z<U.length;Z++){var Q=Z/26|0,I=Z%26;U[Z]=(F.words[Q]&1<<I)>>>I}return U}V.prototype.zeroBits=function F(){if(this.isZero())return 0;var U=0;for(var Z=0;Z<this.length;Z++){var Q=this._zeroBits(this.words[Z]);if(U+=Q,Q!==26)break}return U},V.prototype.byteLength=function F(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function F(U){if(this.negative!==0)return this.abs().inotn(U).iaddn(1);return this.clone()},V.prototype.fromTwos=function F(U){if(this.testn(U-1))return this.notn(U).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function F(){return this.negative!==0},V.prototype.neg=function F(){return this.clone().ineg()},V.prototype.ineg=function F(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function F(U){while(this.length<U.length)this.words[this.length++]=0;for(var Z=0;Z<U.length;Z++)this.words[Z]=this.words[Z]|U.words[Z];return this.strip()},V.prototype.ior=function F(U){return H((this.negative|U.negative)===0),this.iuor(U)},V.prototype.or=function F(U){if(this.length>U.length)return this.clone().ior(U);return U.clone().ior(this)},V.prototype.uor=function F(U){if(this.length>U.length)return this.clone().iuor(U);return U.clone().iuor(this)},V.prototype.iuand=function F(U){var Z;if(this.length>U.length)Z=U;else Z=this;for(var Q=0;Q<Z.length;Q++)this.words[Q]=this.words[Q]&U.words[Q];return this.length=Z.length,this.strip()},V.prototype.iand=function F(U){return H((this.negative|U.negative)===0),this.iuand(U)},V.prototype.and=function F(U){if(this.length>U.length)return this.clone().iand(U);return U.clone().iand(this)},V.prototype.uand=function F(U){if(this.length>U.length)return this.clone().iuand(U);return U.clone().iuand(this)},V.prototype.iuxor=function F(U){var Z,Q;if(this.length>U.length)Z=this,Q=U;else Z=U,Q=this;for(var I=0;I<Q.length;I++)this.words[I]=Z.words[I]^Q.words[I];if(this!==Z)for(;I<Z.length;I++)this.words[I]=Z.words[I];return this.length=Z.length,this.strip()},V.prototype.ixor=function F(U){return H((this.negative|U.negative)===0),this.iuxor(U)},V.prototype.xor=function F(U){if(this.length>U.length)return this.clone().ixor(U);return U.clone().ixor(this)},V.prototype.uxor=function F(U){if(this.length>U.length)return this.clone().iuxor(U);return U.clone().iuxor(this)},V.prototype.inotn=function F(U){H(typeof U==="number"&&U>=0);var Z=Math.ceil(U/26)|0,Q=U%26;if(this._expand(Z),Q>0)Z--;for(var I=0;I<Z;I++)this.words[I]=~this.words[I]&67108863;if(Q>0)this.words[I]=~this.words[I]&67108863>>26-Q;return this.strip()},V.prototype.notn=function F(U){return this.clone().inotn(U)},V.prototype.setn=function F(U,Z){H(typeof U==="number"&&U>=0);var Q=U/26|0,I=U%26;if(this._expand(Q+1),Z)this.words[Q]=this.words[Q]|1<<I;else this.words[Q]=this.words[Q]&~(1<<I);return this.strip()},V.prototype.iadd=function F(U){var Z;if(this.negative!==0&&U.negative===0)return this.negative=0,Z=this.isub(U),this.negative^=1,this._normSign();else if(this.negative===0&&U.negative!==0)return U.negative=0,Z=this.isub(U),U.negative=1,Z._normSign();var Q,I;if(this.length>U.length)Q=this,I=U;else Q=U,I=this;var $=0;for(var K=0;K<I.length;K++)Z=(Q.words[K]|0)+(I.words[K]|0)+$,this.words[K]=Z&67108863,$=Z>>>26;for(;$!==0&&K<Q.length;K++)Z=(Q.words[K]|0)+$,this.words[K]=Z&67108863,$=Z>>>26;if(this.length=Q.length,$!==0)this.words[this.length]=$,this.length++;else if(Q!==this)for(;K<Q.length;K++)this.words[K]=Q.words[K];return this},V.prototype.add=function F(U){var Z;if(U.negative!==0&&this.negative===0)return U.negative=0,Z=this.sub(U),U.negative^=1,Z;else if(U.negative===0&&this.negative!==0)return this.negative=0,Z=U.sub(this),this.negative=1,Z;if(this.length>U.length)return this.clone().iadd(U);return U.clone().iadd(this)},V.prototype.isub=function F(U){if(U.negative!==0){U.negative=0;var Z=this.iadd(U);return U.negative=1,Z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var Q=this.cmp(U);if(Q===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,$;if(Q>0)I=this,$=U;else I=U,$=this;var K=0;for(var J=0;J<$.length;J++)Z=(I.words[J]|0)-($.words[J]|0)+K,K=Z>>26,this.words[J]=Z&67108863;for(;K!==0&&J<I.length;J++)Z=(I.words[J]|0)+K,K=Z>>26,this.words[J]=Z&67108863;if(K===0&&J<I.length&&I!==this)for(;J<I.length;J++)this.words[J]=I.words[J];if(this.length=Math.max(this.length,J),I!==this)this.negative=1;return this.strip()},V.prototype.sub=function F(U){return this.clone().isub(U)};function q(F,U,Z){Z.negative=U.negative^F.negative;var Q=F.length+U.length|0;Z.length=Q,Q=Q-1|0;var I=F.words[0]|0,$=U.words[0]|0,K=I*$,J=K&67108863,Y=K/67108864|0;Z.words[0]=J;for(var X=1;X<Q;X++){var O=Y>>>26,v=Y&67108863,T=Math.min(X,U.length-1);for(var B=Math.max(0,X-F.length+1);B<=T;B++){var c=X-B|0;I=F.words[c]|0,$=U.words[B]|0,K=I*$+v,O+=K/67108864|0,v=K&67108863}Z.words[X]=v|0,Y=O|0}if(Y!==0)Z.words[X]=Y|0;else Z.length--;return Z.strip()}var j=function F(U,Z,Q){var I=U.words,$=Z.words,K=Q.words,J=0,Y,X,O,v=I[0]|0,T=v&8191,B=v>>>13,c=I[1]|0,l=c&8191,s=c>>>13,O0=I[2]|0,h=O0&8191,d=O0>>>13,g0=I[3]|0,Q0=g0&8191,$0=g0>>>13,m=I[4]|0,p=m&8191,b=m>>>13,N0=I[5]|0,i=N0&8191,e=N0>>>13,t=I[6]|0,n=t&8191,X0=t>>>13,H0=I[7]|0,Z0=H0&8191,W0=H0>>>13,c0=I[8]|0,G0=c0&8191,A0=c0>>>13,u0=I[9]|0,J0=u0&8191,T0=u0>>>13,r0=$[0]|0,E0=r0&8191,v0=r0>>>13,AU=$[1]|0,k0=AU&8191,j0=AU>>>13,DU=$[2]|0,R0=DU&8191,S0=DU>>>13,LU=$[3]|0,P0=LU&8191,D0=LU>>>13,zU=$[4]|0,B0=zU&8191,L0=zU>>>13,EU=$[5]|0,_=EU&8191,w=EU>>>13,_0=$[6]|0,U0=_0&8191,I0=_0>>>13,l0=$[7]|0,F0=l0&8191,C0=l0>>>13,CU=$[8]|0,x0=CU&8191,q0=CU>>>13,TU=$[9]|0,z0=TU&8191,M0=TU>>>13;Q.negative=U.negative^Z.negative,Q.length=19,Y=Math.imul(T,E0),X=Math.imul(T,v0),X=X+Math.imul(B,E0)|0,O=Math.imul(B,v0);var t0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(t0>>>26)|0,t0&=67108863,Y=Math.imul(l,E0),X=Math.imul(l,v0),X=X+Math.imul(s,E0)|0,O=Math.imul(s,v0),Y=Y+Math.imul(T,k0)|0,X=X+Math.imul(T,j0)|0,X=X+Math.imul(B,k0)|0,O=O+Math.imul(B,j0)|0;var p0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(p0>>>26)|0,p0&=67108863,Y=Math.imul(h,E0),X=Math.imul(h,v0),X=X+Math.imul(d,E0)|0,O=Math.imul(d,v0),Y=Y+Math.imul(l,k0)|0,X=X+Math.imul(l,j0)|0,X=X+Math.imul(s,k0)|0,O=O+Math.imul(s,j0)|0,Y=Y+Math.imul(T,R0)|0,X=X+Math.imul(T,S0)|0,X=X+Math.imul(B,R0)|0,O=O+Math.imul(B,S0)|0;var f0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(f0>>>26)|0,f0&=67108863,Y=Math.imul(Q0,E0),X=Math.imul(Q0,v0),X=X+Math.imul($0,E0)|0,O=Math.imul($0,v0),Y=Y+Math.imul(h,k0)|0,X=X+Math.imul(h,j0)|0,X=X+Math.imul(d,k0)|0,O=O+Math.imul(d,j0)|0,Y=Y+Math.imul(l,R0)|0,X=X+Math.imul(l,S0)|0,X=X+Math.imul(s,R0)|0,O=O+Math.imul(s,S0)|0,Y=Y+Math.imul(T,P0)|0,X=X+Math.imul(T,D0)|0,X=X+Math.imul(B,P0)|0,O=O+Math.imul(B,D0)|0;var b0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(b0>>>26)|0,b0&=67108863,Y=Math.imul(p,E0),X=Math.imul(p,v0),X=X+Math.imul(b,E0)|0,O=Math.imul(b,v0),Y=Y+Math.imul(Q0,k0)|0,X=X+Math.imul(Q0,j0)|0,X=X+Math.imul($0,k0)|0,O=O+Math.imul($0,j0)|0,Y=Y+Math.imul(h,R0)|0,X=X+Math.imul(h,S0)|0,X=X+Math.imul(d,R0)|0,O=O+Math.imul(d,S0)|0,Y=Y+Math.imul(l,P0)|0,X=X+Math.imul(l,D0)|0,X=X+Math.imul(s,P0)|0,O=O+Math.imul(s,D0)|0,Y=Y+Math.imul(T,B0)|0,X=X+Math.imul(T,L0)|0,X=X+Math.imul(B,B0)|0,O=O+Math.imul(B,L0)|0;var a0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,Y=Math.imul(i,E0),X=Math.imul(i,v0),X=X+Math.imul(e,E0)|0,O=Math.imul(e,v0),Y=Y+Math.imul(p,k0)|0,X=X+Math.imul(p,j0)|0,X=X+Math.imul(b,k0)|0,O=O+Math.imul(b,j0)|0,Y=Y+Math.imul(Q0,R0)|0,X=X+Math.imul(Q0,S0)|0,X=X+Math.imul($0,R0)|0,O=O+Math.imul($0,S0)|0,Y=Y+Math.imul(h,P0)|0,X=X+Math.imul(h,D0)|0,X=X+Math.imul(d,P0)|0,O=O+Math.imul(d,D0)|0,Y=Y+Math.imul(l,B0)|0,X=X+Math.imul(l,L0)|0,X=X+Math.imul(s,B0)|0,O=O+Math.imul(s,L0)|0,Y=Y+Math.imul(T,_)|0,X=X+Math.imul(T,w)|0,X=X+Math.imul(B,_)|0,O=O+Math.imul(B,w)|0;var e0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,Y=Math.imul(n,E0),X=Math.imul(n,v0),X=X+Math.imul(X0,E0)|0,O=Math.imul(X0,v0),Y=Y+Math.imul(i,k0)|0,X=X+Math.imul(i,j0)|0,X=X+Math.imul(e,k0)|0,O=O+Math.imul(e,j0)|0,Y=Y+Math.imul(p,R0)|0,X=X+Math.imul(p,S0)|0,X=X+Math.imul(b,R0)|0,O=O+Math.imul(b,S0)|0,Y=Y+Math.imul(Q0,P0)|0,X=X+Math.imul(Q0,D0)|0,X=X+Math.imul($0,P0)|0,O=O+Math.imul($0,D0)|0,Y=Y+Math.imul(h,B0)|0,X=X+Math.imul(h,L0)|0,X=X+Math.imul(d,B0)|0,O=O+Math.imul(d,L0)|0,Y=Y+Math.imul(l,_)|0,X=X+Math.imul(l,w)|0,X=X+Math.imul(s,_)|0,O=O+Math.imul(s,w)|0,Y=Y+Math.imul(T,U0)|0,X=X+Math.imul(T,I0)|0,X=X+Math.imul(B,U0)|0,O=O+Math.imul(B,I0)|0;var i0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(i0>>>26)|0,i0&=67108863,Y=Math.imul(Z0,E0),X=Math.imul(Z0,v0),X=X+Math.imul(W0,E0)|0,O=Math.imul(W0,v0),Y=Y+Math.imul(n,k0)|0,X=X+Math.imul(n,j0)|0,X=X+Math.imul(X0,k0)|0,O=O+Math.imul(X0,j0)|0,Y=Y+Math.imul(i,R0)|0,X=X+Math.imul(i,S0)|0,X=X+Math.imul(e,R0)|0,O=O+Math.imul(e,S0)|0,Y=Y+Math.imul(p,P0)|0,X=X+Math.imul(p,D0)|0,X=X+Math.imul(b,P0)|0,O=O+Math.imul(b,D0)|0,Y=Y+Math.imul(Q0,B0)|0,X=X+Math.imul(Q0,L0)|0,X=X+Math.imul($0,B0)|0,O=O+Math.imul($0,L0)|0,Y=Y+Math.imul(h,_)|0,X=X+Math.imul(h,w)|0,X=X+Math.imul(d,_)|0,O=O+Math.imul(d,w)|0,Y=Y+Math.imul(l,U0)|0,X=X+Math.imul(l,I0)|0,X=X+Math.imul(s,U0)|0,O=O+Math.imul(s,I0)|0,Y=Y+Math.imul(T,F0)|0,X=X+Math.imul(T,C0)|0,X=X+Math.imul(B,F0)|0,O=O+Math.imul(B,C0)|0;var UU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(UU>>>26)|0,UU&=67108863,Y=Math.imul(G0,E0),X=Math.imul(G0,v0),X=X+Math.imul(A0,E0)|0,O=Math.imul(A0,v0),Y=Y+Math.imul(Z0,k0)|0,X=X+Math.imul(Z0,j0)|0,X=X+Math.imul(W0,k0)|0,O=O+Math.imul(W0,j0)|0,Y=Y+Math.imul(n,R0)|0,X=X+Math.imul(n,S0)|0,X=X+Math.imul(X0,R0)|0,O=O+Math.imul(X0,S0)|0,Y=Y+Math.imul(i,P0)|0,X=X+Math.imul(i,D0)|0,X=X+Math.imul(e,P0)|0,O=O+Math.imul(e,D0)|0,Y=Y+Math.imul(p,B0)|0,X=X+Math.imul(p,L0)|0,X=X+Math.imul(b,B0)|0,O=O+Math.imul(b,L0)|0,Y=Y+Math.imul(Q0,_)|0,X=X+Math.imul(Q0,w)|0,X=X+Math.imul($0,_)|0,O=O+Math.imul($0,w)|0,Y=Y+Math.imul(h,U0)|0,X=X+Math.imul(h,I0)|0,X=X+Math.imul(d,U0)|0,O=O+Math.imul(d,I0)|0,Y=Y+Math.imul(l,F0)|0,X=X+Math.imul(l,C0)|0,X=X+Math.imul(s,F0)|0,O=O+Math.imul(s,C0)|0,Y=Y+Math.imul(T,x0)|0,X=X+Math.imul(T,q0)|0,X=X+Math.imul(B,x0)|0,O=O+Math.imul(B,q0)|0;var XU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(XU>>>26)|0,XU&=67108863,Y=Math.imul(J0,E0),X=Math.imul(J0,v0),X=X+Math.imul(T0,E0)|0,O=Math.imul(T0,v0),Y=Y+Math.imul(G0,k0)|0,X=X+Math.imul(G0,j0)|0,X=X+Math.imul(A0,k0)|0,O=O+Math.imul(A0,j0)|0,Y=Y+Math.imul(Z0,R0)|0,X=X+Math.imul(Z0,S0)|0,X=X+Math.imul(W0,R0)|0,O=O+Math.imul(W0,S0)|0,Y=Y+Math.imul(n,P0)|0,X=X+Math.imul(n,D0)|0,X=X+Math.imul(X0,P0)|0,O=O+Math.imul(X0,D0)|0,Y=Y+Math.imul(i,B0)|0,X=X+Math.imul(i,L0)|0,X=X+Math.imul(e,B0)|0,O=O+Math.imul(e,L0)|0,Y=Y+Math.imul(p,_)|0,X=X+Math.imul(p,w)|0,X=X+Math.imul(b,_)|0,O=O+Math.imul(b,w)|0,Y=Y+Math.imul(Q0,U0)|0,X=X+Math.imul(Q0,I0)|0,X=X+Math.imul($0,U0)|0,O=O+Math.imul($0,I0)|0,Y=Y+Math.imul(h,F0)|0,X=X+Math.imul(h,C0)|0,X=X+Math.imul(d,F0)|0,O=O+Math.imul(d,C0)|0,Y=Y+Math.imul(l,x0)|0,X=X+Math.imul(l,q0)|0,X=X+Math.imul(s,x0)|0,O=O+Math.imul(s,q0)|0,Y=Y+Math.imul(T,z0)|0,X=X+Math.imul(T,M0)|0,X=X+Math.imul(B,z0)|0,O=O+Math.imul(B,M0)|0;var IU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(IU>>>26)|0,IU&=67108863,Y=Math.imul(J0,k0),X=Math.imul(J0,j0),X=X+Math.imul(T0,k0)|0,O=Math.imul(T0,j0),Y=Y+Math.imul(G0,R0)|0,X=X+Math.imul(G0,S0)|0,X=X+Math.imul(A0,R0)|0,O=O+Math.imul(A0,S0)|0,Y=Y+Math.imul(Z0,P0)|0,X=X+Math.imul(Z0,D0)|0,X=X+Math.imul(W0,P0)|0,O=O+Math.imul(W0,D0)|0,Y=Y+Math.imul(n,B0)|0,X=X+Math.imul(n,L0)|0,X=X+Math.imul(X0,B0)|0,O=O+Math.imul(X0,L0)|0,Y=Y+Math.imul(i,_)|0,X=X+Math.imul(i,w)|0,X=X+Math.imul(e,_)|0,O=O+Math.imul(e,w)|0,Y=Y+Math.imul(p,U0)|0,X=X+Math.imul(p,I0)|0,X=X+Math.imul(b,U0)|0,O=O+Math.imul(b,I0)|0,Y=Y+Math.imul(Q0,F0)|0,X=X+Math.imul(Q0,C0)|0,X=X+Math.imul($0,F0)|0,O=O+Math.imul($0,C0)|0,Y=Y+Math.imul(h,x0)|0,X=X+Math.imul(h,q0)|0,X=X+Math.imul(d,x0)|0,O=O+Math.imul(d,q0)|0,Y=Y+Math.imul(l,z0)|0,X=X+Math.imul(l,M0)|0,X=X+Math.imul(s,z0)|0,O=O+Math.imul(s,M0)|0;var ZU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,Y=Math.imul(J0,R0),X=Math.imul(J0,S0),X=X+Math.imul(T0,R0)|0,O=Math.imul(T0,S0),Y=Y+Math.imul(G0,P0)|0,X=X+Math.imul(G0,D0)|0,X=X+Math.imul(A0,P0)|0,O=O+Math.imul(A0,D0)|0,Y=Y+Math.imul(Z0,B0)|0,X=X+Math.imul(Z0,L0)|0,X=X+Math.imul(W0,B0)|0,O=O+Math.imul(W0,L0)|0,Y=Y+Math.imul(n,_)|0,X=X+Math.imul(n,w)|0,X=X+Math.imul(X0,_)|0,O=O+Math.imul(X0,w)|0,Y=Y+Math.imul(i,U0)|0,X=X+Math.imul(i,I0)|0,X=X+Math.imul(e,U0)|0,O=O+Math.imul(e,I0)|0,Y=Y+Math.imul(p,F0)|0,X=X+Math.imul(p,C0)|0,X=X+Math.imul(b,F0)|0,O=O+Math.imul(b,C0)|0,Y=Y+Math.imul(Q0,x0)|0,X=X+Math.imul(Q0,q0)|0,X=X+Math.imul($0,x0)|0,O=O+Math.imul($0,q0)|0,Y=Y+Math.imul(h,z0)|0,X=X+Math.imul(h,M0)|0,X=X+Math.imul(d,z0)|0,O=O+Math.imul(d,M0)|0;var QU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(QU>>>26)|0,QU&=67108863,Y=Math.imul(J0,P0),X=Math.imul(J0,D0),X=X+Math.imul(T0,P0)|0,O=Math.imul(T0,D0),Y=Y+Math.imul(G0,B0)|0,X=X+Math.imul(G0,L0)|0,X=X+Math.imul(A0,B0)|0,O=O+Math.imul(A0,L0)|0,Y=Y+Math.imul(Z0,_)|0,X=X+Math.imul(Z0,w)|0,X=X+Math.imul(W0,_)|0,O=O+Math.imul(W0,w)|0,Y=Y+Math.imul(n,U0)|0,X=X+Math.imul(n,I0)|0,X=X+Math.imul(X0,U0)|0,O=O+Math.imul(X0,I0)|0,Y=Y+Math.imul(i,F0)|0,X=X+Math.imul(i,C0)|0,X=X+Math.imul(e,F0)|0,O=O+Math.imul(e,C0)|0,Y=Y+Math.imul(p,x0)|0,X=X+Math.imul(p,q0)|0,X=X+Math.imul(b,x0)|0,O=O+Math.imul(b,q0)|0,Y=Y+Math.imul(Q0,z0)|0,X=X+Math.imul(Q0,M0)|0,X=X+Math.imul($0,z0)|0,O=O+Math.imul($0,M0)|0;var $U=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+($U>>>26)|0,$U&=67108863,Y=Math.imul(J0,B0),X=Math.imul(J0,L0),X=X+Math.imul(T0,B0)|0,O=Math.imul(T0,L0),Y=Y+Math.imul(G0,_)|0,X=X+Math.imul(G0,w)|0,X=X+Math.imul(A0,_)|0,O=O+Math.imul(A0,w)|0,Y=Y+Math.imul(Z0,U0)|0,X=X+Math.imul(Z0,I0)|0,X=X+Math.imul(W0,U0)|0,O=O+Math.imul(W0,I0)|0,Y=Y+Math.imul(n,F0)|0,X=X+Math.imul(n,C0)|0,X=X+Math.imul(X0,F0)|0,O=O+Math.imul(X0,C0)|0,Y=Y+Math.imul(i,x0)|0,X=X+Math.imul(i,q0)|0,X=X+Math.imul(e,x0)|0,O=O+Math.imul(e,q0)|0,Y=Y+Math.imul(p,z0)|0,X=X+Math.imul(p,M0)|0,X=X+Math.imul(b,z0)|0,O=O+Math.imul(b,M0)|0;var YU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(YU>>>26)|0,YU&=67108863,Y=Math.imul(J0,_),X=Math.imul(J0,w),X=X+Math.imul(T0,_)|0,O=Math.imul(T0,w),Y=Y+Math.imul(G0,U0)|0,X=X+Math.imul(G0,I0)|0,X=X+Math.imul(A0,U0)|0,O=O+Math.imul(A0,I0)|0,Y=Y+Math.imul(Z0,F0)|0,X=X+Math.imul(Z0,C0)|0,X=X+Math.imul(W0,F0)|0,O=O+Math.imul(W0,C0)|0,Y=Y+Math.imul(n,x0)|0,X=X+Math.imul(n,q0)|0,X=X+Math.imul(X0,x0)|0,O=O+Math.imul(X0,q0)|0,Y=Y+Math.imul(i,z0)|0,X=X+Math.imul(i,M0)|0,X=X+Math.imul(e,z0)|0,O=O+Math.imul(e,M0)|0;var VU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(VU>>>26)|0,VU&=67108863,Y=Math.imul(J0,U0),X=Math.imul(J0,I0),X=X+Math.imul(T0,U0)|0,O=Math.imul(T0,I0),Y=Y+Math.imul(G0,F0)|0,X=X+Math.imul(G0,C0)|0,X=X+Math.imul(A0,F0)|0,O=O+Math.imul(A0,C0)|0,Y=Y+Math.imul(Z0,x0)|0,X=X+Math.imul(Z0,q0)|0,X=X+Math.imul(W0,x0)|0,O=O+Math.imul(W0,q0)|0,Y=Y+Math.imul(n,z0)|0,X=X+Math.imul(n,M0)|0,X=X+Math.imul(X0,z0)|0,O=O+Math.imul(X0,M0)|0;var OU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(OU>>>26)|0,OU&=67108863,Y=Math.imul(J0,F0),X=Math.imul(J0,C0),X=X+Math.imul(T0,F0)|0,O=Math.imul(T0,C0),Y=Y+Math.imul(G0,x0)|0,X=X+Math.imul(G0,q0)|0,X=X+Math.imul(A0,x0)|0,O=O+Math.imul(A0,q0)|0,Y=Y+Math.imul(Z0,z0)|0,X=X+Math.imul(Z0,M0)|0,X=X+Math.imul(W0,z0)|0,O=O+Math.imul(W0,M0)|0;var GU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(GU>>>26)|0,GU&=67108863,Y=Math.imul(J0,x0),X=Math.imul(J0,q0),X=X+Math.imul(T0,x0)|0,O=Math.imul(T0,q0),Y=Y+Math.imul(G0,z0)|0,X=X+Math.imul(G0,M0)|0,X=X+Math.imul(A0,z0)|0,O=O+Math.imul(A0,M0)|0;var KU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(KU>>>26)|0,KU&=67108863,Y=Math.imul(J0,z0),X=Math.imul(J0,M0),X=X+Math.imul(T0,z0)|0,O=Math.imul(T0,M0);var WU=(J+Y|0)+((X&8191)<<13)|0;if(J=(O+(X>>>13)|0)+(WU>>>26)|0,WU&=67108863,K[0]=t0,K[1]=p0,K[2]=f0,K[3]=b0,K[4]=a0,K[5]=e0,K[6]=i0,K[7]=UU,K[8]=XU,K[9]=IU,K[10]=ZU,K[11]=QU,K[12]=$U,K[13]=YU,K[14]=VU,K[15]=OU,K[16]=GU,K[17]=KU,K[18]=WU,J!==0)K[19]=J,Q.length++;return Q};if(!Math.imul)j=q;function x(F,U,Z){Z.negative=U.negative^F.negative,Z.length=F.length+U.length;var Q=0,I=0;for(var $=0;$<Z.length-1;$++){var K=I;I=0;var J=Q&67108863,Y=Math.min($,U.length-1);for(var X=Math.max(0,$-F.length+1);X<=Y;X++){var O=$-X,v=F.words[O]|0,T=U.words[X]|0,B=v*T,c=B&67108863;K=K+(B/67108864|0)|0,c=c+J|0,J=c&67108863,K=K+(c>>>26)|0,I+=K>>>26,K&=67108863}Z.words[$]=J,Q=K,K=I}if(Q!==0)Z.words[$]=Q;else Z.length--;return Z.strip()}function g(F,U,Z){var Q=new N;return Q.mulp(F,U,Z)}V.prototype.mulTo=function F(U,Z){var Q,I=this.length+U.length;if(this.length===10&&U.length===10)Q=j(this,U,Z);else if(I<63)Q=q(this,U,Z);else if(I<1024)Q=x(this,U,Z);else Q=g(this,U,Z);return Q};function N(F,U){this.x=F,this.y=U}N.prototype.makeRBT=function F(U){var Z=new Array(U),Q=V.prototype._countBits(U)-1;for(var I=0;I<U;I++)Z[I]=this.revBin(I,Q,U);return Z},N.prototype.revBin=function F(U,Z,Q){if(U===0||U===Q-1)return U;var I=0;for(var $=0;$<Z;$++)I|=(U&1)<<Z-$-1,U>>=1;return I},N.prototype.permute=function F(U,Z,Q,I,$,K){for(var J=0;J<K;J++)I[J]=Z[U[J]],$[J]=Q[U[J]]},N.prototype.transform=function F(U,Z,Q,I,$,K){this.permute(K,U,Z,Q,I,$);for(var J=1;J<$;J<<=1){var Y=J<<1,X=Math.cos(2*Math.PI/Y),O=Math.sin(2*Math.PI/Y);for(var v=0;v<$;v+=Y){var T=X,B=O;for(var c=0;c<J;c++){var l=Q[v+c],s=I[v+c],O0=Q[v+c+J],h=I[v+c+J],d=T*O0-B*h;if(h=T*h+B*O0,O0=d,Q[v+c]=l+O0,I[v+c]=s+h,Q[v+c+J]=l-O0,I[v+c+J]=s-h,c!==Y)d=X*T-O*B,B=X*B+O*T,T=d}}}},N.prototype.guessLen13b=function F(U,Z){var Q=Math.max(Z,U)|1,I=Q&1,$=0;for(Q=Q/2|0;Q;Q=Q>>>1)$++;return 1<<$+1+I},N.prototype.conjugate=function F(U,Z,Q){if(Q<=1)return;for(var I=0;I<Q/2;I++){var $=U[I];U[I]=U[Q-I-1],U[Q-I-1]=$,$=Z[I],Z[I]=-Z[Q-I-1],Z[Q-I-1]=-$}},N.prototype.normalize13b=function F(U,Z){var Q=0;for(var I=0;I<Z/2;I++){var $=Math.round(U[2*I+1]/Z)*8192+Math.round(U[2*I]/Z)+Q;if(U[I]=$&67108863,$<67108864)Q=0;else Q=$/67108864|0}return U},N.prototype.convert13b=function F(U,Z,Q,I){var $=0;for(var K=0;K<Z;K++)$=$+(U[K]|0),Q[2*K]=$&8191,$=$>>>13,Q[2*K+1]=$&8191,$=$>>>13;for(K=2*Z;K<I;++K)Q[K]=0;H($===0),H(($&-8192)===0)},N.prototype.stub=function F(U){var Z=new Array(U);for(var Q=0;Q<U;Q++)Z[Q]=0;return Z},N.prototype.mulp=function F(U,Z,Q){var I=2*this.guessLen13b(U.length,Z.length),$=this.makeRBT(I),K=this.stub(I),J=new Array(I),Y=new Array(I),X=new Array(I),O=new Array(I),v=new Array(I),T=new Array(I),B=Q.words;B.length=I,this.convert13b(U.words,U.length,J,I),this.convert13b(Z.words,Z.length,O,I),this.transform(J,K,Y,X,I,$),this.transform(O,K,v,T,I,$);for(var c=0;c<I;c++){var l=Y[c]*v[c]-X[c]*T[c];X[c]=Y[c]*T[c]+X[c]*v[c],Y[c]=l}return this.conjugate(Y,X,I),this.transform(Y,X,B,K,I,$),this.conjugate(B,K,I),this.normalize13b(B,I),Q.negative=U.negative^Z.negative,Q.length=U.length+Z.length,Q.strip()},V.prototype.mul=function F(U){var Z=new V(null);return Z.words=new Array(this.length+U.length),this.mulTo(U,Z)},V.prototype.mulf=function F(U){var Z=new V(null);return Z.words=new Array(this.length+U.length),g(this,U,Z)},V.prototype.imul=function F(U){return this.clone().mulTo(U,this)},V.prototype.imuln=function F(U){H(typeof U==="number"),H(U<67108864);var Z=0;for(var Q=0;Q<this.length;Q++){var I=(this.words[Q]|0)*U,$=(I&67108863)+(Z&67108863);Z>>=26,Z+=I/67108864|0,Z+=$>>>26,this.words[Q]=$&67108863}if(Z!==0)this.words[Q]=Z,this.length++;return this.length=U===0?1:this.length,this},V.prototype.muln=function F(U){return this.clone().imuln(U)},V.prototype.sqr=function F(){return this.mul(this)},V.prototype.isqr=function F(){return this.imul(this.clone())},V.prototype.pow=function F(U){var Z=M(U);if(Z.length===0)return new V(1);var Q=this;for(var I=0;I<Z.length;I++,Q=Q.sqr())if(Z[I]!==0)break;if(++I<Z.length)for(var $=Q.sqr();I<Z.length;I++,$=$.sqr()){if(Z[I]===0)continue;Q=Q.mul($)}return Q},V.prototype.iushln=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26,I=67108863>>>26-Z<<26-Z,$;if(Z!==0){var K=0;for($=0;$<this.length;$++){var J=this.words[$]&I,Y=(this.words[$]|0)-J<<Z;this.words[$]=Y|K,K=J>>>26-Z}if(K)this.words[$]=K,this.length++}if(Q!==0){for($=this.length-1;$>=0;$--)this.words[$+Q]=this.words[$];for($=0;$<Q;$++)this.words[$]=0;this.length+=Q}return this.strip()},V.prototype.ishln=function F(U){return H(this.negative===0),this.iushln(U)},V.prototype.iushrn=function F(U,Z,Q){H(typeof U==="number"&&U>=0);var I;if(Z)I=(Z-Z%26)/26;else I=0;var $=U%26,K=Math.min((U-$)/26,this.length),J=67108863^67108863>>>$<<$,Y=Q;if(I-=K,I=Math.max(0,I),Y){for(var X=0;X<K;X++)Y.words[X]=this.words[X];Y.length=K}if(K===0);else if(this.length>K){this.length-=K;for(X=0;X<this.length;X++)this.words[X]=this.words[X+K]}else this.words[0]=0,this.length=1;var O=0;for(X=this.length-1;X>=0&&(O!==0||X>=I);X--){var v=this.words[X]|0;this.words[X]=O<<26-$|v>>>$,O=v&J}if(Y&&O!==0)Y.words[Y.length++]=O;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},V.prototype.ishrn=function F(U,Z,Q){return H(this.negative===0),this.iushrn(U,Z,Q)},V.prototype.shln=function F(U){return this.clone().ishln(U)},V.prototype.ushln=function F(U){return this.clone().iushln(U)},V.prototype.shrn=function F(U){return this.clone().ishrn(U)},V.prototype.ushrn=function F(U){return this.clone().iushrn(U)},V.prototype.testn=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26,I=1<<Z;if(this.length<=Q)return!1;var $=this.words[Q];return!!($&I)},V.prototype.imaskn=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=Q)return this;if(Z!==0)Q++;if(this.length=Math.min(Q,this.length),Z!==0){var I=67108863^67108863>>>Z<<Z;this.words[this.length-1]&=I}return this.strip()},V.prototype.maskn=function F(U){return this.clone().imaskn(U)},V.prototype.iaddn=function F(U){if(H(typeof U==="number"),H(U<67108864),U<0)return this.isubn(-U);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<U)return this.words[0]=U-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(U),this.negative=1,this}return this._iaddn(U)},V.prototype._iaddn=function F(U){this.words[0]+=U;for(var Z=0;Z<this.length&&this.words[Z]>=67108864;Z++)if(this.words[Z]-=67108864,Z===this.length-1)this.words[Z+1]=1;else this.words[Z+1]++;return this.length=Math.max(this.length,Z+1),this},V.prototype.isubn=function F(U){if(H(typeof U==="number"),H(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Z=0;Z<this.length&&this.words[Z]<0;Z++)this.words[Z]+=67108864,this.words[Z+1]-=1;return this.strip()},V.prototype.addn=function F(U){return this.clone().iaddn(U)},V.prototype.subn=function F(U){return this.clone().isubn(U)},V.prototype.iabs=function F(){return this.negative=0,this},V.prototype.abs=function F(){return this.clone().iabs()},V.prototype._ishlnsubmul=function F(U,Z,Q){var I=U.length+Q,$;this._expand(I);var K,J=0;for($=0;$<U.length;$++){K=(this.words[$+Q]|0)+J;var Y=(U.words[$]|0)*Z;K-=Y&67108863,J=(K>>26)-(Y/67108864|0),this.words[$+Q]=K&67108863}for(;$<this.length-Q;$++)K=(this.words[$+Q]|0)+J,J=K>>26,this.words[$+Q]=K&67108863;if(J===0)return this.strip();H(J===-1),J=0;for($=0;$<this.length;$++)K=-(this.words[$]|0)+J,J=K>>26,this.words[$]=K&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function F(U,Z){var Q=this.length-U.length,I=this.clone(),$=U,K=$.words[$.length-1]|0,J=this._countBits(K);if(Q=26-J,Q!==0)$=$.ushln(Q),I.iushln(Q),K=$.words[$.length-1]|0;var Y=I.length-$.length,X;if(Z!=="mod"){X=new V(null),X.length=Y+1,X.words=new Array(X.length);for(var O=0;O<X.length;O++)X.words[O]=0}var v=I.clone()._ishlnsubmul($,1,Y);if(v.negative===0){if(I=v,X)X.words[Y]=1}for(var T=Y-1;T>=0;T--){var B=(I.words[$.length+T]|0)*67108864+(I.words[$.length+T-1]|0);B=Math.min(B/K|0,67108863),I._ishlnsubmul($,B,T);while(I.negative!==0)if(B--,I.negative=0,I._ishlnsubmul($,1,T),!I.isZero())I.negative^=1;if(X)X.words[T]=B}if(X)X.strip();if(I.strip(),Z!=="div"&&Q!==0)I.iushrn(Q);return{div:X||null,mod:I}},V.prototype.divmod=function F(U,Z,Q){if(H(!U.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var I,$,K;if(this.negative!==0&&U.negative===0){if(K=this.neg().divmod(U,Z),Z!=="mod")I=K.div.neg();if(Z!=="div"){if($=K.mod.neg(),Q&&$.negative!==0)$.iadd(U)}return{div:I,mod:$}}if(this.negative===0&&U.negative!==0){if(K=this.divmod(U.neg(),Z),Z!=="mod")I=K.div.neg();return{div:I,mod:K.mod}}if((this.negative&U.negative)!==0){if(K=this.neg().divmod(U.neg(),Z),Z!=="div"){if($=K.mod.neg(),Q&&$.negative!==0)$.isub(U)}return{div:K.div,mod:$}}if(U.length>this.length||this.cmp(U)<0)return{div:new V(0),mod:this};if(U.length===1){if(Z==="div")return{div:this.divn(U.words[0]),mod:null};if(Z==="mod")return{div:null,mod:new V(this.modn(U.words[0]))};return{div:this.divn(U.words[0]),mod:new V(this.modn(U.words[0]))}}return this._wordDiv(U,Z)},V.prototype.div=function F(U){return this.divmod(U,"div",!1).div},V.prototype.mod=function F(U){return this.divmod(U,"mod",!1).mod},V.prototype.umod=function F(U){return this.divmod(U,"mod",!0).mod},V.prototype.divRound=function F(U){var Z=this.divmod(U);if(Z.mod.isZero())return Z.div;var Q=Z.div.negative!==0?Z.mod.isub(U):Z.mod,I=U.ushrn(1),$=U.andln(1),K=Q.cmp(I);if(K<0||$===1&&K===0)return Z.div;return Z.div.negative!==0?Z.div.isubn(1):Z.div.iaddn(1)},V.prototype.modn=function F(U){H(U<=67108863);var Z=67108864%U,Q=0;for(var I=this.length-1;I>=0;I--)Q=(Z*Q+(this.words[I]|0))%U;return Q},V.prototype.idivn=function F(U){H(U<=67108863);var Z=0;for(var Q=this.length-1;Q>=0;Q--){var I=(this.words[Q]|0)+Z*67108864;this.words[Q]=I/U|0,Z=I%U}return this.strip()},V.prototype.divn=function F(U){return this.clone().idivn(U)},V.prototype.egcd=function F(U){H(U.negative===0),H(!U.isZero());var Z=this,Q=U.clone();if(Z.negative!==0)Z=Z.umod(U);else Z=Z.clone();var I=new V(1),$=new V(0),K=new V(0),J=new V(1),Y=0;while(Z.isEven()&&Q.isEven())Z.iushrn(1),Q.iushrn(1),++Y;var X=Q.clone(),O=Z.clone();while(!Z.isZero()){for(var v=0,T=1;(Z.words[0]&T)===0&&v<26;++v,T<<=1);if(v>0){Z.iushrn(v);while(v-- >0){if(I.isOdd()||$.isOdd())I.iadd(X),$.isub(O);I.iushrn(1),$.iushrn(1)}}for(var B=0,c=1;(Q.words[0]&c)===0&&B<26;++B,c<<=1);if(B>0){Q.iushrn(B);while(B-- >0){if(K.isOdd()||J.isOdd())K.iadd(X),J.isub(O);K.iushrn(1),J.iushrn(1)}}if(Z.cmp(Q)>=0)Z.isub(Q),I.isub(K),$.isub(J);else Q.isub(Z),K.isub(I),J.isub($)}return{a:K,b:J,gcd:Q.iushln(Y)}},V.prototype._invmp=function F(U){H(U.negative===0),H(!U.isZero());var Z=this,Q=U.clone();if(Z.negative!==0)Z=Z.umod(U);else Z=Z.clone();var I=new V(1),$=new V(0),K=Q.clone();while(Z.cmpn(1)>0&&Q.cmpn(1)>0){for(var J=0,Y=1;(Z.words[0]&Y)===0&&J<26;++J,Y<<=1);if(J>0){Z.iushrn(J);while(J-- >0){if(I.isOdd())I.iadd(K);I.iushrn(1)}}for(var X=0,O=1;(Q.words[0]&O)===0&&X<26;++X,O<<=1);if(X>0){Q.iushrn(X);while(X-- >0){if($.isOdd())$.iadd(K);$.iushrn(1)}}if(Z.cmp(Q)>=0)Z.isub(Q),I.isub($);else Q.isub(Z),$.isub(I)}var v;if(Z.cmpn(1)===0)v=I;else v=$;if(v.cmpn(0)<0)v.iadd(U);return v},V.prototype.gcd=function F(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Z=this.clone(),Q=U.clone();Z.negative=0,Q.negative=0;for(var I=0;Z.isEven()&&Q.isEven();I++)Z.iushrn(1),Q.iushrn(1);do{while(Z.isEven())Z.iushrn(1);while(Q.isEven())Q.iushrn(1);var $=Z.cmp(Q);if($<0){var K=Z;Z=Q,Q=K}else if($===0||Q.cmpn(1)===0)break;Z.isub(Q)}while(!0);return Q.iushln(I)},V.prototype.invm=function F(U){return this.egcd(U).a.umod(U)},V.prototype.isEven=function F(){return(this.words[0]&1)===0},V.prototype.isOdd=function F(){return(this.words[0]&1)===1},V.prototype.andln=function F(U){return this.words[0]&U},V.prototype.bincn=function F(U){H(typeof U==="number");var Z=U%26,Q=(U-Z)/26,I=1<<Z;if(this.length<=Q)return this._expand(Q+1),this.words[Q]|=I,this;var $=I;for(var K=Q;$!==0&&K<this.length;K++){var J=this.words[K]|0;J+=$,$=J>>>26,J&=67108863,this.words[K]=J}if($!==0)this.words[K]=$,this.length++;return this},V.prototype.isZero=function F(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function F(U){var Z=U<0;if(this.negative!==0&&!Z)return-1;if(this.negative===0&&Z)return 1;this.strip();var Q;if(this.length>1)Q=1;else{if(Z)U=-U;H(U<=67108863,"Number is too big");var I=this.words[0]|0;Q=I===U?0:I<U?-1:1}if(this.negative!==0)return-Q|0;return Q},V.prototype.cmp=function F(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Z=this.ucmp(U);if(this.negative!==0)return-Z|0;return Z},V.prototype.ucmp=function F(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;var Z=0;for(var Q=this.length-1;Q>=0;Q--){var I=this.words[Q]|0,$=U.words[Q]|0;if(I===$)continue;if(I<$)Z=-1;else if(I>$)Z=1;break}return Z},V.prototype.gtn=function F(U){return this.cmpn(U)===1},V.prototype.gt=function F(U){return this.cmp(U)===1},V.prototype.gten=function F(U){return this.cmpn(U)>=0},V.prototype.gte=function F(U){return this.cmp(U)>=0},V.prototype.ltn=function F(U){return this.cmpn(U)===-1},V.prototype.lt=function F(U){return this.cmp(U)===-1},V.prototype.lten=function F(U){return this.cmpn(U)<=0},V.prototype.lte=function F(U){return this.cmp(U)<=0},V.prototype.eqn=function F(U){return this.cmpn(U)===0},V.prototype.eq=function F(U){return this.cmp(U)===0},V.red=function F(U){return new u(U)},V.prototype.toRed=function F(U){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},V.prototype.fromRed=function F(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function F(U){return this.red=U,this},V.prototype.forceRed=function F(U){return H(!this.red,"Already a number in reduction context"),this._forceRed(U)},V.prototype.redAdd=function F(U){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},V.prototype.redIAdd=function F(U){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},V.prototype.redSub=function F(U){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},V.prototype.redISub=function F(U){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},V.prototype.redShl=function F(U){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},V.prototype.redMul=function F(U){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},V.prototype.redIMul=function F(U){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},V.prototype.redSqr=function F(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function F(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function F(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function F(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function F(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function F(U){return H(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var y={k256:null,p224:null,p192:null,p25519:null};function f(F,U){this.name=F,this.p=new V(U,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}f.prototype._tmp=function F(){var U=new V(null);return U.words=new Array(Math.ceil(this.n/13)),U},f.prototype.ireduce=function F(U){var Z=U,Q;do this.split(Z,this.tmp),Z=this.imulK(Z),Z=Z.iadd(this.tmp),Q=Z.bitLength();while(Q>this.n);var I=Q<this.n?-1:Z.ucmp(this.p);if(I===0)Z.words[0]=0,Z.length=1;else if(I>0)Z.isub(this.p);else if(Z.strip!==void 0)Z.strip();else Z._strip();return Z},f.prototype.split=function F(U,Z){U.iushrn(this.n,0,Z)},f.prototype.imulK=function F(U){return U.imul(this.k)};function o(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(o,f),o.prototype.split=function F(U,Z){var Q=4194303,I=Math.min(U.length,9);for(var $=0;$<I;$++)Z.words[$]=U.words[$];if(Z.length=I,U.length<=9){U.words[0]=0,U.length=1;return}var K=U.words[9];Z.words[Z.length++]=K&Q;for($=10;$<U.length;$++){var J=U.words[$]|0;U.words[$-10]=(J&Q)<<4|K>>>22,K=J}if(K>>>=22,U.words[$-10]=K,K===0&&U.length>10)U.length-=10;else U.length-=9},o.prototype.imulK=function F(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;var Z=0;for(var Q=0;Q<U.length;Q++){var I=U.words[Q]|0;Z+=I*977,U.words[Q]=Z&67108863,Z=I*64+(Z/67108864|0)}if(U.words[U.length-1]===0){if(U.length--,U.words[U.length-1]===0)U.length--}return U};function r(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}z(r,f);function V0(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}z(V0,f);function Y0(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}z(Y0,f),Y0.prototype.imulK=function F(U){var Z=0;for(var Q=0;Q<U.length;Q++){var I=(U.words[Q]|0)*19+Z,$=I&67108863;I>>>=26,U.words[Q]=$,Z=I}if(Z!==0)U.words[U.length++]=Z;return U},V._prime=function F(U){if(y[U])return y[U];var Z;if(U==="k256")Z=new o;else if(U==="p224")Z=new r;else if(U==="p192")Z=new V0;else if(U==="p25519")Z=new Y0;else throw new Error("Unknown prime "+U);return y[U]=Z,Z};function u(F){if(typeof F==="string"){var U=V._prime(F);this.m=U.p,this.prime=U}else H(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}u.prototype._verify1=function F(U){H(U.negative===0,"red works only with positives"),H(U.red,"red works only with red numbers")},u.prototype._verify2=function F(U,Z){H((U.negative|Z.negative)===0,"red works only with positives"),H(U.red&&U.red===Z.red,"red works only with red numbers")},u.prototype.imod=function F(U){if(this.prime)return this.prime.ireduce(U)._forceRed(this);return U.umod(this.m)._forceRed(this)},u.prototype.neg=function F(U){if(U.isZero())return U.clone();return this.m.sub(U)._forceRed(this)},u.prototype.add=function F(U,Z){this._verify2(U,Z);var Q=U.add(Z);if(Q.cmp(this.m)>=0)Q.isub(this.m);return Q._forceRed(this)},u.prototype.iadd=function F(U,Z){this._verify2(U,Z);var Q=U.iadd(Z);if(Q.cmp(this.m)>=0)Q.isub(this.m);return Q},u.prototype.sub=function F(U,Z){this._verify2(U,Z);var Q=U.sub(Z);if(Q.cmpn(0)<0)Q.iadd(this.m);return Q._forceRed(this)},u.prototype.isub=function F(U,Z){this._verify2(U,Z);var Q=U.isub(Z);if(Q.cmpn(0)<0)Q.iadd(this.m);return Q},u.prototype.shl=function F(U,Z){return this._verify1(U),this.imod(U.ushln(Z))},u.prototype.imul=function F(U,Z){return this._verify2(U,Z),this.imod(U.imul(Z))},u.prototype.mul=function F(U,Z){return this._verify2(U,Z),this.imod(U.mul(Z))},u.prototype.isqr=function F(U){return this.imul(U,U.clone())},u.prototype.sqr=function F(U){return this.mul(U,U)},u.prototype.sqrt=function F(U){if(U.isZero())return U.clone();var Z=this.m.andln(3);if(H(Z%2===1),Z===3){var Q=this.m.add(new V(1)).iushrn(2);return this.pow(U,Q)}var I=this.m.subn(1),$=0;while(!I.isZero()&&I.andln(1)===0)$++,I.iushrn(1);H(!I.isZero());var K=new V(1).toRed(this),J=K.redNeg(),Y=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new V(2*X*X).toRed(this);while(this.pow(X,Y).cmp(J)!==0)X.redIAdd(J);var O=this.pow(X,I),v=this.pow(U,I.addn(1).iushrn(1)),T=this.pow(U,I),B=$;while(T.cmp(K)!==0){var c=T;for(var l=0;c.cmp(K)!==0;l++)c=c.redSqr();H(l<B);var s=this.pow(O,new V(1).iushln(B-l-1));v=v.redMul(s),O=s.redSqr(),T=T.redMul(O),B=l}return v},u.prototype.invm=function F(U){var Z=U._invmp(this.m);if(Z.negative!==0)return Z.negative=0,this.imod(Z).redNeg();else return this.imod(Z)},u.prototype.pow=function F(U,Z){if(Z.isZero())return new V(1).toRed(this);if(Z.cmpn(1)===0)return U.clone();var Q=4,I=new Array(1<<Q);I[0]=new V(1).toRed(this),I[1]=U;for(var $=2;$<I.length;$++)I[$]=this.mul(I[$-1],U);var K=I[0],J=0,Y=0,X=Z.bitLength()%26;if(X===0)X=26;for($=Z.length-1;$>=0;$--){var O=Z.words[$];for(var v=X-1;v>=0;v--){var T=O>>v&1;if(K!==I[0])K=this.sqr(K);if(T===0&&J===0){Y=0;continue}if(J<<=1,J|=T,Y++,Y!==Q&&($!==0||v!==0))continue;K=this.mul(K,I[J]),Y=0,J=0}X=26}return K},u.prototype.convertTo=function F(U){var Z=U.umod(this.m);return Z===U?Z.clone():Z},u.prototype.convertFrom=function F(U){var Z=U.clone();return Z.red=null,Z},V.mont=function F(U){return new a(U)};function a(F){if(u.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}z(a,u),a.prototype.convertTo=function F(U){return this.imod(U.ushln(this.shift))},a.prototype.convertFrom=function F(U){var Z=this.imod(U.mul(this.rinv));return Z.red=null,Z},a.prototype.imul=function F(U,Z){if(U.isZero()||Z.isZero())return U.words[0]=0,U.length=1,U;var Q=U.imul(Z),I=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=Q.isub(I).iushrn(this.shift),K=$;if($.cmp(this.m)>=0)K=$.isub(this.m);else if($.cmpn(0)<0)K=$.iadd(this.m);return K._forceRed(this)},a.prototype.mul=function F(U,Z){if(U.isZero()||Z.isZero())return new V(0)._forceRed(this);var Q=U.mul(Z),I=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=Q.isub(I).iushrn(this.shift),K=$;if($.cmp(this.m)>=0)K=$.isub(this.m);else if($.cmpn(0)<0)K=$.iadd(this.m);return K._forceRed(this)},a.prototype.invm=function F(U){var Z=this.imod(U._invmp(this.m).mul(this.r2));return Z._forceRed(this)}})(typeof G==="undefined"||G,E)}),sU=w0((E,G)=>{G.exports=W;function W(C,H){if(!C)throw new Error(H||"Assertion failed")}W.equal=function C(H,z,V){if(H!=z)throw new Error(V||"Assertion failed: "+H+" != "+z)}}),MZ=w0((E)=>{var G=E;function W(z,V){if(Array.isArray(z))return z.slice();if(!z)return[];var P=[];if(typeof z!=="string"){for(var k=0;k<z.length;k++)P[k]=z[k]|0;return P}if(V==="hex"){if(z=z.replace(/[^a-z0-9]+/ig,""),z.length%2!==0)z="0"+z;for(var k=0;k<z.length;k+=2)P.push(parseInt(z[k]+z[k+1],16))}else for(var k=0;k<z.length;k++){var R=z.charCodeAt(k),S=R>>8,D=R&255;if(S)P.push(S,D);else P.push(D)}return P}G.toArray=W;function C(z){if(z.length===1)return"0"+z;else return z}G.zero2=C;function H(z){var V="";for(var P=0;P<z.length;P++)V+=C(z[P].toString(16));return V}G.toHex=H,G.encode=function z(V,P){if(P==="hex")return H(V);else return V}}),BU=w0((E)=>{var G=E,W=lU(),C=sU(),H=MZ();G.assert=C,G.toArray=H.toArray,G.zero2=H.zero2,G.toHex=H.toHex,G.encode=H.encode;function z(S,D,A){var L=new Array(Math.max(S.bitLength(),A)+1),M;for(M=0;M<L.length;M+=1)L[M]=0;var q=1<<D+1,j=S.clone();for(M=0;M<L.length;M++){var x,g=j.andln(q-1);if(j.isOdd()){if(g>(q>>1)-1)x=(q>>1)-g;else x=g;j.isubn(x)}else x=0;L[M]=x,j.iushrn(1)}return L}G.getNAF=z;function V(S,D){var A=[[],[]];S=S.clone(),D=D.clone();var L=0,M=0,q;while(S.cmpn(-L)>0||D.cmpn(-M)>0){var j=S.andln(3)+L&3,x=D.andln(3)+M&3;if(j===3)j=-1;if(x===3)x=-1;var g;if((j&1)===0)g=0;else if(q=S.andln(7)+L&7,(q===3||q===5)&&x===2)g=-j;else g=j;A[0].push(g);var N;if((x&1)===0)N=0;else if(q=D.andln(7)+M&7,(q===3||q===5)&&j===2)N=-x;else N=x;if(A[1].push(N),2*L===g+1)L=1-L;if(2*M===N+1)M=1-M;S.iushrn(1),D.iushrn(1)}return A}G.getJSF=V;function P(S,D,A){var L="_"+D;S.prototype[D]=function M(){return this[L]!==void 0?this[L]:this[L]=A.call(this)}}G.cachedProperty=P;function k(S){return typeof S==="string"?G.toArray(S,"hex"):S}G.parseBytes=k;function R(S){return new W(S,"hex","le")}G.intFromLE=R}),RZ=w0((E,G)=>{var W;G.exports=function z(V){if(!W)W=new C(null);return W.generate(V)};function C(z){this.rand=z}if(G.exports.Rand=C,C.prototype.generate=function z(V){return this._rand(V)},C.prototype._rand=function z(V){if(this.rand.getBytes)return this.rand.getBytes(V);var P=new Uint8Array(V);for(var k=0;k<P.length;k++)P[k]=this.rand.getByte();return P},typeof self==="object"){if(self.crypto&&self.crypto.getRandomValues)C.prototype._rand=function z(V){var P=new Uint8Array(V);return self.crypto.getRandomValues(P),P};else if(self.msCrypto&&self.msCrypto.getRandomValues)C.prototype._rand=function z(V){var P=new Uint8Array(V);return self.msCrypto.getRandomValues(P),P};else if(typeof window==="object")C.prototype._rand=function(){throw new Error("Not implemented yet")}}else try{if(H=(qU(),y0(kU)),typeof H.randomBytes!=="function")throw new Error("Not supported");C.prototype._rand=function z(V){return H.randomBytes(V)}}catch(z){}var H}),_X=w0((E,G)=>{var W=lU(),C=BU(),H=C.getNAF,z=C.getJSF,V=C.assert;function P(R,S){this.type=R,this.p=new W(S.p,16),this.red=S.prime?W.red(S.prime):W.mont(this.p),this.zero=new W(0).toRed(this.red),this.one=new W(1).toRed(this.red),this.two=new W(2).toRed(this.red),this.n=S.n&&new W(S.n,16),this.g=S.g&&this.pointFromJSON(S.g,S.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var D=this.n&&this.p.div(this.n);if(!D||D.cmpn(100)>0)this.redN=null;else this._maxwellTrick=!0,this.redN=this.n.toRed(this.red)}G.exports=P,P.prototype.point=function R(){throw new Error("Not implemented")},P.prototype.validate=function R(){throw new Error("Not implemented")},P.prototype._fixedNafMul=function R(S,D){V(S.precomputed);var A=S._getDoubles(),L=H(D,1,this._bitLength),M=(1<<A.step+1)-(A.step%2===0?2:1);M/=3;var q=[],j,x;for(j=0;j<L.length;j+=A.step){x=0;for(var g=j+A.step-1;g>=j;g--)x=(x<<1)+L[g];q.push(x)}var N=this.jpoint(null,null,null),y=this.jpoint(null,null,null);for(var f=M;f>0;f--){for(j=0;j<q.length;j++)if(x=q[j],x===f)y=y.mixedAdd(A.points[j]);else if(x===-f)y=y.mixedAdd(A.points[j].neg());N=N.add(y)}return N.toP()},P.prototype._wnafMul=function R(S,D){var A=4,L=S._getNAFPoints(A);A=L.wnd;var M=L.points,q=H(D,A,this._bitLength),j=this.jpoint(null,null,null);for(var x=q.length-1;x>=0;x--){for(var g=0;x>=0&&q[x]===0;x--)g++;if(x>=0)g++;if(j=j.dblp(g),x<0)break;var N=q[x];if(V(N!==0),S.type==="affine")if(N>0)j=j.mixedAdd(M[N-1>>1]);else j=j.mixedAdd(M[-N-1>>1].neg());else if(N>0)j=j.add(M[N-1>>1]);else j=j.add(M[-N-1>>1].neg())}return S.type==="affine"?j.toP():j},P.prototype._wnafMulAdd=function R(S,D,A,L,M){var q=this._wnafT1,j=this._wnafT2,x=this._wnafT3,g=0,N,y,f;for(N=0;N<L;N++){f=D[N];var o=f._getNAFPoints(S);q[N]=o.wnd,j[N]=o.points}for(N=L-1;N>=1;N-=2){var r=N-1,V0=N;if(q[r]!==1||q[V0]!==1){x[r]=H(A[r],q[r],this._bitLength),x[V0]=H(A[V0],q[V0],this._bitLength),g=Math.max(x[r].length,g),g=Math.max(x[V0].length,g);continue}var Y0=[D[r],null,null,D[V0]];if(D[r].y.cmp(D[V0].y)===0)Y0[1]=D[r].add(D[V0]),Y0[2]=D[r].toJ().mixedAdd(D[V0].neg());else if(D[r].y.cmp(D[V0].y.redNeg())===0)Y0[1]=D[r].toJ().mixedAdd(D[V0]),Y0[2]=D[r].add(D[V0].neg());else Y0[1]=D[r].toJ().mixedAdd(D[V0]),Y0[2]=D[r].toJ().mixedAdd(D[V0].neg());var u=[-3,-1,-5,-7,0,7,5,1,3],a=z(A[r],A[V0]);g=Math.max(a[0].length,g),x[r]=new Array(g),x[V0]=new Array(g);for(y=0;y<g;y++){var F=a[0][y]|0,U=a[1][y]|0;x[r][y]=u[(F+1)*3+(U+1)],x[V0][y]=0,j[r]=Y0}}var Z=this.jpoint(null,null,null),Q=this._wnafT4;for(N=g;N>=0;N--){var I=0;while(N>=0){var $=!0;for(y=0;y<L;y++)if(Q[y]=x[y][N]|0,Q[y]!==0)$=!1;if(!$)break;I++,N--}if(N>=0)I++;if(Z=Z.dblp(I),N<0)break;for(y=0;y<L;y++){var K=Q[y];if(K===0)continue;else if(K>0)f=j[y][K-1>>1];else if(K<0)f=j[y][-K-1>>1].neg();if(f.type==="affine")Z=Z.mixedAdd(f);else Z=Z.add(f)}}for(N=0;N<L;N++)j[N]=null;if(M)return Z;else return Z.toP()};function k(R,S){this.curve=R,this.type=S,this.precomputed=null}P.BasePoint=k,k.prototype.eq=function R(){throw new Error("Not implemented")},k.prototype.validate=function R(){return this.curve.validate(this)},P.prototype.decodePoint=function R(S,D){S=C.toArray(S,D);var A=this.p.byteLength();if((S[0]===4||S[0]===6||S[0]===7)&&S.length-1===2*A){if(S[0]===6)V(S[S.length-1]%2===0);else if(S[0]===7)V(S[S.length-1]%2===1);var L=this.point(S.slice(1,1+A),S.slice(1+A,1+2*A));return L}else if((S[0]===2||S[0]===3)&&S.length-1===A)return this.pointFromX(S.slice(1,1+A),S[0]===3);throw new Error("Unknown point format")},k.prototype.encodeCompressed=function R(S){return this.encode(S,!0)},k.prototype._encode=function R(S){var D=this.curve.p.byteLength(),A=this.getX().toArray("be",D);if(S)return[this.getY().isEven()?2:3].concat(A);return[4].concat(A,this.getY().toArray("be",D))},k.prototype.encode=function R(S,D){return C.encode(this._encode(D),S)},k.prototype.precompute=function R(S){if(this.precomputed)return this;var D={doubles:null,naf:null,beta:null};return D.naf=this._getNAFPoints(8),D.doubles=this._getDoubles(4,S),D.beta=this._getBeta(),this.precomputed=D,this},k.prototype._hasDoubles=function R(S){if(!this.precomputed)return!1;var D=this.precomputed.doubles;if(!D)return!1;return D.points.length>=Math.ceil((S.bitLength()+1)/D.step)},k.prototype._getDoubles=function R(S,D){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;var A=[this],L=this;for(var M=0;M<D;M+=S){for(var q=0;q<S;q++)L=L.dbl();A.push(L)}return{step:S,points:A}},k.prototype._getNAFPoints=function R(S){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;var D=[this],A=(1<<S)-1,L=A===1?null:this.dbl();for(var M=1;M<A;M++)D[M]=D[M-1].add(L);return{wnd:S,points:D}},k.prototype._getBeta=function R(){return null},k.prototype.dblp=function R(S){var D=this;for(var A=0;A<S;A++)D=D.dbl();return D}}),LY=w0((E,G)=>{if(typeof Object.create==="function")G.exports=function W(C,H){if(H)C.super_=H,C.prototype=Object.create(H.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}})};else G.exports=function W(C,H){if(H){C.super_=H;var z=function(){};z.prototype=H.prototype,C.prototype=new z,C.prototype.constructor=C}}}),vU=w0((E,G)=>{try{if(W=(sI(),y0(nI)),typeof W.inherits!=="function")throw"";G.exports=W.inherits}catch(C){G.exports=LY()}var W}),zY=w0((E,G)=>{var W=BU(),C=lU(),H=vU(),z=_X(),V=W.assert;function P(S){z.call(this,"short",S),this.a=new C(S.a,16).toRed(this.red),this.b=new C(S.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(S),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}H(P,z),G.exports=P,P.prototype._getEndomorphism=function S(D){if(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)return;var A,L;if(D.beta)A=new C(D.beta,16).toRed(this.red);else{var M=this._getEndoRoots(this.p);A=M[0].cmp(M[1])<0?M[0]:M[1],A=A.toRed(this.red)}if(D.lambda)L=new C(D.lambda,16);else{var q=this._getEndoRoots(this.n);if(this.g.mul(q[0]).x.cmp(this.g.x.redMul(A))===0)L=q[0];else L=q[1],V(this.g.mul(L).x.cmp(this.g.x.redMul(A))===0)}var j;if(D.basis)j=D.basis.map(function(x){return{a:new C(x.a,16),b:new C(x.b,16)}});else j=this._getEndoBasis(L);return{beta:A,lambda:L,basis:j}},P.prototype._getEndoRoots=function S(D){var A=D===this.p?this.red:C.mont(D),L=new C(2).toRed(A).redInvm(),M=L.redNeg(),q=new C(3).toRed(A).redNeg().redSqrt().redMul(L),j=M.redAdd(q).fromRed(),x=M.redSub(q).fromRed();return[j,x]},P.prototype._getEndoBasis=function S(D){var A=this.n.ushrn(Math.floor(this.n.bitLength()/2)),L=D,M=this.n.clone(),q=new C(1),j=new C(0),x=new C(0),g=new C(1),N,y,f,o,r,V0,Y0,u=0,a,F;while(L.cmpn(0)!==0){var U=M.div(L);a=M.sub(U.mul(L)),F=x.sub(U.mul(q));var Z=g.sub(U.mul(j));if(!f&&a.cmp(A)<0)N=Y0.neg(),y=q,f=a.neg(),o=F;else if(f&&++u===2)break;Y0=a,M=L,L=a,x=q,q=F,g=j,j=Z}r=a.neg(),V0=F;var Q=f.sqr().add(o.sqr()),I=r.sqr().add(V0.sqr());if(I.cmp(Q)>=0)r=N,V0=y;if(f.negative)f=f.neg(),o=o.neg();if(r.negative)r=r.neg(),V0=V0.neg();return[{a:f,b:o},{a:r,b:V0}]},P.prototype._endoSplit=function S(D){var A=this.endo.basis,L=A[0],M=A[1],q=M.b.mul(D).divRound(this.n),j=L.b.neg().mul(D).divRound(this.n),x=q.mul(L.a),g=j.mul(M.a),N=q.mul(L.b),y=j.mul(M.b),f=D.sub(x).sub(g),o=N.add(y).neg();return{k1:f,k2:o}},P.prototype.pointFromX=function S(D,A){if(D=new C(D,16),!D.red)D=D.toRed(this.red);var L=D.redSqr().redMul(D).redIAdd(D.redMul(this.a)).redIAdd(this.b),M=L.redSqrt();if(M.redSqr().redSub(L).cmp(this.zero)!==0)throw new Error("invalid point");var q=M.fromRed().isOdd();if(A&&!q||!A&&q)M=M.redNeg();return this.point(D,M)},P.prototype.validate=function S(D){if(D.inf)return!0;var{x:A,y:L}=D,M=this.a.redMul(A),q=A.redSqr().redMul(A).redIAdd(M).redIAdd(this.b);return L.redSqr().redISub(q).cmpn(0)===0},P.prototype._endoWnafMulAdd=function S(D,A,L){var M=this._endoWnafT1,q=this._endoWnafT2;for(var j=0;j<D.length;j++){var x=this._endoSplit(A[j]),g=D[j],N=g._getBeta();if(x.k1.negative)x.k1.ineg(),g=g.neg(!0);if(x.k2.negative)x.k2.ineg(),N=N.neg(!0);M[j*2]=g,M[j*2+1]=N,q[j*2]=x.k1,q[j*2+1]=x.k2}var y=this._wnafMulAdd(1,M,q,j*2,L);for(var f=0;f<j*2;f++)M[f]=null,q[f]=null;return y};function k(S,D,A,L){if(z.BasePoint.call(this,S,"affine"),D===null&&A===null)this.x=null,this.y=null,this.inf=!0;else{if(this.x=new C(D,16),this.y=new C(A,16),L)this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);this.inf=!1}}H(k,z.BasePoint),P.prototype.point=function S(D,A,L){return new k(this,D,A,L)},P.prototype.pointFromJSON=function S(D,A){return k.fromJSON(this,D,A)},k.prototype._getBeta=function S(){if(!this.curve.endo)return;var D=this.precomputed;if(D&&D.beta)return D.beta;var A=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(D){var L=this.curve,M=function(q){return L.point(q.x.redMul(L.endo.beta),q.y)};D.beta=A,A.precomputed={beta:null,naf:D.naf&&{wnd:D.naf.wnd,points:D.naf.points.map(M)},doubles:D.doubles&&{step:D.doubles.step,points:D.doubles.points.map(M)}}}return A},k.prototype.toJSON=function S(){if(!this.precomputed)return[this.x,this.y];return[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]},k.fromJSON=function S(D,A,L){if(typeof A==="string")A=JSON.parse(A);var M=D.point(A[0],A[1],L);if(!A[2])return M;function q(x){return D.point(x[0],x[1],L)}var j=A[2];return M.precomputed={beta:null,doubles:j.doubles&&{step:j.doubles.step,points:[M].concat(j.doubles.points.map(q))},naf:j.naf&&{wnd:j.naf.wnd,points:[M].concat(j.naf.points.map(q))}},M},k.prototype.inspect=function S(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},k.prototype.isInfinity=function S(){return this.inf},k.prototype.add=function S(D){if(this.inf)return D;if(D.inf)return this;if(this.eq(D))return this.dbl();if(this.neg().eq(D))return this.curve.point(null,null);if(this.x.cmp(D.x)===0)return this.curve.point(null,null);var A=this.y.redSub(D.y);if(A.cmpn(0)!==0)A=A.redMul(this.x.redSub(D.x).redInvm());var L=A.redSqr().redISub(this.x).redISub(D.x),M=A.redMul(this.x.redSub(L)).redISub(this.y);return this.curve.point(L,M)},k.prototype.dbl=function S(){if(this.inf)return this;var D=this.y.redAdd(this.y);if(D.cmpn(0)===0)return this.curve.point(null,null);var A=this.curve.a,L=this.x.redSqr(),M=D.redInvm(),q=L.redAdd(L).redIAdd(L).redIAdd(A).redMul(M),j=q.redSqr().redISub(this.x.redAdd(this.x)),x=q.redMul(this.x.redSub(j)).redISub(this.y);return this.curve.point(j,x)},k.prototype.getX=function S(){return this.x.fromRed()},k.prototype.getY=function S(){return this.y.fromRed()},k.prototype.mul=function S(D){if(D=new C(D,16),this.isInfinity())return this;else if(this._hasDoubles(D))return this.curve._fixedNafMul(this,D);else if(this.curve.endo)return this.curve._endoWnafMulAdd([this],[D]);else return this.curve._wnafMul(this,D)},k.prototype.mulAdd=function S(D,A,L){var M=[this,A],q=[D,L];if(this.curve.endo)return this.curve._endoWnafMulAdd(M,q);else return this.curve._wnafMulAdd(1,M,q,2)},k.prototype.jmulAdd=function S(D,A,L){var M=[this,A],q=[D,L];if(this.curve.endo)return this.curve._endoWnafMulAdd(M,q,!0);else return this.curve._wnafMulAdd(1,M,q,2,!0)},k.prototype.eq=function S(D){return this===D||this.inf===D.inf&&(this.inf||this.x.cmp(D.x)===0&&this.y.cmp(D.y)===0)},k.prototype.neg=function S(D){if(this.inf)return this;var A=this.curve.point(this.x,this.y.redNeg());if(D&&this.precomputed){var L=this.precomputed,M=function(q){return q.neg()};A.precomputed={naf:L.naf&&{wnd:L.naf.wnd,points:L.naf.points.map(M)},doubles:L.doubles&&{step:L.doubles.step,points:L.doubles.points.map(M)}}}return A},k.prototype.toJ=function S(){if(this.inf)return this.curve.jpoint(null,null,null);var D=this.curve.jpoint(this.x,this.y,this.curve.one);return D};function R(S,D,A,L){if(z.BasePoint.call(this,S,"jacobian"),D===null&&A===null&&L===null)this.x=this.curve.one,this.y=this.curve.one,this.z=new C(0);else this.x=new C(D,16),this.y=new C(A,16),this.z=new C(L,16);if(!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);this.zOne=this.z===this.curve.one}H(R,z.BasePoint),P.prototype.jpoint=function S(D,A,L){return new R(this,D,A,L)},R.prototype.toP=function S(){if(this.isInfinity())return this.curve.point(null,null);var D=this.z.redInvm(),A=D.redSqr(),L=this.x.redMul(A),M=this.y.redMul(A).redMul(D);return this.curve.point(L,M)},R.prototype.neg=function S(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},R.prototype.add=function S(D){if(this.isInfinity())return D;if(D.isInfinity())return this;var A=D.z.redSqr(),L=this.z.redSqr(),M=this.x.redMul(A),q=D.x.redMul(L),j=this.y.redMul(A.redMul(D.z)),x=D.y.redMul(L.redMul(this.z)),g=M.redSub(q),N=j.redSub(x);if(g.cmpn(0)===0)if(N.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var y=g.redSqr(),f=y.redMul(g),o=M.redMul(y),r=N.redSqr().redIAdd(f).redISub(o).redISub(o),V0=N.redMul(o.redISub(r)).redISub(j.redMul(f)),Y0=this.z.redMul(D.z).redMul(g);return this.curve.jpoint(r,V0,Y0)},R.prototype.mixedAdd=function S(D){if(this.isInfinity())return D.toJ();if(D.isInfinity())return this;var A=this.z.redSqr(),L=this.x,M=D.x.redMul(A),q=this.y,j=D.y.redMul(A).redMul(this.z),x=L.redSub(M),g=q.redSub(j);if(x.cmpn(0)===0)if(g.cmpn(0)!==0)return this.curve.jpoint(null,null,null);else return this.dbl();var N=x.redSqr(),y=N.redMul(x),f=L.redMul(N),o=g.redSqr().redIAdd(y).redISub(f).redISub(f),r=g.redMul(f.redISub(o)).redISub(q.redMul(y)),V0=this.z.redMul(x);return this.curve.jpoint(o,r,V0)},R.prototype.dblp=function S(D){if(D===0)return this;if(this.isInfinity())return this;if(!D)return this.dbl();var A;if(this.curve.zeroA||this.curve.threeA){var L=this;for(A=0;A<D;A++)L=L.dbl();return L}var M=this.curve.a,q=this.curve.tinv,j=this.x,x=this.y,g=this.z,N=g.redSqr().redSqr(),y=x.redAdd(x);for(A=0;A<D;A++){var f=j.redSqr(),o=y.redSqr(),r=o.redSqr(),V0=f.redAdd(f).redIAdd(f).redIAdd(M.redMul(N)),Y0=j.redMul(o),u=V0.redSqr().redISub(Y0.redAdd(Y0)),a=Y0.redISub(u),F=V0.redMul(a);F=F.redIAdd(F).redISub(r);var U=y.redMul(g);if(A+1<D)N=N.redMul(r);j=u,g=U,y=F}return this.curve.jpoint(j,y.redMul(q),g)},R.prototype.dbl=function S(){if(this.isInfinity())return this;if(this.curve.zeroA)return this._zeroDbl();else if(this.curve.threeA)return this._threeDbl();else return this._dbl()},R.prototype._zeroDbl=function S(){var D,A,L;if(this.zOne){var M=this.x.redSqr(),q=this.y.redSqr(),j=q.redSqr(),x=this.x.redAdd(q).redSqr().redISub(M).redISub(j);x=x.redIAdd(x);var g=M.redAdd(M).redIAdd(M),N=g.redSqr().redISub(x).redISub(x),y=j.redIAdd(j);y=y.redIAdd(y),y=y.redIAdd(y),D=N,A=g.redMul(x.redISub(N)).redISub(y),L=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),o=this.y.redSqr(),r=o.redSqr(),V0=this.x.redAdd(o).redSqr().redISub(f).redISub(r);V0=V0.redIAdd(V0);var Y0=f.redAdd(f).redIAdd(f),u=Y0.redSqr(),a=r.redIAdd(r);a=a.redIAdd(a),a=a.redIAdd(a),D=u.redISub(V0).redISub(V0),A=Y0.redMul(V0.redISub(D)).redISub(a),L=this.y.redMul(this.z),L=L.redIAdd(L)}return this.curve.jpoint(D,A,L)},R.prototype._threeDbl=function S(){var D,A,L;if(this.zOne){var M=this.x.redSqr(),q=this.y.redSqr(),j=q.redSqr(),x=this.x.redAdd(q).redSqr().redISub(M).redISub(j);x=x.redIAdd(x);var g=M.redAdd(M).redIAdd(M).redIAdd(this.curve.a),N=g.redSqr().redISub(x).redISub(x);D=N;var y=j.redIAdd(j);y=y.redIAdd(y),y=y.redIAdd(y),A=g.redMul(x.redISub(N)).redISub(y),L=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),o=this.y.redSqr(),r=this.x.redMul(o),V0=this.x.redSub(f).redMul(this.x.redAdd(f));V0=V0.redAdd(V0).redIAdd(V0);var Y0=r.redIAdd(r);Y0=Y0.redIAdd(Y0);var u=Y0.redAdd(Y0);D=V0.redSqr().redISub(u),L=this.y.redAdd(this.z).redSqr().redISub(o).redISub(f);var a=o.redSqr();a=a.redIAdd(a),a=a.redIAdd(a),a=a.redIAdd(a),A=V0.redMul(Y0.redISub(D)).redISub(a)}return this.curve.jpoint(D,A,L)},R.prototype._dbl=function S(){var D=this.curve.a,A=this.x,L=this.y,M=this.z,q=M.redSqr().redSqr(),j=A.redSqr(),x=L.redSqr(),g=j.redAdd(j).redIAdd(j).redIAdd(D.redMul(q)),N=A.redAdd(A);N=N.redIAdd(N);var y=N.redMul(x),f=g.redSqr().redISub(y.redAdd(y)),o=y.redISub(f),r=x.redSqr();r=r.redIAdd(r),r=r.redIAdd(r),r=r.redIAdd(r);var V0=g.redMul(o).redISub(r),Y0=L.redAdd(L).redMul(M);return this.curve.jpoint(f,V0,Y0)},R.prototype.trpl=function S(){if(!this.curve.zeroA)return this.dbl().add(this);var D=this.x.redSqr(),A=this.y.redSqr(),L=this.z.redSqr(),M=A.redSqr(),q=D.redAdd(D).redIAdd(D),j=q.redSqr(),x=this.x.redAdd(A).redSqr().redISub(D).redISub(M);x=x.redIAdd(x),x=x.redAdd(x).redIAdd(x),x=x.redISub(j);var g=x.redSqr(),N=M.redIAdd(M);N=N.redIAdd(N),N=N.redIAdd(N),N=N.redIAdd(N);var y=q.redIAdd(x).redSqr().redISub(j).redISub(g).redISub(N),f=A.redMul(y);f=f.redIAdd(f),f=f.redIAdd(f);var o=this.x.redMul(g).redISub(f);o=o.redIAdd(o),o=o.redIAdd(o);var r=this.y.redMul(y.redMul(N.redISub(y)).redISub(x.redMul(g)));r=r.redIAdd(r),r=r.redIAdd(r),r=r.redIAdd(r);var V0=this.z.redAdd(x).redSqr().redISub(L).redISub(g);return this.curve.jpoint(o,r,V0)},R.prototype.mul=function S(D,A){return D=new C(D,A),this.curve._wnafMul(this,D)},R.prototype.eq=function S(D){if(D.type==="affine")return this.eq(D.toJ());if(this===D)return!0;var A=this.z.redSqr(),L=D.z.redSqr();if(this.x.redMul(L).redISub(D.x.redMul(A)).cmpn(0)!==0)return!1;var M=A.redMul(this.z),q=L.redMul(D.z);return this.y.redMul(q).redISub(D.y.redMul(M)).cmpn(0)===0},R.prototype.eqXToP=function S(D){var A=this.z.redSqr(),L=D.toRed(this.curve.red).redMul(A);if(this.x.cmp(L)===0)return!0;var M=D.clone(),q=this.curve.redN.redMul(A);for(;;){if(M.iadd(this.curve.n),M.cmp(this.curve.p)>=0)return!1;if(L.redIAdd(q),this.x.cmp(L)===0)return!0}},R.prototype.inspect=function S(){if(this.isInfinity())return"<EC JPoint Infinity>";return"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},R.prototype.isInfinity=function S(){return this.z.cmpn(0)===0}}),MY=w0((E,G)=>{var W=lU(),C=vU(),H=_X(),z=BU();function V(k){H.call(this,"mont",k),this.a=new W(k.a,16).toRed(this.red),this.b=new W(k.b,16).toRed(this.red),this.i4=new W(4).toRed(this.red).redInvm(),this.two=new W(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}C(V,H),G.exports=V,V.prototype.validate=function k(R){var S=R.normalize().x,D=S.redSqr(),A=D.redMul(S).redAdd(D.redMul(this.a)).redAdd(S),L=A.redSqrt();return L.redSqr().cmp(A)===0};function P(k,R,S){if(H.BasePoint.call(this,k,"projective"),R===null&&S===null)this.x=this.curve.one,this.z=this.curve.zero;else{if(this.x=new W(R,16),this.z=new W(S,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red)}}C(P,H.BasePoint),V.prototype.decodePoint=function k(R,S){return this.point(z.toArray(R,S),1)},V.prototype.point=function k(R,S){return new P(this,R,S)},V.prototype.pointFromJSON=function k(R){return P.fromJSON(this,R)},P.prototype.precompute=function k(){},P.prototype._encode=function k(){return this.getX().toArray("be",this.curve.p.byteLength())},P.fromJSON=function k(R,S){return new P(R,S[0],S[1]||R.one)},P.prototype.inspect=function k(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},P.prototype.isInfinity=function k(){return this.z.cmpn(0)===0},P.prototype.dbl=function k(){var R=this.x.redAdd(this.z),S=R.redSqr(),D=this.x.redSub(this.z),A=D.redSqr(),L=S.redSub(A),M=S.redMul(A),q=L.redMul(A.redAdd(this.curve.a24.redMul(L)));return this.curve.point(M,q)},P.prototype.add=function k(){throw new Error("Not supported on Montgomery curve")},P.prototype.diffAdd=function k(R,S){var D=this.x.redAdd(this.z),A=this.x.redSub(this.z),L=R.x.redAdd(R.z),M=R.x.redSub(R.z),q=M.redMul(D),j=L.redMul(A),x=S.z.redMul(q.redAdd(j).redSqr()),g=S.x.redMul(q.redISub(j).redSqr());return this.curve.point(x,g)},P.prototype.mul=function k(R){var S=R.clone(),D=this,A=this.curve.point(null,null),L=this;for(var M=[];S.cmpn(0)!==0;S.iushrn(1))M.push(S.andln(1));for(var q=M.length-1;q>=0;q--)if(M[q]===0)D=D.diffAdd(A,L),A=A.dbl();else A=D.diffAdd(A,L),D=D.dbl();return A},P.prototype.mulAdd=function k(){throw new Error("Not supported on Montgomery curve")},P.prototype.jumlAdd=function k(){throw new Error("Not supported on Montgomery curve")},P.prototype.eq=function k(R){return this.getX().cmp(R.getX())===0},P.prototype.normalize=function k(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},P.prototype.getX=function k(){return this.normalize(),this.x.fromRed()}}),RY=w0((E,G)=>{var W=BU(),C=lU(),H=vU(),z=_X(),V=W.assert;function P(R){this.twisted=(R.a|0)!==1,this.mOneA=this.twisted&&(R.a|0)===-1,this.extended=this.mOneA,z.call(this,"edwards",R),this.a=new C(R.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new C(R.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new C(R.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),V(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(R.c|0)===1}H(P,z),G.exports=P,P.prototype._mulA=function R(S){if(this.mOneA)return S.redNeg();else return this.a.redMul(S)},P.prototype._mulC=function R(S){if(this.oneC)return S;else return this.c.redMul(S)},P.prototype.jpoint=function R(S,D,A,L){return this.point(S,D,A,L)},P.prototype.pointFromX=function R(S,D){if(S=new C(S,16),!S.red)S=S.toRed(this.red);var A=S.redSqr(),L=this.c2.redSub(this.a.redMul(A)),M=this.one.redSub(this.c2.redMul(this.d).redMul(A)),q=L.redMul(M.redInvm()),j=q.redSqrt();if(j.redSqr().redSub(q).cmp(this.zero)!==0)throw new Error("invalid point");var x=j.fromRed().isOdd();if(D&&!x||!D&&x)j=j.redNeg();return this.point(S,j)},P.prototype.pointFromY=function R(S,D){if(S=new C(S,16),!S.red)S=S.toRed(this.red);var A=S.redSqr(),L=A.redSub(this.c2),M=A.redMul(this.d).redMul(this.c2).redSub(this.a),q=L.redMul(M.redInvm());if(q.cmp(this.zero)===0)if(D)throw new Error("invalid point");else return this.point(this.zero,S);var j=q.redSqrt();if(j.redSqr().redSub(q).cmp(this.zero)!==0)throw new Error("invalid point");if(j.fromRed().isOdd()!==D)j=j.redNeg();return this.point(j,S)},P.prototype.validate=function R(S){if(S.isInfinity())return!0;S.normalize();var D=S.x.redSqr(),A=S.y.redSqr(),L=D.redMul(this.a).redAdd(A),M=this.c2.redMul(this.one.redAdd(this.d.redMul(D).redMul(A)));return L.cmp(M)===0};function k(R,S,D,A,L){if(z.BasePoint.call(this,R,"projective"),S===null&&D===null&&A===null)this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0;else{if(this.x=new C(S,16),this.y=new C(D,16),this.z=A?new C(A,16):this.curve.one,this.t=L&&new C(L,16),!this.x.red)this.x=this.x.toRed(this.curve.red);if(!this.y.red)this.y=this.y.toRed(this.curve.red);if(!this.z.red)this.z=this.z.toRed(this.curve.red);if(this.t&&!this.t.red)this.t=this.t.toRed(this.curve.red);if(this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t){if(this.t=this.x.redMul(this.y),!this.zOne)this.t=this.t.redMul(this.z.redInvm())}}}H(k,z.BasePoint),P.prototype.pointFromJSON=function R(S){return k.fromJSON(this,S)},P.prototype.point=function R(S,D,A,L){return new k(this,S,D,A,L)},k.fromJSON=function R(S,D){return new k(S,D[0],D[1],D[2])},k.prototype.inspect=function R(){if(this.isInfinity())return"<EC Point Infinity>";return"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},k.prototype.isInfinity=function R(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},k.prototype._extDbl=function R(){var S=this.x.redSqr(),D=this.y.redSqr(),A=this.z.redSqr();A=A.redIAdd(A);var L=this.curve._mulA(S),M=this.x.redAdd(this.y).redSqr().redISub(S).redISub(D),q=L.redAdd(D),j=q.redSub(A),x=L.redSub(D),g=M.redMul(j),N=q.redMul(x),y=M.redMul(x),f=j.redMul(q);return this.curve.point(g,N,f,y)},k.prototype._projDbl=function R(){var S=this.x.redAdd(this.y).redSqr(),D=this.x.redSqr(),A=this.y.redSqr(),L,M,q,j,x,g;if(this.curve.twisted){j=this.curve._mulA(D);var N=j.redAdd(A);if(this.zOne)L=S.redSub(D).redSub(A).redMul(N.redSub(this.curve.two)),M=N.redMul(j.redSub(A)),q=N.redSqr().redSub(N).redSub(N);else x=this.z.redSqr(),g=N.redSub(x).redISub(x),L=S.redSub(D).redISub(A).redMul(g),M=N.redMul(j.redSub(A)),q=N.redMul(g)}else j=D.redAdd(A),x=this.curve._mulC(this.z).redSqr(),g=j.redSub(x).redSub(x),L=this.curve._mulC(S.redISub(j)).redMul(g),M=this.curve._mulC(j).redMul(D.redISub(A)),q=j.redMul(g);return this.curve.point(L,M,q)},k.prototype.dbl=function R(){if(this.isInfinity())return this;if(this.curve.extended)return this._extDbl();else return this._projDbl()},k.prototype._extAdd=function R(S){var D=this.y.redSub(this.x).redMul(S.y.redSub(S.x)),A=this.y.redAdd(this.x).redMul(S.y.redAdd(S.x)),L=this.t.redMul(this.curve.dd).redMul(S.t),M=this.z.redMul(S.z.redAdd(S.z)),q=A.redSub(D),j=M.redSub(L),x=M.redAdd(L),g=A.redAdd(D),N=q.redMul(j),y=x.redMul(g),f=q.redMul(g),o=j.redMul(x);return this.curve.point(N,y,o,f)},k.prototype._projAdd=function R(S){var D=this.z.redMul(S.z),A=D.redSqr(),L=this.x.redMul(S.x),M=this.y.redMul(S.y),q=this.curve.d.redMul(L).redMul(M),j=A.redSub(q),x=A.redAdd(q),g=this.x.redAdd(this.y).redMul(S.x.redAdd(S.y)).redISub(L).redISub(M),N=D.redMul(j).redMul(g),y,f;if(this.curve.twisted)y=D.redMul(x).redMul(M.redSub(this.curve._mulA(L))),f=j.redMul(x);else y=D.redMul(x).redMul(M.redSub(L)),f=this.curve._mulC(j).redMul(x);return this.curve.point(N,y,f)},k.prototype.add=function R(S){if(this.isInfinity())return S;if(S.isInfinity())return this;if(this.curve.extended)return this._extAdd(S);else return this._projAdd(S)},k.prototype.mul=function R(S){if(this._hasDoubles(S))return this.curve._fixedNafMul(this,S);else return this.curve._wnafMul(this,S)},k.prototype.mulAdd=function R(S,D,A){return this.curve._wnafMulAdd(1,[this,D],[S,A],2,!1)},k.prototype.jmulAdd=function R(S,D,A){return this.curve._wnafMulAdd(1,[this,D],[S,A],2,!0)},k.prototype.normalize=function R(){if(this.zOne)return this;var S=this.z.redInvm();if(this.x=this.x.redMul(S),this.y=this.y.redMul(S),this.t)this.t=this.t.redMul(S);return this.z=this.curve.one,this.zOne=!0,this},k.prototype.neg=function R(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},k.prototype.getX=function R(){return this.normalize(),this.x.fromRed()},k.prototype.getY=function R(){return this.normalize(),this.y.fromRed()},k.prototype.eq=function R(S){return this===S||this.getX().cmp(S.getX())===0&&this.getY().cmp(S.getY())===0},k.prototype.eqXToP=function R(S){var D=S.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(D)===0)return!0;var A=S.clone(),L=this.curve.redN.redMul(this.z);for(;;){if(A.iadd(this.curve.n),A.cmp(this.curve.p)>=0)return!1;if(D.redIAdd(L),this.x.cmp(D)===0)return!0}},k.prototype.toP=k.prototype.normalize,k.prototype.mixedAdd=k.prototype.add}),SZ=w0((E)=>{var G=E;G.base=_X(),G.short=zY(),G.mont=MY(),G.edwards=RY()}),yU=w0((E)=>{var G=sU(),W=vU();E.inherits=W;function C(U,Z){if((U.charCodeAt(Z)&64512)!==55296)return!1;if(Z<0||Z+1>=U.length)return!1;return(U.charCodeAt(Z+1)&64512)===56320}function H(U,Z){if(Array.isArray(U))return U.slice();if(!U)return[];var Q=[];if(typeof U==="string"){if(!Z){var I=0;for(var $=0;$<U.length;$++){var K=U.charCodeAt($);if(K<128)Q[I++]=K;else if(K<2048)Q[I++]=K>>6|192,Q[I++]=K&63|128;else if(C(U,$))K=65536+((K&1023)<<10)+(U.charCodeAt(++$)&1023),Q[I++]=K>>18|240,Q[I++]=K>>12&63|128,Q[I++]=K>>6&63|128,Q[I++]=K&63|128;else Q[I++]=K>>12|224,Q[I++]=K>>6&63|128,Q[I++]=K&63|128}}else if(Z==="hex"){if(U=U.replace(/[^a-z0-9]+/ig,""),U.length%2!==0)U="0"+U;for($=0;$<U.length;$+=2)Q.push(parseInt(U[$]+U[$+1],16))}}else for($=0;$<U.length;$++)Q[$]=U[$]|0;return Q}E.toArray=H;function z(U){var Z="";for(var Q=0;Q<U.length;Q++)Z+=k(U[Q].toString(16));return Z}E.toHex=z;function V(U){var Z=U>>>24|U>>>8&65280|U<<8&16711680|(U&255)<<24;return Z>>>0}E.htonl=V;function P(U,Z){var Q="";for(var I=0;I<U.length;I++){var $=U[I];if(Z==="little")$=V($);Q+=R($.toString(16))}return Q}E.toHex32=P;function k(U){if(U.length===1)return"0"+U;else return U}E.zero2=k;function R(U){if(U.length===7)return"0"+U;else if(U.length===6)return"00"+U;else if(U.length===5)return"000"+U;else if(U.length===4)return"0000"+U;else if(U.length===3)return"00000"+U;else if(U.length===2)return"000000"+U;else if(U.length===1)return"0000000"+U;else return U}E.zero8=R;function S(U,Z,Q,I){var $=Q-Z;G($%4===0);var K=new Array($/4);for(var J=0,Y=Z;J<K.length;J++,Y+=4){var X;if(I==="big")X=U[Y]<<24|U[Y+1]<<16|U[Y+2]<<8|U[Y+3];else X=U[Y+3]<<24|U[Y+2]<<16|U[Y+1]<<8|U[Y];K[J]=X>>>0}return K}E.join32=S;function D(U,Z){var Q=new Array(U.length*4);for(var I=0,$=0;I<U.length;I++,$+=4){var K=U[I];if(Z==="big")Q[$]=K>>>24,Q[$+1]=K>>>16&255,Q[$+2]=K>>>8&255,Q[$+3]=K&255;else Q[$+3]=K>>>24,Q[$+2]=K>>>16&255,Q[$+1]=K>>>8&255,Q[$]=K&255}return Q}E.split32=D;function A(U,Z){return U>>>Z|U<<32-Z}E.rotr32=A;function L(U,Z){return U<<Z|U>>>32-Z}E.rotl32=L;function M(U,Z){return U+Z>>>0}E.sum32=M;function q(U,Z,Q){return U+Z+Q>>>0}E.sum32_3=q;function j(U,Z,Q,I){return U+Z+Q+I>>>0}E.sum32_4=j;function x(U,Z,Q,I,$){return U+Z+Q+I+$>>>0}E.sum32_5=x;function g(U,Z,Q,I){var $=U[Z],K=U[Z+1],J=I+K>>>0,Y=(J<I?1:0)+Q+$;U[Z]=Y>>>0,U[Z+1]=J}E.sum64=g;function N(U,Z,Q,I){var $=Z+I>>>0,K=($<Z?1:0)+U+Q;return K>>>0}E.sum64_hi=N;function y(U,Z,Q,I){var $=Z+I;return $>>>0}E.sum64_lo=y;function f(U,Z,Q,I,$,K,J,Y){var X=0,O=Z;O=O+I>>>0,X+=O<Z?1:0,O=O+K>>>0,X+=O<K?1:0,O=O+Y>>>0,X+=O<Y?1:0;var v=U+Q+$+J+X;return v>>>0}E.sum64_4_hi=f;function o(U,Z,Q,I,$,K,J,Y){var X=Z+I+K+Y;return X>>>0}E.sum64_4_lo=o;function r(U,Z,Q,I,$,K,J,Y,X,O){var v=0,T=Z;T=T+I>>>0,v+=T<Z?1:0,T=T+K>>>0,v+=T<K?1:0,T=T+Y>>>0,v+=T<Y?1:0,T=T+O>>>0,v+=T<O?1:0;var B=U+Q+$+J+X+v;return B>>>0}E.sum64_5_hi=r;function V0(U,Z,Q,I,$,K,J,Y,X,O){var v=Z+I+K+Y+O;return v>>>0}E.sum64_5_lo=V0;function Y0(U,Z,Q){var I=Z<<32-Q|U>>>Q;return I>>>0}E.rotr64_hi=Y0;function u(U,Z,Q){var I=U<<32-Q|Z>>>Q;return I>>>0}E.rotr64_lo=u;function a(U,Z,Q){return U>>>Q}E.shr64_hi=a;function F(U,Z,Q){var I=U<<32-Q|Z>>>Q;return I>>>0}E.shr64_lo=F}),CX=w0((E)=>{var G=yU(),W=sU();function C(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}E.BlockHash=C,C.prototype.update=function H(z,V){if(z=G.toArray(z,V),!this.pending)this.pending=z;else this.pending=this.pending.concat(z);if(this.pendingTotal+=z.length,this.pending.length>=this._delta8){z=this.pending;var P=z.length%this._delta8;if(this.pending=z.slice(z.length-P,z.length),this.pending.length===0)this.pending=null;z=G.join32(z,0,z.length-P,this.endian);for(var k=0;k<z.length;k+=this._delta32)this._update(z,k,k+this._delta32)}return this},C.prototype.digest=function H(z){return this.update(this._pad()),W(this.pending===null),this._digest(z)},C.prototype._pad=function H(){var z=this.pendingTotal,V=this._delta8,P=V-(z+this.padLength)%V,k=new Array(P+this.padLength);k[0]=128;for(var R=1;R<P;R++)k[R]=0;if(z<<=3,this.endian==="big"){for(var S=8;S<this.padLength;S++)k[R++]=0;k[R++]=0,k[R++]=0,k[R++]=0,k[R++]=0,k[R++]=z>>>24&255,k[R++]=z>>>16&255,k[R++]=z>>>8&255,k[R++]=z&255}else{k[R++]=z&255,k[R++]=z>>>8&255,k[R++]=z>>>16&255,k[R++]=z>>>24&255,k[R++]=0,k[R++]=0,k[R++]=0,k[R++]=0;for(S=8;S<this.padLength;S++)k[R++]=0}return k}}),PZ=w0((E)=>{var G=yU(),W=G.rotr32;function C(D,A,L,M){if(D===0)return H(A,L,M);if(D===1||D===3)return V(A,L,M);if(D===2)return z(A,L,M)}E.ft_1=C;function H(D,A,L){return D&A^~D&L}E.ch32=H;function z(D,A,L){return D&A^D&L^A&L}E.maj32=z;function V(D,A,L){return D^A^L}E.p32=V;function P(D){return W(D,2)^W(D,13)^W(D,22)}E.s0_256=P;function k(D){return W(D,6)^W(D,11)^W(D,25)}E.s1_256=k;function R(D){return W(D,7)^W(D,18)^D>>>3}E.g0_256=R;function S(D){return W(D,17)^W(D,19)^D>>>10}E.g1_256=S}),SY=w0((E,G)=>{var W=yU(),C=CX(),H=PZ(),z=W.rotl32,V=W.sum32,P=W.sum32_5,k=H.ft_1,R=C.BlockHash,S=[1518500249,1859775393,2400959708,3395469782];function D(){if(!(this instanceof D))return new D;R.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}W.inherits(D,R),G.exports=D,D.blockSize=512,D.outSize=160,D.hmacStrength=80,D.padLength=64,D.prototype._update=function A(L,M){var q=this.W;for(var j=0;j<16;j++)q[j]=L[M+j];for(;j<q.length;j++)q[j]=z(q[j-3]^q[j-8]^q[j-14]^q[j-16],1);var x=this.h[0],g=this.h[1],N=this.h[2],y=this.h[3],f=this.h[4];for(j=0;j<q.length;j++){var o=~~(j/20),r=P(z(x,5),k(o,g,N,y),f,q[j],S[o]);f=y,y=N,N=z(g,30),g=x,x=r}this.h[0]=V(this.h[0],x),this.h[1]=V(this.h[1],g),this.h[2]=V(this.h[2],N),this.h[3]=V(this.h[3],y),this.h[4]=V(this.h[4],f)},D.prototype._digest=function A(L){if(L==="hex")return W.toHex32(this.h,"big");else return W.split32(this.h,"big")}}),qZ=w0((E,G)=>{var W=yU(),C=CX(),H=PZ(),z=sU(),V=W.sum32,P=W.sum32_4,k=W.sum32_5,R=H.ch32,S=H.maj32,D=H.s0_256,A=H.s1_256,L=H.g0_256,M=H.g1_256,q=C.BlockHash,j=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function x(){if(!(this instanceof x))return new x;q.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=j,this.W=new Array(64)}W.inherits(x,q),G.exports=x,x.blockSize=512,x.outSize=256,x.hmacStrength=192,x.padLength=64,x.prototype._update=function g(N,y){var f=this.W;for(var o=0;o<16;o++)f[o]=N[y+o];for(;o<f.length;o++)f[o]=P(M(f[o-2]),f[o-7],L(f[o-15]),f[o-16]);var r=this.h[0],V0=this.h[1],Y0=this.h[2],u=this.h[3],a=this.h[4],F=this.h[5],U=this.h[6],Z=this.h[7];z(this.k.length===f.length);for(o=0;o<f.length;o++){var Q=k(Z,A(a),R(a,F,U),this.k[o],f[o]),I=V(D(r),S(r,V0,Y0));Z=U,U=F,F=a,a=V(u,Q),u=Y0,Y0=V0,V0=r,r=V(Q,I)}this.h[0]=V(this.h[0],r),this.h[1]=V(this.h[1],V0),this.h[2]=V(this.h[2],Y0),this.h[3]=V(this.h[3],u),this.h[4]=V(this.h[4],a),this.h[5]=V(this.h[5],F),this.h[6]=V(this.h[6],U),this.h[7]=V(this.h[7],Z)},x.prototype._digest=function g(N){if(N==="hex")return W.toHex32(this.h,"big");else return W.split32(this.h,"big")}}),PY=w0((E,G)=>{var W=yU(),C=qZ();function H(){if(!(this instanceof H))return new H;C.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}W.inherits(H,C),G.exports=H,H.blockSize=512,H.outSize=224,H.hmacStrength=192,H.padLength=64,H.prototype._digest=function z(V){if(V==="hex")return W.toHex32(this.h.slice(0,7),"big");else return W.split32(this.h.slice(0,7),"big")}}),vZ=w0((E,G)=>{var W=yU(),C=CX(),H=sU(),z=W.rotr64_hi,V=W.rotr64_lo,P=W.shr64_hi,k=W.shr64_lo,R=W.sum64,S=W.sum64_hi,D=W.sum64_lo,A=W.sum64_4_hi,L=W.sum64_4_lo,M=W.sum64_5_hi,q=W.sum64_5_lo,j=C.BlockHash,x=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function g(){if(!(this instanceof g))return new g;j.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=x,this.W=new Array(160)}W.inherits(g,j),G.exports=g,g.blockSize=1024,g.outSize=512,g.hmacStrength=192,g.padLength=128,g.prototype._prepareBlock=function Q(I,$){var K=this.W;for(var J=0;J<32;J++)K[J]=I[$+J];for(;J<K.length;J+=2){var Y=U(K[J-4],K[J-3]),X=Z(K[J-4],K[J-3]),O=K[J-14],v=K[J-13],T=a(K[J-30],K[J-29]),B=F(K[J-30],K[J-29]),c=K[J-32],l=K[J-31];K[J]=A(Y,X,O,v,T,B,c,l),K[J+1]=L(Y,X,O,v,T,B,c,l)}},g.prototype._update=function Q(I,$){this._prepareBlock(I,$);var K=this.W,J=this.h[0],Y=this.h[1],X=this.h[2],O=this.h[3],v=this.h[4],T=this.h[5],B=this.h[6],c=this.h[7],l=this.h[8],s=this.h[9],O0=this.h[10],h=this.h[11],d=this.h[12],g0=this.h[13],Q0=this.h[14],$0=this.h[15];H(this.k.length===K.length);for(var m=0;m<K.length;m+=2){var p=Q0,b=$0,N0=Y0(l,s),i=u(l,s),e=N(l,s,O0,h,d,g0),t=y(l,s,O0,h,d,g0),n=this.k[m],X0=this.k[m+1],H0=K[m],Z0=K[m+1],W0=M(p,b,N0,i,e,t,n,X0,H0,Z0),c0=q(p,b,N0,i,e,t,n,X0,H0,Z0);p=r(J,Y),b=V0(J,Y),N0=f(J,Y,X,O,v,T),i=o(J,Y,X,O,v,T);var G0=S(p,b,N0,i),A0=D(p,b,N0,i);Q0=d,$0=g0,d=O0,g0=h,O0=l,h=s,l=S(B,c,W0,c0),s=D(c,c,W0,c0),B=v,c=T,v=X,T=O,X=J,O=Y,J=S(W0,c0,G0,A0),Y=D(W0,c0,G0,A0)}R(this.h,0,J,Y),R(this.h,2,X,O),R(this.h,4,v,T),R(this.h,6,B,c),R(this.h,8,l,s),R(this.h,10,O0,h),R(this.h,12,d,g0),R(this.h,14,Q0,$0)},g.prototype._digest=function Q(I){if(I==="hex")return W.toHex32(this.h,"big");else return W.split32(this.h,"big")};function N(Q,I,$,K,J){var Y=Q&$^~Q&J;if(Y<0)Y+=4294967296;return Y}function y(Q,I,$,K,J,Y){var X=I&K^~I&Y;if(X<0)X+=4294967296;return X}function f(Q,I,$,K,J){var Y=Q&$^Q&J^$&J;if(Y<0)Y+=4294967296;return Y}function o(Q,I,$,K,J,Y){var X=I&K^I&Y^K&Y;if(X<0)X+=4294967296;return X}function r(Q,I){var $=z(Q,I,28),K=z(I,Q,2),J=z(I,Q,7),Y=$^K^J;if(Y<0)Y+=4294967296;return Y}function V0(Q,I){var $=V(Q,I,28),K=V(I,Q,2),J=V(I,Q,7),Y=$^K^J;if(Y<0)Y+=4294967296;return Y}function Y0(Q,I){var $=z(Q,I,14),K=z(Q,I,18),J=z(I,Q,9),Y=$^K^J;if(Y<0)Y+=4294967296;return Y}function u(Q,I){var $=V(Q,I,14),K=V(Q,I,18),J=V(I,Q,9),Y=$^K^J;if(Y<0)Y+=4294967296;return Y}function a(Q,I){var $=z(Q,I,1),K=z(Q,I,8),J=P(Q,I,7),Y=$^K^J;if(Y<0)Y+=4294967296;return Y}function F(Q,I){var $=V(Q,I,1),K=V(Q,I,8),J=k(Q,I,7),Y=$^K^J;if(Y<0)Y+=4294967296;return Y}function U(Q,I){var $=z(Q,I,19),K=z(I,Q,29),J=P(Q,I,6),Y=$^K^J;if(Y<0)Y+=4294967296;return Y}function Z(Q,I){var $=V(Q,I,19),K=V(I,Q,29),J=k(Q,I,6),Y=$^K^J;if(Y<0)Y+=4294967296;return Y}}),qY=w0((E,G)=>{var W=yU(),C=vZ();function H(){if(!(this instanceof H))return new H;C.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}W.inherits(H,C),G.exports=H,H.blockSize=1024,H.outSize=384,H.hmacStrength=192,H.padLength=128,H.prototype._digest=function z(V){if(V==="hex")return W.toHex32(this.h.slice(0,12),"big");else return W.split32(this.h.slice(0,12),"big")}}),vY=w0((E)=>{E.sha1=SY(),E.sha224=PY(),E.sha256=qZ(),E.sha384=qY(),E.sha512=vZ()}),kY=w0((E)=>{var G=yU(),W=CX(),C=G.rotl32,H=G.sum32,z=G.sum32_3,V=G.sum32_4,P=W.BlockHash;function k(){if(!(this instanceof k))return new k;P.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}G.inherits(k,P),E.ripemd160=k,k.blockSize=512,k.outSize=160,k.hmacStrength=192,k.padLength=64,k.prototype._update=function j(x,g){var N=this.h[0],y=this.h[1],f=this.h[2],o=this.h[3],r=this.h[4],V0=N,Y0=y,u=f,a=o,F=r;for(var U=0;U<80;U++){var Z=H(C(V(N,R(U,y,f,o),x[A[U]+g],S(U)),M[U]),r);N=r,r=o,o=C(f,10),f=y,y=Z,Z=H(C(V(V0,R(79-U,Y0,u,a),x[L[U]+g],D(U)),q[U]),F),V0=F,F=a,a=C(u,10),u=Y0,Y0=Z}Z=z(this.h[1],f,a),this.h[1]=z(this.h[2],o,F),this.h[2]=z(this.h[3],r,V0),this.h[3]=z(this.h[4],N,Y0),this.h[4]=z(this.h[0],y,u),this.h[0]=Z},k.prototype._digest=function j(x){if(x==="hex")return G.toHex32(this.h,"little");else return G.split32(this.h,"little")};function R(j,x,g,N){if(j<=15)return x^g^N;else if(j<=31)return x&g|~x&N;else if(j<=47)return(x|~g)^N;else if(j<=63)return x&N|g&~N;else return x^(g|~N)}function S(j){if(j<=15)return 0;else if(j<=31)return 1518500249;else if(j<=47)return 1859775393;else if(j<=63)return 2400959708;else return 2840853838}function D(j){if(j<=15)return 1352829926;else if(j<=31)return 1548603684;else if(j<=47)return 1836072691;else if(j<=63)return 2053994217;else return 0}var A=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],L=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],q=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]}),jY=w0((E,G)=>{var W=yU(),C=sU();function H(z,V,P){if(!(this instanceof H))return new H(z,V,P);this.Hash=z,this.blockSize=z.blockSize/8,this.outSize=z.outSize/8,this.inner=null,this.outer=null,this._init(W.toArray(V,P))}G.exports=H,H.prototype._init=function z(V){if(V.length>this.blockSize)V=new this.Hash().update(V).digest();C(V.length<=this.blockSize);for(var P=V.length;P<this.blockSize;P++)V.push(0);for(P=0;P<V.length;P++)V[P]^=54;this.inner=new this.Hash().update(V);for(P=0;P<V.length;P++)V[P]^=106;this.outer=new this.Hash().update(V)},H.prototype.update=function z(V,P){return this.inner.update(V,P),this},H.prototype.digest=function z(V){return this.outer.update(this.inner.digest()),this.outer.digest(V)}}),FI=w0((E)=>{var G=E;G.utils=yU(),G.common=CX(),G.sha=vY(),G.ripemd=kY(),G.hmac=jY(),G.sha1=G.sha.sha1,G.sha256=G.sha.sha256,G.sha224=G.sha.sha224,G.sha384=G.sha.sha384,G.sha512=G.sha.sha512,G.ripemd160=G.ripemd.ripemd160}),BY=w0((E,G)=>{G.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}}),HI=w0((E)=>{var G=E,W=FI(),C=SZ(),H=BU(),z=H.assert;function V(R){if(R.type==="short")this.curve=new C.short(R);else if(R.type==="edwards")this.curve=new C.edwards(R);else this.curve=new C.mont(R);this.g=this.curve.g,this.n=this.curve.n,this.hash=R.hash,z(this.g.validate(),"Invalid curve"),z(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}G.PresetCurve=V;function P(R,S){Object.defineProperty(G,R,{configurable:!0,enumerable:!0,get:function(){var D=new V(S);return Object.defineProperty(G,R,{configurable:!0,enumerable:!0,value:D}),D}})}P("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:W.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),P("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:W.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),P("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:W.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),P("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:W.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),P("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:W.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),P("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:W.sha256,gRed:!1,g:["9"]}),P("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:W.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var k;try{k=BY()}catch(R){k=void 0}P("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:W.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",k]})}),xY=w0((E,G)=>{var W=FI(),C=MZ(),H=sU();function z(V){if(!(this instanceof z))return new z(V);this.hash=V.hash,this.predResist=!!V.predResist,this.outLen=this.hash.outSize,this.minEntropy=V.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var P=C.toArray(V.entropy,V.entropyEnc||"hex"),k=C.toArray(V.nonce,V.nonceEnc||"hex"),R=C.toArray(V.pers,V.persEnc||"hex");H(P.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(P,k,R)}G.exports=z,z.prototype._init=function V(P,k,R){var S=P.concat(k).concat(R);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var D=0;D<this.V.length;D++)this.K[D]=0,this.V[D]=1;this._update(S),this._reseed=1,this.reseedInterval=281474976710656},z.prototype._hmac=function V(){return new W.hmac(this.hash,this.K)},z.prototype._update=function V(P){var k=this._hmac().update(this.V).update([0]);if(P)k=k.update(P);if(this.K=k.digest(),this.V=this._hmac().update(this.V).digest(),!P)return;this.K=this._hmac().update(this.V).update([1]).update(P).digest(),this.V=this._hmac().update(this.V).digest()},z.prototype.reseed=function V(P,k,R,S){if(typeof k!=="string")S=R,R=k,k=null;P=C.toArray(P,k),R=C.toArray(R,S),H(P.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(P.concat(R||[])),this._reseed=1},z.prototype.generate=function V(P,k,R,S){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");if(typeof k!=="string")S=R,R=k,k=null;if(R)R=C.toArray(R,S||"hex"),this._update(R);var D=[];while(D.length<P)this.V=this._hmac().update(this.V).digest(),D=D.concat(this.V);var A=D.slice(0,P);return this._update(R),this._reseed++,C.encode(A,k)}}),gY=w0((E,G)=>{var W=lU(),C=BU(),H=C.assert;function z(V,P){if(this.ec=V,this.priv=null,this.pub=null,P.priv)this._importPrivate(P.priv,P.privEnc);if(P.pub)this._importPublic(P.pub,P.pubEnc)}G.exports=z,z.fromPublic=function V(P,k,R){if(k instanceof z)return k;return new z(P,{pub:k,pubEnc:R})},z.fromPrivate=function V(P,k,R){if(k instanceof z)return k;return new z(P,{priv:k,privEnc:R})},z.prototype.validate=function V(){var P=this.getPublic();if(P.isInfinity())return{result:!1,reason:"Invalid public key"};if(!P.validate())return{result:!1,reason:"Public key is not a point"};if(!P.mul(this.ec.curve.n).isInfinity())return{result:!1,reason:"Public key * N != O"};return{result:!0,reason:null}},z.prototype.getPublic=function V(P,k){if(typeof P==="string")k=P,P=null;if(!this.pub)this.pub=this.ec.g.mul(this.priv);if(!k)return this.pub;return this.pub.encode(k,P)},z.prototype.getPrivate=function V(P){if(P==="hex")return this.priv.toString(16,2);else return this.priv},z.prototype._importPrivate=function V(P,k){this.priv=new W(P,k||16),this.priv=this.priv.umod(this.ec.curve.n)},z.prototype._importPublic=function V(P,k){if(P.x||P.y){if(this.ec.curve.type==="mont")H(P.x,"Need x coordinate");else if(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")H(P.x&&P.y,"Need both x and y coordinate");this.pub=this.ec.curve.point(P.x,P.y);return}this.pub=this.ec.curve.decodePoint(P,k)},z.prototype.derive=function V(P){if(!P.validate())H(P.validate(),"public point not validated");return P.mul(this.priv).getX()},z.prototype.sign=function V(P,k,R){return this.ec.sign(P,this,k,R)},z.prototype.verify=function V(P,k,R){return this.ec.verify(P,k,this,void 0,R)},z.prototype.inspect=function V(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),NY=w0((E,G)=>{var W=lU(),C=BU(),H=C.assert;function z(S,D){if(S instanceof z)return S;if(this._importDER(S,D))return;if(H(S.r&&S.s,"Signature without r or s"),this.r=new W(S.r,16),this.s=new W(S.s,16),S.recoveryParam===void 0)this.recoveryParam=null;else this.recoveryParam=S.recoveryParam}G.exports=z;function V(){this.place=0}function P(S,D){var A=S[D.place++];if(!(A&128))return A;var L=A&15;if(L===0||L>4)return!1;if(S[D.place]===0)return!1;var M=0;for(var q=0,j=D.place;q<L;q++,j++)M<<=8,M|=S[j],M>>>=0;if(M<=127)return!1;return D.place=j,M}function k(S){var D=0,A=S.length-1;while(!S[D]&&!(S[D+1]&128)&&D<A)D++;if(D===0)return S;return S.slice(D)}z.prototype._importDER=function S(D,A){D=C.toArray(D,A);var L=new V;if(D[L.place++]!==48)return!1;var M=P(D,L);if(M===!1)return!1;if(M+L.place!==D.length)return!1;if(D[L.place++]!==2)return!1;var q=P(D,L);if(q===!1)return!1;if((D[L.place]&128)!==0)return!1;var j=D.slice(L.place,q+L.place);if(L.place+=q,D[L.place++]!==2)return!1;var x=P(D,L);if(x===!1)return!1;if(D.length!==x+L.place)return!1;if((D[L.place]&128)!==0)return!1;var g=D.slice(L.place,x+L.place);if(j[0]===0)if(j[1]&128)j=j.slice(1);else return!1;if(g[0]===0)if(g[1]&128)g=g.slice(1);else return!1;return this.r=new W(j),this.s=new W(g),this.recoveryParam=null,!0};function R(S,D){if(D<128){S.push(D);return}var A=1+(Math.log(D)/Math.LN2>>>3);S.push(A|128);while(--A)S.push(D>>>(A<<3)&255);S.push(D)}z.prototype.toDER=function S(D){var A=this.r.toArray(),L=this.s.toArray();if(A[0]&128)A=[0].concat(A);if(L[0]&128)L=[0].concat(L);A=k(A),L=k(L);while(!L[0]&&!(L[1]&128))L=L.slice(1);var M=[2];R(M,A.length),M=M.concat(A),M.push(2),R(M,L.length);var q=M.concat(L),j=[48];return R(j,q.length),j=j.concat(q),C.encode(j,D)}}),_Y=w0((E,G)=>{var W=lU(),C=xY(),H=BU(),z=HI(),V=RZ(),P=H.assert,k=gY(),R=NY();function S(D){if(!(this instanceof S))return new S(D);if(typeof D==="string")P(Object.prototype.hasOwnProperty.call(z,D),"Unknown curve "+D),D=z[D];if(D instanceof z.PresetCurve)D={curve:D};this.curve=D.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=D.curve.g,this.g.precompute(D.curve.n.bitLength()+1),this.hash=D.hash||D.curve.hash}G.exports=S,S.prototype.keyPair=function D(A){return new k(this,A)},S.prototype.keyFromPrivate=function D(A,L){return k.fromPrivate(this,A,L)},S.prototype.keyFromPublic=function D(A,L){return k.fromPublic(this,A,L)},S.prototype.genKeyPair=function D(A){if(!A)A={};var L=new C({hash:this.hash,pers:A.pers,persEnc:A.persEnc||"utf8",entropy:A.entropy||V(this.hash.hmacStrength),entropyEnc:A.entropy&&A.entropyEnc||"utf8",nonce:this.n.toArray()}),M=this.n.byteLength(),q=this.n.sub(new W(2));for(;;){var j=new W(L.generate(M));if(j.cmp(q)>0)continue;return j.iaddn(1),this.keyFromPrivate(j)}},S.prototype._truncateToN=function D(A,L,M){var q;if(W.isBN(A)||typeof A==="number")A=new W(A,16),q=A.byteLength();else if(typeof A==="object")q=A.length,A=new W(A,16);else{var j=A.toString();q=j.length+1>>>1,A=new W(j,16)}if(typeof M!=="number")M=q*8;var x=M-this.n.bitLength();if(x>0)A=A.ushrn(x);if(!L&&A.cmp(this.n)>=0)return A.sub(this.n);else return A},S.prototype.sign=function D(A,L,M,q){if(typeof M==="object")q=M,M=null;if(!q)q={};if(typeof A!=="string"&&typeof A!=="number"&&!W.isBN(A)){P(typeof A==="object"&&A&&typeof A.length==="number","Expected message to be an array-like, a hex string, or a BN instance"),P(A.length>>>0===A.length);for(var j=0;j<A.length;j++)P((A[j]&255)===A[j])}L=this.keyFromPrivate(L,M),A=this._truncateToN(A,!1,q.msgBitLength),P(!A.isNeg(),"Can not sign a negative message");var x=this.n.byteLength(),g=L.getPrivate().toArray("be",x),N=A.toArray("be",x);P(new W(N).eq(A),"Can not sign message");var y=new C({hash:this.hash,entropy:g,nonce:N,pers:q.pers,persEnc:q.persEnc||"utf8"}),f=this.n.sub(new W(1));for(var o=0;;o++){var r=q.k?q.k(o):new W(y.generate(this.n.byteLength()));if(r=this._truncateToN(r,!0),r.cmpn(1)<=0||r.cmp(f)>=0)continue;var V0=this.g.mul(r);if(V0.isInfinity())continue;var Y0=V0.getX(),u=Y0.umod(this.n);if(u.cmpn(0)===0)continue;var a=r.invm(this.n).mul(u.mul(L.getPrivate()).iadd(A));if(a=a.umod(this.n),a.cmpn(0)===0)continue;var F=(V0.getY().isOdd()?1:0)|(Y0.cmp(u)!==0?2:0);if(q.canonical&&a.cmp(this.nh)>0)a=this.n.sub(a),F^=1;return new R({r:u,s:a,recoveryParam:F})}},S.prototype.verify=function D(A,L,M,q,j){if(!j)j={};A=this._truncateToN(A,!1,j.msgBitLength),M=this.keyFromPublic(M,q),L=new R(L,"hex");var{r:x,s:g}=L;if(x.cmpn(1)<0||x.cmp(this.n)>=0)return!1;if(g.cmpn(1)<0||g.cmp(this.n)>=0)return!1;var N=g.invm(this.n),y=N.mul(A).umod(this.n),f=N.mul(x).umod(this.n),o;if(!this.curve._maxwellTrick){if(o=this.g.mulAdd(y,M.getPublic(),f),o.isInfinity())return!1;return o.getX().umod(this.n).cmp(x)===0}if(o=this.g.jmulAdd(y,M.getPublic(),f),o.isInfinity())return!1;return o.eqXToP(x)},S.prototype.recoverPubKey=function(D,A,L,M){P((3&L)===L,"The recovery param is more than two bits"),A=new R(A,M);var q=this.n,j=new W(D),x=A.r,g=A.s,N=L&1,y=L>>1;if(x.cmp(this.curve.p.umod(this.curve.n))>=0&&y)throw new Error("Unable to find sencond key candinate");if(y)x=this.curve.pointFromX(x.add(this.curve.n),N);else x=this.curve.pointFromX(x,N);var f=A.r.invm(q),o=q.sub(j).mul(f).umod(q),r=g.mul(f).umod(q);return this.g.mulAdd(o,x,r)},S.prototype.getKeyRecoveryParam=function(D,A,L,M){if(A=new R(A,M),A.recoveryParam!==null)return A.recoveryParam;for(var q=0;q<4;q++){var j;try{j=this.recoverPubKey(D,A,q)}catch(x){continue}if(j.eq(L))return q}throw new Error("Unable to find valid recovery factor")}}),wY=w0((E,G)=>{var W=BU(),C=W.assert,H=W.parseBytes,z=W.cachedProperty;function V(P,k){if(this.eddsa=P,this._secret=H(k.secret),P.isPoint(k.pub))this._pub=k.pub;else this._pubBytes=H(k.pub)}V.fromPublic=function P(k,R){if(R instanceof V)return R;return new V(k,{pub:R})},V.fromSecret=function P(k,R){if(R instanceof V)return R;return new V(k,{secret:R})},V.prototype.secret=function P(){return this._secret},z(V,"pubBytes",function P(){return this.eddsa.encodePoint(this.pub())}),z(V,"pub",function P(){if(this._pubBytes)return this.eddsa.decodePoint(this._pubBytes);return this.eddsa.g.mul(this.priv())}),z(V,"privBytes",function P(){var k=this.eddsa,R=this.hash(),S=k.encodingLength-1,D=R.slice(0,k.encodingLength);return D[0]&=248,D[S]&=127,D[S]|=64,D}),z(V,"priv",function P(){return this.eddsa.decodeInt(this.privBytes())}),z(V,"hash",function P(){return this.eddsa.hash().update(this.secret()).digest()}),z(V,"messagePrefix",function P(){return this.hash().slice(this.eddsa.encodingLength)}),V.prototype.sign=function P(k){return C(this._secret,"KeyPair can only verify"),this.eddsa.sign(k,this)},V.prototype.verify=function P(k,R){return this.eddsa.verify(k,R,this)},V.prototype.getSecret=function P(k){return C(this._secret,"KeyPair is public only"),W.encode(this.secret(),k)},V.prototype.getPublic=function P(k){return W.encode(this.pubBytes(),k)},G.exports=V}),yY=w0((E,G)=>{var W=lU(),C=BU(),H=C.assert,z=C.cachedProperty,V=C.parseBytes;function P(k,R){if(this.eddsa=k,typeof R!=="object")R=V(R);if(Array.isArray(R))H(R.length===k.encodingLength*2,"Signature has invalid size"),R={R:R.slice(0,k.encodingLength),S:R.slice(k.encodingLength)};if(H(R.R&&R.S,"Signature without R or S"),k.isPoint(R.R))this._R=R.R;if(R.S instanceof W)this._S=R.S;this._Rencoded=Array.isArray(R.R)?R.R:R.Rencoded,this._Sencoded=Array.isArray(R.S)?R.S:R.Sencoded}z(P,"S",function k(){return this.eddsa.decodeInt(this.Sencoded())}),z(P,"R",function k(){return this.eddsa.decodePoint(this.Rencoded())}),z(P,"Rencoded",function k(){return this.eddsa.encodePoint(this.R())}),z(P,"Sencoded",function k(){return this.eddsa.encodeInt(this.S())}),P.prototype.toBytes=function k(){return this.Rencoded().concat(this.Sencoded())},P.prototype.toHex=function k(){return C.encode(this.toBytes(),"hex").toUpperCase()},G.exports=P}),fY=w0((E,G)=>{var W=FI(),C=HI(),H=BU(),z=H.assert,V=H.parseBytes,P=wY(),k=yY();function R(S){if(z(S==="ed25519","only tested with ed25519 so far"),!(this instanceof R))return new R(S);S=C[S].curve,this.curve=S,this.g=S.g,this.g.precompute(S.n.bitLength()+1),this.pointClass=S.point().constructor,this.encodingLength=Math.ceil(S.n.bitLength()/8),this.hash=W.sha512}G.exports=R,R.prototype.sign=function S(D,A){D=V(D);var L=this.keyFromSecret(A),M=this.hashInt(L.messagePrefix(),D),q=this.g.mul(M),j=this.encodePoint(q),x=this.hashInt(j,L.pubBytes(),D).mul(L.priv()),g=M.add(x).umod(this.curve.n);return this.makeSignature({R:q,S:g,Rencoded:j})},R.prototype.verify=function S(D,A,L){if(D=V(D),A=this.makeSignature(A),A.S().gte(A.eddsa.curve.n)||A.S().isNeg())return!1;var M=this.keyFromPublic(L),q=this.hashInt(A.Rencoded(),M.pubBytes(),D),j=this.g.mul(A.S()),x=A.R().add(M.pub().mul(q));return x.eq(j)},R.prototype.hashInt=function S(){var D=this.hash();for(var A=0;A<arguments.length;A++)D.update(arguments[A]);return H.intFromLE(D.digest()).umod(this.curve.n)},R.prototype.keyFromPublic=function S(D){return P.fromPublic(this,D)},R.prototype.keyFromSecret=function S(D){return P.fromSecret(this,D)},R.prototype.makeSignature=function S(D){if(D instanceof k)return D;return new k(this,D)},R.prototype.encodePoint=function S(D){var A=D.getY().toArray("le",this.encodingLength);return A[this.encodingLength-1]|=D.getX().isOdd()?128:0,A},R.prototype.decodePoint=function S(D){D=H.parseBytes(D);var A=D.length-1,L=D.slice(0,A).concat(D[A]&-129),M=(D[A]&128)!==0,q=H.intFromLE(L);return this.curve.pointFromY(q,M)},R.prototype.encodeInt=function S(D){return D.toArray("le",this.encodingLength)},R.prototype.decodeInt=function S(D){return H.intFromLE(D)},R.prototype.isPoint=function S(D){return D instanceof this.pointClass}}),cY=w0((E)=>{var G=E;G.version=DY().version,G.utils=BU(),G.rand=RZ(),G.curve=SZ(),G.curves=HI(),G.ec=_Y(),G.eddsa=fY()}),pY=w0((E,G)=>{(function(W,C){function H(F,U){if(!F)throw new Error(U||"Assertion failed")}function z(F,U){F.super_=U;var Z=function(){};Z.prototype=U.prototype,F.prototype=new Z,F.prototype.constructor=F}function V(F,U,Z){if(V.isBN(F))return F;if(this.negative=0,this.words=null,this.length=0,this.red=null,F!==null){if(U==="le"||U==="be")Z=U,U=10;this._init(F||0,U||10,Z||"be")}}if(typeof W==="object")W.exports=V;else C.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined")P=window.Buffer;else P=(HU(),y0(FU)).Buffer}catch(F){}V.isBN=function F(U){if(U instanceof V)return!0;return U!==null&&typeof U==="object"&&U.constructor.wordSize===V.wordSize&&Array.isArray(U.words)},V.max=function F(U,Z){if(U.cmp(Z)>0)return U;return Z},V.min=function F(U,Z){if(U.cmp(Z)<0)return U;return Z},V.prototype._init=function F(U,Z,Q){if(typeof U==="number")return this._initNumber(U,Z,Q);if(typeof U==="object")return this._initArray(U,Z,Q);if(Z==="hex")Z=16;H(Z===(Z|0)&&Z>=2&&Z<=36),U=U.toString().replace(/\s+/g,"");var I=0;if(U[0]==="-")I++,this.negative=1;if(I<U.length){if(Z===16)this._parseHex(U,I,Q);else if(this._parseBase(U,Z,I),Q==="le")this._initArray(this.toArray(),Z,Q)}},V.prototype._initNumber=function F(U,Z,Q){if(U<0)this.negative=1,U=-U;if(U<67108864)this.words=[U&67108863],this.length=1;else if(U<4503599627370496)this.words=[U&67108863,U/67108864&67108863],this.length=2;else H(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3;if(Q!=="le")return;this._initArray(this.toArray(),Z,Q)},V.prototype._initArray=function F(U,Z,Q){if(H(typeof U.length==="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var $,K,J=0;if(Q==="be"){for(I=U.length-1,$=0;I>=0;I-=3)if(K=U[I]|U[I-1]<<8|U[I-2]<<16,this.words[$]|=K<<J&67108863,this.words[$+1]=K>>>26-J&67108863,J+=24,J>=26)J-=26,$++}else if(Q==="le"){for(I=0,$=0;I<U.length;I+=3)if(K=U[I]|U[I+1]<<8|U[I+2]<<16,this.words[$]|=K<<J&67108863,this.words[$+1]=K>>>26-J&67108863,J+=24,J>=26)J-=26,$++}return this.strip()};function k(F,U){var Z=F.charCodeAt(U);if(Z>=65&&Z<=70)return Z-55;else if(Z>=97&&Z<=102)return Z-87;else return Z-48&15}function R(F,U,Z){var Q=k(F,Z);if(Z-1>=U)Q|=k(F,Z-1)<<4;return Q}V.prototype._parseHex=function F(U,Z,Q){this.length=Math.ceil((U.length-Z)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var $=0,K=0,J;if(Q==="be")for(I=U.length-1;I>=Z;I-=2)if(J=R(U,Z,I)<<$,this.words[K]|=J&67108863,$>=18)$-=18,K+=1,this.words[K]|=J>>>26;else $+=8;else{var Y=U.length-Z;for(I=Y%2===0?Z+1:Z;I<U.length;I+=2)if(J=R(U,Z,I)<<$,this.words[K]|=J&67108863,$>=18)$-=18,K+=1,this.words[K]|=J>>>26;else $+=8}this.strip()};function S(F,U,Z,Q){var I=0,$=Math.min(F.length,Z);for(var K=U;K<$;K++){var J=F.charCodeAt(K)-48;if(I*=Q,J>=49)I+=J-49+10;else if(J>=17)I+=J-17+10;else I+=J}return I}V.prototype._parseBase=function F(U,Z,Q){this.words=[0],this.length=1;for(var I=0,$=1;$<=67108863;$*=Z)I++;I--,$=$/Z|0;var K=U.length-Q,J=K%I,Y=Math.min(K,K-J)+Q,X=0;for(var O=Q;O<Y;O+=I)if(X=S(U,O,O+I,Z),this.imuln($),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(J!==0){var v=1;X=S(U,O,U.length,Z);for(O=0;O<J;O++)v*=Z;if(this.imuln(v),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},V.prototype.copy=function F(U){U.words=new Array(this.length);for(var Z=0;Z<this.length;Z++)U.words[Z]=this.words[Z];U.length=this.length,U.negative=this.negative,U.red=this.red},V.prototype.clone=function F(){var U=new V(null);return this.copy(U),U},V.prototype._expand=function F(U){while(this.length<U)this.words[this.length++]=0;return this},V.prototype.strip=function F(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function F(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},V.prototype.inspect=function F(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var D=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function F(U,Z){U=U||10,Z=Z|0||1;var Q;if(U===16||U==="hex"){Q="";var I=0,$=0;for(var K=0;K<this.length;K++){var J=this.words[K],Y=((J<<I|$)&16777215).toString(16);if($=J>>>24-I&16777215,I+=2,I>=26)I-=26,K--;if($!==0||K!==this.length-1)Q=D[6-Y.length]+Y+Q;else Q=Y+Q}if($!==0)Q=$.toString(16)+Q;while(Q.length%Z!==0)Q="0"+Q;if(this.negative!==0)Q="-"+Q;return Q}if(U===(U|0)&&U>=2&&U<=36){var X=A[U],O=L[U];Q="";var v=this.clone();v.negative=0;while(!v.isZero()){var T=v.modn(O).toString(U);if(v=v.idivn(O),!v.isZero())Q=D[X-T.length]+T+Q;else Q=T+Q}if(this.isZero())Q="0"+Q;while(Q.length%Z!==0)Q="0"+Q;if(this.negative!==0)Q="-"+Q;return Q}H(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function F(){var U=this.words[0];if(this.length===2)U+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)U+=4503599627370496+this.words[1]*67108864;else if(this.length>2)H(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-U:U},V.prototype.toJSON=function F(){return this.toString(16)},V.prototype.toBuffer=function F(U,Z){return H(typeof P!=="undefined"),this.toArrayLike(P,U,Z)},V.prototype.toArray=function F(U,Z){return this.toArrayLike(Array,U,Z)},V.prototype.toArrayLike=function F(U,Z,Q){var I=this.byteLength(),$=Q||Math.max(1,I);H(I<=$,"byte array longer than desired length"),H($>0,"Requested array length <= 0"),this.strip();var K=Z==="le",J=new U($),Y,X,O=this.clone();if(!K){for(X=0;X<$-I;X++)J[X]=0;for(X=0;!O.isZero();X++)Y=O.andln(255),O.iushrn(8),J[$-X-1]=Y}else{for(X=0;!O.isZero();X++)Y=O.andln(255),O.iushrn(8),J[X]=Y;for(;X<$;X++)J[X]=0}return J},Math.clz32)V.prototype._countBits=function F(U){return 32-Math.clz32(U)};else V.prototype._countBits=function F(U){var Z=U,Q=0;if(Z>=4096)Q+=13,Z>>>=13;if(Z>=64)Q+=7,Z>>>=7;if(Z>=8)Q+=4,Z>>>=4;if(Z>=2)Q+=2,Z>>>=2;return Q+Z};V.prototype._zeroBits=function F(U){if(U===0)return 26;var Z=U,Q=0;if((Z&8191)===0)Q+=13,Z>>>=13;if((Z&127)===0)Q+=7,Z>>>=7;if((Z&15)===0)Q+=4,Z>>>=4;if((Z&3)===0)Q+=2,Z>>>=2;if((Z&1)===0)Q++;return Q},V.prototype.bitLength=function F(){var U=this.words[this.length-1],Z=this._countBits(U);return(this.length-1)*26+Z};function M(F){var U=new Array(F.bitLength());for(var Z=0;Z<U.length;Z++){var Q=Z/26|0,I=Z%26;U[Z]=(F.words[Q]&1<<I)>>>I}return U}V.prototype.zeroBits=function F(){if(this.isZero())return 0;var U=0;for(var Z=0;Z<this.length;Z++){var Q=this._zeroBits(this.words[Z]);if(U+=Q,Q!==26)break}return U},V.prototype.byteLength=function F(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function F(U){if(this.negative!==0)return this.abs().inotn(U).iaddn(1);return this.clone()},V.prototype.fromTwos=function F(U){if(this.testn(U-1))return this.notn(U).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function F(){return this.negative!==0},V.prototype.neg=function F(){return this.clone().ineg()},V.prototype.ineg=function F(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function F(U){while(this.length<U.length)this.words[this.length++]=0;for(var Z=0;Z<U.length;Z++)this.words[Z]=this.words[Z]|U.words[Z];return this.strip()},V.prototype.ior=function F(U){return H((this.negative|U.negative)===0),this.iuor(U)},V.prototype.or=function F(U){if(this.length>U.length)return this.clone().ior(U);return U.clone().ior(this)},V.prototype.uor=function F(U){if(this.length>U.length)return this.clone().iuor(U);return U.clone().iuor(this)},V.prototype.iuand=function F(U){var Z;if(this.length>U.length)Z=U;else Z=this;for(var Q=0;Q<Z.length;Q++)this.words[Q]=this.words[Q]&U.words[Q];return this.length=Z.length,this.strip()},V.prototype.iand=function F(U){return H((this.negative|U.negative)===0),this.iuand(U)},V.prototype.and=function F(U){if(this.length>U.length)return this.clone().iand(U);return U.clone().iand(this)},V.prototype.uand=function F(U){if(this.length>U.length)return this.clone().iuand(U);return U.clone().iuand(this)},V.prototype.iuxor=function F(U){var Z,Q;if(this.length>U.length)Z=this,Q=U;else Z=U,Q=this;for(var I=0;I<Q.length;I++)this.words[I]=Z.words[I]^Q.words[I];if(this!==Z)for(;I<Z.length;I++)this.words[I]=Z.words[I];return this.length=Z.length,this.strip()},V.prototype.ixor=function F(U){return H((this.negative|U.negative)===0),this.iuxor(U)},V.prototype.xor=function F(U){if(this.length>U.length)return this.clone().ixor(U);return U.clone().ixor(this)},V.prototype.uxor=function F(U){if(this.length>U.length)return this.clone().iuxor(U);return U.clone().iuxor(this)},V.prototype.inotn=function F(U){H(typeof U==="number"&&U>=0);var Z=Math.ceil(U/26)|0,Q=U%26;if(this._expand(Z),Q>0)Z--;for(var I=0;I<Z;I++)this.words[I]=~this.words[I]&67108863;if(Q>0)this.words[I]=~this.words[I]&67108863>>26-Q;return this.strip()},V.prototype.notn=function F(U){return this.clone().inotn(U)},V.prototype.setn=function F(U,Z){H(typeof U==="number"&&U>=0);var Q=U/26|0,I=U%26;if(this._expand(Q+1),Z)this.words[Q]=this.words[Q]|1<<I;else this.words[Q]=this.words[Q]&~(1<<I);return this.strip()},V.prototype.iadd=function F(U){var Z;if(this.negative!==0&&U.negative===0)return this.negative=0,Z=this.isub(U),this.negative^=1,this._normSign();else if(this.negative===0&&U.negative!==0)return U.negative=0,Z=this.isub(U),U.negative=1,Z._normSign();var Q,I;if(this.length>U.length)Q=this,I=U;else Q=U,I=this;var $=0;for(var K=0;K<I.length;K++)Z=(Q.words[K]|0)+(I.words[K]|0)+$,this.words[K]=Z&67108863,$=Z>>>26;for(;$!==0&&K<Q.length;K++)Z=(Q.words[K]|0)+$,this.words[K]=Z&67108863,$=Z>>>26;if(this.length=Q.length,$!==0)this.words[this.length]=$,this.length++;else if(Q!==this)for(;K<Q.length;K++)this.words[K]=Q.words[K];return this},V.prototype.add=function F(U){var Z;if(U.negative!==0&&this.negative===0)return U.negative=0,Z=this.sub(U),U.negative^=1,Z;else if(U.negative===0&&this.negative!==0)return this.negative=0,Z=U.sub(this),this.negative=1,Z;if(this.length>U.length)return this.clone().iadd(U);return U.clone().iadd(this)},V.prototype.isub=function F(U){if(U.negative!==0){U.negative=0;var Z=this.iadd(U);return U.negative=1,Z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var Q=this.cmp(U);if(Q===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,$;if(Q>0)I=this,$=U;else I=U,$=this;var K=0;for(var J=0;J<$.length;J++)Z=(I.words[J]|0)-($.words[J]|0)+K,K=Z>>26,this.words[J]=Z&67108863;for(;K!==0&&J<I.length;J++)Z=(I.words[J]|0)+K,K=Z>>26,this.words[J]=Z&67108863;if(K===0&&J<I.length&&I!==this)for(;J<I.length;J++)this.words[J]=I.words[J];if(this.length=Math.max(this.length,J),I!==this)this.negative=1;return this.strip()},V.prototype.sub=function F(U){return this.clone().isub(U)};function q(F,U,Z){Z.negative=U.negative^F.negative;var Q=F.length+U.length|0;Z.length=Q,Q=Q-1|0;var I=F.words[0]|0,$=U.words[0]|0,K=I*$,J=K&67108863,Y=K/67108864|0;Z.words[0]=J;for(var X=1;X<Q;X++){var O=Y>>>26,v=Y&67108863,T=Math.min(X,U.length-1);for(var B=Math.max(0,X-F.length+1);B<=T;B++){var c=X-B|0;I=F.words[c]|0,$=U.words[B]|0,K=I*$+v,O+=K/67108864|0,v=K&67108863}Z.words[X]=v|0,Y=O|0}if(Y!==0)Z.words[X]=Y|0;else Z.length--;return Z.strip()}var j=function F(U,Z,Q){var I=U.words,$=Z.words,K=Q.words,J=0,Y,X,O,v=I[0]|0,T=v&8191,B=v>>>13,c=I[1]|0,l=c&8191,s=c>>>13,O0=I[2]|0,h=O0&8191,d=O0>>>13,g0=I[3]|0,Q0=g0&8191,$0=g0>>>13,m=I[4]|0,p=m&8191,b=m>>>13,N0=I[5]|0,i=N0&8191,e=N0>>>13,t=I[6]|0,n=t&8191,X0=t>>>13,H0=I[7]|0,Z0=H0&8191,W0=H0>>>13,c0=I[8]|0,G0=c0&8191,A0=c0>>>13,u0=I[9]|0,J0=u0&8191,T0=u0>>>13,r0=$[0]|0,E0=r0&8191,v0=r0>>>13,AU=$[1]|0,k0=AU&8191,j0=AU>>>13,DU=$[2]|0,R0=DU&8191,S0=DU>>>13,LU=$[3]|0,P0=LU&8191,D0=LU>>>13,zU=$[4]|0,B0=zU&8191,L0=zU>>>13,EU=$[5]|0,_=EU&8191,w=EU>>>13,_0=$[6]|0,U0=_0&8191,I0=_0>>>13,l0=$[7]|0,F0=l0&8191,C0=l0>>>13,CU=$[8]|0,x0=CU&8191,q0=CU>>>13,TU=$[9]|0,z0=TU&8191,M0=TU>>>13;Q.negative=U.negative^Z.negative,Q.length=19,Y=Math.imul(T,E0),X=Math.imul(T,v0),X=X+Math.imul(B,E0)|0,O=Math.imul(B,v0);var t0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(t0>>>26)|0,t0&=67108863,Y=Math.imul(l,E0),X=Math.imul(l,v0),X=X+Math.imul(s,E0)|0,O=Math.imul(s,v0),Y=Y+Math.imul(T,k0)|0,X=X+Math.imul(T,j0)|0,X=X+Math.imul(B,k0)|0,O=O+Math.imul(B,j0)|0;var p0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(p0>>>26)|0,p0&=67108863,Y=Math.imul(h,E0),X=Math.imul(h,v0),X=X+Math.imul(d,E0)|0,O=Math.imul(d,v0),Y=Y+Math.imul(l,k0)|0,X=X+Math.imul(l,j0)|0,X=X+Math.imul(s,k0)|0,O=O+Math.imul(s,j0)|0,Y=Y+Math.imul(T,R0)|0,X=X+Math.imul(T,S0)|0,X=X+Math.imul(B,R0)|0,O=O+Math.imul(B,S0)|0;var f0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(f0>>>26)|0,f0&=67108863,Y=Math.imul(Q0,E0),X=Math.imul(Q0,v0),X=X+Math.imul($0,E0)|0,O=Math.imul($0,v0),Y=Y+Math.imul(h,k0)|0,X=X+Math.imul(h,j0)|0,X=X+Math.imul(d,k0)|0,O=O+Math.imul(d,j0)|0,Y=Y+Math.imul(l,R0)|0,X=X+Math.imul(l,S0)|0,X=X+Math.imul(s,R0)|0,O=O+Math.imul(s,S0)|0,Y=Y+Math.imul(T,P0)|0,X=X+Math.imul(T,D0)|0,X=X+Math.imul(B,P0)|0,O=O+Math.imul(B,D0)|0;var b0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(b0>>>26)|0,b0&=67108863,Y=Math.imul(p,E0),X=Math.imul(p,v0),X=X+Math.imul(b,E0)|0,O=Math.imul(b,v0),Y=Y+Math.imul(Q0,k0)|0,X=X+Math.imul(Q0,j0)|0,X=X+Math.imul($0,k0)|0,O=O+Math.imul($0,j0)|0,Y=Y+Math.imul(h,R0)|0,X=X+Math.imul(h,S0)|0,X=X+Math.imul(d,R0)|0,O=O+Math.imul(d,S0)|0,Y=Y+Math.imul(l,P0)|0,X=X+Math.imul(l,D0)|0,X=X+Math.imul(s,P0)|0,O=O+Math.imul(s,D0)|0,Y=Y+Math.imul(T,B0)|0,X=X+Math.imul(T,L0)|0,X=X+Math.imul(B,B0)|0,O=O+Math.imul(B,L0)|0;var a0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,Y=Math.imul(i,E0),X=Math.imul(i,v0),X=X+Math.imul(e,E0)|0,O=Math.imul(e,v0),Y=Y+Math.imul(p,k0)|0,X=X+Math.imul(p,j0)|0,X=X+Math.imul(b,k0)|0,O=O+Math.imul(b,j0)|0,Y=Y+Math.imul(Q0,R0)|0,X=X+Math.imul(Q0,S0)|0,X=X+Math.imul($0,R0)|0,O=O+Math.imul($0,S0)|0,Y=Y+Math.imul(h,P0)|0,X=X+Math.imul(h,D0)|0,X=X+Math.imul(d,P0)|0,O=O+Math.imul(d,D0)|0,Y=Y+Math.imul(l,B0)|0,X=X+Math.imul(l,L0)|0,X=X+Math.imul(s,B0)|0,O=O+Math.imul(s,L0)|0,Y=Y+Math.imul(T,_)|0,X=X+Math.imul(T,w)|0,X=X+Math.imul(B,_)|0,O=O+Math.imul(B,w)|0;var e0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,Y=Math.imul(n,E0),X=Math.imul(n,v0),X=X+Math.imul(X0,E0)|0,O=Math.imul(X0,v0),Y=Y+Math.imul(i,k0)|0,X=X+Math.imul(i,j0)|0,X=X+Math.imul(e,k0)|0,O=O+Math.imul(e,j0)|0,Y=Y+Math.imul(p,R0)|0,X=X+Math.imul(p,S0)|0,X=X+Math.imul(b,R0)|0,O=O+Math.imul(b,S0)|0,Y=Y+Math.imul(Q0,P0)|0,X=X+Math.imul(Q0,D0)|0,X=X+Math.imul($0,P0)|0,O=O+Math.imul($0,D0)|0,Y=Y+Math.imul(h,B0)|0,X=X+Math.imul(h,L0)|0,X=X+Math.imul(d,B0)|0,O=O+Math.imul(d,L0)|0,Y=Y+Math.imul(l,_)|0,X=X+Math.imul(l,w)|0,X=X+Math.imul(s,_)|0,O=O+Math.imul(s,w)|0,Y=Y+Math.imul(T,U0)|0,X=X+Math.imul(T,I0)|0,X=X+Math.imul(B,U0)|0,O=O+Math.imul(B,I0)|0;var i0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(i0>>>26)|0,i0&=67108863,Y=Math.imul(Z0,E0),X=Math.imul(Z0,v0),X=X+Math.imul(W0,E0)|0,O=Math.imul(W0,v0),Y=Y+Math.imul(n,k0)|0,X=X+Math.imul(n,j0)|0,X=X+Math.imul(X0,k0)|0,O=O+Math.imul(X0,j0)|0,Y=Y+Math.imul(i,R0)|0,X=X+Math.imul(i,S0)|0,X=X+Math.imul(e,R0)|0,O=O+Math.imul(e,S0)|0,Y=Y+Math.imul(p,P0)|0,X=X+Math.imul(p,D0)|0,X=X+Math.imul(b,P0)|0,O=O+Math.imul(b,D0)|0,Y=Y+Math.imul(Q0,B0)|0,X=X+Math.imul(Q0,L0)|0,X=X+Math.imul($0,B0)|0,O=O+Math.imul($0,L0)|0,Y=Y+Math.imul(h,_)|0,X=X+Math.imul(h,w)|0,X=X+Math.imul(d,_)|0,O=O+Math.imul(d,w)|0,Y=Y+Math.imul(l,U0)|0,X=X+Math.imul(l,I0)|0,X=X+Math.imul(s,U0)|0,O=O+Math.imul(s,I0)|0,Y=Y+Math.imul(T,F0)|0,X=X+Math.imul(T,C0)|0,X=X+Math.imul(B,F0)|0,O=O+Math.imul(B,C0)|0;var UU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(UU>>>26)|0,UU&=67108863,Y=Math.imul(G0,E0),X=Math.imul(G0,v0),X=X+Math.imul(A0,E0)|0,O=Math.imul(A0,v0),Y=Y+Math.imul(Z0,k0)|0,X=X+Math.imul(Z0,j0)|0,X=X+Math.imul(W0,k0)|0,O=O+Math.imul(W0,j0)|0,Y=Y+Math.imul(n,R0)|0,X=X+Math.imul(n,S0)|0,X=X+Math.imul(X0,R0)|0,O=O+Math.imul(X0,S0)|0,Y=Y+Math.imul(i,P0)|0,X=X+Math.imul(i,D0)|0,X=X+Math.imul(e,P0)|0,O=O+Math.imul(e,D0)|0,Y=Y+Math.imul(p,B0)|0,X=X+Math.imul(p,L0)|0,X=X+Math.imul(b,B0)|0,O=O+Math.imul(b,L0)|0,Y=Y+Math.imul(Q0,_)|0,X=X+Math.imul(Q0,w)|0,X=X+Math.imul($0,_)|0,O=O+Math.imul($0,w)|0,Y=Y+Math.imul(h,U0)|0,X=X+Math.imul(h,I0)|0,X=X+Math.imul(d,U0)|0,O=O+Math.imul(d,I0)|0,Y=Y+Math.imul(l,F0)|0,X=X+Math.imul(l,C0)|0,X=X+Math.imul(s,F0)|0,O=O+Math.imul(s,C0)|0,Y=Y+Math.imul(T,x0)|0,X=X+Math.imul(T,q0)|0,X=X+Math.imul(B,x0)|0,O=O+Math.imul(B,q0)|0;var XU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(XU>>>26)|0,XU&=67108863,Y=Math.imul(J0,E0),X=Math.imul(J0,v0),X=X+Math.imul(T0,E0)|0,O=Math.imul(T0,v0),Y=Y+Math.imul(G0,k0)|0,X=X+Math.imul(G0,j0)|0,X=X+Math.imul(A0,k0)|0,O=O+Math.imul(A0,j0)|0,Y=Y+Math.imul(Z0,R0)|0,X=X+Math.imul(Z0,S0)|0,X=X+Math.imul(W0,R0)|0,O=O+Math.imul(W0,S0)|0,Y=Y+Math.imul(n,P0)|0,X=X+Math.imul(n,D0)|0,X=X+Math.imul(X0,P0)|0,O=O+Math.imul(X0,D0)|0,Y=Y+Math.imul(i,B0)|0,X=X+Math.imul(i,L0)|0,X=X+Math.imul(e,B0)|0,O=O+Math.imul(e,L0)|0,Y=Y+Math.imul(p,_)|0,X=X+Math.imul(p,w)|0,X=X+Math.imul(b,_)|0,O=O+Math.imul(b,w)|0,Y=Y+Math.imul(Q0,U0)|0,X=X+Math.imul(Q0,I0)|0,X=X+Math.imul($0,U0)|0,O=O+Math.imul($0,I0)|0,Y=Y+Math.imul(h,F0)|0,X=X+Math.imul(h,C0)|0,X=X+Math.imul(d,F0)|0,O=O+Math.imul(d,C0)|0,Y=Y+Math.imul(l,x0)|0,X=X+Math.imul(l,q0)|0,X=X+Math.imul(s,x0)|0,O=O+Math.imul(s,q0)|0,Y=Y+Math.imul(T,z0)|0,X=X+Math.imul(T,M0)|0,X=X+Math.imul(B,z0)|0,O=O+Math.imul(B,M0)|0;var IU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(IU>>>26)|0,IU&=67108863,Y=Math.imul(J0,k0),X=Math.imul(J0,j0),X=X+Math.imul(T0,k0)|0,O=Math.imul(T0,j0),Y=Y+Math.imul(G0,R0)|0,X=X+Math.imul(G0,S0)|0,X=X+Math.imul(A0,R0)|0,O=O+Math.imul(A0,S0)|0,Y=Y+Math.imul(Z0,P0)|0,X=X+Math.imul(Z0,D0)|0,X=X+Math.imul(W0,P0)|0,O=O+Math.imul(W0,D0)|0,Y=Y+Math.imul(n,B0)|0,X=X+Math.imul(n,L0)|0,X=X+Math.imul(X0,B0)|0,O=O+Math.imul(X0,L0)|0,Y=Y+Math.imul(i,_)|0,X=X+Math.imul(i,w)|0,X=X+Math.imul(e,_)|0,O=O+Math.imul(e,w)|0,Y=Y+Math.imul(p,U0)|0,X=X+Math.imul(p,I0)|0,X=X+Math.imul(b,U0)|0,O=O+Math.imul(b,I0)|0,Y=Y+Math.imul(Q0,F0)|0,X=X+Math.imul(Q0,C0)|0,X=X+Math.imul($0,F0)|0,O=O+Math.imul($0,C0)|0,Y=Y+Math.imul(h,x0)|0,X=X+Math.imul(h,q0)|0,X=X+Math.imul(d,x0)|0,O=O+Math.imul(d,q0)|0,Y=Y+Math.imul(l,z0)|0,X=X+Math.imul(l,M0)|0,X=X+Math.imul(s,z0)|0,O=O+Math.imul(s,M0)|0;var ZU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,Y=Math.imul(J0,R0),X=Math.imul(J0,S0),X=X+Math.imul(T0,R0)|0,O=Math.imul(T0,S0),Y=Y+Math.imul(G0,P0)|0,X=X+Math.imul(G0,D0)|0,X=X+Math.imul(A0,P0)|0,O=O+Math.imul(A0,D0)|0,Y=Y+Math.imul(Z0,B0)|0,X=X+Math.imul(Z0,L0)|0,X=X+Math.imul(W0,B0)|0,O=O+Math.imul(W0,L0)|0,Y=Y+Math.imul(n,_)|0,X=X+Math.imul(n,w)|0,X=X+Math.imul(X0,_)|0,O=O+Math.imul(X0,w)|0,Y=Y+Math.imul(i,U0)|0,X=X+Math.imul(i,I0)|0,X=X+Math.imul(e,U0)|0,O=O+Math.imul(e,I0)|0,Y=Y+Math.imul(p,F0)|0,X=X+Math.imul(p,C0)|0,X=X+Math.imul(b,F0)|0,O=O+Math.imul(b,C0)|0,Y=Y+Math.imul(Q0,x0)|0,X=X+Math.imul(Q0,q0)|0,X=X+Math.imul($0,x0)|0,O=O+Math.imul($0,q0)|0,Y=Y+Math.imul(h,z0)|0,X=X+Math.imul(h,M0)|0,X=X+Math.imul(d,z0)|0,O=O+Math.imul(d,M0)|0;var QU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(QU>>>26)|0,QU&=67108863,Y=Math.imul(J0,P0),X=Math.imul(J0,D0),X=X+Math.imul(T0,P0)|0,O=Math.imul(T0,D0),Y=Y+Math.imul(G0,B0)|0,X=X+Math.imul(G0,L0)|0,X=X+Math.imul(A0,B0)|0,O=O+Math.imul(A0,L0)|0,Y=Y+Math.imul(Z0,_)|0,X=X+Math.imul(Z0,w)|0,X=X+Math.imul(W0,_)|0,O=O+Math.imul(W0,w)|0,Y=Y+Math.imul(n,U0)|0,X=X+Math.imul(n,I0)|0,X=X+Math.imul(X0,U0)|0,O=O+Math.imul(X0,I0)|0,Y=Y+Math.imul(i,F0)|0,X=X+Math.imul(i,C0)|0,X=X+Math.imul(e,F0)|0,O=O+Math.imul(e,C0)|0,Y=Y+Math.imul(p,x0)|0,X=X+Math.imul(p,q0)|0,X=X+Math.imul(b,x0)|0,O=O+Math.imul(b,q0)|0,Y=Y+Math.imul(Q0,z0)|0,X=X+Math.imul(Q0,M0)|0,X=X+Math.imul($0,z0)|0,O=O+Math.imul($0,M0)|0;var $U=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+($U>>>26)|0,$U&=67108863,Y=Math.imul(J0,B0),X=Math.imul(J0,L0),X=X+Math.imul(T0,B0)|0,O=Math.imul(T0,L0),Y=Y+Math.imul(G0,_)|0,X=X+Math.imul(G0,w)|0,X=X+Math.imul(A0,_)|0,O=O+Math.imul(A0,w)|0,Y=Y+Math.imul(Z0,U0)|0,X=X+Math.imul(Z0,I0)|0,X=X+Math.imul(W0,U0)|0,O=O+Math.imul(W0,I0)|0,Y=Y+Math.imul(n,F0)|0,X=X+Math.imul(n,C0)|0,X=X+Math.imul(X0,F0)|0,O=O+Math.imul(X0,C0)|0,Y=Y+Math.imul(i,x0)|0,X=X+Math.imul(i,q0)|0,X=X+Math.imul(e,x0)|0,O=O+Math.imul(e,q0)|0,Y=Y+Math.imul(p,z0)|0,X=X+Math.imul(p,M0)|0,X=X+Math.imul(b,z0)|0,O=O+Math.imul(b,M0)|0;var YU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(YU>>>26)|0,YU&=67108863,Y=Math.imul(J0,_),X=Math.imul(J0,w),X=X+Math.imul(T0,_)|0,O=Math.imul(T0,w),Y=Y+Math.imul(G0,U0)|0,X=X+Math.imul(G0,I0)|0,X=X+Math.imul(A0,U0)|0,O=O+Math.imul(A0,I0)|0,Y=Y+Math.imul(Z0,F0)|0,X=X+Math.imul(Z0,C0)|0,X=X+Math.imul(W0,F0)|0,O=O+Math.imul(W0,C0)|0,Y=Y+Math.imul(n,x0)|0,X=X+Math.imul(n,q0)|0,X=X+Math.imul(X0,x0)|0,O=O+Math.imul(X0,q0)|0,Y=Y+Math.imul(i,z0)|0,X=X+Math.imul(i,M0)|0,X=X+Math.imul(e,z0)|0,O=O+Math.imul(e,M0)|0;var VU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(VU>>>26)|0,VU&=67108863,Y=Math.imul(J0,U0),X=Math.imul(J0,I0),X=X+Math.imul(T0,U0)|0,O=Math.imul(T0,I0),Y=Y+Math.imul(G0,F0)|0,X=X+Math.imul(G0,C0)|0,X=X+Math.imul(A0,F0)|0,O=O+Math.imul(A0,C0)|0,Y=Y+Math.imul(Z0,x0)|0,X=X+Math.imul(Z0,q0)|0,X=X+Math.imul(W0,x0)|0,O=O+Math.imul(W0,q0)|0,Y=Y+Math.imul(n,z0)|0,X=X+Math.imul(n,M0)|0,X=X+Math.imul(X0,z0)|0,O=O+Math.imul(X0,M0)|0;var OU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(OU>>>26)|0,OU&=67108863,Y=Math.imul(J0,F0),X=Math.imul(J0,C0),X=X+Math.imul(T0,F0)|0,O=Math.imul(T0,C0),Y=Y+Math.imul(G0,x0)|0,X=X+Math.imul(G0,q0)|0,X=X+Math.imul(A0,x0)|0,O=O+Math.imul(A0,q0)|0,Y=Y+Math.imul(Z0,z0)|0,X=X+Math.imul(Z0,M0)|0,X=X+Math.imul(W0,z0)|0,O=O+Math.imul(W0,M0)|0;var GU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(GU>>>26)|0,GU&=67108863,Y=Math.imul(J0,x0),X=Math.imul(J0,q0),X=X+Math.imul(T0,x0)|0,O=Math.imul(T0,q0),Y=Y+Math.imul(G0,z0)|0,X=X+Math.imul(G0,M0)|0,X=X+Math.imul(A0,z0)|0,O=O+Math.imul(A0,M0)|0;var KU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(KU>>>26)|0,KU&=67108863,Y=Math.imul(J0,z0),X=Math.imul(J0,M0),X=X+Math.imul(T0,z0)|0,O=Math.imul(T0,M0);var WU=(J+Y|0)+((X&8191)<<13)|0;if(J=(O+(X>>>13)|0)+(WU>>>26)|0,WU&=67108863,K[0]=t0,K[1]=p0,K[2]=f0,K[3]=b0,K[4]=a0,K[5]=e0,K[6]=i0,K[7]=UU,K[8]=XU,K[9]=IU,K[10]=ZU,K[11]=QU,K[12]=$U,K[13]=YU,K[14]=VU,K[15]=OU,K[16]=GU,K[17]=KU,K[18]=WU,J!==0)K[19]=J,Q.length++;return Q};if(!Math.imul)j=q;function x(F,U,Z){Z.negative=U.negative^F.negative,Z.length=F.length+U.length;var Q=0,I=0;for(var $=0;$<Z.length-1;$++){var K=I;I=0;var J=Q&67108863,Y=Math.min($,U.length-1);for(var X=Math.max(0,$-F.length+1);X<=Y;X++){var O=$-X,v=F.words[O]|0,T=U.words[X]|0,B=v*T,c=B&67108863;K=K+(B/67108864|0)|0,c=c+J|0,J=c&67108863,K=K+(c>>>26)|0,I+=K>>>26,K&=67108863}Z.words[$]=J,Q=K,K=I}if(Q!==0)Z.words[$]=Q;else Z.length--;return Z.strip()}function g(F,U,Z){var Q=new N;return Q.mulp(F,U,Z)}V.prototype.mulTo=function F(U,Z){var Q,I=this.length+U.length;if(this.length===10&&U.length===10)Q=j(this,U,Z);else if(I<63)Q=q(this,U,Z);else if(I<1024)Q=x(this,U,Z);else Q=g(this,U,Z);return Q};function N(F,U){this.x=F,this.y=U}N.prototype.makeRBT=function F(U){var Z=new Array(U),Q=V.prototype._countBits(U)-1;for(var I=0;I<U;I++)Z[I]=this.revBin(I,Q,U);return Z},N.prototype.revBin=function F(U,Z,Q){if(U===0||U===Q-1)return U;var I=0;for(var $=0;$<Z;$++)I|=(U&1)<<Z-$-1,U>>=1;return I},N.prototype.permute=function F(U,Z,Q,I,$,K){for(var J=0;J<K;J++)I[J]=Z[U[J]],$[J]=Q[U[J]]},N.prototype.transform=function F(U,Z,Q,I,$,K){this.permute(K,U,Z,Q,I,$);for(var J=1;J<$;J<<=1){var Y=J<<1,X=Math.cos(2*Math.PI/Y),O=Math.sin(2*Math.PI/Y);for(var v=0;v<$;v+=Y){var T=X,B=O;for(var c=0;c<J;c++){var l=Q[v+c],s=I[v+c],O0=Q[v+c+J],h=I[v+c+J],d=T*O0-B*h;if(h=T*h+B*O0,O0=d,Q[v+c]=l+O0,I[v+c]=s+h,Q[v+c+J]=l-O0,I[v+c+J]=s-h,c!==Y)d=X*T-O*B,B=X*B+O*T,T=d}}}},N.prototype.guessLen13b=function F(U,Z){var Q=Math.max(Z,U)|1,I=Q&1,$=0;for(Q=Q/2|0;Q;Q=Q>>>1)$++;return 1<<$+1+I},N.prototype.conjugate=function F(U,Z,Q){if(Q<=1)return;for(var I=0;I<Q/2;I++){var $=U[I];U[I]=U[Q-I-1],U[Q-I-1]=$,$=Z[I],Z[I]=-Z[Q-I-1],Z[Q-I-1]=-$}},N.prototype.normalize13b=function F(U,Z){var Q=0;for(var I=0;I<Z/2;I++){var $=Math.round(U[2*I+1]/Z)*8192+Math.round(U[2*I]/Z)+Q;if(U[I]=$&67108863,$<67108864)Q=0;else Q=$/67108864|0}return U},N.prototype.convert13b=function F(U,Z,Q,I){var $=0;for(var K=0;K<Z;K++)$=$+(U[K]|0),Q[2*K]=$&8191,$=$>>>13,Q[2*K+1]=$&8191,$=$>>>13;for(K=2*Z;K<I;++K)Q[K]=0;H($===0),H(($&-8192)===0)},N.prototype.stub=function F(U){var Z=new Array(U);for(var Q=0;Q<U;Q++)Z[Q]=0;return Z},N.prototype.mulp=function F(U,Z,Q){var I=2*this.guessLen13b(U.length,Z.length),$=this.makeRBT(I),K=this.stub(I),J=new Array(I),Y=new Array(I),X=new Array(I),O=new Array(I),v=new Array(I),T=new Array(I),B=Q.words;B.length=I,this.convert13b(U.words,U.length,J,I),this.convert13b(Z.words,Z.length,O,I),this.transform(J,K,Y,X,I,$),this.transform(O,K,v,T,I,$);for(var c=0;c<I;c++){var l=Y[c]*v[c]-X[c]*T[c];X[c]=Y[c]*T[c]+X[c]*v[c],Y[c]=l}return this.conjugate(Y,X,I),this.transform(Y,X,B,K,I,$),this.conjugate(B,K,I),this.normalize13b(B,I),Q.negative=U.negative^Z.negative,Q.length=U.length+Z.length,Q.strip()},V.prototype.mul=function F(U){var Z=new V(null);return Z.words=new Array(this.length+U.length),this.mulTo(U,Z)},V.prototype.mulf=function F(U){var Z=new V(null);return Z.words=new Array(this.length+U.length),g(this,U,Z)},V.prototype.imul=function F(U){return this.clone().mulTo(U,this)},V.prototype.imuln=function F(U){H(typeof U==="number"),H(U<67108864);var Z=0;for(var Q=0;Q<this.length;Q++){var I=(this.words[Q]|0)*U,$=(I&67108863)+(Z&67108863);Z>>=26,Z+=I/67108864|0,Z+=$>>>26,this.words[Q]=$&67108863}if(Z!==0)this.words[Q]=Z,this.length++;return this.length=U===0?1:this.length,this},V.prototype.muln=function F(U){return this.clone().imuln(U)},V.prototype.sqr=function F(){return this.mul(this)},V.prototype.isqr=function F(){return this.imul(this.clone())},V.prototype.pow=function F(U){var Z=M(U);if(Z.length===0)return new V(1);var Q=this;for(var I=0;I<Z.length;I++,Q=Q.sqr())if(Z[I]!==0)break;if(++I<Z.length)for(var $=Q.sqr();I<Z.length;I++,$=$.sqr()){if(Z[I]===0)continue;Q=Q.mul($)}return Q},V.prototype.iushln=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26,I=67108863>>>26-Z<<26-Z,$;if(Z!==0){var K=0;for($=0;$<this.length;$++){var J=this.words[$]&I,Y=(this.words[$]|0)-J<<Z;this.words[$]=Y|K,K=J>>>26-Z}if(K)this.words[$]=K,this.length++}if(Q!==0){for($=this.length-1;$>=0;$--)this.words[$+Q]=this.words[$];for($=0;$<Q;$++)this.words[$]=0;this.length+=Q}return this.strip()},V.prototype.ishln=function F(U){return H(this.negative===0),this.iushln(U)},V.prototype.iushrn=function F(U,Z,Q){H(typeof U==="number"&&U>=0);var I;if(Z)I=(Z-Z%26)/26;else I=0;var $=U%26,K=Math.min((U-$)/26,this.length),J=67108863^67108863>>>$<<$,Y=Q;if(I-=K,I=Math.max(0,I),Y){for(var X=0;X<K;X++)Y.words[X]=this.words[X];Y.length=K}if(K===0);else if(this.length>K){this.length-=K;for(X=0;X<this.length;X++)this.words[X]=this.words[X+K]}else this.words[0]=0,this.length=1;var O=0;for(X=this.length-1;X>=0&&(O!==0||X>=I);X--){var v=this.words[X]|0;this.words[X]=O<<26-$|v>>>$,O=v&J}if(Y&&O!==0)Y.words[Y.length++]=O;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},V.prototype.ishrn=function F(U,Z,Q){return H(this.negative===0),this.iushrn(U,Z,Q)},V.prototype.shln=function F(U){return this.clone().ishln(U)},V.prototype.ushln=function F(U){return this.clone().iushln(U)},V.prototype.shrn=function F(U){return this.clone().ishrn(U)},V.prototype.ushrn=function F(U){return this.clone().iushrn(U)},V.prototype.testn=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26,I=1<<Z;if(this.length<=Q)return!1;var $=this.words[Q];return!!($&I)},V.prototype.imaskn=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=Q)return this;if(Z!==0)Q++;if(this.length=Math.min(Q,this.length),Z!==0){var I=67108863^67108863>>>Z<<Z;this.words[this.length-1]&=I}return this.strip()},V.prototype.maskn=function F(U){return this.clone().imaskn(U)},V.prototype.iaddn=function F(U){if(H(typeof U==="number"),H(U<67108864),U<0)return this.isubn(-U);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<U)return this.words[0]=U-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(U),this.negative=1,this}return this._iaddn(U)},V.prototype._iaddn=function F(U){this.words[0]+=U;for(var Z=0;Z<this.length&&this.words[Z]>=67108864;Z++)if(this.words[Z]-=67108864,Z===this.length-1)this.words[Z+1]=1;else this.words[Z+1]++;return this.length=Math.max(this.length,Z+1),this},V.prototype.isubn=function F(U){if(H(typeof U==="number"),H(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Z=0;Z<this.length&&this.words[Z]<0;Z++)this.words[Z]+=67108864,this.words[Z+1]-=1;return this.strip()},V.prototype.addn=function F(U){return this.clone().iaddn(U)},V.prototype.subn=function F(U){return this.clone().isubn(U)},V.prototype.iabs=function F(){return this.negative=0,this},V.prototype.abs=function F(){return this.clone().iabs()},V.prototype._ishlnsubmul=function F(U,Z,Q){var I=U.length+Q,$;this._expand(I);var K,J=0;for($=0;$<U.length;$++){K=(this.words[$+Q]|0)+J;var Y=(U.words[$]|0)*Z;K-=Y&67108863,J=(K>>26)-(Y/67108864|0),this.words[$+Q]=K&67108863}for(;$<this.length-Q;$++)K=(this.words[$+Q]|0)+J,J=K>>26,this.words[$+Q]=K&67108863;if(J===0)return this.strip();H(J===-1),J=0;for($=0;$<this.length;$++)K=-(this.words[$]|0)+J,J=K>>26,this.words[$]=K&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function F(U,Z){var Q=this.length-U.length,I=this.clone(),$=U,K=$.words[$.length-1]|0,J=this._countBits(K);if(Q=26-J,Q!==0)$=$.ushln(Q),I.iushln(Q),K=$.words[$.length-1]|0;var Y=I.length-$.length,X;if(Z!=="mod"){X=new V(null),X.length=Y+1,X.words=new Array(X.length);for(var O=0;O<X.length;O++)X.words[O]=0}var v=I.clone()._ishlnsubmul($,1,Y);if(v.negative===0){if(I=v,X)X.words[Y]=1}for(var T=Y-1;T>=0;T--){var B=(I.words[$.length+T]|0)*67108864+(I.words[$.length+T-1]|0);B=Math.min(B/K|0,67108863),I._ishlnsubmul($,B,T);while(I.negative!==0)if(B--,I.negative=0,I._ishlnsubmul($,1,T),!I.isZero())I.negative^=1;if(X)X.words[T]=B}if(X)X.strip();if(I.strip(),Z!=="div"&&Q!==0)I.iushrn(Q);return{div:X||null,mod:I}},V.prototype.divmod=function F(U,Z,Q){if(H(!U.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var I,$,K;if(this.negative!==0&&U.negative===0){if(K=this.neg().divmod(U,Z),Z!=="mod")I=K.div.neg();if(Z!=="div"){if($=K.mod.neg(),Q&&$.negative!==0)$.iadd(U)}return{div:I,mod:$}}if(this.negative===0&&U.negative!==0){if(K=this.divmod(U.neg(),Z),Z!=="mod")I=K.div.neg();return{div:I,mod:K.mod}}if((this.negative&U.negative)!==0){if(K=this.neg().divmod(U.neg(),Z),Z!=="div"){if($=K.mod.neg(),Q&&$.negative!==0)$.isub(U)}return{div:K.div,mod:$}}if(U.length>this.length||this.cmp(U)<0)return{div:new V(0),mod:this};if(U.length===1){if(Z==="div")return{div:this.divn(U.words[0]),mod:null};if(Z==="mod")return{div:null,mod:new V(this.modn(U.words[0]))};return{div:this.divn(U.words[0]),mod:new V(this.modn(U.words[0]))}}return this._wordDiv(U,Z)},V.prototype.div=function F(U){return this.divmod(U,"div",!1).div},V.prototype.mod=function F(U){return this.divmod(U,"mod",!1).mod},V.prototype.umod=function F(U){return this.divmod(U,"mod",!0).mod},V.prototype.divRound=function F(U){var Z=this.divmod(U);if(Z.mod.isZero())return Z.div;var Q=Z.div.negative!==0?Z.mod.isub(U):Z.mod,I=U.ushrn(1),$=U.andln(1),K=Q.cmp(I);if(K<0||$===1&&K===0)return Z.div;return Z.div.negative!==0?Z.div.isubn(1):Z.div.iaddn(1)},V.prototype.modn=function F(U){H(U<=67108863);var Z=67108864%U,Q=0;for(var I=this.length-1;I>=0;I--)Q=(Z*Q+(this.words[I]|0))%U;return Q},V.prototype.idivn=function F(U){H(U<=67108863);var Z=0;for(var Q=this.length-1;Q>=0;Q--){var I=(this.words[Q]|0)+Z*67108864;this.words[Q]=I/U|0,Z=I%U}return this.strip()},V.prototype.divn=function F(U){return this.clone().idivn(U)},V.prototype.egcd=function F(U){H(U.negative===0),H(!U.isZero());var Z=this,Q=U.clone();if(Z.negative!==0)Z=Z.umod(U);else Z=Z.clone();var I=new V(1),$=new V(0),K=new V(0),J=new V(1),Y=0;while(Z.isEven()&&Q.isEven())Z.iushrn(1),Q.iushrn(1),++Y;var X=Q.clone(),O=Z.clone();while(!Z.isZero()){for(var v=0,T=1;(Z.words[0]&T)===0&&v<26;++v,T<<=1);if(v>0){Z.iushrn(v);while(v-- >0){if(I.isOdd()||$.isOdd())I.iadd(X),$.isub(O);I.iushrn(1),$.iushrn(1)}}for(var B=0,c=1;(Q.words[0]&c)===0&&B<26;++B,c<<=1);if(B>0){Q.iushrn(B);while(B-- >0){if(K.isOdd()||J.isOdd())K.iadd(X),J.isub(O);K.iushrn(1),J.iushrn(1)}}if(Z.cmp(Q)>=0)Z.isub(Q),I.isub(K),$.isub(J);else Q.isub(Z),K.isub(I),J.isub($)}return{a:K,b:J,gcd:Q.iushln(Y)}},V.prototype._invmp=function F(U){H(U.negative===0),H(!U.isZero());var Z=this,Q=U.clone();if(Z.negative!==0)Z=Z.umod(U);else Z=Z.clone();var I=new V(1),$=new V(0),K=Q.clone();while(Z.cmpn(1)>0&&Q.cmpn(1)>0){for(var J=0,Y=1;(Z.words[0]&Y)===0&&J<26;++J,Y<<=1);if(J>0){Z.iushrn(J);while(J-- >0){if(I.isOdd())I.iadd(K);I.iushrn(1)}}for(var X=0,O=1;(Q.words[0]&O)===0&&X<26;++X,O<<=1);if(X>0){Q.iushrn(X);while(X-- >0){if($.isOdd())$.iadd(K);$.iushrn(1)}}if(Z.cmp(Q)>=0)Z.isub(Q),I.isub($);else Q.isub(Z),$.isub(I)}var v;if(Z.cmpn(1)===0)v=I;else v=$;if(v.cmpn(0)<0)v.iadd(U);return v},V.prototype.gcd=function F(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Z=this.clone(),Q=U.clone();Z.negative=0,Q.negative=0;for(var I=0;Z.isEven()&&Q.isEven();I++)Z.iushrn(1),Q.iushrn(1);do{while(Z.isEven())Z.iushrn(1);while(Q.isEven())Q.iushrn(1);var $=Z.cmp(Q);if($<0){var K=Z;Z=Q,Q=K}else if($===0||Q.cmpn(1)===0)break;Z.isub(Q)}while(!0);return Q.iushln(I)},V.prototype.invm=function F(U){return this.egcd(U).a.umod(U)},V.prototype.isEven=function F(){return(this.words[0]&1)===0},V.prototype.isOdd=function F(){return(this.words[0]&1)===1},V.prototype.andln=function F(U){return this.words[0]&U},V.prototype.bincn=function F(U){H(typeof U==="number");var Z=U%26,Q=(U-Z)/26,I=1<<Z;if(this.length<=Q)return this._expand(Q+1),this.words[Q]|=I,this;var $=I;for(var K=Q;$!==0&&K<this.length;K++){var J=this.words[K]|0;J+=$,$=J>>>26,J&=67108863,this.words[K]=J}if($!==0)this.words[K]=$,this.length++;return this},V.prototype.isZero=function F(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function F(U){var Z=U<0;if(this.negative!==0&&!Z)return-1;if(this.negative===0&&Z)return 1;this.strip();var Q;if(this.length>1)Q=1;else{if(Z)U=-U;H(U<=67108863,"Number is too big");var I=this.words[0]|0;Q=I===U?0:I<U?-1:1}if(this.negative!==0)return-Q|0;return Q},V.prototype.cmp=function F(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Z=this.ucmp(U);if(this.negative!==0)return-Z|0;return Z},V.prototype.ucmp=function F(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;var Z=0;for(var Q=this.length-1;Q>=0;Q--){var I=this.words[Q]|0,$=U.words[Q]|0;if(I===$)continue;if(I<$)Z=-1;else if(I>$)Z=1;break}return Z},V.prototype.gtn=function F(U){return this.cmpn(U)===1},V.prototype.gt=function F(U){return this.cmp(U)===1},V.prototype.gten=function F(U){return this.cmpn(U)>=0},V.prototype.gte=function F(U){return this.cmp(U)>=0},V.prototype.ltn=function F(U){return this.cmpn(U)===-1},V.prototype.lt=function F(U){return this.cmp(U)===-1},V.prototype.lten=function F(U){return this.cmpn(U)<=0},V.prototype.lte=function F(U){return this.cmp(U)<=0},V.prototype.eqn=function F(U){return this.cmpn(U)===0},V.prototype.eq=function F(U){return this.cmp(U)===0},V.red=function F(U){return new u(U)},V.prototype.toRed=function F(U){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},V.prototype.fromRed=function F(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function F(U){return this.red=U,this},V.prototype.forceRed=function F(U){return H(!this.red,"Already a number in reduction context"),this._forceRed(U)},V.prototype.redAdd=function F(U){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},V.prototype.redIAdd=function F(U){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},V.prototype.redSub=function F(U){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},V.prototype.redISub=function F(U){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},V.prototype.redShl=function F(U){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},V.prototype.redMul=function F(U){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},V.prototype.redIMul=function F(U){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},V.prototype.redSqr=function F(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function F(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function F(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function F(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function F(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function F(U){return H(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var y={k256:null,p224:null,p192:null,p25519:null};function f(F,U){this.name=F,this.p=new V(U,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}f.prototype._tmp=function F(){var U=new V(null);return U.words=new Array(Math.ceil(this.n/13)),U},f.prototype.ireduce=function F(U){var Z=U,Q;do this.split(Z,this.tmp),Z=this.imulK(Z),Z=Z.iadd(this.tmp),Q=Z.bitLength();while(Q>this.n);var I=Q<this.n?-1:Z.ucmp(this.p);if(I===0)Z.words[0]=0,Z.length=1;else if(I>0)Z.isub(this.p);else if(Z.strip!==void 0)Z.strip();else Z._strip();return Z},f.prototype.split=function F(U,Z){U.iushrn(this.n,0,Z)},f.prototype.imulK=function F(U){return U.imul(this.k)};function o(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(o,f),o.prototype.split=function F(U,Z){var Q=4194303,I=Math.min(U.length,9);for(var $=0;$<I;$++)Z.words[$]=U.words[$];if(Z.length=I,U.length<=9){U.words[0]=0,U.length=1;return}var K=U.words[9];Z.words[Z.length++]=K&Q;for($=10;$<U.length;$++){var J=U.words[$]|0;U.words[$-10]=(J&Q)<<4|K>>>22,K=J}if(K>>>=22,U.words[$-10]=K,K===0&&U.length>10)U.length-=10;else U.length-=9},o.prototype.imulK=function F(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;var Z=0;for(var Q=0;Q<U.length;Q++){var I=U.words[Q]|0;Z+=I*977,U.words[Q]=Z&67108863,Z=I*64+(Z/67108864|0)}if(U.words[U.length-1]===0){if(U.length--,U.words[U.length-1]===0)U.length--}return U};function r(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}z(r,f);function V0(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}z(V0,f);function Y0(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}z(Y0,f),Y0.prototype.imulK=function F(U){var Z=0;for(var Q=0;Q<U.length;Q++){var I=(U.words[Q]|0)*19+Z,$=I&67108863;I>>>=26,U.words[Q]=$,Z=I}if(Z!==0)U.words[U.length++]=Z;return U},V._prime=function F(U){if(y[U])return y[U];var Z;if(U==="k256")Z=new o;else if(U==="p224")Z=new r;else if(U==="p192")Z=new V0;else if(U==="p25519")Z=new Y0;else throw new Error("Unknown prime "+U);return y[U]=Z,Z};function u(F){if(typeof F==="string"){var U=V._prime(F);this.m=U.p,this.prime=U}else H(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}u.prototype._verify1=function F(U){H(U.negative===0,"red works only with positives"),H(U.red,"red works only with red numbers")},u.prototype._verify2=function F(U,Z){H((U.negative|Z.negative)===0,"red works only with positives"),H(U.red&&U.red===Z.red,"red works only with red numbers")},u.prototype.imod=function F(U){if(this.prime)return this.prime.ireduce(U)._forceRed(this);return U.umod(this.m)._forceRed(this)},u.prototype.neg=function F(U){if(U.isZero())return U.clone();return this.m.sub(U)._forceRed(this)},u.prototype.add=function F(U,Z){this._verify2(U,Z);var Q=U.add(Z);if(Q.cmp(this.m)>=0)Q.isub(this.m);return Q._forceRed(this)},u.prototype.iadd=function F(U,Z){this._verify2(U,Z);var Q=U.iadd(Z);if(Q.cmp(this.m)>=0)Q.isub(this.m);return Q},u.prototype.sub=function F(U,Z){this._verify2(U,Z);var Q=U.sub(Z);if(Q.cmpn(0)<0)Q.iadd(this.m);return Q._forceRed(this)},u.prototype.isub=function F(U,Z){this._verify2(U,Z);var Q=U.isub(Z);if(Q.cmpn(0)<0)Q.iadd(this.m);return Q},u.prototype.shl=function F(U,Z){return this._verify1(U),this.imod(U.ushln(Z))},u.prototype.imul=function F(U,Z){return this._verify2(U,Z),this.imod(U.imul(Z))},u.prototype.mul=function F(U,Z){return this._verify2(U,Z),this.imod(U.mul(Z))},u.prototype.isqr=function F(U){return this.imul(U,U.clone())},u.prototype.sqr=function F(U){return this.mul(U,U)},u.prototype.sqrt=function F(U){if(U.isZero())return U.clone();var Z=this.m.andln(3);if(H(Z%2===1),Z===3){var Q=this.m.add(new V(1)).iushrn(2);return this.pow(U,Q)}var I=this.m.subn(1),$=0;while(!I.isZero()&&I.andln(1)===0)$++,I.iushrn(1);H(!I.isZero());var K=new V(1).toRed(this),J=K.redNeg(),Y=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new V(2*X*X).toRed(this);while(this.pow(X,Y).cmp(J)!==0)X.redIAdd(J);var O=this.pow(X,I),v=this.pow(U,I.addn(1).iushrn(1)),T=this.pow(U,I),B=$;while(T.cmp(K)!==0){var c=T;for(var l=0;c.cmp(K)!==0;l++)c=c.redSqr();H(l<B);var s=this.pow(O,new V(1).iushln(B-l-1));v=v.redMul(s),O=s.redSqr(),T=T.redMul(O),B=l}return v},u.prototype.invm=function F(U){var Z=U._invmp(this.m);if(Z.negative!==0)return Z.negative=0,this.imod(Z).redNeg();else return this.imod(Z)},u.prototype.pow=function F(U,Z){if(Z.isZero())return new V(1).toRed(this);if(Z.cmpn(1)===0)return U.clone();var Q=4,I=new Array(1<<Q);I[0]=new V(1).toRed(this),I[1]=U;for(var $=2;$<I.length;$++)I[$]=this.mul(I[$-1],U);var K=I[0],J=0,Y=0,X=Z.bitLength()%26;if(X===0)X=26;for($=Z.length-1;$>=0;$--){var O=Z.words[$];for(var v=X-1;v>=0;v--){var T=O>>v&1;if(K!==I[0])K=this.sqr(K);if(T===0&&J===0){Y=0;continue}if(J<<=1,J|=T,Y++,Y!==Q&&($!==0||v!==0))continue;K=this.mul(K,I[J]),Y=0,J=0}X=26}return K},u.prototype.convertTo=function F(U){var Z=U.umod(this.m);return Z===U?Z.clone():Z},u.prototype.convertFrom=function F(U){var Z=U.clone();return Z.red=null,Z},V.mont=function F(U){return new a(U)};function a(F){if(u.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}z(a,u),a.prototype.convertTo=function F(U){return this.imod(U.ushln(this.shift))},a.prototype.convertFrom=function F(U){var Z=this.imod(U.mul(this.rinv));return Z.red=null,Z},a.prototype.imul=function F(U,Z){if(U.isZero()||Z.isZero())return U.words[0]=0,U.length=1,U;var Q=U.imul(Z),I=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=Q.isub(I).iushrn(this.shift),K=$;if($.cmp(this.m)>=0)K=$.isub(this.m);else if($.cmpn(0)<0)K=$.iadd(this.m);return K._forceRed(this)},a.prototype.mul=function F(U,Z){if(U.isZero()||Z.isZero())return new V(0)._forceRed(this);var Q=U.mul(Z),I=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=Q.isub(I).iushrn(this.shift),K=$;if($.cmp(this.m)>=0)K=$.isub(this.m);else if($.cmpn(0)<0)K=$.iadd(this.m);return K._forceRed(this)},a.prototype.invm=function F(U){var Z=this.imod(U._invmp(this.m).mul(this.r2));return Z._forceRed(this)}})(typeof G==="undefined"||G,E)}),hY=w0((E,G)=>{var W=cY(),C=pY();G.exports=function P(k){return new z(k)};var H={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};H.p224=H.secp224r1,H.p256=H.secp256r1=H.prime256v1,H.p192=H.secp192r1=H.prime192v1,H.p384=H.secp384r1,H.p521=H.secp521r1;function z(P){if(this.curveType=H[P],!this.curveType)this.curveType={name:P};this.curve=new W.ec(this.curveType.name),this.keys=void 0}z.prototype.generateKeys=function(P,k){return this.keys=this.curve.genKeyPair(),this.getPublicKey(P,k)},z.prototype.computeSecret=function(P,k,R){if(k=k||"utf8",!Buffer.isBuffer(P))P=new Buffer(P,k);var S=this.curve.keyFromPublic(P).getPublic(),D=S.mul(this.keys.getPrivate()).getX();return V(D,R,this.curveType.byteLength)},z.prototype.getPublicKey=function(P,k){var R=this.keys.getPublic(k==="compressed",!0);if(k==="hybrid")if(R[R.length-1]%2)R[0]=7;else R[0]=6;return V(R,P)},z.prototype.getPrivateKey=function(P){return V(this.keys.getPrivate(),P)},z.prototype.setPublicKey=function(P,k){if(k=k||"utf8",!Buffer.isBuffer(P))P=new Buffer(P,k);return this.keys._importPublic(P),this},z.prototype.setPrivateKey=function(P,k){if(k=k||"utf8",!Buffer.isBuffer(P))P=new Buffer(P,k);var R=new C(P);return R=R.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(R),this};function V(P,k,R){if(!Array.isArray(P))P=P.toArray();var S=new Buffer(P);if(R&&S.length<R){var D=new Buffer(R-S.length);D.fill(0),S=Buffer.concat([D,S])}if(!k)return S;else return S.toString(k)}}),uY=w0((E,G)=>{var W=(qU(),y0(kU)).createECDH;G.exports=W||hY()}),lY=w0((E,G)=>{(function(W,C){function H(F,U){if(!F)throw new Error(U||"Assertion failed")}function z(F,U){F.super_=U;var Z=function(){};Z.prototype=U.prototype,F.prototype=new Z,F.prototype.constructor=F}function V(F,U,Z){if(V.isBN(F))return F;if(this.negative=0,this.words=null,this.length=0,this.red=null,F!==null){if(U==="le"||U==="be")Z=U,U=10;this._init(F||0,U||10,Z||"be")}}if(typeof W==="object")W.exports=V;else C.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined")P=window.Buffer;else P=(HU(),y0(FU)).Buffer}catch(F){}V.isBN=function F(U){if(U instanceof V)return!0;return U!==null&&typeof U==="object"&&U.constructor.wordSize===V.wordSize&&Array.isArray(U.words)},V.max=function F(U,Z){if(U.cmp(Z)>0)return U;return Z},V.min=function F(U,Z){if(U.cmp(Z)<0)return U;return Z},V.prototype._init=function F(U,Z,Q){if(typeof U==="number")return this._initNumber(U,Z,Q);if(typeof U==="object")return this._initArray(U,Z,Q);if(Z==="hex")Z=16;H(Z===(Z|0)&&Z>=2&&Z<=36),U=U.toString().replace(/\s+/g,"");var I=0;if(U[0]==="-")I++,this.negative=1;if(I<U.length){if(Z===16)this._parseHex(U,I,Q);else if(this._parseBase(U,Z,I),Q==="le")this._initArray(this.toArray(),Z,Q)}},V.prototype._initNumber=function F(U,Z,Q){if(U<0)this.negative=1,U=-U;if(U<67108864)this.words=[U&67108863],this.length=1;else if(U<4503599627370496)this.words=[U&67108863,U/67108864&67108863],this.length=2;else H(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3;if(Q!=="le")return;this._initArray(this.toArray(),Z,Q)},V.prototype._initArray=function F(U,Z,Q){if(H(typeof U.length==="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var $,K,J=0;if(Q==="be"){for(I=U.length-1,$=0;I>=0;I-=3)if(K=U[I]|U[I-1]<<8|U[I-2]<<16,this.words[$]|=K<<J&67108863,this.words[$+1]=K>>>26-J&67108863,J+=24,J>=26)J-=26,$++}else if(Q==="le"){for(I=0,$=0;I<U.length;I+=3)if(K=U[I]|U[I+1]<<8|U[I+2]<<16,this.words[$]|=K<<J&67108863,this.words[$+1]=K>>>26-J&67108863,J+=24,J>=26)J-=26,$++}return this.strip()};function k(F,U){var Z=F.charCodeAt(U);if(Z>=65&&Z<=70)return Z-55;else if(Z>=97&&Z<=102)return Z-87;else return Z-48&15}function R(F,U,Z){var Q=k(F,Z);if(Z-1>=U)Q|=k(F,Z-1)<<4;return Q}V.prototype._parseHex=function F(U,Z,Q){this.length=Math.ceil((U.length-Z)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var $=0,K=0,J;if(Q==="be")for(I=U.length-1;I>=Z;I-=2)if(J=R(U,Z,I)<<$,this.words[K]|=J&67108863,$>=18)$-=18,K+=1,this.words[K]|=J>>>26;else $+=8;else{var Y=U.length-Z;for(I=Y%2===0?Z+1:Z;I<U.length;I+=2)if(J=R(U,Z,I)<<$,this.words[K]|=J&67108863,$>=18)$-=18,K+=1,this.words[K]|=J>>>26;else $+=8}this.strip()};function S(F,U,Z,Q){var I=0,$=Math.min(F.length,Z);for(var K=U;K<$;K++){var J=F.charCodeAt(K)-48;if(I*=Q,J>=49)I+=J-49+10;else if(J>=17)I+=J-17+10;else I+=J}return I}V.prototype._parseBase=function F(U,Z,Q){this.words=[0],this.length=1;for(var I=0,$=1;$<=67108863;$*=Z)I++;I--,$=$/Z|0;var K=U.length-Q,J=K%I,Y=Math.min(K,K-J)+Q,X=0;for(var O=Q;O<Y;O+=I)if(X=S(U,O,O+I,Z),this.imuln($),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(J!==0){var v=1;X=S(U,O,U.length,Z);for(O=0;O<J;O++)v*=Z;if(this.imuln(v),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},V.prototype.copy=function F(U){U.words=new Array(this.length);for(var Z=0;Z<this.length;Z++)U.words[Z]=this.words[Z];U.length=this.length,U.negative=this.negative,U.red=this.red},V.prototype.clone=function F(){var U=new V(null);return this.copy(U),U},V.prototype._expand=function F(U){while(this.length<U)this.words[this.length++]=0;return this},V.prototype.strip=function F(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function F(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},V.prototype.inspect=function F(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var D=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function F(U,Z){U=U||10,Z=Z|0||1;var Q;if(U===16||U==="hex"){Q="";var I=0,$=0;for(var K=0;K<this.length;K++){var J=this.words[K],Y=((J<<I|$)&16777215).toString(16);if($=J>>>24-I&16777215,I+=2,I>=26)I-=26,K--;if($!==0||K!==this.length-1)Q=D[6-Y.length]+Y+Q;else Q=Y+Q}if($!==0)Q=$.toString(16)+Q;while(Q.length%Z!==0)Q="0"+Q;if(this.negative!==0)Q="-"+Q;return Q}if(U===(U|0)&&U>=2&&U<=36){var X=A[U],O=L[U];Q="";var v=this.clone();v.negative=0;while(!v.isZero()){var T=v.modn(O).toString(U);if(v=v.idivn(O),!v.isZero())Q=D[X-T.length]+T+Q;else Q=T+Q}if(this.isZero())Q="0"+Q;while(Q.length%Z!==0)Q="0"+Q;if(this.negative!==0)Q="-"+Q;return Q}H(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function F(){var U=this.words[0];if(this.length===2)U+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)U+=4503599627370496+this.words[1]*67108864;else if(this.length>2)H(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-U:U},V.prototype.toJSON=function F(){return this.toString(16)},V.prototype.toBuffer=function F(U,Z){return H(typeof P!=="undefined"),this.toArrayLike(P,U,Z)},V.prototype.toArray=function F(U,Z){return this.toArrayLike(Array,U,Z)},V.prototype.toArrayLike=function F(U,Z,Q){var I=this.byteLength(),$=Q||Math.max(1,I);H(I<=$,"byte array longer than desired length"),H($>0,"Requested array length <= 0"),this.strip();var K=Z==="le",J=new U($),Y,X,O=this.clone();if(!K){for(X=0;X<$-I;X++)J[X]=0;for(X=0;!O.isZero();X++)Y=O.andln(255),O.iushrn(8),J[$-X-1]=Y}else{for(X=0;!O.isZero();X++)Y=O.andln(255),O.iushrn(8),J[X]=Y;for(;X<$;X++)J[X]=0}return J},Math.clz32)V.prototype._countBits=function F(U){return 32-Math.clz32(U)};else V.prototype._countBits=function F(U){var Z=U,Q=0;if(Z>=4096)Q+=13,Z>>>=13;if(Z>=64)Q+=7,Z>>>=7;if(Z>=8)Q+=4,Z>>>=4;if(Z>=2)Q+=2,Z>>>=2;return Q+Z};V.prototype._zeroBits=function F(U){if(U===0)return 26;var Z=U,Q=0;if((Z&8191)===0)Q+=13,Z>>>=13;if((Z&127)===0)Q+=7,Z>>>=7;if((Z&15)===0)Q+=4,Z>>>=4;if((Z&3)===0)Q+=2,Z>>>=2;if((Z&1)===0)Q++;return Q},V.prototype.bitLength=function F(){var U=this.words[this.length-1],Z=this._countBits(U);return(this.length-1)*26+Z};function M(F){var U=new Array(F.bitLength());for(var Z=0;Z<U.length;Z++){var Q=Z/26|0,I=Z%26;U[Z]=(F.words[Q]&1<<I)>>>I}return U}V.prototype.zeroBits=function F(){if(this.isZero())return 0;var U=0;for(var Z=0;Z<this.length;Z++){var Q=this._zeroBits(this.words[Z]);if(U+=Q,Q!==26)break}return U},V.prototype.byteLength=function F(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function F(U){if(this.negative!==0)return this.abs().inotn(U).iaddn(1);return this.clone()},V.prototype.fromTwos=function F(U){if(this.testn(U-1))return this.notn(U).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function F(){return this.negative!==0},V.prototype.neg=function F(){return this.clone().ineg()},V.prototype.ineg=function F(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function F(U){while(this.length<U.length)this.words[this.length++]=0;for(var Z=0;Z<U.length;Z++)this.words[Z]=this.words[Z]|U.words[Z];return this.strip()},V.prototype.ior=function F(U){return H((this.negative|U.negative)===0),this.iuor(U)},V.prototype.or=function F(U){if(this.length>U.length)return this.clone().ior(U);return U.clone().ior(this)},V.prototype.uor=function F(U){if(this.length>U.length)return this.clone().iuor(U);return U.clone().iuor(this)},V.prototype.iuand=function F(U){var Z;if(this.length>U.length)Z=U;else Z=this;for(var Q=0;Q<Z.length;Q++)this.words[Q]=this.words[Q]&U.words[Q];return this.length=Z.length,this.strip()},V.prototype.iand=function F(U){return H((this.negative|U.negative)===0),this.iuand(U)},V.prototype.and=function F(U){if(this.length>U.length)return this.clone().iand(U);return U.clone().iand(this)},V.prototype.uand=function F(U){if(this.length>U.length)return this.clone().iuand(U);return U.clone().iuand(this)},V.prototype.iuxor=function F(U){var Z,Q;if(this.length>U.length)Z=this,Q=U;else Z=U,Q=this;for(var I=0;I<Q.length;I++)this.words[I]=Z.words[I]^Q.words[I];if(this!==Z)for(;I<Z.length;I++)this.words[I]=Z.words[I];return this.length=Z.length,this.strip()},V.prototype.ixor=function F(U){return H((this.negative|U.negative)===0),this.iuxor(U)},V.prototype.xor=function F(U){if(this.length>U.length)return this.clone().ixor(U);return U.clone().ixor(this)},V.prototype.uxor=function F(U){if(this.length>U.length)return this.clone().iuxor(U);return U.clone().iuxor(this)},V.prototype.inotn=function F(U){H(typeof U==="number"&&U>=0);var Z=Math.ceil(U/26)|0,Q=U%26;if(this._expand(Z),Q>0)Z--;for(var I=0;I<Z;I++)this.words[I]=~this.words[I]&67108863;if(Q>0)this.words[I]=~this.words[I]&67108863>>26-Q;return this.strip()},V.prototype.notn=function F(U){return this.clone().inotn(U)},V.prototype.setn=function F(U,Z){H(typeof U==="number"&&U>=0);var Q=U/26|0,I=U%26;if(this._expand(Q+1),Z)this.words[Q]=this.words[Q]|1<<I;else this.words[Q]=this.words[Q]&~(1<<I);return this.strip()},V.prototype.iadd=function F(U){var Z;if(this.negative!==0&&U.negative===0)return this.negative=0,Z=this.isub(U),this.negative^=1,this._normSign();else if(this.negative===0&&U.negative!==0)return U.negative=0,Z=this.isub(U),U.negative=1,Z._normSign();var Q,I;if(this.length>U.length)Q=this,I=U;else Q=U,I=this;var $=0;for(var K=0;K<I.length;K++)Z=(Q.words[K]|0)+(I.words[K]|0)+$,this.words[K]=Z&67108863,$=Z>>>26;for(;$!==0&&K<Q.length;K++)Z=(Q.words[K]|0)+$,this.words[K]=Z&67108863,$=Z>>>26;if(this.length=Q.length,$!==0)this.words[this.length]=$,this.length++;else if(Q!==this)for(;K<Q.length;K++)this.words[K]=Q.words[K];return this},V.prototype.add=function F(U){var Z;if(U.negative!==0&&this.negative===0)return U.negative=0,Z=this.sub(U),U.negative^=1,Z;else if(U.negative===0&&this.negative!==0)return this.negative=0,Z=U.sub(this),this.negative=1,Z;if(this.length>U.length)return this.clone().iadd(U);return U.clone().iadd(this)},V.prototype.isub=function F(U){if(U.negative!==0){U.negative=0;var Z=this.iadd(U);return U.negative=1,Z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var Q=this.cmp(U);if(Q===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,$;if(Q>0)I=this,$=U;else I=U,$=this;var K=0;for(var J=0;J<$.length;J++)Z=(I.words[J]|0)-($.words[J]|0)+K,K=Z>>26,this.words[J]=Z&67108863;for(;K!==0&&J<I.length;J++)Z=(I.words[J]|0)+K,K=Z>>26,this.words[J]=Z&67108863;if(K===0&&J<I.length&&I!==this)for(;J<I.length;J++)this.words[J]=I.words[J];if(this.length=Math.max(this.length,J),I!==this)this.negative=1;return this.strip()},V.prototype.sub=function F(U){return this.clone().isub(U)};function q(F,U,Z){Z.negative=U.negative^F.negative;var Q=F.length+U.length|0;Z.length=Q,Q=Q-1|0;var I=F.words[0]|0,$=U.words[0]|0,K=I*$,J=K&67108863,Y=K/67108864|0;Z.words[0]=J;for(var X=1;X<Q;X++){var O=Y>>>26,v=Y&67108863,T=Math.min(X,U.length-1);for(var B=Math.max(0,X-F.length+1);B<=T;B++){var c=X-B|0;I=F.words[c]|0,$=U.words[B]|0,K=I*$+v,O+=K/67108864|0,v=K&67108863}Z.words[X]=v|0,Y=O|0}if(Y!==0)Z.words[X]=Y|0;else Z.length--;return Z.strip()}var j=function F(U,Z,Q){var I=U.words,$=Z.words,K=Q.words,J=0,Y,X,O,v=I[0]|0,T=v&8191,B=v>>>13,c=I[1]|0,l=c&8191,s=c>>>13,O0=I[2]|0,h=O0&8191,d=O0>>>13,g0=I[3]|0,Q0=g0&8191,$0=g0>>>13,m=I[4]|0,p=m&8191,b=m>>>13,N0=I[5]|0,i=N0&8191,e=N0>>>13,t=I[6]|0,n=t&8191,X0=t>>>13,H0=I[7]|0,Z0=H0&8191,W0=H0>>>13,c0=I[8]|0,G0=c0&8191,A0=c0>>>13,u0=I[9]|0,J0=u0&8191,T0=u0>>>13,r0=$[0]|0,E0=r0&8191,v0=r0>>>13,AU=$[1]|0,k0=AU&8191,j0=AU>>>13,DU=$[2]|0,R0=DU&8191,S0=DU>>>13,LU=$[3]|0,P0=LU&8191,D0=LU>>>13,zU=$[4]|0,B0=zU&8191,L0=zU>>>13,EU=$[5]|0,_=EU&8191,w=EU>>>13,_0=$[6]|0,U0=_0&8191,I0=_0>>>13,l0=$[7]|0,F0=l0&8191,C0=l0>>>13,CU=$[8]|0,x0=CU&8191,q0=CU>>>13,TU=$[9]|0,z0=TU&8191,M0=TU>>>13;Q.negative=U.negative^Z.negative,Q.length=19,Y=Math.imul(T,E0),X=Math.imul(T,v0),X=X+Math.imul(B,E0)|0,O=Math.imul(B,v0);var t0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(t0>>>26)|0,t0&=67108863,Y=Math.imul(l,E0),X=Math.imul(l,v0),X=X+Math.imul(s,E0)|0,O=Math.imul(s,v0),Y=Y+Math.imul(T,k0)|0,X=X+Math.imul(T,j0)|0,X=X+Math.imul(B,k0)|0,O=O+Math.imul(B,j0)|0;var p0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(p0>>>26)|0,p0&=67108863,Y=Math.imul(h,E0),X=Math.imul(h,v0),X=X+Math.imul(d,E0)|0,O=Math.imul(d,v0),Y=Y+Math.imul(l,k0)|0,X=X+Math.imul(l,j0)|0,X=X+Math.imul(s,k0)|0,O=O+Math.imul(s,j0)|0,Y=Y+Math.imul(T,R0)|0,X=X+Math.imul(T,S0)|0,X=X+Math.imul(B,R0)|0,O=O+Math.imul(B,S0)|0;var f0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(f0>>>26)|0,f0&=67108863,Y=Math.imul(Q0,E0),X=Math.imul(Q0,v0),X=X+Math.imul($0,E0)|0,O=Math.imul($0,v0),Y=Y+Math.imul(h,k0)|0,X=X+Math.imul(h,j0)|0,X=X+Math.imul(d,k0)|0,O=O+Math.imul(d,j0)|0,Y=Y+Math.imul(l,R0)|0,X=X+Math.imul(l,S0)|0,X=X+Math.imul(s,R0)|0,O=O+Math.imul(s,S0)|0,Y=Y+Math.imul(T,P0)|0,X=X+Math.imul(T,D0)|0,X=X+Math.imul(B,P0)|0,O=O+Math.imul(B,D0)|0;var b0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(b0>>>26)|0,b0&=67108863,Y=Math.imul(p,E0),X=Math.imul(p,v0),X=X+Math.imul(b,E0)|0,O=Math.imul(b,v0),Y=Y+Math.imul(Q0,k0)|0,X=X+Math.imul(Q0,j0)|0,X=X+Math.imul($0,k0)|0,O=O+Math.imul($0,j0)|0,Y=Y+Math.imul(h,R0)|0,X=X+Math.imul(h,S0)|0,X=X+Math.imul(d,R0)|0,O=O+Math.imul(d,S0)|0,Y=Y+Math.imul(l,P0)|0,X=X+Math.imul(l,D0)|0,X=X+Math.imul(s,P0)|0,O=O+Math.imul(s,D0)|0,Y=Y+Math.imul(T,B0)|0,X=X+Math.imul(T,L0)|0,X=X+Math.imul(B,B0)|0,O=O+Math.imul(B,L0)|0;var a0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,Y=Math.imul(i,E0),X=Math.imul(i,v0),X=X+Math.imul(e,E0)|0,O=Math.imul(e,v0),Y=Y+Math.imul(p,k0)|0,X=X+Math.imul(p,j0)|0,X=X+Math.imul(b,k0)|0,O=O+Math.imul(b,j0)|0,Y=Y+Math.imul(Q0,R0)|0,X=X+Math.imul(Q0,S0)|0,X=X+Math.imul($0,R0)|0,O=O+Math.imul($0,S0)|0,Y=Y+Math.imul(h,P0)|0,X=X+Math.imul(h,D0)|0,X=X+Math.imul(d,P0)|0,O=O+Math.imul(d,D0)|0,Y=Y+Math.imul(l,B0)|0,X=X+Math.imul(l,L0)|0,X=X+Math.imul(s,B0)|0,O=O+Math.imul(s,L0)|0,Y=Y+Math.imul(T,_)|0,X=X+Math.imul(T,w)|0,X=X+Math.imul(B,_)|0,O=O+Math.imul(B,w)|0;var e0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,Y=Math.imul(n,E0),X=Math.imul(n,v0),X=X+Math.imul(X0,E0)|0,O=Math.imul(X0,v0),Y=Y+Math.imul(i,k0)|0,X=X+Math.imul(i,j0)|0,X=X+Math.imul(e,k0)|0,O=O+Math.imul(e,j0)|0,Y=Y+Math.imul(p,R0)|0,X=X+Math.imul(p,S0)|0,X=X+Math.imul(b,R0)|0,O=O+Math.imul(b,S0)|0,Y=Y+Math.imul(Q0,P0)|0,X=X+Math.imul(Q0,D0)|0,X=X+Math.imul($0,P0)|0,O=O+Math.imul($0,D0)|0,Y=Y+Math.imul(h,B0)|0,X=X+Math.imul(h,L0)|0,X=X+Math.imul(d,B0)|0,O=O+Math.imul(d,L0)|0,Y=Y+Math.imul(l,_)|0,X=X+Math.imul(l,w)|0,X=X+Math.imul(s,_)|0,O=O+Math.imul(s,w)|0,Y=Y+Math.imul(T,U0)|0,X=X+Math.imul(T,I0)|0,X=X+Math.imul(B,U0)|0,O=O+Math.imul(B,I0)|0;var i0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(i0>>>26)|0,i0&=67108863,Y=Math.imul(Z0,E0),X=Math.imul(Z0,v0),X=X+Math.imul(W0,E0)|0,O=Math.imul(W0,v0),Y=Y+Math.imul(n,k0)|0,X=X+Math.imul(n,j0)|0,X=X+Math.imul(X0,k0)|0,O=O+Math.imul(X0,j0)|0,Y=Y+Math.imul(i,R0)|0,X=X+Math.imul(i,S0)|0,X=X+Math.imul(e,R0)|0,O=O+Math.imul(e,S0)|0,Y=Y+Math.imul(p,P0)|0,X=X+Math.imul(p,D0)|0,X=X+Math.imul(b,P0)|0,O=O+Math.imul(b,D0)|0,Y=Y+Math.imul(Q0,B0)|0,X=X+Math.imul(Q0,L0)|0,X=X+Math.imul($0,B0)|0,O=O+Math.imul($0,L0)|0,Y=Y+Math.imul(h,_)|0,X=X+Math.imul(h,w)|0,X=X+Math.imul(d,_)|0,O=O+Math.imul(d,w)|0,Y=Y+Math.imul(l,U0)|0,X=X+Math.imul(l,I0)|0,X=X+Math.imul(s,U0)|0,O=O+Math.imul(s,I0)|0,Y=Y+Math.imul(T,F0)|0,X=X+Math.imul(T,C0)|0,X=X+Math.imul(B,F0)|0,O=O+Math.imul(B,C0)|0;var UU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(UU>>>26)|0,UU&=67108863,Y=Math.imul(G0,E0),X=Math.imul(G0,v0),X=X+Math.imul(A0,E0)|0,O=Math.imul(A0,v0),Y=Y+Math.imul(Z0,k0)|0,X=X+Math.imul(Z0,j0)|0,X=X+Math.imul(W0,k0)|0,O=O+Math.imul(W0,j0)|0,Y=Y+Math.imul(n,R0)|0,X=X+Math.imul(n,S0)|0,X=X+Math.imul(X0,R0)|0,O=O+Math.imul(X0,S0)|0,Y=Y+Math.imul(i,P0)|0,X=X+Math.imul(i,D0)|0,X=X+Math.imul(e,P0)|0,O=O+Math.imul(e,D0)|0,Y=Y+Math.imul(p,B0)|0,X=X+Math.imul(p,L0)|0,X=X+Math.imul(b,B0)|0,O=O+Math.imul(b,L0)|0,Y=Y+Math.imul(Q0,_)|0,X=X+Math.imul(Q0,w)|0,X=X+Math.imul($0,_)|0,O=O+Math.imul($0,w)|0,Y=Y+Math.imul(h,U0)|0,X=X+Math.imul(h,I0)|0,X=X+Math.imul(d,U0)|0,O=O+Math.imul(d,I0)|0,Y=Y+Math.imul(l,F0)|0,X=X+Math.imul(l,C0)|0,X=X+Math.imul(s,F0)|0,O=O+Math.imul(s,C0)|0,Y=Y+Math.imul(T,x0)|0,X=X+Math.imul(T,q0)|0,X=X+Math.imul(B,x0)|0,O=O+Math.imul(B,q0)|0;var XU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(XU>>>26)|0,XU&=67108863,Y=Math.imul(J0,E0),X=Math.imul(J0,v0),X=X+Math.imul(T0,E0)|0,O=Math.imul(T0,v0),Y=Y+Math.imul(G0,k0)|0,X=X+Math.imul(G0,j0)|0,X=X+Math.imul(A0,k0)|0,O=O+Math.imul(A0,j0)|0,Y=Y+Math.imul(Z0,R0)|0,X=X+Math.imul(Z0,S0)|0,X=X+Math.imul(W0,R0)|0,O=O+Math.imul(W0,S0)|0,Y=Y+Math.imul(n,P0)|0,X=X+Math.imul(n,D0)|0,X=X+Math.imul(X0,P0)|0,O=O+Math.imul(X0,D0)|0,Y=Y+Math.imul(i,B0)|0,X=X+Math.imul(i,L0)|0,X=X+Math.imul(e,B0)|0,O=O+Math.imul(e,L0)|0,Y=Y+Math.imul(p,_)|0,X=X+Math.imul(p,w)|0,X=X+Math.imul(b,_)|0,O=O+Math.imul(b,w)|0,Y=Y+Math.imul(Q0,U0)|0,X=X+Math.imul(Q0,I0)|0,X=X+Math.imul($0,U0)|0,O=O+Math.imul($0,I0)|0,Y=Y+Math.imul(h,F0)|0,X=X+Math.imul(h,C0)|0,X=X+Math.imul(d,F0)|0,O=O+Math.imul(d,C0)|0,Y=Y+Math.imul(l,x0)|0,X=X+Math.imul(l,q0)|0,X=X+Math.imul(s,x0)|0,O=O+Math.imul(s,q0)|0,Y=Y+Math.imul(T,z0)|0,X=X+Math.imul(T,M0)|0,X=X+Math.imul(B,z0)|0,O=O+Math.imul(B,M0)|0;var IU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(IU>>>26)|0,IU&=67108863,Y=Math.imul(J0,k0),X=Math.imul(J0,j0),X=X+Math.imul(T0,k0)|0,O=Math.imul(T0,j0),Y=Y+Math.imul(G0,R0)|0,X=X+Math.imul(G0,S0)|0,X=X+Math.imul(A0,R0)|0,O=O+Math.imul(A0,S0)|0,Y=Y+Math.imul(Z0,P0)|0,X=X+Math.imul(Z0,D0)|0,X=X+Math.imul(W0,P0)|0,O=O+Math.imul(W0,D0)|0,Y=Y+Math.imul(n,B0)|0,X=X+Math.imul(n,L0)|0,X=X+Math.imul(X0,B0)|0,O=O+Math.imul(X0,L0)|0,Y=Y+Math.imul(i,_)|0,X=X+Math.imul(i,w)|0,X=X+Math.imul(e,_)|0,O=O+Math.imul(e,w)|0,Y=Y+Math.imul(p,U0)|0,X=X+Math.imul(p,I0)|0,X=X+Math.imul(b,U0)|0,O=O+Math.imul(b,I0)|0,Y=Y+Math.imul(Q0,F0)|0,X=X+Math.imul(Q0,C0)|0,X=X+Math.imul($0,F0)|0,O=O+Math.imul($0,C0)|0,Y=Y+Math.imul(h,x0)|0,X=X+Math.imul(h,q0)|0,X=X+Math.imul(d,x0)|0,O=O+Math.imul(d,q0)|0,Y=Y+Math.imul(l,z0)|0,X=X+Math.imul(l,M0)|0,X=X+Math.imul(s,z0)|0,O=O+Math.imul(s,M0)|0;var ZU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,Y=Math.imul(J0,R0),X=Math.imul(J0,S0),X=X+Math.imul(T0,R0)|0,O=Math.imul(T0,S0),Y=Y+Math.imul(G0,P0)|0,X=X+Math.imul(G0,D0)|0,X=X+Math.imul(A0,P0)|0,O=O+Math.imul(A0,D0)|0,Y=Y+Math.imul(Z0,B0)|0,X=X+Math.imul(Z0,L0)|0,X=X+Math.imul(W0,B0)|0,O=O+Math.imul(W0,L0)|0,Y=Y+Math.imul(n,_)|0,X=X+Math.imul(n,w)|0,X=X+Math.imul(X0,_)|0,O=O+Math.imul(X0,w)|0,Y=Y+Math.imul(i,U0)|0,X=X+Math.imul(i,I0)|0,X=X+Math.imul(e,U0)|0,O=O+Math.imul(e,I0)|0,Y=Y+Math.imul(p,F0)|0,X=X+Math.imul(p,C0)|0,X=X+Math.imul(b,F0)|0,O=O+Math.imul(b,C0)|0,Y=Y+Math.imul(Q0,x0)|0,X=X+Math.imul(Q0,q0)|0,X=X+Math.imul($0,x0)|0,O=O+Math.imul($0,q0)|0,Y=Y+Math.imul(h,z0)|0,X=X+Math.imul(h,M0)|0,X=X+Math.imul(d,z0)|0,O=O+Math.imul(d,M0)|0;var QU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(QU>>>26)|0,QU&=67108863,Y=Math.imul(J0,P0),X=Math.imul(J0,D0),X=X+Math.imul(T0,P0)|0,O=Math.imul(T0,D0),Y=Y+Math.imul(G0,B0)|0,X=X+Math.imul(G0,L0)|0,X=X+Math.imul(A0,B0)|0,O=O+Math.imul(A0,L0)|0,Y=Y+Math.imul(Z0,_)|0,X=X+Math.imul(Z0,w)|0,X=X+Math.imul(W0,_)|0,O=O+Math.imul(W0,w)|0,Y=Y+Math.imul(n,U0)|0,X=X+Math.imul(n,I0)|0,X=X+Math.imul(X0,U0)|0,O=O+Math.imul(X0,I0)|0,Y=Y+Math.imul(i,F0)|0,X=X+Math.imul(i,C0)|0,X=X+Math.imul(e,F0)|0,O=O+Math.imul(e,C0)|0,Y=Y+Math.imul(p,x0)|0,X=X+Math.imul(p,q0)|0,X=X+Math.imul(b,x0)|0,O=O+Math.imul(b,q0)|0,Y=Y+Math.imul(Q0,z0)|0,X=X+Math.imul(Q0,M0)|0,X=X+Math.imul($0,z0)|0,O=O+Math.imul($0,M0)|0;var $U=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+($U>>>26)|0,$U&=67108863,Y=Math.imul(J0,B0),X=Math.imul(J0,L0),X=X+Math.imul(T0,B0)|0,O=Math.imul(T0,L0),Y=Y+Math.imul(G0,_)|0,X=X+Math.imul(G0,w)|0,X=X+Math.imul(A0,_)|0,O=O+Math.imul(A0,w)|0,Y=Y+Math.imul(Z0,U0)|0,X=X+Math.imul(Z0,I0)|0,X=X+Math.imul(W0,U0)|0,O=O+Math.imul(W0,I0)|0,Y=Y+Math.imul(n,F0)|0,X=X+Math.imul(n,C0)|0,X=X+Math.imul(X0,F0)|0,O=O+Math.imul(X0,C0)|0,Y=Y+Math.imul(i,x0)|0,X=X+Math.imul(i,q0)|0,X=X+Math.imul(e,x0)|0,O=O+Math.imul(e,q0)|0,Y=Y+Math.imul(p,z0)|0,X=X+Math.imul(p,M0)|0,X=X+Math.imul(b,z0)|0,O=O+Math.imul(b,M0)|0;var YU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(YU>>>26)|0,YU&=67108863,Y=Math.imul(J0,_),X=Math.imul(J0,w),X=X+Math.imul(T0,_)|0,O=Math.imul(T0,w),Y=Y+Math.imul(G0,U0)|0,X=X+Math.imul(G0,I0)|0,X=X+Math.imul(A0,U0)|0,O=O+Math.imul(A0,I0)|0,Y=Y+Math.imul(Z0,F0)|0,X=X+Math.imul(Z0,C0)|0,X=X+Math.imul(W0,F0)|0,O=O+Math.imul(W0,C0)|0,Y=Y+Math.imul(n,x0)|0,X=X+Math.imul(n,q0)|0,X=X+Math.imul(X0,x0)|0,O=O+Math.imul(X0,q0)|0,Y=Y+Math.imul(i,z0)|0,X=X+Math.imul(i,M0)|0,X=X+Math.imul(e,z0)|0,O=O+Math.imul(e,M0)|0;var VU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(VU>>>26)|0,VU&=67108863,Y=Math.imul(J0,U0),X=Math.imul(J0,I0),X=X+Math.imul(T0,U0)|0,O=Math.imul(T0,I0),Y=Y+Math.imul(G0,F0)|0,X=X+Math.imul(G0,C0)|0,X=X+Math.imul(A0,F0)|0,O=O+Math.imul(A0,C0)|0,Y=Y+Math.imul(Z0,x0)|0,X=X+Math.imul(Z0,q0)|0,X=X+Math.imul(W0,x0)|0,O=O+Math.imul(W0,q0)|0,Y=Y+Math.imul(n,z0)|0,X=X+Math.imul(n,M0)|0,X=X+Math.imul(X0,z0)|0,O=O+Math.imul(X0,M0)|0;var OU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(OU>>>26)|0,OU&=67108863,Y=Math.imul(J0,F0),X=Math.imul(J0,C0),X=X+Math.imul(T0,F0)|0,O=Math.imul(T0,C0),Y=Y+Math.imul(G0,x0)|0,X=X+Math.imul(G0,q0)|0,X=X+Math.imul(A0,x0)|0,O=O+Math.imul(A0,q0)|0,Y=Y+Math.imul(Z0,z0)|0,X=X+Math.imul(Z0,M0)|0,X=X+Math.imul(W0,z0)|0,O=O+Math.imul(W0,M0)|0;var GU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(GU>>>26)|0,GU&=67108863,Y=Math.imul(J0,x0),X=Math.imul(J0,q0),X=X+Math.imul(T0,x0)|0,O=Math.imul(T0,q0),Y=Y+Math.imul(G0,z0)|0,X=X+Math.imul(G0,M0)|0,X=X+Math.imul(A0,z0)|0,O=O+Math.imul(A0,M0)|0;var KU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(KU>>>26)|0,KU&=67108863,Y=Math.imul(J0,z0),X=Math.imul(J0,M0),X=X+Math.imul(T0,z0)|0,O=Math.imul(T0,M0);var WU=(J+Y|0)+((X&8191)<<13)|0;if(J=(O+(X>>>13)|0)+(WU>>>26)|0,WU&=67108863,K[0]=t0,K[1]=p0,K[2]=f0,K[3]=b0,K[4]=a0,K[5]=e0,K[6]=i0,K[7]=UU,K[8]=XU,K[9]=IU,K[10]=ZU,K[11]=QU,K[12]=$U,K[13]=YU,K[14]=VU,K[15]=OU,K[16]=GU,K[17]=KU,K[18]=WU,J!==0)K[19]=J,Q.length++;return Q};if(!Math.imul)j=q;function x(F,U,Z){Z.negative=U.negative^F.negative,Z.length=F.length+U.length;var Q=0,I=0;for(var $=0;$<Z.length-1;$++){var K=I;I=0;var J=Q&67108863,Y=Math.min($,U.length-1);for(var X=Math.max(0,$-F.length+1);X<=Y;X++){var O=$-X,v=F.words[O]|0,T=U.words[X]|0,B=v*T,c=B&67108863;K=K+(B/67108864|0)|0,c=c+J|0,J=c&67108863,K=K+(c>>>26)|0,I+=K>>>26,K&=67108863}Z.words[$]=J,Q=K,K=I}if(Q!==0)Z.words[$]=Q;else Z.length--;return Z.strip()}function g(F,U,Z){var Q=new N;return Q.mulp(F,U,Z)}V.prototype.mulTo=function F(U,Z){var Q,I=this.length+U.length;if(this.length===10&&U.length===10)Q=j(this,U,Z);else if(I<63)Q=q(this,U,Z);else if(I<1024)Q=x(this,U,Z);else Q=g(this,U,Z);return Q};function N(F,U){this.x=F,this.y=U}N.prototype.makeRBT=function F(U){var Z=new Array(U),Q=V.prototype._countBits(U)-1;for(var I=0;I<U;I++)Z[I]=this.revBin(I,Q,U);return Z},N.prototype.revBin=function F(U,Z,Q){if(U===0||U===Q-1)return U;var I=0;for(var $=0;$<Z;$++)I|=(U&1)<<Z-$-1,U>>=1;return I},N.prototype.permute=function F(U,Z,Q,I,$,K){for(var J=0;J<K;J++)I[J]=Z[U[J]],$[J]=Q[U[J]]},N.prototype.transform=function F(U,Z,Q,I,$,K){this.permute(K,U,Z,Q,I,$);for(var J=1;J<$;J<<=1){var Y=J<<1,X=Math.cos(2*Math.PI/Y),O=Math.sin(2*Math.PI/Y);for(var v=0;v<$;v+=Y){var T=X,B=O;for(var c=0;c<J;c++){var l=Q[v+c],s=I[v+c],O0=Q[v+c+J],h=I[v+c+J],d=T*O0-B*h;if(h=T*h+B*O0,O0=d,Q[v+c]=l+O0,I[v+c]=s+h,Q[v+c+J]=l-O0,I[v+c+J]=s-h,c!==Y)d=X*T-O*B,B=X*B+O*T,T=d}}}},N.prototype.guessLen13b=function F(U,Z){var Q=Math.max(Z,U)|1,I=Q&1,$=0;for(Q=Q/2|0;Q;Q=Q>>>1)$++;return 1<<$+1+I},N.prototype.conjugate=function F(U,Z,Q){if(Q<=1)return;for(var I=0;I<Q/2;I++){var $=U[I];U[I]=U[Q-I-1],U[Q-I-1]=$,$=Z[I],Z[I]=-Z[Q-I-1],Z[Q-I-1]=-$}},N.prototype.normalize13b=function F(U,Z){var Q=0;for(var I=0;I<Z/2;I++){var $=Math.round(U[2*I+1]/Z)*8192+Math.round(U[2*I]/Z)+Q;if(U[I]=$&67108863,$<67108864)Q=0;else Q=$/67108864|0}return U},N.prototype.convert13b=function F(U,Z,Q,I){var $=0;for(var K=0;K<Z;K++)$=$+(U[K]|0),Q[2*K]=$&8191,$=$>>>13,Q[2*K+1]=$&8191,$=$>>>13;for(K=2*Z;K<I;++K)Q[K]=0;H($===0),H(($&-8192)===0)},N.prototype.stub=function F(U){var Z=new Array(U);for(var Q=0;Q<U;Q++)Z[Q]=0;return Z},N.prototype.mulp=function F(U,Z,Q){var I=2*this.guessLen13b(U.length,Z.length),$=this.makeRBT(I),K=this.stub(I),J=new Array(I),Y=new Array(I),X=new Array(I),O=new Array(I),v=new Array(I),T=new Array(I),B=Q.words;B.length=I,this.convert13b(U.words,U.length,J,I),this.convert13b(Z.words,Z.length,O,I),this.transform(J,K,Y,X,I,$),this.transform(O,K,v,T,I,$);for(var c=0;c<I;c++){var l=Y[c]*v[c]-X[c]*T[c];X[c]=Y[c]*T[c]+X[c]*v[c],Y[c]=l}return this.conjugate(Y,X,I),this.transform(Y,X,B,K,I,$),this.conjugate(B,K,I),this.normalize13b(B,I),Q.negative=U.negative^Z.negative,Q.length=U.length+Z.length,Q.strip()},V.prototype.mul=function F(U){var Z=new V(null);return Z.words=new Array(this.length+U.length),this.mulTo(U,Z)},V.prototype.mulf=function F(U){var Z=new V(null);return Z.words=new Array(this.length+U.length),g(this,U,Z)},V.prototype.imul=function F(U){return this.clone().mulTo(U,this)},V.prototype.imuln=function F(U){H(typeof U==="number"),H(U<67108864);var Z=0;for(var Q=0;Q<this.length;Q++){var I=(this.words[Q]|0)*U,$=(I&67108863)+(Z&67108863);Z>>=26,Z+=I/67108864|0,Z+=$>>>26,this.words[Q]=$&67108863}if(Z!==0)this.words[Q]=Z,this.length++;return this.length=U===0?1:this.length,this},V.prototype.muln=function F(U){return this.clone().imuln(U)},V.prototype.sqr=function F(){return this.mul(this)},V.prototype.isqr=function F(){return this.imul(this.clone())},V.prototype.pow=function F(U){var Z=M(U);if(Z.length===0)return new V(1);var Q=this;for(var I=0;I<Z.length;I++,Q=Q.sqr())if(Z[I]!==0)break;if(++I<Z.length)for(var $=Q.sqr();I<Z.length;I++,$=$.sqr()){if(Z[I]===0)continue;Q=Q.mul($)}return Q},V.prototype.iushln=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26,I=67108863>>>26-Z<<26-Z,$;if(Z!==0){var K=0;for($=0;$<this.length;$++){var J=this.words[$]&I,Y=(this.words[$]|0)-J<<Z;this.words[$]=Y|K,K=J>>>26-Z}if(K)this.words[$]=K,this.length++}if(Q!==0){for($=this.length-1;$>=0;$--)this.words[$+Q]=this.words[$];for($=0;$<Q;$++)this.words[$]=0;this.length+=Q}return this.strip()},V.prototype.ishln=function F(U){return H(this.negative===0),this.iushln(U)},V.prototype.iushrn=function F(U,Z,Q){H(typeof U==="number"&&U>=0);var I;if(Z)I=(Z-Z%26)/26;else I=0;var $=U%26,K=Math.min((U-$)/26,this.length),J=67108863^67108863>>>$<<$,Y=Q;if(I-=K,I=Math.max(0,I),Y){for(var X=0;X<K;X++)Y.words[X]=this.words[X];Y.length=K}if(K===0);else if(this.length>K){this.length-=K;for(X=0;X<this.length;X++)this.words[X]=this.words[X+K]}else this.words[0]=0,this.length=1;var O=0;for(X=this.length-1;X>=0&&(O!==0||X>=I);X--){var v=this.words[X]|0;this.words[X]=O<<26-$|v>>>$,O=v&J}if(Y&&O!==0)Y.words[Y.length++]=O;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},V.prototype.ishrn=function F(U,Z,Q){return H(this.negative===0),this.iushrn(U,Z,Q)},V.prototype.shln=function F(U){return this.clone().ishln(U)},V.prototype.ushln=function F(U){return this.clone().iushln(U)},V.prototype.shrn=function F(U){return this.clone().ishrn(U)},V.prototype.ushrn=function F(U){return this.clone().iushrn(U)},V.prototype.testn=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26,I=1<<Z;if(this.length<=Q)return!1;var $=this.words[Q];return!!($&I)},V.prototype.imaskn=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=Q)return this;if(Z!==0)Q++;if(this.length=Math.min(Q,this.length),Z!==0){var I=67108863^67108863>>>Z<<Z;this.words[this.length-1]&=I}return this.strip()},V.prototype.maskn=function F(U){return this.clone().imaskn(U)},V.prototype.iaddn=function F(U){if(H(typeof U==="number"),H(U<67108864),U<0)return this.isubn(-U);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<U)return this.words[0]=U-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(U),this.negative=1,this}return this._iaddn(U)},V.prototype._iaddn=function F(U){this.words[0]+=U;for(var Z=0;Z<this.length&&this.words[Z]>=67108864;Z++)if(this.words[Z]-=67108864,Z===this.length-1)this.words[Z+1]=1;else this.words[Z+1]++;return this.length=Math.max(this.length,Z+1),this},V.prototype.isubn=function F(U){if(H(typeof U==="number"),H(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Z=0;Z<this.length&&this.words[Z]<0;Z++)this.words[Z]+=67108864,this.words[Z+1]-=1;return this.strip()},V.prototype.addn=function F(U){return this.clone().iaddn(U)},V.prototype.subn=function F(U){return this.clone().isubn(U)},V.prototype.iabs=function F(){return this.negative=0,this},V.prototype.abs=function F(){return this.clone().iabs()},V.prototype._ishlnsubmul=function F(U,Z,Q){var I=U.length+Q,$;this._expand(I);var K,J=0;for($=0;$<U.length;$++){K=(this.words[$+Q]|0)+J;var Y=(U.words[$]|0)*Z;K-=Y&67108863,J=(K>>26)-(Y/67108864|0),this.words[$+Q]=K&67108863}for(;$<this.length-Q;$++)K=(this.words[$+Q]|0)+J,J=K>>26,this.words[$+Q]=K&67108863;if(J===0)return this.strip();H(J===-1),J=0;for($=0;$<this.length;$++)K=-(this.words[$]|0)+J,J=K>>26,this.words[$]=K&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function F(U,Z){var Q=this.length-U.length,I=this.clone(),$=U,K=$.words[$.length-1]|0,J=this._countBits(K);if(Q=26-J,Q!==0)$=$.ushln(Q),I.iushln(Q),K=$.words[$.length-1]|0;var Y=I.length-$.length,X;if(Z!=="mod"){X=new V(null),X.length=Y+1,X.words=new Array(X.length);for(var O=0;O<X.length;O++)X.words[O]=0}var v=I.clone()._ishlnsubmul($,1,Y);if(v.negative===0){if(I=v,X)X.words[Y]=1}for(var T=Y-1;T>=0;T--){var B=(I.words[$.length+T]|0)*67108864+(I.words[$.length+T-1]|0);B=Math.min(B/K|0,67108863),I._ishlnsubmul($,B,T);while(I.negative!==0)if(B--,I.negative=0,I._ishlnsubmul($,1,T),!I.isZero())I.negative^=1;if(X)X.words[T]=B}if(X)X.strip();if(I.strip(),Z!=="div"&&Q!==0)I.iushrn(Q);return{div:X||null,mod:I}},V.prototype.divmod=function F(U,Z,Q){if(H(!U.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var I,$,K;if(this.negative!==0&&U.negative===0){if(K=this.neg().divmod(U,Z),Z!=="mod")I=K.div.neg();if(Z!=="div"){if($=K.mod.neg(),Q&&$.negative!==0)$.iadd(U)}return{div:I,mod:$}}if(this.negative===0&&U.negative!==0){if(K=this.divmod(U.neg(),Z),Z!=="mod")I=K.div.neg();return{div:I,mod:K.mod}}if((this.negative&U.negative)!==0){if(K=this.neg().divmod(U.neg(),Z),Z!=="div"){if($=K.mod.neg(),Q&&$.negative!==0)$.isub(U)}return{div:K.div,mod:$}}if(U.length>this.length||this.cmp(U)<0)return{div:new V(0),mod:this};if(U.length===1){if(Z==="div")return{div:this.divn(U.words[0]),mod:null};if(Z==="mod")return{div:null,mod:new V(this.modn(U.words[0]))};return{div:this.divn(U.words[0]),mod:new V(this.modn(U.words[0]))}}return this._wordDiv(U,Z)},V.prototype.div=function F(U){return this.divmod(U,"div",!1).div},V.prototype.mod=function F(U){return this.divmod(U,"mod",!1).mod},V.prototype.umod=function F(U){return this.divmod(U,"mod",!0).mod},V.prototype.divRound=function F(U){var Z=this.divmod(U);if(Z.mod.isZero())return Z.div;var Q=Z.div.negative!==0?Z.mod.isub(U):Z.mod,I=U.ushrn(1),$=U.andln(1),K=Q.cmp(I);if(K<0||$===1&&K===0)return Z.div;return Z.div.negative!==0?Z.div.isubn(1):Z.div.iaddn(1)},V.prototype.modn=function F(U){H(U<=67108863);var Z=67108864%U,Q=0;for(var I=this.length-1;I>=0;I--)Q=(Z*Q+(this.words[I]|0))%U;return Q},V.prototype.idivn=function F(U){H(U<=67108863);var Z=0;for(var Q=this.length-1;Q>=0;Q--){var I=(this.words[Q]|0)+Z*67108864;this.words[Q]=I/U|0,Z=I%U}return this.strip()},V.prototype.divn=function F(U){return this.clone().idivn(U)},V.prototype.egcd=function F(U){H(U.negative===0),H(!U.isZero());var Z=this,Q=U.clone();if(Z.negative!==0)Z=Z.umod(U);else Z=Z.clone();var I=new V(1),$=new V(0),K=new V(0),J=new V(1),Y=0;while(Z.isEven()&&Q.isEven())Z.iushrn(1),Q.iushrn(1),++Y;var X=Q.clone(),O=Z.clone();while(!Z.isZero()){for(var v=0,T=1;(Z.words[0]&T)===0&&v<26;++v,T<<=1);if(v>0){Z.iushrn(v);while(v-- >0){if(I.isOdd()||$.isOdd())I.iadd(X),$.isub(O);I.iushrn(1),$.iushrn(1)}}for(var B=0,c=1;(Q.words[0]&c)===0&&B<26;++B,c<<=1);if(B>0){Q.iushrn(B);while(B-- >0){if(K.isOdd()||J.isOdd())K.iadd(X),J.isub(O);K.iushrn(1),J.iushrn(1)}}if(Z.cmp(Q)>=0)Z.isub(Q),I.isub(K),$.isub(J);else Q.isub(Z),K.isub(I),J.isub($)}return{a:K,b:J,gcd:Q.iushln(Y)}},V.prototype._invmp=function F(U){H(U.negative===0),H(!U.isZero());var Z=this,Q=U.clone();if(Z.negative!==0)Z=Z.umod(U);else Z=Z.clone();var I=new V(1),$=new V(0),K=Q.clone();while(Z.cmpn(1)>0&&Q.cmpn(1)>0){for(var J=0,Y=1;(Z.words[0]&Y)===0&&J<26;++J,Y<<=1);if(J>0){Z.iushrn(J);while(J-- >0){if(I.isOdd())I.iadd(K);I.iushrn(1)}}for(var X=0,O=1;(Q.words[0]&O)===0&&X<26;++X,O<<=1);if(X>0){Q.iushrn(X);while(X-- >0){if($.isOdd())$.iadd(K);$.iushrn(1)}}if(Z.cmp(Q)>=0)Z.isub(Q),I.isub($);else Q.isub(Z),$.isub(I)}var v;if(Z.cmpn(1)===0)v=I;else v=$;if(v.cmpn(0)<0)v.iadd(U);return v},V.prototype.gcd=function F(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Z=this.clone(),Q=U.clone();Z.negative=0,Q.negative=0;for(var I=0;Z.isEven()&&Q.isEven();I++)Z.iushrn(1),Q.iushrn(1);do{while(Z.isEven())Z.iushrn(1);while(Q.isEven())Q.iushrn(1);var $=Z.cmp(Q);if($<0){var K=Z;Z=Q,Q=K}else if($===0||Q.cmpn(1)===0)break;Z.isub(Q)}while(!0);return Q.iushln(I)},V.prototype.invm=function F(U){return this.egcd(U).a.umod(U)},V.prototype.isEven=function F(){return(this.words[0]&1)===0},V.prototype.isOdd=function F(){return(this.words[0]&1)===1},V.prototype.andln=function F(U){return this.words[0]&U},V.prototype.bincn=function F(U){H(typeof U==="number");var Z=U%26,Q=(U-Z)/26,I=1<<Z;if(this.length<=Q)return this._expand(Q+1),this.words[Q]|=I,this;var $=I;for(var K=Q;$!==0&&K<this.length;K++){var J=this.words[K]|0;J+=$,$=J>>>26,J&=67108863,this.words[K]=J}if($!==0)this.words[K]=$,this.length++;return this},V.prototype.isZero=function F(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function F(U){var Z=U<0;if(this.negative!==0&&!Z)return-1;if(this.negative===0&&Z)return 1;this.strip();var Q;if(this.length>1)Q=1;else{if(Z)U=-U;H(U<=67108863,"Number is too big");var I=this.words[0]|0;Q=I===U?0:I<U?-1:1}if(this.negative!==0)return-Q|0;return Q},V.prototype.cmp=function F(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Z=this.ucmp(U);if(this.negative!==0)return-Z|0;return Z},V.prototype.ucmp=function F(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;var Z=0;for(var Q=this.length-1;Q>=0;Q--){var I=this.words[Q]|0,$=U.words[Q]|0;if(I===$)continue;if(I<$)Z=-1;else if(I>$)Z=1;break}return Z},V.prototype.gtn=function F(U){return this.cmpn(U)===1},V.prototype.gt=function F(U){return this.cmp(U)===1},V.prototype.gten=function F(U){return this.cmpn(U)>=0},V.prototype.gte=function F(U){return this.cmp(U)>=0},V.prototype.ltn=function F(U){return this.cmpn(U)===-1},V.prototype.lt=function F(U){return this.cmp(U)===-1},V.prototype.lten=function F(U){return this.cmpn(U)<=0},V.prototype.lte=function F(U){return this.cmp(U)<=0},V.prototype.eqn=function F(U){return this.cmpn(U)===0},V.prototype.eq=function F(U){return this.cmp(U)===0},V.red=function F(U){return new u(U)},V.prototype.toRed=function F(U){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},V.prototype.fromRed=function F(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function F(U){return this.red=U,this},V.prototype.forceRed=function F(U){return H(!this.red,"Already a number in reduction context"),this._forceRed(U)},V.prototype.redAdd=function F(U){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},V.prototype.redIAdd=function F(U){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},V.prototype.redSub=function F(U){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},V.prototype.redISub=function F(U){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},V.prototype.redShl=function F(U){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},V.prototype.redMul=function F(U){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},V.prototype.redIMul=function F(U){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},V.prototype.redSqr=function F(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function F(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function F(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function F(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function F(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function F(U){return H(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var y={k256:null,p224:null,p192:null,p25519:null};function f(F,U){this.name=F,this.p=new V(U,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}f.prototype._tmp=function F(){var U=new V(null);return U.words=new Array(Math.ceil(this.n/13)),U},f.prototype.ireduce=function F(U){var Z=U,Q;do this.split(Z,this.tmp),Z=this.imulK(Z),Z=Z.iadd(this.tmp),Q=Z.bitLength();while(Q>this.n);var I=Q<this.n?-1:Z.ucmp(this.p);if(I===0)Z.words[0]=0,Z.length=1;else if(I>0)Z.isub(this.p);else if(Z.strip!==void 0)Z.strip();else Z._strip();return Z},f.prototype.split=function F(U,Z){U.iushrn(this.n,0,Z)},f.prototype.imulK=function F(U){return U.imul(this.k)};function o(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(o,f),o.prototype.split=function F(U,Z){var Q=4194303,I=Math.min(U.length,9);for(var $=0;$<I;$++)Z.words[$]=U.words[$];if(Z.length=I,U.length<=9){U.words[0]=0,U.length=1;return}var K=U.words[9];Z.words[Z.length++]=K&Q;for($=10;$<U.length;$++){var J=U.words[$]|0;U.words[$-10]=(J&Q)<<4|K>>>22,K=J}if(K>>>=22,U.words[$-10]=K,K===0&&U.length>10)U.length-=10;else U.length-=9},o.prototype.imulK=function F(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;var Z=0;for(var Q=0;Q<U.length;Q++){var I=U.words[Q]|0;Z+=I*977,U.words[Q]=Z&67108863,Z=I*64+(Z/67108864|0)}if(U.words[U.length-1]===0){if(U.length--,U.words[U.length-1]===0)U.length--}return U};function r(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}z(r,f);function V0(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}z(V0,f);function Y0(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}z(Y0,f),Y0.prototype.imulK=function F(U){var Z=0;for(var Q=0;Q<U.length;Q++){var I=(U.words[Q]|0)*19+Z,$=I&67108863;I>>>=26,U.words[Q]=$,Z=I}if(Z!==0)U.words[U.length++]=Z;return U},V._prime=function F(U){if(y[U])return y[U];var Z;if(U==="k256")Z=new o;else if(U==="p224")Z=new r;else if(U==="p192")Z=new V0;else if(U==="p25519")Z=new Y0;else throw new Error("Unknown prime "+U);return y[U]=Z,Z};function u(F){if(typeof F==="string"){var U=V._prime(F);this.m=U.p,this.prime=U}else H(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}u.prototype._verify1=function F(U){H(U.negative===0,"red works only with positives"),H(U.red,"red works only with red numbers")},u.prototype._verify2=function F(U,Z){H((U.negative|Z.negative)===0,"red works only with positives"),H(U.red&&U.red===Z.red,"red works only with red numbers")},u.prototype.imod=function F(U){if(this.prime)return this.prime.ireduce(U)._forceRed(this);return U.umod(this.m)._forceRed(this)},u.prototype.neg=function F(U){if(U.isZero())return U.clone();return this.m.sub(U)._forceRed(this)},u.prototype.add=function F(U,Z){this._verify2(U,Z);var Q=U.add(Z);if(Q.cmp(this.m)>=0)Q.isub(this.m);return Q._forceRed(this)},u.prototype.iadd=function F(U,Z){this._verify2(U,Z);var Q=U.iadd(Z);if(Q.cmp(this.m)>=0)Q.isub(this.m);return Q},u.prototype.sub=function F(U,Z){this._verify2(U,Z);var Q=U.sub(Z);if(Q.cmpn(0)<0)Q.iadd(this.m);return Q._forceRed(this)},u.prototype.isub=function F(U,Z){this._verify2(U,Z);var Q=U.isub(Z);if(Q.cmpn(0)<0)Q.iadd(this.m);return Q},u.prototype.shl=function F(U,Z){return this._verify1(U),this.imod(U.ushln(Z))},u.prototype.imul=function F(U,Z){return this._verify2(U,Z),this.imod(U.imul(Z))},u.prototype.mul=function F(U,Z){return this._verify2(U,Z),this.imod(U.mul(Z))},u.prototype.isqr=function F(U){return this.imul(U,U.clone())},u.prototype.sqr=function F(U){return this.mul(U,U)},u.prototype.sqrt=function F(U){if(U.isZero())return U.clone();var Z=this.m.andln(3);if(H(Z%2===1),Z===3){var Q=this.m.add(new V(1)).iushrn(2);return this.pow(U,Q)}var I=this.m.subn(1),$=0;while(!I.isZero()&&I.andln(1)===0)$++,I.iushrn(1);H(!I.isZero());var K=new V(1).toRed(this),J=K.redNeg(),Y=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new V(2*X*X).toRed(this);while(this.pow(X,Y).cmp(J)!==0)X.redIAdd(J);var O=this.pow(X,I),v=this.pow(U,I.addn(1).iushrn(1)),T=this.pow(U,I),B=$;while(T.cmp(K)!==0){var c=T;for(var l=0;c.cmp(K)!==0;l++)c=c.redSqr();H(l<B);var s=this.pow(O,new V(1).iushln(B-l-1));v=v.redMul(s),O=s.redSqr(),T=T.redMul(O),B=l}return v},u.prototype.invm=function F(U){var Z=U._invmp(this.m);if(Z.negative!==0)return Z.negative=0,this.imod(Z).redNeg();else return this.imod(Z)},u.prototype.pow=function F(U,Z){if(Z.isZero())return new V(1).toRed(this);if(Z.cmpn(1)===0)return U.clone();var Q=4,I=new Array(1<<Q);I[0]=new V(1).toRed(this),I[1]=U;for(var $=2;$<I.length;$++)I[$]=this.mul(I[$-1],U);var K=I[0],J=0,Y=0,X=Z.bitLength()%26;if(X===0)X=26;for($=Z.length-1;$>=0;$--){var O=Z.words[$];for(var v=X-1;v>=0;v--){var T=O>>v&1;if(K!==I[0])K=this.sqr(K);if(T===0&&J===0){Y=0;continue}if(J<<=1,J|=T,Y++,Y!==Q&&($!==0||v!==0))continue;K=this.mul(K,I[J]),Y=0,J=0}X=26}return K},u.prototype.convertTo=function F(U){var Z=U.umod(this.m);return Z===U?Z.clone():Z},u.prototype.convertFrom=function F(U){var Z=U.clone();return Z.red=null,Z},V.mont=function F(U){return new a(U)};function a(F){if(u.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}z(a,u),a.prototype.convertTo=function F(U){return this.imod(U.ushln(this.shift))},a.prototype.convertFrom=function F(U){var Z=this.imod(U.mul(this.rinv));return Z.red=null,Z},a.prototype.imul=function F(U,Z){if(U.isZero()||Z.isZero())return U.words[0]=0,U.length=1,U;var Q=U.imul(Z),I=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=Q.isub(I).iushrn(this.shift),K=$;if($.cmp(this.m)>=0)K=$.isub(this.m);else if($.cmpn(0)<0)K=$.iadd(this.m);return K._forceRed(this)},a.prototype.mul=function F(U,Z){if(U.isZero()||Z.isZero())return new V(0)._forceRed(this);var Q=U.mul(Z),I=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=Q.isub(I).iushrn(this.shift),K=$;if($.cmp(this.m)>=0)K=$.isub(this.m);else if($.cmpn(0)<0)K=$.iadd(this.m);return K._forceRed(this)},a.prototype.invm=function F(U){var Z=this.imod(U._invmp(this.m).mul(this.r2));return Z._forceRed(this)}})(typeof G==="undefined"||G,E)}),dY=w0((E)=>{var G=TX(),W=vU(),C=E;C.define=function z(V,P){return new H(V,P)};function H(z,V){this.name=z,this.body=V,this.decoders={},this.encoders={}}H.prototype._createNamed=function z(V){var P;try{P=(()=>{throw new Error("Cannot require module "+"vm");})().runInThisContext("(function "+this.name+`(entity) {
|
|
12
|
-
this._initNamed(entity);
|
|
13
|
-
})`)}catch(k){P=function(R){this._initNamed(R)}}return W(P,V),P.prototype._initNamed=function k(R){V.call(this,R)},new P(this)},H.prototype._getDecoder=function z(V){if(V=V||"der",!this.decoders.hasOwnProperty(V))this.decoders[V]=this._createNamed(G.decoders[V]);return this.decoders[V]},H.prototype.decode=function z(V,P,k){return this._getDecoder(P).decode(V,k)},H.prototype._getEncoder=function z(V){if(V=V||"der",!this.encoders.hasOwnProperty(V))this.encoders[V]=this._createNamed(G.encoders[V]);return this.encoders[V]},H.prototype.encode=function z(V,P,k){return this._getEncoder(P).encode(V,k)}}),bY=w0((E)=>{var G=vU();function W(H){this._reporterState={obj:null,path:[],options:H||{},errors:[]}}E.Reporter=W,W.prototype.isError=function H(z){return z instanceof C},W.prototype.save=function H(){var z=this._reporterState;return{obj:z.obj,pathLen:z.path.length}},W.prototype.restore=function H(z){var V=this._reporterState;V.obj=z.obj,V.path=V.path.slice(0,z.pathLen)},W.prototype.enterKey=function H(z){return this._reporterState.path.push(z)},W.prototype.exitKey=function H(z){var V=this._reporterState;V.path=V.path.slice(0,z-1)},W.prototype.leaveKey=function H(z,V,P){var k=this._reporterState;if(this.exitKey(z),k.obj!==null)k.obj[V]=P},W.prototype.path=function H(){return this._reporterState.path.join("/")},W.prototype.enterObject=function H(){var z=this._reporterState,V=z.obj;return z.obj={},V},W.prototype.leaveObject=function H(z){var V=this._reporterState,P=V.obj;return V.obj=z,P},W.prototype.error=function H(z){var V,P=this._reporterState,k=z instanceof C;if(k)V=z;else V=new C(P.path.map(function(R){return"["+JSON.stringify(R)+"]"}).join(""),z.message||z,z.stack);if(!P.options.partial)throw V;if(!k)P.errors.push(V);return V},W.prototype.wrapResult=function H(z){var V=this._reporterState;if(!V.options.partial)return z;return{result:this.isError(z)?null:z,errors:V.errors}};function C(H,z){this.path=H,this.rethrow(z)}G(C,Error),C.prototype.rethrow=function H(z){if(this.message=z+" at: "+(this.path||"(shallow)"),Error.captureStackTrace)Error.captureStackTrace(this,C);if(!this.stack)try{throw new Error(this.message)}catch(V){this.stack=V.stack}return this}}),TZ=w0((E)=>{var G=vU(),W=EX().Reporter,C=(HU(),y0(FU)).Buffer;function H(V,P){if(W.call(this,P),!C.isBuffer(V)){this.error("Input not Buffer");return}this.base=V,this.offset=0,this.length=V.length}G(H,W),E.DecoderBuffer=H,H.prototype.save=function V(){return{offset:this.offset,reporter:W.prototype.save.call(this)}},H.prototype.restore=function V(P){var k=new H(this.base);return k.offset=P.offset,k.length=this.offset,this.offset=P.offset,W.prototype.restore.call(this,P.reporter),k},H.prototype.isEmpty=function V(){return this.offset===this.length},H.prototype.readUInt8=function V(P){if(this.offset+1<=this.length)return this.base.readUInt8(this.offset++,!0);else return this.error(P||"DecoderBuffer overrun")},H.prototype.skip=function V(P,k){if(!(this.offset+P<=this.length))return this.error(k||"DecoderBuffer overrun");var R=new H(this.base);return R._reporterState=this._reporterState,R.offset=this.offset,R.length=this.offset+P,this.offset+=P,R},H.prototype.raw=function V(P){return this.base.slice(P?P.offset:this.offset,this.length)};function z(V,P){if(Array.isArray(V))this.length=0,this.value=V.map(function(k){if(!(k instanceof z))k=new z(k,P);return this.length+=k.length,k},this);else if(typeof V==="number"){if(!(0<=V&&V<=255))return P.error("non-byte EncoderBuffer value");this.value=V,this.length=1}else if(typeof V==="string")this.value=V,this.length=C.byteLength(V);else if(C.isBuffer(V))this.value=V,this.length=V.length;else return P.error("Unsupported type: "+typeof V)}E.EncoderBuffer=z,z.prototype.join=function V(P,k){if(!P)P=new C(this.length);if(!k)k=0;if(this.length===0)return P;if(Array.isArray(this.value))this.value.forEach(function(R){R.join(P,k),k+=R.length});else{if(typeof this.value==="number")P[k]=this.value;else if(typeof this.value==="string")P.write(this.value,k);else if(C.isBuffer(this.value))this.value.copy(P,k);k+=this.length}return P}}),oY=w0((E,G)=>{var W=EX().Reporter,C=EX().EncoderBuffer,H=EX().DecoderBuffer,z=sU(),V=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],P=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(V),k=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function R(D,A){var L={};if(this._baseState=L,L.enc=D,L.parent=A||null,L.children=null,L.tag=null,L.args=null,L.reverseArgs=null,L.choice=null,L.optional=!1,L.any=!1,L.obj=!1,L.use=null,L.useDecoder=null,L.key=null,L.default=null,L.explicit=null,L.implicit=null,L.contains=null,!L.parent)L.children=[],this._wrap()}G.exports=R;var S=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];R.prototype.clone=function D(){var A=this._baseState,L={};S.forEach(function(q){L[q]=A[q]});var M=new this.constructor(L.parent);return M._baseState=L,M},R.prototype._wrap=function D(){var A=this._baseState;P.forEach(function(L){this[L]=function M(){var q=new this.constructor(this);return A.children.push(q),q[L].apply(q,arguments)}},this)},R.prototype._init=function D(A){var L=this._baseState;z(L.parent===null),A.call(this),L.children=L.children.filter(function(M){return M._baseState.parent===this},this),z.equal(L.children.length,1,"Root node can have only one child")},R.prototype._useArgs=function D(A){var L=this._baseState,M=A.filter(function(q){return q instanceof this.constructor},this);if(A=A.filter(function(q){return!(q instanceof this.constructor)},this),M.length!==0)z(L.children===null),L.children=M,M.forEach(function(q){q._baseState.parent=this},this);if(A.length!==0)z(L.args===null),L.args=A,L.reverseArgs=A.map(function(q){if(typeof q!=="object"||q.constructor!==Object)return q;var j={};return Object.keys(q).forEach(function(x){if(x==(x|0))x|=0;var g=q[x];j[g]=x}),j})},k.forEach(function(D){R.prototype[D]=function A(){var L=this._baseState;throw new Error(D+" not implemented for encoding: "+L.enc)}}),V.forEach(function(D){R.prototype[D]=function A(){var L=this._baseState,M=Array.prototype.slice.call(arguments);return z(L.tag===null),L.tag=D,this._useArgs(M),this}}),R.prototype.use=function D(A){z(A);var L=this._baseState;return z(L.use===null),L.use=A,this},R.prototype.optional=function D(){var A=this._baseState;return A.optional=!0,this},R.prototype.def=function D(A){var L=this._baseState;return z(L.default===null),L.default=A,L.optional=!0,this},R.prototype.explicit=function D(A){var L=this._baseState;return z(L.explicit===null&&L.implicit===null),L.explicit=A,this},R.prototype.implicit=function D(A){var L=this._baseState;return z(L.explicit===null&&L.implicit===null),L.implicit=A,this},R.prototype.obj=function D(){var A=this._baseState,L=Array.prototype.slice.call(arguments);if(A.obj=!0,L.length!==0)this._useArgs(L);return this},R.prototype.key=function D(A){var L=this._baseState;return z(L.key===null),L.key=A,this},R.prototype.any=function D(){var A=this._baseState;return A.any=!0,this},R.prototype.choice=function D(A){var L=this._baseState;return z(L.choice===null),L.choice=A,this._useArgs(Object.keys(A).map(function(M){return A[M]})),this},R.prototype.contains=function D(A){var L=this._baseState;return z(L.use===null),L.contains=A,this},R.prototype._decode=function D(A,L){var M=this._baseState;if(M.parent===null)return A.wrapResult(M.children[0]._decode(A,L));var q=M.default,j=!0,x=null;if(M.key!==null)x=A.enterKey(M.key);if(M.optional){var g=null;if(M.explicit!==null)g=M.explicit;else if(M.implicit!==null)g=M.implicit;else if(M.tag!==null)g=M.tag;if(g===null&&!M.any){var N=A.save();try{if(M.choice===null)this._decodeGeneric(M.tag,A,L);else this._decodeChoice(A,L);j=!0}catch(Y0){j=!1}A.restore(N)}else if(j=this._peekTag(A,g,M.any),A.isError(j))return j}var y;if(M.obj&&j)y=A.enterObject();if(j){if(M.explicit!==null){var f=this._decodeTag(A,M.explicit);if(A.isError(f))return f;A=f}var o=A.offset;if(M.use===null&&M.choice===null){if(M.any)var N=A.save();var r=this._decodeTag(A,M.implicit!==null?M.implicit:M.tag,M.any);if(A.isError(r))return r;if(M.any)q=A.raw(N);else A=r}if(L&&L.track&&M.tag!==null)L.track(A.path(),o,A.length,"tagged");if(L&&L.track&&M.tag!==null)L.track(A.path(),A.offset,A.length,"content");if(M.any)q=q;else if(M.choice===null)q=this._decodeGeneric(M.tag,A,L);else q=this._decodeChoice(A,L);if(A.isError(q))return q;if(!M.any&&M.choice===null&&M.children!==null)M.children.forEach(function Y0(u){u._decode(A,L)});if(M.contains&&(M.tag==="octstr"||M.tag==="bitstr")){var V0=new H(q);q=this._getUse(M.contains,A._reporterState.obj)._decode(V0,L)}}if(M.obj&&j)q=A.leaveObject(y);if(M.key!==null&&(q!==null||j===!0))A.leaveKey(x,M.key,q);else if(x!==null)A.exitKey(x);return q},R.prototype._decodeGeneric=function D(A,L,M){var q=this._baseState;if(A==="seq"||A==="set")return null;if(A==="seqof"||A==="setof")return this._decodeList(L,A,q.args[0],M);else if(/str$/.test(A))return this._decodeStr(L,A,M);else if(A==="objid"&&q.args)return this._decodeObjid(L,q.args[0],q.args[1],M);else if(A==="objid")return this._decodeObjid(L,null,null,M);else if(A==="gentime"||A==="utctime")return this._decodeTime(L,A,M);else if(A==="null_")return this._decodeNull(L,M);else if(A==="bool")return this._decodeBool(L,M);else if(A==="objDesc")return this._decodeStr(L,A,M);else if(A==="int"||A==="enum")return this._decodeInt(L,q.args&&q.args[0],M);if(q.use!==null)return this._getUse(q.use,L._reporterState.obj)._decode(L,M);else return L.error("unknown tag: "+A)},R.prototype._getUse=function D(A,L){var M=this._baseState;if(M.useDecoder=this._use(A,L),z(M.useDecoder._baseState.parent===null),M.useDecoder=M.useDecoder._baseState.children[0],M.implicit!==M.useDecoder._baseState.implicit)M.useDecoder=M.useDecoder.clone(),M.useDecoder._baseState.implicit=M.implicit;return M.useDecoder},R.prototype._decodeChoice=function D(A,L){var M=this._baseState,q=null,j=!1;if(Object.keys(M.choice).some(function(x){var g=A.save(),N=M.choice[x];try{var y=N._decode(A,L);if(A.isError(y))return!1;q={type:x,value:y},j=!0}catch(f){return A.restore(g),!1}return!0},this),!j)return A.error("Choice not matched");return q},R.prototype._createEncoderBuffer=function D(A){return new C(A,this.reporter)},R.prototype._encode=function D(A,L,M){var q=this._baseState;if(q.default!==null&&q.default===A)return;var j=this._encodeValue(A,L,M);if(j===void 0)return;if(this._skipDefault(j,L,M))return;return j},R.prototype._encodeValue=function D(A,L,M){var q=this._baseState;if(q.parent===null)return q.children[0]._encode(A,L||new W);var N=null;if(this.reporter=L,q.optional&&A===void 0)if(q.default!==null)A=q.default;else return;var j=null,x=!1;if(q.any)N=this._createEncoderBuffer(A);else if(q.choice)N=this._encodeChoice(A,L);else if(q.contains)j=this._getUse(q.contains,M)._encode(A,L),x=!0;else if(q.children)j=q.children.map(function(o){if(o._baseState.tag==="null_")return o._encode(null,L,A);if(o._baseState.key===null)return L.error("Child should have a key");var r=L.enterKey(o._baseState.key);if(typeof A!=="object")return L.error("Child expected, but input is not object");var V0=o._encode(A[o._baseState.key],L,A);return L.leaveKey(r),V0},this).filter(function(o){return o}),j=this._createEncoderBuffer(j);else if(q.tag==="seqof"||q.tag==="setof"){if(!(q.args&&q.args.length===1))return L.error("Too many args for : "+q.tag);if(!Array.isArray(A))return L.error("seqof/setof, but data is not Array");var g=this.clone();g._baseState.implicit=null,j=this._createEncoderBuffer(A.map(function(o){var r=this._baseState;return this._getUse(r.args[0],A)._encode(o,L)},g))}else if(q.use!==null)N=this._getUse(q.use,M)._encode(A,L);else j=this._encodePrimitive(q.tag,A),x=!0;var N;if(!q.any&&q.choice===null){var y=q.implicit!==null?q.implicit:q.tag,f=q.implicit===null?"universal":"context";if(y===null){if(q.use===null)L.error("Tag could be omitted only for .use()")}else if(q.use===null)N=this._encodeComposite(y,x,f,j)}if(q.explicit!==null)N=this._encodeComposite(q.explicit,!1,"context",N);return N},R.prototype._encodeChoice=function D(A,L){var M=this._baseState,q=M.choice[A.type];if(!q)z(!1,A.type+" not found in "+JSON.stringify(Object.keys(M.choice)));return q._encode(A.value,L)},R.prototype._encodePrimitive=function D(A,L){var M=this._baseState;if(/str$/.test(A))return this._encodeStr(L,A);else if(A==="objid"&&M.args)return this._encodeObjid(L,M.reverseArgs[0],M.args[1]);else if(A==="objid")return this._encodeObjid(L,null,null);else if(A==="gentime"||A==="utctime")return this._encodeTime(L,A);else if(A==="null_")return this._encodeNull();else if(A==="int"||A==="enum")return this._encodeInt(L,M.args&&M.reverseArgs[0]);else if(A==="bool")return this._encodeBool(L);else if(A==="objDesc")return this._encodeStr(L,A);else throw new Error("Unsupported tag: "+A)},R.prototype._isNumstr=function D(A){return/^[0-9 ]*$/.test(A)},R.prototype._isPrintstr=function D(A){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(A)}}),EX=w0((E)=>{var G=E;G.Reporter=bY().Reporter,G.DecoderBuffer=TZ().DecoderBuffer,G.EncoderBuffer=TZ().EncoderBuffer,G.Node=oY()}),nY=w0((E)=>{var G=kZ();E.tagClass={0:"universal",1:"application",2:"context",3:"private"},E.tagClassByName=G._reverse(E.tagClass),E.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},E.tagByName=G._reverse(E.tag)}),kZ=w0((E)=>{var G=E;G._reverse=function W(C){var H={};return Object.keys(C).forEach(function(z){if((z|0)==z)z=z|0;var V=C[z];H[V]=z}),H},G.der=nY()}),jZ=w0((E,G)=>{var W=vU(),C=TX(),H=C.base,z=C.bignum,V=C.constants.der;function P(D){this.enc="der",this.name=D.name,this.entity=D,this.tree=new k,this.tree._init(D.body)}G.exports=P,P.prototype.decode=function D(A,L){if(!(A instanceof H.DecoderBuffer))A=new H.DecoderBuffer(A,L);return this.tree._decode(A,L)};function k(D){H.Node.call(this,"der",D)}W(k,H.Node),k.prototype._peekTag=function D(A,L,M){if(A.isEmpty())return!1;var q=A.save(),j=R(A,'Failed to peek tag: "'+L+'"');if(A.isError(j))return j;return A.restore(q),j.tag===L||j.tagStr===L||j.tagStr+"of"===L||M},k.prototype._decodeTag=function D(A,L,M){var q=R(A,'Failed to decode tag of "'+L+'"');if(A.isError(q))return q;var j=S(A,q.primitive,'Failed to get length of "'+L+'"');if(A.isError(j))return j;if(!M&&q.tag!==L&&q.tagStr!==L&&q.tagStr+"of"!==L)return A.error('Failed to match tag: "'+L+'"');if(q.primitive||j!==null)return A.skip(j,'Failed to match body of: "'+L+'"');var x=A.save(),g=this._skipUntilEnd(A,'Failed to skip indefinite length body: "'+this.tag+'"');if(A.isError(g))return g;return j=A.offset-x.offset,A.restore(x),A.skip(j,'Failed to match body of: "'+L+'"')},k.prototype._skipUntilEnd=function D(A,L){while(!0){var M=R(A,L);if(A.isError(M))return M;var q=S(A,M.primitive,L);if(A.isError(q))return q;var j;if(M.primitive||q!==null)j=A.skip(q);else j=this._skipUntilEnd(A,L);if(A.isError(j))return j;if(M.tagStr==="end")break}},k.prototype._decodeList=function D(A,L,M,q){var j=[];while(!A.isEmpty()){var x=this._peekTag(A,"end");if(A.isError(x))return x;var g=M.decode(A,"der",q);if(A.isError(g)&&x)break;j.push(g)}return j},k.prototype._decodeStr=function D(A,L){if(L==="bitstr"){var M=A.readUInt8();if(A.isError(M))return M;return{unused:M,data:A.raw()}}else if(L==="bmpstr"){var q=A.raw();if(q.length%2===1)return A.error("Decoding of string type: bmpstr length mismatch");var j="";for(var x=0;x<q.length/2;x++)j+=String.fromCharCode(q.readUInt16BE(x*2));return j}else if(L==="numstr"){var g=A.raw().toString("ascii");if(!this._isNumstr(g))return A.error("Decoding of string type: numstr unsupported characters");return g}else if(L==="octstr")return A.raw();else if(L==="objDesc")return A.raw();else if(L==="printstr"){var N=A.raw().toString("ascii");if(!this._isPrintstr(N))return A.error("Decoding of string type: printstr unsupported characters");return N}else if(/str$/.test(L))return A.raw().toString();else return A.error("Decoding of string type: "+L+" unsupported")},k.prototype._decodeObjid=function D(A,L,M){var q,j=[],x=0;while(!A.isEmpty()){var g=A.readUInt8();if(x<<=7,x|=g&127,(g&128)===0)j.push(x),x=0}if(g&128)j.push(x);var N=j[0]/40|0,y=j[0]%40;if(M)q=j;else q=[N,y].concat(j.slice(1));if(L){var f=L[q.join(" ")];if(f===void 0)f=L[q.join(".")];if(f!==void 0)q=f}return q},k.prototype._decodeTime=function D(A,L){var M=A.raw().toString();if(L==="gentime")var q=M.slice(0,4)|0,j=M.slice(4,6)|0,x=M.slice(6,8)|0,g=M.slice(8,10)|0,N=M.slice(10,12)|0,y=M.slice(12,14)|0;else if(L==="utctime"){var q=M.slice(0,2)|0,j=M.slice(2,4)|0,x=M.slice(4,6)|0,g=M.slice(6,8)|0,N=M.slice(8,10)|0,y=M.slice(10,12)|0;if(q<70)q=2000+q;else q=1900+q}else return A.error("Decoding "+L+" time is not supported yet");return Date.UTC(q,j-1,x,g,N,y,0)},k.prototype._decodeNull=function D(A){return null},k.prototype._decodeBool=function D(A){var L=A.readUInt8();if(A.isError(L))return L;else return L!==0},k.prototype._decodeInt=function D(A,L){var M=A.raw(),q=new z(M);if(L)q=L[q.toString(10)]||q;return q},k.prototype._use=function D(A,L){if(typeof A==="function")A=A(L);return A._getDecoder("der").tree};function R(D,A){var L=D.readUInt8(A);if(D.isError(L))return L;var M=V.tagClass[L>>6],q=(L&32)===0;if((L&31)===31){var j=L;L=0;while((j&128)===128){if(j=D.readUInt8(A),D.isError(j))return j;L<<=7,L|=j&127}}else L&=31;var x=V.tag[L];return{cls:M,primitive:q,tag:L,tagStr:x}}function S(D,A,L){var M=D.readUInt8(L);if(D.isError(M))return M;if(!A&&M===128)return null;if((M&128)===0)return M;var q=M&127;if(q>4)return D.error("length octect is too long");M=0;for(var j=0;j<q;j++){M<<=8;var x=D.readUInt8(L);if(D.isError(x))return x;M|=x}return M}}),sY=w0((E,G)=>{var W=vU(),C=(HU(),y0(FU)).Buffer,H=jZ();function z(V){H.call(this,V),this.enc="pem"}W(z,H),G.exports=z,z.prototype.decode=function V(P,k){var R=P.toString().split(/[\r\n]+/g),S=k.label.toUpperCase(),D=/^-----(BEGIN|END) ([^-]+)-----$/,A=-1,L=-1;for(var M=0;M<R.length;M++){var q=R[M].match(D);if(q===null)continue;if(q[2]!==S)continue;if(A===-1){if(q[1]!=="BEGIN")break;A=M}else{if(q[1]!=="END")break;L=M;break}}if(A===-1||L===-1)throw new Error("PEM section not found for: "+S);var j=R.slice(A+1,L).join("");j.replace(/[^a-z0-9\+\/=]+/gi,"");var x=new C(j,"base64");return H.prototype.decode.call(this,x,k)}}),mY=w0((E)=>{var G=E;G.der=jZ(),G.pem=sY()}),BZ=w0((E,G)=>{var W=vU(),C=(HU(),y0(FU)).Buffer,H=TX(),z=H.base,V=H.constants.der;function P(D){this.enc="der",this.name=D.name,this.entity=D,this.tree=new k,this.tree._init(D.body)}G.exports=P,P.prototype.encode=function D(A,L){return this.tree._encode(A,L).join()};function k(D){z.Node.call(this,"der",D)}W(k,z.Node),k.prototype._encodeComposite=function D(A,L,M,q){var j=S(A,L,M,this.reporter);if(q.length<128){var N=new C(2);return N[0]=j,N[1]=q.length,this._createEncoderBuffer([N,q])}var x=1;for(var g=q.length;g>=256;g>>=8)x++;var N=new C(2+x);N[0]=j,N[1]=128|x;for(var g=1+x,y=q.length;y>0;g--,y>>=8)N[g]=y&255;return this._createEncoderBuffer([N,q])},k.prototype._encodeStr=function D(A,L){if(L==="bitstr")return this._createEncoderBuffer([A.unused|0,A.data]);else if(L==="bmpstr"){var M=new C(A.length*2);for(var q=0;q<A.length;q++)M.writeUInt16BE(A.charCodeAt(q),q*2);return this._createEncoderBuffer(M)}else if(L==="numstr"){if(!this._isNumstr(A))return this.reporter.error("Encoding of string type: numstr supports only digits and space");return this._createEncoderBuffer(A)}else if(L==="printstr"){if(!this._isPrintstr(A))return this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark");return this._createEncoderBuffer(A)}else if(/str$/.test(L))return this._createEncoderBuffer(A);else if(L==="objDesc")return this._createEncoderBuffer(A);else return this.reporter.error("Encoding of string type: "+L+" unsupported")},k.prototype._encodeObjid=function D(A,L,M){if(typeof A==="string"){if(!L)return this.reporter.error("string objid given, but no values map found");if(!L.hasOwnProperty(A))return this.reporter.error("objid not found in values map");A=L[A].split(/[\s\.]+/g);for(var q=0;q<A.length;q++)A[q]|=0}else if(Array.isArray(A)){A=A.slice();for(var q=0;q<A.length;q++)A[q]|=0}if(!Array.isArray(A))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(A));if(!M){if(A[1]>=40)return this.reporter.error("Second objid identifier OOB");A.splice(0,2,A[0]*40+A[1])}var j=0;for(var q=0;q<A.length;q++){var x=A[q];for(j++;x>=128;x>>=7)j++}var g=new C(j),N=g.length-1;for(var q=A.length-1;q>=0;q--){var x=A[q];g[N--]=x&127;while((x>>=7)>0)g[N--]=128|x&127}return this._createEncoderBuffer(g)};function R(D){if(D<10)return"0"+D;else return D}k.prototype._encodeTime=function D(A,L){var M,q=new Date(A);if(L==="gentime")M=[R(q.getFullYear()),R(q.getUTCMonth()+1),R(q.getUTCDate()),R(q.getUTCHours()),R(q.getUTCMinutes()),R(q.getUTCSeconds()),"Z"].join("");else if(L==="utctime")M=[R(q.getFullYear()%100),R(q.getUTCMonth()+1),R(q.getUTCDate()),R(q.getUTCHours()),R(q.getUTCMinutes()),R(q.getUTCSeconds()),"Z"].join("");else this.reporter.error("Encoding "+L+" time is not supported yet");return this._encodeStr(M,"octstr")},k.prototype._encodeNull=function D(){return this._createEncoderBuffer("")},k.prototype._encodeInt=function D(A,L){if(typeof A==="string"){if(!L)return this.reporter.error("String int or enum given, but no values map");if(!L.hasOwnProperty(A))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(A));A=L[A]}if(typeof A!=="number"&&!C.isBuffer(A)){var M=A.toArray();if(!A.sign&&M[0]&128)M.unshift(0);A=new C(M)}if(C.isBuffer(A)){var q=A.length;if(A.length===0)q++;var x=new C(q);if(A.copy(x),A.length===0)x[0]=0;return this._createEncoderBuffer(x)}if(A<128)return this._createEncoderBuffer(A);if(A<256)return this._createEncoderBuffer([0,A]);var q=1;for(var j=A;j>=256;j>>=8)q++;var x=new Array(q);for(var j=x.length-1;j>=0;j--)x[j]=A&255,A>>=8;if(x[0]&128)x.unshift(0);return this._createEncoderBuffer(new C(x))},k.prototype._encodeBool=function D(A){return this._createEncoderBuffer(A?255:0)},k.prototype._use=function D(A,L){if(typeof A==="function")A=A(L);return A._getEncoder("der").tree},k.prototype._skipDefault=function D(A,L,M){var q=this._baseState,j;if(q.default===null)return!1;var x=A.join();if(q.defaultBuffer===void 0)q.defaultBuffer=this._encodeValue(q.default,L,M).join();if(x.length!==q.defaultBuffer.length)return!1;for(j=0;j<x.length;j++)if(x[j]!==q.defaultBuffer[j])return!1;return!0};function S(D,A,L,M){var q;if(D==="seqof")D="seq";else if(D==="setof")D="set";if(V.tagByName.hasOwnProperty(D))q=V.tagByName[D];else if(typeof D==="number"&&(D|0)===D)q=D;else return M.error("Unknown tag: "+D);if(q>=31)return M.error("Multi-octet tag encoding unsupported");if(!A)q|=32;return q|=V.tagClassByName[L||"universal"]<<6,q}}),tY=w0((E,G)=>{var W=vU(),C=BZ();function H(z){C.call(this,z),this.enc="pem"}W(H,C),G.exports=H,H.prototype.encode=function z(V,P){var k=C.prototype.encode.call(this,V),R=k.toString("base64"),S=["-----BEGIN "+P.label+"-----"];for(var D=0;D<R.length;D+=64)S.push(R.slice(D,D+64));return S.push("-----END "+P.label+"-----"),S.join(`
|
|
14
|
-
`)}}),rY=w0((E)=>{var G=E;G.der=BZ(),G.pem=tY()}),TX=w0((E)=>{var G=E;G.bignum=lY(),G.define=dY().define,G.base=EX(),G.constants=kZ(),G.decoders=mY(),G.encoders=rY()}),aY=w0((E,G)=>{var W=TX(),C=W.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),H=W.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),z=W.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),V=W.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(z),this.key("subjectPublicKey").bitstr())}),P=W.define("RelativeDistinguishedName",function(){this.setof(H)}),k=W.define("RDNSequence",function(){this.seqof(P)}),R=W.define("Name",function(){this.choice({rdnSequence:this.use(k)})}),S=W.define("Validity",function(){this.seq().obj(this.key("notBefore").use(C),this.key("notAfter").use(C))}),D=W.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),A=W.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(z),this.key("issuer").use(R),this.key("validity").use(S),this.key("subject").use(R),this.key("subjectPublicKeyInfo").use(V),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(D).optional())}),L=W.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(A),this.key("signatureAlgorithm").use(z),this.key("signatureValue").bitstr())});G.exports=L}),eY=w0((E)=>{var G=TX();E.certificate=aY();var W=G.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});E.RSAPrivateKey=W;var C=G.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});E.RSAPublicKey=C;var H=G.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),z=G.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(H),this.key("subjectPublicKey").bitstr())});E.PublicKey=z;var V=G.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(H),this.key("subjectPrivateKey").octstr())});E.PrivateKey=V;var P=G.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});E.EncryptedPrivateKey=P;var k=G.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});E.DSAPrivateKey=k,E.DSAparam=G.define("DSAparam",function(){this.int()});var R=G.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),S=G.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(R),this.key("publicKey").optional().explicit(1).bitstr())});E.ECPrivateKey=S,E.signature=G.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),iY=w0((E,G)=>{G.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}}),UV=w0((E,G)=>{var W=PU().Buffer,C=(OI(),y0(VI)).Transform,H=vU();function z(R){C.call(this),this._block=W.allocUnsafe(R),this._blockSize=R,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}H(z,C),z.prototype._transform=function(R,S,D){var A=null;try{this.update(R,S)}catch(L){A=L}D(A)},z.prototype._flush=function(R){var S=null;try{this.push(this.digest())}catch(D){S=D}R(S)};var V=typeof Uint8Array!=="undefined",P=typeof ArrayBuffer!=="undefined"&&typeof Uint8Array!=="undefined"&&ArrayBuffer.isView&&(W.prototype instanceof Uint8Array||W.TYPED_ARRAY_SUPPORT);function k(R,S){if(R instanceof W)return R;if(typeof R==="string")return W.from(R,S);if(P&&ArrayBuffer.isView(R)){if(R.byteLength===0)return W.alloc(0);var D=W.from(R.buffer,R.byteOffset,R.byteLength);if(D.byteLength===R.byteLength)return D}if(V&&R instanceof Uint8Array)return W.from(R);if(W.isBuffer(R)&&R.constructor&&typeof R.constructor.isBuffer==="function"&&R.constructor.isBuffer(R))return W.from(R);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}z.prototype.update=function(R,S){if(this._finalized)throw new Error("Digest already called");R=k(R,S);var D=this._block,A=0;while(this._blockOffset+R.length-A>=this._blockSize){for(var L=this._blockOffset;L<this._blockSize;)D[L++]=R[A++];this._update(),this._blockOffset=0}while(A<R.length)D[this._blockOffset++]=R[A++];for(var M=0,q=R.length*8;q>0;++M)if(this._length[M]+=q,q=this._length[M]/4294967296|0,q>0)this._length[M]-=4294967296*q;return this},z.prototype._update=function(){throw new Error("_update is not implemented")},z.prototype.digest=function(R){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var S=this._digest();if(R!==void 0)S=S.toString(R);this._block.fill(0),this._blockOffset=0;for(var D=0;D<4;++D)this._length[D]=0;return S},z.prototype._digest=function(){throw new Error("_digest is not implemented")},G.exports=z}),XV=w0((E,G)=>{var W=vU(),C=UV(),H=PU().Buffer,z=new Array(16);function V(){C.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}W(V,C),V.prototype._update=function(){var A=z;for(var L=0;L<16;++L)A[L]=this._block.readInt32LE(L*4);var M=this._a,q=this._b,j=this._c,x=this._d;M=k(M,q,j,x,A[0],3614090360,7),x=k(x,M,q,j,A[1],3905402710,12),j=k(j,x,M,q,A[2],606105819,17),q=k(q,j,x,M,A[3],3250441966,22),M=k(M,q,j,x,A[4],4118548399,7),x=k(x,M,q,j,A[5],1200080426,12),j=k(j,x,M,q,A[6],2821735955,17),q=k(q,j,x,M,A[7],4249261313,22),M=k(M,q,j,x,A[8],1770035416,7),x=k(x,M,q,j,A[9],2336552879,12),j=k(j,x,M,q,A[10],4294925233,17),q=k(q,j,x,M,A[11],2304563134,22),M=k(M,q,j,x,A[12],1804603682,7),x=k(x,M,q,j,A[13],4254626195,12),j=k(j,x,M,q,A[14],2792965006,17),q=k(q,j,x,M,A[15],1236535329,22),M=R(M,q,j,x,A[1],4129170786,5),x=R(x,M,q,j,A[6],3225465664,9),j=R(j,x,M,q,A[11],643717713,14),q=R(q,j,x,M,A[0],3921069994,20),M=R(M,q,j,x,A[5],3593408605,5),x=R(x,M,q,j,A[10],38016083,9),j=R(j,x,M,q,A[15],3634488961,14),q=R(q,j,x,M,A[4],3889429448,20),M=R(M,q,j,x,A[9],568446438,5),x=R(x,M,q,j,A[14],3275163606,9),j=R(j,x,M,q,A[3],4107603335,14),q=R(q,j,x,M,A[8],1163531501,20),M=R(M,q,j,x,A[13],2850285829,5),x=R(x,M,q,j,A[2],4243563512,9),j=R(j,x,M,q,A[7],1735328473,14),q=R(q,j,x,M,A[12],2368359562,20),M=S(M,q,j,x,A[5],4294588738,4),x=S(x,M,q,j,A[8],2272392833,11),j=S(j,x,M,q,A[11],1839030562,16),q=S(q,j,x,M,A[14],4259657740,23),M=S(M,q,j,x,A[1],2763975236,4),x=S(x,M,q,j,A[4],1272893353,11),j=S(j,x,M,q,A[7],4139469664,16),q=S(q,j,x,M,A[10],3200236656,23),M=S(M,q,j,x,A[13],681279174,4),x=S(x,M,q,j,A[0],3936430074,11),j=S(j,x,M,q,A[3],3572445317,16),q=S(q,j,x,M,A[6],76029189,23),M=S(M,q,j,x,A[9],3654602809,4),x=S(x,M,q,j,A[12],3873151461,11),j=S(j,x,M,q,A[15],530742520,16),q=S(q,j,x,M,A[2],3299628645,23),M=D(M,q,j,x,A[0],4096336452,6),x=D(x,M,q,j,A[7],1126891415,10),j=D(j,x,M,q,A[14],2878612391,15),q=D(q,j,x,M,A[5],4237533241,21),M=D(M,q,j,x,A[12],1700485571,6),x=D(x,M,q,j,A[3],2399980690,10),j=D(j,x,M,q,A[10],4293915773,15),q=D(q,j,x,M,A[1],2240044497,21),M=D(M,q,j,x,A[8],1873313359,6),x=D(x,M,q,j,A[15],4264355552,10),j=D(j,x,M,q,A[6],2734768916,15),q=D(q,j,x,M,A[13],1309151649,21),M=D(M,q,j,x,A[4],4149444226,6),x=D(x,M,q,j,A[11],3174756917,10),j=D(j,x,M,q,A[2],718787259,15),q=D(q,j,x,M,A[9],3951481745,21),this._a=this._a+M|0,this._b=this._b+q|0,this._c=this._c+j|0,this._d=this._d+x|0},V.prototype._digest=function(){if(this._block[this._blockOffset++]=128,this._blockOffset>56)this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0;this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var A=H.allocUnsafe(16);return A.writeInt32LE(this._a,0),A.writeInt32LE(this._b,4),A.writeInt32LE(this._c,8),A.writeInt32LE(this._d,12),A};function P(A,L){return A<<L|A>>>32-L}function k(A,L,M,q,j,x,g){return P(A+(L&M|~L&q)+j+x|0,g)+L|0}function R(A,L,M,q,j,x,g){return P(A+(L&q|M&~q)+j+x|0,g)+L|0}function S(A,L,M,q,j,x,g){return P(A+(L^M^q)+j+x|0,g)+L|0}function D(A,L,M,q,j,x,g){return P(A+(M^(L|~q))+j+x|0,g)+L|0}G.exports=V}),IV=w0((E,G)=>{var W=PU().Buffer,C=XV();function H(z,V,P,k){if(!W.isBuffer(z))z=W.from(z,"binary");if(V){if(!W.isBuffer(V))V=W.from(V,"binary");if(V.length!==8)throw new RangeError("salt should be Buffer with 8 byte length")}var R=P/8,S=W.alloc(R),D=W.alloc(k||0),A=W.alloc(0);while(R>0||k>0){var L=new C;if(L.update(A),L.update(z),V)L.update(V);A=L.digest();var M=0;if(R>0){var q=S.length-R;M=Math.min(R,A.length),A.copy(S,q,0,M),R-=M}if(M<A.length&&k>0){var j=D.length-k,x=Math.min(k,A.length-M);A.copy(D,j,M,M+x),k-=x}}return A.fill(0),{key:S,iv:D}}G.exports=H}),xZ=w0((E)=>{var G=(qU(),y0(kU));E.createCipher=E.Cipher=G.createCipher,E.createCipheriv=E.Cipheriv=G.createCipheriv,E.createDecipher=E.Decipher=G.createDecipher,E.createDecipheriv=E.Decipheriv=G.createDecipheriv,E.listCiphers=E.getCiphers=G.getCiphers}),ZV=w0((E,G)=>{var W=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,C=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,H=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,z=IV(),V=xZ(),P=PU().Buffer;G.exports=function(k,R){var S=k.toString(),D=S.match(W),A;if(!D){var L=S.match(H);A=P.from(L[2].replace(/[\r\n]/g,""),"base64")}else{var M="aes"+D[1],q=P.from(D[2],"hex"),j=P.from(D[3].replace(/[\r\n]/g,""),"base64"),x=z(R,q.slice(0,8),parseInt(D[1],10)).key,g=[],N=V.createDecipheriv(M,x,q);g.push(N.update(j)),g.push(N.final()),A=P.concat(g)}var y=S.match(C)[1];return{tag:y,data:A}}}),gZ=w0((E,G)=>{var W=eY(),C=iY(),H=ZV(),z=xZ(),V=zZ(),P=PU().Buffer;function k(S,D){var A=S.algorithm.decrypt.kde.kdeparams.salt,L=parseInt(S.algorithm.decrypt.kde.kdeparams.iters.toString(),10),M=C[S.algorithm.decrypt.cipher.algo.join(".")],q=S.algorithm.decrypt.cipher.iv,j=S.subjectPrivateKey,x=parseInt(M.split("-")[1],10)/8,g=V.pbkdf2Sync(D,A,L,x,"sha1"),N=z.createDecipheriv(M,g,q),y=[];return y.push(N.update(j)),y.push(N.final()),P.concat(y)}function R(S){var D;if(typeof S==="object"&&!P.isBuffer(S))D=S.passphrase,S=S.key;if(typeof S==="string")S=P.from(S);var A=H(S,D),L=A.tag,M=A.data,q,j;switch(L){case"CERTIFICATE":j=W.certificate.decode(M,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":if(!j)j=W.PublicKey.decode(M,"der");switch(q=j.algorithm.algorithm.join("."),q){case"1.2.840.113549.1.1.1":return W.RSAPublicKey.decode(j.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return j.subjectPrivateKey=j.subjectPublicKey,{type:"ec",data:j};case"1.2.840.10040.4.1":return j.algorithm.params.pub_key=W.DSAparam.decode(j.subjectPublicKey.data,"der"),{type:"dsa",data:j.algorithm.params};default:throw new Error("unknown key id "+q)}case"ENCRYPTED PRIVATE KEY":M=W.EncryptedPrivateKey.decode(M,"der"),M=k(M,D);case"PRIVATE KEY":switch(j=W.PrivateKey.decode(M,"der"),q=j.algorithm.algorithm.join("."),q){case"1.2.840.113549.1.1.1":return W.RSAPrivateKey.decode(j.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:j.algorithm.curve,privateKey:W.ECPrivateKey.decode(j.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return j.algorithm.params.priv_key=W.DSAparam.decode(j.subjectPrivateKey,"der"),{type:"dsa",params:j.algorithm.params};default:throw new Error("unknown key id "+q)}case"RSA PUBLIC KEY":return W.RSAPublicKey.decode(M,"der");case"RSA PRIVATE KEY":return W.RSAPrivateKey.decode(M,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:W.DSAPrivateKey.decode(M,"der")};case"EC PRIVATE KEY":return M=W.ECPrivateKey.decode(M,"der"),{curve:M.parameters.value,privateKey:M.privateKey};default:throw new Error("unknown key type "+L)}}R.signature=W.signature,G.exports=R}),NZ=w0((E,G)=>{var W=NX(),C=PU().Buffer;G.exports=function(z,V){var P=C.alloc(0),k=0,R;while(P.length<V)R=H(k++),P=C.concat([P,W("sha1").update(z).update(R).digest()]);return P.slice(0,V)};function H(z){var V=C.allocUnsafe(4);return V.writeUInt32BE(z,0),V}}),_Z=w0((E,G)=>{G.exports=function W(C,H){var z=C.length,V=-1;while(++V<z)C[V]^=H[V];return C}}),AI=w0((E,G)=>{(function(W,C){function H(F,U){if(!F)throw new Error(U||"Assertion failed")}function z(F,U){F.super_=U;var Z=function(){};Z.prototype=U.prototype,F.prototype=new Z,F.prototype.constructor=F}function V(F,U,Z){if(V.isBN(F))return F;if(this.negative=0,this.words=null,this.length=0,this.red=null,F!==null){if(U==="le"||U==="be")Z=U,U=10;this._init(F||0,U||10,Z||"be")}}if(typeof W==="object")W.exports=V;else C.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined")P=window.Buffer;else P=(HU(),y0(FU)).Buffer}catch(F){}V.isBN=function F(U){if(U instanceof V)return!0;return U!==null&&typeof U==="object"&&U.constructor.wordSize===V.wordSize&&Array.isArray(U.words)},V.max=function F(U,Z){if(U.cmp(Z)>0)return U;return Z},V.min=function F(U,Z){if(U.cmp(Z)<0)return U;return Z},V.prototype._init=function F(U,Z,Q){if(typeof U==="number")return this._initNumber(U,Z,Q);if(typeof U==="object")return this._initArray(U,Z,Q);if(Z==="hex")Z=16;H(Z===(Z|0)&&Z>=2&&Z<=36),U=U.toString().replace(/\s+/g,"");var I=0;if(U[0]==="-")I++,this.negative=1;if(I<U.length){if(Z===16)this._parseHex(U,I,Q);else if(this._parseBase(U,Z,I),Q==="le")this._initArray(this.toArray(),Z,Q)}},V.prototype._initNumber=function F(U,Z,Q){if(U<0)this.negative=1,U=-U;if(U<67108864)this.words=[U&67108863],this.length=1;else if(U<4503599627370496)this.words=[U&67108863,U/67108864&67108863],this.length=2;else H(U<9007199254740992),this.words=[U&67108863,U/67108864&67108863,1],this.length=3;if(Q!=="le")return;this._initArray(this.toArray(),Z,Q)},V.prototype._initArray=function F(U,Z,Q){if(H(typeof U.length==="number"),U.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(U.length/3),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var $,K,J=0;if(Q==="be"){for(I=U.length-1,$=0;I>=0;I-=3)if(K=U[I]|U[I-1]<<8|U[I-2]<<16,this.words[$]|=K<<J&67108863,this.words[$+1]=K>>>26-J&67108863,J+=24,J>=26)J-=26,$++}else if(Q==="le"){for(I=0,$=0;I<U.length;I+=3)if(K=U[I]|U[I+1]<<8|U[I+2]<<16,this.words[$]|=K<<J&67108863,this.words[$+1]=K>>>26-J&67108863,J+=24,J>=26)J-=26,$++}return this.strip()};function k(F,U){var Z=F.charCodeAt(U);if(Z>=65&&Z<=70)return Z-55;else if(Z>=97&&Z<=102)return Z-87;else return Z-48&15}function R(F,U,Z){var Q=k(F,Z);if(Z-1>=U)Q|=k(F,Z-1)<<4;return Q}V.prototype._parseHex=function F(U,Z,Q){this.length=Math.ceil((U.length-Z)/6),this.words=new Array(this.length);for(var I=0;I<this.length;I++)this.words[I]=0;var $=0,K=0,J;if(Q==="be")for(I=U.length-1;I>=Z;I-=2)if(J=R(U,Z,I)<<$,this.words[K]|=J&67108863,$>=18)$-=18,K+=1,this.words[K]|=J>>>26;else $+=8;else{var Y=U.length-Z;for(I=Y%2===0?Z+1:Z;I<U.length;I+=2)if(J=R(U,Z,I)<<$,this.words[K]|=J&67108863,$>=18)$-=18,K+=1,this.words[K]|=J>>>26;else $+=8}this.strip()};function S(F,U,Z,Q){var I=0,$=Math.min(F.length,Z);for(var K=U;K<$;K++){var J=F.charCodeAt(K)-48;if(I*=Q,J>=49)I+=J-49+10;else if(J>=17)I+=J-17+10;else I+=J}return I}V.prototype._parseBase=function F(U,Z,Q){this.words=[0],this.length=1;for(var I=0,$=1;$<=67108863;$*=Z)I++;I--,$=$/Z|0;var K=U.length-Q,J=K%I,Y=Math.min(K,K-J)+Q,X=0;for(var O=Q;O<Y;O+=I)if(X=S(U,O,O+I,Z),this.imuln($),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X);if(J!==0){var v=1;X=S(U,O,U.length,Z);for(O=0;O<J;O++)v*=Z;if(this.imuln(v),this.words[0]+X<67108864)this.words[0]+=X;else this._iaddn(X)}this.strip()},V.prototype.copy=function F(U){U.words=new Array(this.length);for(var Z=0;Z<this.length;Z++)U.words[Z]=this.words[Z];U.length=this.length,U.negative=this.negative,U.red=this.red},V.prototype.clone=function F(){var U=new V(null);return this.copy(U),U},V.prototype._expand=function F(U){while(this.length<U)this.words[this.length++]=0;return this},V.prototype.strip=function F(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function F(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},V.prototype.inspect=function F(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var D=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A=[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,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function F(U,Z){U=U||10,Z=Z|0||1;var Q;if(U===16||U==="hex"){Q="";var I=0,$=0;for(var K=0;K<this.length;K++){var J=this.words[K],Y=((J<<I|$)&16777215).toString(16);if($=J>>>24-I&16777215,I+=2,I>=26)I-=26,K--;if($!==0||K!==this.length-1)Q=D[6-Y.length]+Y+Q;else Q=Y+Q}if($!==0)Q=$.toString(16)+Q;while(Q.length%Z!==0)Q="0"+Q;if(this.negative!==0)Q="-"+Q;return Q}if(U===(U|0)&&U>=2&&U<=36){var X=A[U],O=L[U];Q="";var v=this.clone();v.negative=0;while(!v.isZero()){var T=v.modn(O).toString(U);if(v=v.idivn(O),!v.isZero())Q=D[X-T.length]+T+Q;else Q=T+Q}if(this.isZero())Q="0"+Q;while(Q.length%Z!==0)Q="0"+Q;if(this.negative!==0)Q="-"+Q;return Q}H(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function F(){var U=this.words[0];if(this.length===2)U+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)U+=4503599627370496+this.words[1]*67108864;else if(this.length>2)H(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-U:U},V.prototype.toJSON=function F(){return this.toString(16)},V.prototype.toBuffer=function F(U,Z){return H(typeof P!=="undefined"),this.toArrayLike(P,U,Z)},V.prototype.toArray=function F(U,Z){return this.toArrayLike(Array,U,Z)},V.prototype.toArrayLike=function F(U,Z,Q){var I=this.byteLength(),$=Q||Math.max(1,I);H(I<=$,"byte array longer than desired length"),H($>0,"Requested array length <= 0"),this.strip();var K=Z==="le",J=new U($),Y,X,O=this.clone();if(!K){for(X=0;X<$-I;X++)J[X]=0;for(X=0;!O.isZero();X++)Y=O.andln(255),O.iushrn(8),J[$-X-1]=Y}else{for(X=0;!O.isZero();X++)Y=O.andln(255),O.iushrn(8),J[X]=Y;for(;X<$;X++)J[X]=0}return J},Math.clz32)V.prototype._countBits=function F(U){return 32-Math.clz32(U)};else V.prototype._countBits=function F(U){var Z=U,Q=0;if(Z>=4096)Q+=13,Z>>>=13;if(Z>=64)Q+=7,Z>>>=7;if(Z>=8)Q+=4,Z>>>=4;if(Z>=2)Q+=2,Z>>>=2;return Q+Z};V.prototype._zeroBits=function F(U){if(U===0)return 26;var Z=U,Q=0;if((Z&8191)===0)Q+=13,Z>>>=13;if((Z&127)===0)Q+=7,Z>>>=7;if((Z&15)===0)Q+=4,Z>>>=4;if((Z&3)===0)Q+=2,Z>>>=2;if((Z&1)===0)Q++;return Q},V.prototype.bitLength=function F(){var U=this.words[this.length-1],Z=this._countBits(U);return(this.length-1)*26+Z};function M(F){var U=new Array(F.bitLength());for(var Z=0;Z<U.length;Z++){var Q=Z/26|0,I=Z%26;U[Z]=(F.words[Q]&1<<I)>>>I}return U}V.prototype.zeroBits=function F(){if(this.isZero())return 0;var U=0;for(var Z=0;Z<this.length;Z++){var Q=this._zeroBits(this.words[Z]);if(U+=Q,Q!==26)break}return U},V.prototype.byteLength=function F(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function F(U){if(this.negative!==0)return this.abs().inotn(U).iaddn(1);return this.clone()},V.prototype.fromTwos=function F(U){if(this.testn(U-1))return this.notn(U).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function F(){return this.negative!==0},V.prototype.neg=function F(){return this.clone().ineg()},V.prototype.ineg=function F(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function F(U){while(this.length<U.length)this.words[this.length++]=0;for(var Z=0;Z<U.length;Z++)this.words[Z]=this.words[Z]|U.words[Z];return this.strip()},V.prototype.ior=function F(U){return H((this.negative|U.negative)===0),this.iuor(U)},V.prototype.or=function F(U){if(this.length>U.length)return this.clone().ior(U);return U.clone().ior(this)},V.prototype.uor=function F(U){if(this.length>U.length)return this.clone().iuor(U);return U.clone().iuor(this)},V.prototype.iuand=function F(U){var Z;if(this.length>U.length)Z=U;else Z=this;for(var Q=0;Q<Z.length;Q++)this.words[Q]=this.words[Q]&U.words[Q];return this.length=Z.length,this.strip()},V.prototype.iand=function F(U){return H((this.negative|U.negative)===0),this.iuand(U)},V.prototype.and=function F(U){if(this.length>U.length)return this.clone().iand(U);return U.clone().iand(this)},V.prototype.uand=function F(U){if(this.length>U.length)return this.clone().iuand(U);return U.clone().iuand(this)},V.prototype.iuxor=function F(U){var Z,Q;if(this.length>U.length)Z=this,Q=U;else Z=U,Q=this;for(var I=0;I<Q.length;I++)this.words[I]=Z.words[I]^Q.words[I];if(this!==Z)for(;I<Z.length;I++)this.words[I]=Z.words[I];return this.length=Z.length,this.strip()},V.prototype.ixor=function F(U){return H((this.negative|U.negative)===0),this.iuxor(U)},V.prototype.xor=function F(U){if(this.length>U.length)return this.clone().ixor(U);return U.clone().ixor(this)},V.prototype.uxor=function F(U){if(this.length>U.length)return this.clone().iuxor(U);return U.clone().iuxor(this)},V.prototype.inotn=function F(U){H(typeof U==="number"&&U>=0);var Z=Math.ceil(U/26)|0,Q=U%26;if(this._expand(Z),Q>0)Z--;for(var I=0;I<Z;I++)this.words[I]=~this.words[I]&67108863;if(Q>0)this.words[I]=~this.words[I]&67108863>>26-Q;return this.strip()},V.prototype.notn=function F(U){return this.clone().inotn(U)},V.prototype.setn=function F(U,Z){H(typeof U==="number"&&U>=0);var Q=U/26|0,I=U%26;if(this._expand(Q+1),Z)this.words[Q]=this.words[Q]|1<<I;else this.words[Q]=this.words[Q]&~(1<<I);return this.strip()},V.prototype.iadd=function F(U){var Z;if(this.negative!==0&&U.negative===0)return this.negative=0,Z=this.isub(U),this.negative^=1,this._normSign();else if(this.negative===0&&U.negative!==0)return U.negative=0,Z=this.isub(U),U.negative=1,Z._normSign();var Q,I;if(this.length>U.length)Q=this,I=U;else Q=U,I=this;var $=0;for(var K=0;K<I.length;K++)Z=(Q.words[K]|0)+(I.words[K]|0)+$,this.words[K]=Z&67108863,$=Z>>>26;for(;$!==0&&K<Q.length;K++)Z=(Q.words[K]|0)+$,this.words[K]=Z&67108863,$=Z>>>26;if(this.length=Q.length,$!==0)this.words[this.length]=$,this.length++;else if(Q!==this)for(;K<Q.length;K++)this.words[K]=Q.words[K];return this},V.prototype.add=function F(U){var Z;if(U.negative!==0&&this.negative===0)return U.negative=0,Z=this.sub(U),U.negative^=1,Z;else if(U.negative===0&&this.negative!==0)return this.negative=0,Z=U.sub(this),this.negative=1,Z;if(this.length>U.length)return this.clone().iadd(U);return U.clone().iadd(this)},V.prototype.isub=function F(U){if(U.negative!==0){U.negative=0;var Z=this.iadd(U);return U.negative=1,Z._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(U),this.negative=1,this._normSign();var Q=this.cmp(U);if(Q===0)return this.negative=0,this.length=1,this.words[0]=0,this;var I,$;if(Q>0)I=this,$=U;else I=U,$=this;var K=0;for(var J=0;J<$.length;J++)Z=(I.words[J]|0)-($.words[J]|0)+K,K=Z>>26,this.words[J]=Z&67108863;for(;K!==0&&J<I.length;J++)Z=(I.words[J]|0)+K,K=Z>>26,this.words[J]=Z&67108863;if(K===0&&J<I.length&&I!==this)for(;J<I.length;J++)this.words[J]=I.words[J];if(this.length=Math.max(this.length,J),I!==this)this.negative=1;return this.strip()},V.prototype.sub=function F(U){return this.clone().isub(U)};function q(F,U,Z){Z.negative=U.negative^F.negative;var Q=F.length+U.length|0;Z.length=Q,Q=Q-1|0;var I=F.words[0]|0,$=U.words[0]|0,K=I*$,J=K&67108863,Y=K/67108864|0;Z.words[0]=J;for(var X=1;X<Q;X++){var O=Y>>>26,v=Y&67108863,T=Math.min(X,U.length-1);for(var B=Math.max(0,X-F.length+1);B<=T;B++){var c=X-B|0;I=F.words[c]|0,$=U.words[B]|0,K=I*$+v,O+=K/67108864|0,v=K&67108863}Z.words[X]=v|0,Y=O|0}if(Y!==0)Z.words[X]=Y|0;else Z.length--;return Z.strip()}var j=function F(U,Z,Q){var I=U.words,$=Z.words,K=Q.words,J=0,Y,X,O,v=I[0]|0,T=v&8191,B=v>>>13,c=I[1]|0,l=c&8191,s=c>>>13,O0=I[2]|0,h=O0&8191,d=O0>>>13,g0=I[3]|0,Q0=g0&8191,$0=g0>>>13,m=I[4]|0,p=m&8191,b=m>>>13,N0=I[5]|0,i=N0&8191,e=N0>>>13,t=I[6]|0,n=t&8191,X0=t>>>13,H0=I[7]|0,Z0=H0&8191,W0=H0>>>13,c0=I[8]|0,G0=c0&8191,A0=c0>>>13,u0=I[9]|0,J0=u0&8191,T0=u0>>>13,r0=$[0]|0,E0=r0&8191,v0=r0>>>13,AU=$[1]|0,k0=AU&8191,j0=AU>>>13,DU=$[2]|0,R0=DU&8191,S0=DU>>>13,LU=$[3]|0,P0=LU&8191,D0=LU>>>13,zU=$[4]|0,B0=zU&8191,L0=zU>>>13,EU=$[5]|0,_=EU&8191,w=EU>>>13,_0=$[6]|0,U0=_0&8191,I0=_0>>>13,l0=$[7]|0,F0=l0&8191,C0=l0>>>13,CU=$[8]|0,x0=CU&8191,q0=CU>>>13,TU=$[9]|0,z0=TU&8191,M0=TU>>>13;Q.negative=U.negative^Z.negative,Q.length=19,Y=Math.imul(T,E0),X=Math.imul(T,v0),X=X+Math.imul(B,E0)|0,O=Math.imul(B,v0);var t0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(t0>>>26)|0,t0&=67108863,Y=Math.imul(l,E0),X=Math.imul(l,v0),X=X+Math.imul(s,E0)|0,O=Math.imul(s,v0),Y=Y+Math.imul(T,k0)|0,X=X+Math.imul(T,j0)|0,X=X+Math.imul(B,k0)|0,O=O+Math.imul(B,j0)|0;var p0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(p0>>>26)|0,p0&=67108863,Y=Math.imul(h,E0),X=Math.imul(h,v0),X=X+Math.imul(d,E0)|0,O=Math.imul(d,v0),Y=Y+Math.imul(l,k0)|0,X=X+Math.imul(l,j0)|0,X=X+Math.imul(s,k0)|0,O=O+Math.imul(s,j0)|0,Y=Y+Math.imul(T,R0)|0,X=X+Math.imul(T,S0)|0,X=X+Math.imul(B,R0)|0,O=O+Math.imul(B,S0)|0;var f0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(f0>>>26)|0,f0&=67108863,Y=Math.imul(Q0,E0),X=Math.imul(Q0,v0),X=X+Math.imul($0,E0)|0,O=Math.imul($0,v0),Y=Y+Math.imul(h,k0)|0,X=X+Math.imul(h,j0)|0,X=X+Math.imul(d,k0)|0,O=O+Math.imul(d,j0)|0,Y=Y+Math.imul(l,R0)|0,X=X+Math.imul(l,S0)|0,X=X+Math.imul(s,R0)|0,O=O+Math.imul(s,S0)|0,Y=Y+Math.imul(T,P0)|0,X=X+Math.imul(T,D0)|0,X=X+Math.imul(B,P0)|0,O=O+Math.imul(B,D0)|0;var b0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(b0>>>26)|0,b0&=67108863,Y=Math.imul(p,E0),X=Math.imul(p,v0),X=X+Math.imul(b,E0)|0,O=Math.imul(b,v0),Y=Y+Math.imul(Q0,k0)|0,X=X+Math.imul(Q0,j0)|0,X=X+Math.imul($0,k0)|0,O=O+Math.imul($0,j0)|0,Y=Y+Math.imul(h,R0)|0,X=X+Math.imul(h,S0)|0,X=X+Math.imul(d,R0)|0,O=O+Math.imul(d,S0)|0,Y=Y+Math.imul(l,P0)|0,X=X+Math.imul(l,D0)|0,X=X+Math.imul(s,P0)|0,O=O+Math.imul(s,D0)|0,Y=Y+Math.imul(T,B0)|0,X=X+Math.imul(T,L0)|0,X=X+Math.imul(B,B0)|0,O=O+Math.imul(B,L0)|0;var a0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(a0>>>26)|0,a0&=67108863,Y=Math.imul(i,E0),X=Math.imul(i,v0),X=X+Math.imul(e,E0)|0,O=Math.imul(e,v0),Y=Y+Math.imul(p,k0)|0,X=X+Math.imul(p,j0)|0,X=X+Math.imul(b,k0)|0,O=O+Math.imul(b,j0)|0,Y=Y+Math.imul(Q0,R0)|0,X=X+Math.imul(Q0,S0)|0,X=X+Math.imul($0,R0)|0,O=O+Math.imul($0,S0)|0,Y=Y+Math.imul(h,P0)|0,X=X+Math.imul(h,D0)|0,X=X+Math.imul(d,P0)|0,O=O+Math.imul(d,D0)|0,Y=Y+Math.imul(l,B0)|0,X=X+Math.imul(l,L0)|0,X=X+Math.imul(s,B0)|0,O=O+Math.imul(s,L0)|0,Y=Y+Math.imul(T,_)|0,X=X+Math.imul(T,w)|0,X=X+Math.imul(B,_)|0,O=O+Math.imul(B,w)|0;var e0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(e0>>>26)|0,e0&=67108863,Y=Math.imul(n,E0),X=Math.imul(n,v0),X=X+Math.imul(X0,E0)|0,O=Math.imul(X0,v0),Y=Y+Math.imul(i,k0)|0,X=X+Math.imul(i,j0)|0,X=X+Math.imul(e,k0)|0,O=O+Math.imul(e,j0)|0,Y=Y+Math.imul(p,R0)|0,X=X+Math.imul(p,S0)|0,X=X+Math.imul(b,R0)|0,O=O+Math.imul(b,S0)|0,Y=Y+Math.imul(Q0,P0)|0,X=X+Math.imul(Q0,D0)|0,X=X+Math.imul($0,P0)|0,O=O+Math.imul($0,D0)|0,Y=Y+Math.imul(h,B0)|0,X=X+Math.imul(h,L0)|0,X=X+Math.imul(d,B0)|0,O=O+Math.imul(d,L0)|0,Y=Y+Math.imul(l,_)|0,X=X+Math.imul(l,w)|0,X=X+Math.imul(s,_)|0,O=O+Math.imul(s,w)|0,Y=Y+Math.imul(T,U0)|0,X=X+Math.imul(T,I0)|0,X=X+Math.imul(B,U0)|0,O=O+Math.imul(B,I0)|0;var i0=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(i0>>>26)|0,i0&=67108863,Y=Math.imul(Z0,E0),X=Math.imul(Z0,v0),X=X+Math.imul(W0,E0)|0,O=Math.imul(W0,v0),Y=Y+Math.imul(n,k0)|0,X=X+Math.imul(n,j0)|0,X=X+Math.imul(X0,k0)|0,O=O+Math.imul(X0,j0)|0,Y=Y+Math.imul(i,R0)|0,X=X+Math.imul(i,S0)|0,X=X+Math.imul(e,R0)|0,O=O+Math.imul(e,S0)|0,Y=Y+Math.imul(p,P0)|0,X=X+Math.imul(p,D0)|0,X=X+Math.imul(b,P0)|0,O=O+Math.imul(b,D0)|0,Y=Y+Math.imul(Q0,B0)|0,X=X+Math.imul(Q0,L0)|0,X=X+Math.imul($0,B0)|0,O=O+Math.imul($0,L0)|0,Y=Y+Math.imul(h,_)|0,X=X+Math.imul(h,w)|0,X=X+Math.imul(d,_)|0,O=O+Math.imul(d,w)|0,Y=Y+Math.imul(l,U0)|0,X=X+Math.imul(l,I0)|0,X=X+Math.imul(s,U0)|0,O=O+Math.imul(s,I0)|0,Y=Y+Math.imul(T,F0)|0,X=X+Math.imul(T,C0)|0,X=X+Math.imul(B,F0)|0,O=O+Math.imul(B,C0)|0;var UU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(UU>>>26)|0,UU&=67108863,Y=Math.imul(G0,E0),X=Math.imul(G0,v0),X=X+Math.imul(A0,E0)|0,O=Math.imul(A0,v0),Y=Y+Math.imul(Z0,k0)|0,X=X+Math.imul(Z0,j0)|0,X=X+Math.imul(W0,k0)|0,O=O+Math.imul(W0,j0)|0,Y=Y+Math.imul(n,R0)|0,X=X+Math.imul(n,S0)|0,X=X+Math.imul(X0,R0)|0,O=O+Math.imul(X0,S0)|0,Y=Y+Math.imul(i,P0)|0,X=X+Math.imul(i,D0)|0,X=X+Math.imul(e,P0)|0,O=O+Math.imul(e,D0)|0,Y=Y+Math.imul(p,B0)|0,X=X+Math.imul(p,L0)|0,X=X+Math.imul(b,B0)|0,O=O+Math.imul(b,L0)|0,Y=Y+Math.imul(Q0,_)|0,X=X+Math.imul(Q0,w)|0,X=X+Math.imul($0,_)|0,O=O+Math.imul($0,w)|0,Y=Y+Math.imul(h,U0)|0,X=X+Math.imul(h,I0)|0,X=X+Math.imul(d,U0)|0,O=O+Math.imul(d,I0)|0,Y=Y+Math.imul(l,F0)|0,X=X+Math.imul(l,C0)|0,X=X+Math.imul(s,F0)|0,O=O+Math.imul(s,C0)|0,Y=Y+Math.imul(T,x0)|0,X=X+Math.imul(T,q0)|0,X=X+Math.imul(B,x0)|0,O=O+Math.imul(B,q0)|0;var XU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(XU>>>26)|0,XU&=67108863,Y=Math.imul(J0,E0),X=Math.imul(J0,v0),X=X+Math.imul(T0,E0)|0,O=Math.imul(T0,v0),Y=Y+Math.imul(G0,k0)|0,X=X+Math.imul(G0,j0)|0,X=X+Math.imul(A0,k0)|0,O=O+Math.imul(A0,j0)|0,Y=Y+Math.imul(Z0,R0)|0,X=X+Math.imul(Z0,S0)|0,X=X+Math.imul(W0,R0)|0,O=O+Math.imul(W0,S0)|0,Y=Y+Math.imul(n,P0)|0,X=X+Math.imul(n,D0)|0,X=X+Math.imul(X0,P0)|0,O=O+Math.imul(X0,D0)|0,Y=Y+Math.imul(i,B0)|0,X=X+Math.imul(i,L0)|0,X=X+Math.imul(e,B0)|0,O=O+Math.imul(e,L0)|0,Y=Y+Math.imul(p,_)|0,X=X+Math.imul(p,w)|0,X=X+Math.imul(b,_)|0,O=O+Math.imul(b,w)|0,Y=Y+Math.imul(Q0,U0)|0,X=X+Math.imul(Q0,I0)|0,X=X+Math.imul($0,U0)|0,O=O+Math.imul($0,I0)|0,Y=Y+Math.imul(h,F0)|0,X=X+Math.imul(h,C0)|0,X=X+Math.imul(d,F0)|0,O=O+Math.imul(d,C0)|0,Y=Y+Math.imul(l,x0)|0,X=X+Math.imul(l,q0)|0,X=X+Math.imul(s,x0)|0,O=O+Math.imul(s,q0)|0,Y=Y+Math.imul(T,z0)|0,X=X+Math.imul(T,M0)|0,X=X+Math.imul(B,z0)|0,O=O+Math.imul(B,M0)|0;var IU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(IU>>>26)|0,IU&=67108863,Y=Math.imul(J0,k0),X=Math.imul(J0,j0),X=X+Math.imul(T0,k0)|0,O=Math.imul(T0,j0),Y=Y+Math.imul(G0,R0)|0,X=X+Math.imul(G0,S0)|0,X=X+Math.imul(A0,R0)|0,O=O+Math.imul(A0,S0)|0,Y=Y+Math.imul(Z0,P0)|0,X=X+Math.imul(Z0,D0)|0,X=X+Math.imul(W0,P0)|0,O=O+Math.imul(W0,D0)|0,Y=Y+Math.imul(n,B0)|0,X=X+Math.imul(n,L0)|0,X=X+Math.imul(X0,B0)|0,O=O+Math.imul(X0,L0)|0,Y=Y+Math.imul(i,_)|0,X=X+Math.imul(i,w)|0,X=X+Math.imul(e,_)|0,O=O+Math.imul(e,w)|0,Y=Y+Math.imul(p,U0)|0,X=X+Math.imul(p,I0)|0,X=X+Math.imul(b,U0)|0,O=O+Math.imul(b,I0)|0,Y=Y+Math.imul(Q0,F0)|0,X=X+Math.imul(Q0,C0)|0,X=X+Math.imul($0,F0)|0,O=O+Math.imul($0,C0)|0,Y=Y+Math.imul(h,x0)|0,X=X+Math.imul(h,q0)|0,X=X+Math.imul(d,x0)|0,O=O+Math.imul(d,q0)|0,Y=Y+Math.imul(l,z0)|0,X=X+Math.imul(l,M0)|0,X=X+Math.imul(s,z0)|0,O=O+Math.imul(s,M0)|0;var ZU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,Y=Math.imul(J0,R0),X=Math.imul(J0,S0),X=X+Math.imul(T0,R0)|0,O=Math.imul(T0,S0),Y=Y+Math.imul(G0,P0)|0,X=X+Math.imul(G0,D0)|0,X=X+Math.imul(A0,P0)|0,O=O+Math.imul(A0,D0)|0,Y=Y+Math.imul(Z0,B0)|0,X=X+Math.imul(Z0,L0)|0,X=X+Math.imul(W0,B0)|0,O=O+Math.imul(W0,L0)|0,Y=Y+Math.imul(n,_)|0,X=X+Math.imul(n,w)|0,X=X+Math.imul(X0,_)|0,O=O+Math.imul(X0,w)|0,Y=Y+Math.imul(i,U0)|0,X=X+Math.imul(i,I0)|0,X=X+Math.imul(e,U0)|0,O=O+Math.imul(e,I0)|0,Y=Y+Math.imul(p,F0)|0,X=X+Math.imul(p,C0)|0,X=X+Math.imul(b,F0)|0,O=O+Math.imul(b,C0)|0,Y=Y+Math.imul(Q0,x0)|0,X=X+Math.imul(Q0,q0)|0,X=X+Math.imul($0,x0)|0,O=O+Math.imul($0,q0)|0,Y=Y+Math.imul(h,z0)|0,X=X+Math.imul(h,M0)|0,X=X+Math.imul(d,z0)|0,O=O+Math.imul(d,M0)|0;var QU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(QU>>>26)|0,QU&=67108863,Y=Math.imul(J0,P0),X=Math.imul(J0,D0),X=X+Math.imul(T0,P0)|0,O=Math.imul(T0,D0),Y=Y+Math.imul(G0,B0)|0,X=X+Math.imul(G0,L0)|0,X=X+Math.imul(A0,B0)|0,O=O+Math.imul(A0,L0)|0,Y=Y+Math.imul(Z0,_)|0,X=X+Math.imul(Z0,w)|0,X=X+Math.imul(W0,_)|0,O=O+Math.imul(W0,w)|0,Y=Y+Math.imul(n,U0)|0,X=X+Math.imul(n,I0)|0,X=X+Math.imul(X0,U0)|0,O=O+Math.imul(X0,I0)|0,Y=Y+Math.imul(i,F0)|0,X=X+Math.imul(i,C0)|0,X=X+Math.imul(e,F0)|0,O=O+Math.imul(e,C0)|0,Y=Y+Math.imul(p,x0)|0,X=X+Math.imul(p,q0)|0,X=X+Math.imul(b,x0)|0,O=O+Math.imul(b,q0)|0,Y=Y+Math.imul(Q0,z0)|0,X=X+Math.imul(Q0,M0)|0,X=X+Math.imul($0,z0)|0,O=O+Math.imul($0,M0)|0;var $U=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+($U>>>26)|0,$U&=67108863,Y=Math.imul(J0,B0),X=Math.imul(J0,L0),X=X+Math.imul(T0,B0)|0,O=Math.imul(T0,L0),Y=Y+Math.imul(G0,_)|0,X=X+Math.imul(G0,w)|0,X=X+Math.imul(A0,_)|0,O=O+Math.imul(A0,w)|0,Y=Y+Math.imul(Z0,U0)|0,X=X+Math.imul(Z0,I0)|0,X=X+Math.imul(W0,U0)|0,O=O+Math.imul(W0,I0)|0,Y=Y+Math.imul(n,F0)|0,X=X+Math.imul(n,C0)|0,X=X+Math.imul(X0,F0)|0,O=O+Math.imul(X0,C0)|0,Y=Y+Math.imul(i,x0)|0,X=X+Math.imul(i,q0)|0,X=X+Math.imul(e,x0)|0,O=O+Math.imul(e,q0)|0,Y=Y+Math.imul(p,z0)|0,X=X+Math.imul(p,M0)|0,X=X+Math.imul(b,z0)|0,O=O+Math.imul(b,M0)|0;var YU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(YU>>>26)|0,YU&=67108863,Y=Math.imul(J0,_),X=Math.imul(J0,w),X=X+Math.imul(T0,_)|0,O=Math.imul(T0,w),Y=Y+Math.imul(G0,U0)|0,X=X+Math.imul(G0,I0)|0,X=X+Math.imul(A0,U0)|0,O=O+Math.imul(A0,I0)|0,Y=Y+Math.imul(Z0,F0)|0,X=X+Math.imul(Z0,C0)|0,X=X+Math.imul(W0,F0)|0,O=O+Math.imul(W0,C0)|0,Y=Y+Math.imul(n,x0)|0,X=X+Math.imul(n,q0)|0,X=X+Math.imul(X0,x0)|0,O=O+Math.imul(X0,q0)|0,Y=Y+Math.imul(i,z0)|0,X=X+Math.imul(i,M0)|0,X=X+Math.imul(e,z0)|0,O=O+Math.imul(e,M0)|0;var VU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(VU>>>26)|0,VU&=67108863,Y=Math.imul(J0,U0),X=Math.imul(J0,I0),X=X+Math.imul(T0,U0)|0,O=Math.imul(T0,I0),Y=Y+Math.imul(G0,F0)|0,X=X+Math.imul(G0,C0)|0,X=X+Math.imul(A0,F0)|0,O=O+Math.imul(A0,C0)|0,Y=Y+Math.imul(Z0,x0)|0,X=X+Math.imul(Z0,q0)|0,X=X+Math.imul(W0,x0)|0,O=O+Math.imul(W0,q0)|0,Y=Y+Math.imul(n,z0)|0,X=X+Math.imul(n,M0)|0,X=X+Math.imul(X0,z0)|0,O=O+Math.imul(X0,M0)|0;var OU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(OU>>>26)|0,OU&=67108863,Y=Math.imul(J0,F0),X=Math.imul(J0,C0),X=X+Math.imul(T0,F0)|0,O=Math.imul(T0,C0),Y=Y+Math.imul(G0,x0)|0,X=X+Math.imul(G0,q0)|0,X=X+Math.imul(A0,x0)|0,O=O+Math.imul(A0,q0)|0,Y=Y+Math.imul(Z0,z0)|0,X=X+Math.imul(Z0,M0)|0,X=X+Math.imul(W0,z0)|0,O=O+Math.imul(W0,M0)|0;var GU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(GU>>>26)|0,GU&=67108863,Y=Math.imul(J0,x0),X=Math.imul(J0,q0),X=X+Math.imul(T0,x0)|0,O=Math.imul(T0,q0),Y=Y+Math.imul(G0,z0)|0,X=X+Math.imul(G0,M0)|0,X=X+Math.imul(A0,z0)|0,O=O+Math.imul(A0,M0)|0;var KU=(J+Y|0)+((X&8191)<<13)|0;J=(O+(X>>>13)|0)+(KU>>>26)|0,KU&=67108863,Y=Math.imul(J0,z0),X=Math.imul(J0,M0),X=X+Math.imul(T0,z0)|0,O=Math.imul(T0,M0);var WU=(J+Y|0)+((X&8191)<<13)|0;if(J=(O+(X>>>13)|0)+(WU>>>26)|0,WU&=67108863,K[0]=t0,K[1]=p0,K[2]=f0,K[3]=b0,K[4]=a0,K[5]=e0,K[6]=i0,K[7]=UU,K[8]=XU,K[9]=IU,K[10]=ZU,K[11]=QU,K[12]=$U,K[13]=YU,K[14]=VU,K[15]=OU,K[16]=GU,K[17]=KU,K[18]=WU,J!==0)K[19]=J,Q.length++;return Q};if(!Math.imul)j=q;function x(F,U,Z){Z.negative=U.negative^F.negative,Z.length=F.length+U.length;var Q=0,I=0;for(var $=0;$<Z.length-1;$++){var K=I;I=0;var J=Q&67108863,Y=Math.min($,U.length-1);for(var X=Math.max(0,$-F.length+1);X<=Y;X++){var O=$-X,v=F.words[O]|0,T=U.words[X]|0,B=v*T,c=B&67108863;K=K+(B/67108864|0)|0,c=c+J|0,J=c&67108863,K=K+(c>>>26)|0,I+=K>>>26,K&=67108863}Z.words[$]=J,Q=K,K=I}if(Q!==0)Z.words[$]=Q;else Z.length--;return Z.strip()}function g(F,U,Z){var Q=new N;return Q.mulp(F,U,Z)}V.prototype.mulTo=function F(U,Z){var Q,I=this.length+U.length;if(this.length===10&&U.length===10)Q=j(this,U,Z);else if(I<63)Q=q(this,U,Z);else if(I<1024)Q=x(this,U,Z);else Q=g(this,U,Z);return Q};function N(F,U){this.x=F,this.y=U}N.prototype.makeRBT=function F(U){var Z=new Array(U),Q=V.prototype._countBits(U)-1;for(var I=0;I<U;I++)Z[I]=this.revBin(I,Q,U);return Z},N.prototype.revBin=function F(U,Z,Q){if(U===0||U===Q-1)return U;var I=0;for(var $=0;$<Z;$++)I|=(U&1)<<Z-$-1,U>>=1;return I},N.prototype.permute=function F(U,Z,Q,I,$,K){for(var J=0;J<K;J++)I[J]=Z[U[J]],$[J]=Q[U[J]]},N.prototype.transform=function F(U,Z,Q,I,$,K){this.permute(K,U,Z,Q,I,$);for(var J=1;J<$;J<<=1){var Y=J<<1,X=Math.cos(2*Math.PI/Y),O=Math.sin(2*Math.PI/Y);for(var v=0;v<$;v+=Y){var T=X,B=O;for(var c=0;c<J;c++){var l=Q[v+c],s=I[v+c],O0=Q[v+c+J],h=I[v+c+J],d=T*O0-B*h;if(h=T*h+B*O0,O0=d,Q[v+c]=l+O0,I[v+c]=s+h,Q[v+c+J]=l-O0,I[v+c+J]=s-h,c!==Y)d=X*T-O*B,B=X*B+O*T,T=d}}}},N.prototype.guessLen13b=function F(U,Z){var Q=Math.max(Z,U)|1,I=Q&1,$=0;for(Q=Q/2|0;Q;Q=Q>>>1)$++;return 1<<$+1+I},N.prototype.conjugate=function F(U,Z,Q){if(Q<=1)return;for(var I=0;I<Q/2;I++){var $=U[I];U[I]=U[Q-I-1],U[Q-I-1]=$,$=Z[I],Z[I]=-Z[Q-I-1],Z[Q-I-1]=-$}},N.prototype.normalize13b=function F(U,Z){var Q=0;for(var I=0;I<Z/2;I++){var $=Math.round(U[2*I+1]/Z)*8192+Math.round(U[2*I]/Z)+Q;if(U[I]=$&67108863,$<67108864)Q=0;else Q=$/67108864|0}return U},N.prototype.convert13b=function F(U,Z,Q,I){var $=0;for(var K=0;K<Z;K++)$=$+(U[K]|0),Q[2*K]=$&8191,$=$>>>13,Q[2*K+1]=$&8191,$=$>>>13;for(K=2*Z;K<I;++K)Q[K]=0;H($===0),H(($&-8192)===0)},N.prototype.stub=function F(U){var Z=new Array(U);for(var Q=0;Q<U;Q++)Z[Q]=0;return Z},N.prototype.mulp=function F(U,Z,Q){var I=2*this.guessLen13b(U.length,Z.length),$=this.makeRBT(I),K=this.stub(I),J=new Array(I),Y=new Array(I),X=new Array(I),O=new Array(I),v=new Array(I),T=new Array(I),B=Q.words;B.length=I,this.convert13b(U.words,U.length,J,I),this.convert13b(Z.words,Z.length,O,I),this.transform(J,K,Y,X,I,$),this.transform(O,K,v,T,I,$);for(var c=0;c<I;c++){var l=Y[c]*v[c]-X[c]*T[c];X[c]=Y[c]*T[c]+X[c]*v[c],Y[c]=l}return this.conjugate(Y,X,I),this.transform(Y,X,B,K,I,$),this.conjugate(B,K,I),this.normalize13b(B,I),Q.negative=U.negative^Z.negative,Q.length=U.length+Z.length,Q.strip()},V.prototype.mul=function F(U){var Z=new V(null);return Z.words=new Array(this.length+U.length),this.mulTo(U,Z)},V.prototype.mulf=function F(U){var Z=new V(null);return Z.words=new Array(this.length+U.length),g(this,U,Z)},V.prototype.imul=function F(U){return this.clone().mulTo(U,this)},V.prototype.imuln=function F(U){H(typeof U==="number"),H(U<67108864);var Z=0;for(var Q=0;Q<this.length;Q++){var I=(this.words[Q]|0)*U,$=(I&67108863)+(Z&67108863);Z>>=26,Z+=I/67108864|0,Z+=$>>>26,this.words[Q]=$&67108863}if(Z!==0)this.words[Q]=Z,this.length++;return this.length=U===0?1:this.length,this},V.prototype.muln=function F(U){return this.clone().imuln(U)},V.prototype.sqr=function F(){return this.mul(this)},V.prototype.isqr=function F(){return this.imul(this.clone())},V.prototype.pow=function F(U){var Z=M(U);if(Z.length===0)return new V(1);var Q=this;for(var I=0;I<Z.length;I++,Q=Q.sqr())if(Z[I]!==0)break;if(++I<Z.length)for(var $=Q.sqr();I<Z.length;I++,$=$.sqr()){if(Z[I]===0)continue;Q=Q.mul($)}return Q},V.prototype.iushln=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26,I=67108863>>>26-Z<<26-Z,$;if(Z!==0){var K=0;for($=0;$<this.length;$++){var J=this.words[$]&I,Y=(this.words[$]|0)-J<<Z;this.words[$]=Y|K,K=J>>>26-Z}if(K)this.words[$]=K,this.length++}if(Q!==0){for($=this.length-1;$>=0;$--)this.words[$+Q]=this.words[$];for($=0;$<Q;$++)this.words[$]=0;this.length+=Q}return this.strip()},V.prototype.ishln=function F(U){return H(this.negative===0),this.iushln(U)},V.prototype.iushrn=function F(U,Z,Q){H(typeof U==="number"&&U>=0);var I;if(Z)I=(Z-Z%26)/26;else I=0;var $=U%26,K=Math.min((U-$)/26,this.length),J=67108863^67108863>>>$<<$,Y=Q;if(I-=K,I=Math.max(0,I),Y){for(var X=0;X<K;X++)Y.words[X]=this.words[X];Y.length=K}if(K===0);else if(this.length>K){this.length-=K;for(X=0;X<this.length;X++)this.words[X]=this.words[X+K]}else this.words[0]=0,this.length=1;var O=0;for(X=this.length-1;X>=0&&(O!==0||X>=I);X--){var v=this.words[X]|0;this.words[X]=O<<26-$|v>>>$,O=v&J}if(Y&&O!==0)Y.words[Y.length++]=O;if(this.length===0)this.words[0]=0,this.length=1;return this.strip()},V.prototype.ishrn=function F(U,Z,Q){return H(this.negative===0),this.iushrn(U,Z,Q)},V.prototype.shln=function F(U){return this.clone().ishln(U)},V.prototype.ushln=function F(U){return this.clone().iushln(U)},V.prototype.shrn=function F(U){return this.clone().ishrn(U)},V.prototype.ushrn=function F(U){return this.clone().iushrn(U)},V.prototype.testn=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26,I=1<<Z;if(this.length<=Q)return!1;var $=this.words[Q];return!!($&I)},V.prototype.imaskn=function F(U){H(typeof U==="number"&&U>=0);var Z=U%26,Q=(U-Z)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=Q)return this;if(Z!==0)Q++;if(this.length=Math.min(Q,this.length),Z!==0){var I=67108863^67108863>>>Z<<Z;this.words[this.length-1]&=I}return this.strip()},V.prototype.maskn=function F(U){return this.clone().imaskn(U)},V.prototype.iaddn=function F(U){if(H(typeof U==="number"),H(U<67108864),U<0)return this.isubn(-U);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<U)return this.words[0]=U-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(U),this.negative=1,this}return this._iaddn(U)},V.prototype._iaddn=function F(U){this.words[0]+=U;for(var Z=0;Z<this.length&&this.words[Z]>=67108864;Z++)if(this.words[Z]-=67108864,Z===this.length-1)this.words[Z+1]=1;else this.words[Z+1]++;return this.length=Math.max(this.length,Z+1),this},V.prototype.isubn=function F(U){if(H(typeof U==="number"),H(U<67108864),U<0)return this.iaddn(-U);if(this.negative!==0)return this.negative=0,this.iaddn(U),this.negative=1,this;if(this.words[0]-=U,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Z=0;Z<this.length&&this.words[Z]<0;Z++)this.words[Z]+=67108864,this.words[Z+1]-=1;return this.strip()},V.prototype.addn=function F(U){return this.clone().iaddn(U)},V.prototype.subn=function F(U){return this.clone().isubn(U)},V.prototype.iabs=function F(){return this.negative=0,this},V.prototype.abs=function F(){return this.clone().iabs()},V.prototype._ishlnsubmul=function F(U,Z,Q){var I=U.length+Q,$;this._expand(I);var K,J=0;for($=0;$<U.length;$++){K=(this.words[$+Q]|0)+J;var Y=(U.words[$]|0)*Z;K-=Y&67108863,J=(K>>26)-(Y/67108864|0),this.words[$+Q]=K&67108863}for(;$<this.length-Q;$++)K=(this.words[$+Q]|0)+J,J=K>>26,this.words[$+Q]=K&67108863;if(J===0)return this.strip();H(J===-1),J=0;for($=0;$<this.length;$++)K=-(this.words[$]|0)+J,J=K>>26,this.words[$]=K&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function F(U,Z){var Q=this.length-U.length,I=this.clone(),$=U,K=$.words[$.length-1]|0,J=this._countBits(K);if(Q=26-J,Q!==0)$=$.ushln(Q),I.iushln(Q),K=$.words[$.length-1]|0;var Y=I.length-$.length,X;if(Z!=="mod"){X=new V(null),X.length=Y+1,X.words=new Array(X.length);for(var O=0;O<X.length;O++)X.words[O]=0}var v=I.clone()._ishlnsubmul($,1,Y);if(v.negative===0){if(I=v,X)X.words[Y]=1}for(var T=Y-1;T>=0;T--){var B=(I.words[$.length+T]|0)*67108864+(I.words[$.length+T-1]|0);B=Math.min(B/K|0,67108863),I._ishlnsubmul($,B,T);while(I.negative!==0)if(B--,I.negative=0,I._ishlnsubmul($,1,T),!I.isZero())I.negative^=1;if(X)X.words[T]=B}if(X)X.strip();if(I.strip(),Z!=="div"&&Q!==0)I.iushrn(Q);return{div:X||null,mod:I}},V.prototype.divmod=function F(U,Z,Q){if(H(!U.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var I,$,K;if(this.negative!==0&&U.negative===0){if(K=this.neg().divmod(U,Z),Z!=="mod")I=K.div.neg();if(Z!=="div"){if($=K.mod.neg(),Q&&$.negative!==0)$.iadd(U)}return{div:I,mod:$}}if(this.negative===0&&U.negative!==0){if(K=this.divmod(U.neg(),Z),Z!=="mod")I=K.div.neg();return{div:I,mod:K.mod}}if((this.negative&U.negative)!==0){if(K=this.neg().divmod(U.neg(),Z),Z!=="div"){if($=K.mod.neg(),Q&&$.negative!==0)$.isub(U)}return{div:K.div,mod:$}}if(U.length>this.length||this.cmp(U)<0)return{div:new V(0),mod:this};if(U.length===1){if(Z==="div")return{div:this.divn(U.words[0]),mod:null};if(Z==="mod")return{div:null,mod:new V(this.modn(U.words[0]))};return{div:this.divn(U.words[0]),mod:new V(this.modn(U.words[0]))}}return this._wordDiv(U,Z)},V.prototype.div=function F(U){return this.divmod(U,"div",!1).div},V.prototype.mod=function F(U){return this.divmod(U,"mod",!1).mod},V.prototype.umod=function F(U){return this.divmod(U,"mod",!0).mod},V.prototype.divRound=function F(U){var Z=this.divmod(U);if(Z.mod.isZero())return Z.div;var Q=Z.div.negative!==0?Z.mod.isub(U):Z.mod,I=U.ushrn(1),$=U.andln(1),K=Q.cmp(I);if(K<0||$===1&&K===0)return Z.div;return Z.div.negative!==0?Z.div.isubn(1):Z.div.iaddn(1)},V.prototype.modn=function F(U){H(U<=67108863);var Z=67108864%U,Q=0;for(var I=this.length-1;I>=0;I--)Q=(Z*Q+(this.words[I]|0))%U;return Q},V.prototype.idivn=function F(U){H(U<=67108863);var Z=0;for(var Q=this.length-1;Q>=0;Q--){var I=(this.words[Q]|0)+Z*67108864;this.words[Q]=I/U|0,Z=I%U}return this.strip()},V.prototype.divn=function F(U){return this.clone().idivn(U)},V.prototype.egcd=function F(U){H(U.negative===0),H(!U.isZero());var Z=this,Q=U.clone();if(Z.negative!==0)Z=Z.umod(U);else Z=Z.clone();var I=new V(1),$=new V(0),K=new V(0),J=new V(1),Y=0;while(Z.isEven()&&Q.isEven())Z.iushrn(1),Q.iushrn(1),++Y;var X=Q.clone(),O=Z.clone();while(!Z.isZero()){for(var v=0,T=1;(Z.words[0]&T)===0&&v<26;++v,T<<=1);if(v>0){Z.iushrn(v);while(v-- >0){if(I.isOdd()||$.isOdd())I.iadd(X),$.isub(O);I.iushrn(1),$.iushrn(1)}}for(var B=0,c=1;(Q.words[0]&c)===0&&B<26;++B,c<<=1);if(B>0){Q.iushrn(B);while(B-- >0){if(K.isOdd()||J.isOdd())K.iadd(X),J.isub(O);K.iushrn(1),J.iushrn(1)}}if(Z.cmp(Q)>=0)Z.isub(Q),I.isub(K),$.isub(J);else Q.isub(Z),K.isub(I),J.isub($)}return{a:K,b:J,gcd:Q.iushln(Y)}},V.prototype._invmp=function F(U){H(U.negative===0),H(!U.isZero());var Z=this,Q=U.clone();if(Z.negative!==0)Z=Z.umod(U);else Z=Z.clone();var I=new V(1),$=new V(0),K=Q.clone();while(Z.cmpn(1)>0&&Q.cmpn(1)>0){for(var J=0,Y=1;(Z.words[0]&Y)===0&&J<26;++J,Y<<=1);if(J>0){Z.iushrn(J);while(J-- >0){if(I.isOdd())I.iadd(K);I.iushrn(1)}}for(var X=0,O=1;(Q.words[0]&O)===0&&X<26;++X,O<<=1);if(X>0){Q.iushrn(X);while(X-- >0){if($.isOdd())$.iadd(K);$.iushrn(1)}}if(Z.cmp(Q)>=0)Z.isub(Q),I.isub($);else Q.isub(Z),$.isub(I)}var v;if(Z.cmpn(1)===0)v=I;else v=$;if(v.cmpn(0)<0)v.iadd(U);return v},V.prototype.gcd=function F(U){if(this.isZero())return U.abs();if(U.isZero())return this.abs();var Z=this.clone(),Q=U.clone();Z.negative=0,Q.negative=0;for(var I=0;Z.isEven()&&Q.isEven();I++)Z.iushrn(1),Q.iushrn(1);do{while(Z.isEven())Z.iushrn(1);while(Q.isEven())Q.iushrn(1);var $=Z.cmp(Q);if($<0){var K=Z;Z=Q,Q=K}else if($===0||Q.cmpn(1)===0)break;Z.isub(Q)}while(!0);return Q.iushln(I)},V.prototype.invm=function F(U){return this.egcd(U).a.umod(U)},V.prototype.isEven=function F(){return(this.words[0]&1)===0},V.prototype.isOdd=function F(){return(this.words[0]&1)===1},V.prototype.andln=function F(U){return this.words[0]&U},V.prototype.bincn=function F(U){H(typeof U==="number");var Z=U%26,Q=(U-Z)/26,I=1<<Z;if(this.length<=Q)return this._expand(Q+1),this.words[Q]|=I,this;var $=I;for(var K=Q;$!==0&&K<this.length;K++){var J=this.words[K]|0;J+=$,$=J>>>26,J&=67108863,this.words[K]=J}if($!==0)this.words[K]=$,this.length++;return this},V.prototype.isZero=function F(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function F(U){var Z=U<0;if(this.negative!==0&&!Z)return-1;if(this.negative===0&&Z)return 1;this.strip();var Q;if(this.length>1)Q=1;else{if(Z)U=-U;H(U<=67108863,"Number is too big");var I=this.words[0]|0;Q=I===U?0:I<U?-1:1}if(this.negative!==0)return-Q|0;return Q},V.prototype.cmp=function F(U){if(this.negative!==0&&U.negative===0)return-1;if(this.negative===0&&U.negative!==0)return 1;var Z=this.ucmp(U);if(this.negative!==0)return-Z|0;return Z},V.prototype.ucmp=function F(U){if(this.length>U.length)return 1;if(this.length<U.length)return-1;var Z=0;for(var Q=this.length-1;Q>=0;Q--){var I=this.words[Q]|0,$=U.words[Q]|0;if(I===$)continue;if(I<$)Z=-1;else if(I>$)Z=1;break}return Z},V.prototype.gtn=function F(U){return this.cmpn(U)===1},V.prototype.gt=function F(U){return this.cmp(U)===1},V.prototype.gten=function F(U){return this.cmpn(U)>=0},V.prototype.gte=function F(U){return this.cmp(U)>=0},V.prototype.ltn=function F(U){return this.cmpn(U)===-1},V.prototype.lt=function F(U){return this.cmp(U)===-1},V.prototype.lten=function F(U){return this.cmpn(U)<=0},V.prototype.lte=function F(U){return this.cmp(U)<=0},V.prototype.eqn=function F(U){return this.cmpn(U)===0},V.prototype.eq=function F(U){return this.cmp(U)===0},V.red=function F(U){return new u(U)},V.prototype.toRed=function F(U){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),U.convertTo(this)._forceRed(U)},V.prototype.fromRed=function F(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function F(U){return this.red=U,this},V.prototype.forceRed=function F(U){return H(!this.red,"Already a number in reduction context"),this._forceRed(U)},V.prototype.redAdd=function F(U){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,U)},V.prototype.redIAdd=function F(U){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,U)},V.prototype.redSub=function F(U){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,U)},V.prototype.redISub=function F(U){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,U)},V.prototype.redShl=function F(U){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,U)},V.prototype.redMul=function F(U){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.mul(this,U)},V.prototype.redIMul=function F(U){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,U),this.red.imul(this,U)},V.prototype.redSqr=function F(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function F(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function F(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function F(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function F(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function F(U){return H(this.red&&!U.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,U)};var y={k256:null,p224:null,p192:null,p25519:null};function f(F,U){this.name=F,this.p=new V(U,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}f.prototype._tmp=function F(){var U=new V(null);return U.words=new Array(Math.ceil(this.n/13)),U},f.prototype.ireduce=function F(U){var Z=U,Q;do this.split(Z,this.tmp),Z=this.imulK(Z),Z=Z.iadd(this.tmp),Q=Z.bitLength();while(Q>this.n);var I=Q<this.n?-1:Z.ucmp(this.p);if(I===0)Z.words[0]=0,Z.length=1;else if(I>0)Z.isub(this.p);else if(Z.strip!==void 0)Z.strip();else Z._strip();return Z},f.prototype.split=function F(U,Z){U.iushrn(this.n,0,Z)},f.prototype.imulK=function F(U){return U.imul(this.k)};function o(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(o,f),o.prototype.split=function F(U,Z){var Q=4194303,I=Math.min(U.length,9);for(var $=0;$<I;$++)Z.words[$]=U.words[$];if(Z.length=I,U.length<=9){U.words[0]=0,U.length=1;return}var K=U.words[9];Z.words[Z.length++]=K&Q;for($=10;$<U.length;$++){var J=U.words[$]|0;U.words[$-10]=(J&Q)<<4|K>>>22,K=J}if(K>>>=22,U.words[$-10]=K,K===0&&U.length>10)U.length-=10;else U.length-=9},o.prototype.imulK=function F(U){U.words[U.length]=0,U.words[U.length+1]=0,U.length+=2;var Z=0;for(var Q=0;Q<U.length;Q++){var I=U.words[Q]|0;Z+=I*977,U.words[Q]=Z&67108863,Z=I*64+(Z/67108864|0)}if(U.words[U.length-1]===0){if(U.length--,U.words[U.length-1]===0)U.length--}return U};function r(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}z(r,f);function V0(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}z(V0,f);function Y0(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}z(Y0,f),Y0.prototype.imulK=function F(U){var Z=0;for(var Q=0;Q<U.length;Q++){var I=(U.words[Q]|0)*19+Z,$=I&67108863;I>>>=26,U.words[Q]=$,Z=I}if(Z!==0)U.words[U.length++]=Z;return U},V._prime=function F(U){if(y[U])return y[U];var Z;if(U==="k256")Z=new o;else if(U==="p224")Z=new r;else if(U==="p192")Z=new V0;else if(U==="p25519")Z=new Y0;else throw new Error("Unknown prime "+U);return y[U]=Z,Z};function u(F){if(typeof F==="string"){var U=V._prime(F);this.m=U.p,this.prime=U}else H(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}u.prototype._verify1=function F(U){H(U.negative===0,"red works only with positives"),H(U.red,"red works only with red numbers")},u.prototype._verify2=function F(U,Z){H((U.negative|Z.negative)===0,"red works only with positives"),H(U.red&&U.red===Z.red,"red works only with red numbers")},u.prototype.imod=function F(U){if(this.prime)return this.prime.ireduce(U)._forceRed(this);return U.umod(this.m)._forceRed(this)},u.prototype.neg=function F(U){if(U.isZero())return U.clone();return this.m.sub(U)._forceRed(this)},u.prototype.add=function F(U,Z){this._verify2(U,Z);var Q=U.add(Z);if(Q.cmp(this.m)>=0)Q.isub(this.m);return Q._forceRed(this)},u.prototype.iadd=function F(U,Z){this._verify2(U,Z);var Q=U.iadd(Z);if(Q.cmp(this.m)>=0)Q.isub(this.m);return Q},u.prototype.sub=function F(U,Z){this._verify2(U,Z);var Q=U.sub(Z);if(Q.cmpn(0)<0)Q.iadd(this.m);return Q._forceRed(this)},u.prototype.isub=function F(U,Z){this._verify2(U,Z);var Q=U.isub(Z);if(Q.cmpn(0)<0)Q.iadd(this.m);return Q},u.prototype.shl=function F(U,Z){return this._verify1(U),this.imod(U.ushln(Z))},u.prototype.imul=function F(U,Z){return this._verify2(U,Z),this.imod(U.imul(Z))},u.prototype.mul=function F(U,Z){return this._verify2(U,Z),this.imod(U.mul(Z))},u.prototype.isqr=function F(U){return this.imul(U,U.clone())},u.prototype.sqr=function F(U){return this.mul(U,U)},u.prototype.sqrt=function F(U){if(U.isZero())return U.clone();var Z=this.m.andln(3);if(H(Z%2===1),Z===3){var Q=this.m.add(new V(1)).iushrn(2);return this.pow(U,Q)}var I=this.m.subn(1),$=0;while(!I.isZero()&&I.andln(1)===0)$++,I.iushrn(1);H(!I.isZero());var K=new V(1).toRed(this),J=K.redNeg(),Y=this.m.subn(1).iushrn(1),X=this.m.bitLength();X=new V(2*X*X).toRed(this);while(this.pow(X,Y).cmp(J)!==0)X.redIAdd(J);var O=this.pow(X,I),v=this.pow(U,I.addn(1).iushrn(1)),T=this.pow(U,I),B=$;while(T.cmp(K)!==0){var c=T;for(var l=0;c.cmp(K)!==0;l++)c=c.redSqr();H(l<B);var s=this.pow(O,new V(1).iushln(B-l-1));v=v.redMul(s),O=s.redSqr(),T=T.redMul(O),B=l}return v},u.prototype.invm=function F(U){var Z=U._invmp(this.m);if(Z.negative!==0)return Z.negative=0,this.imod(Z).redNeg();else return this.imod(Z)},u.prototype.pow=function F(U,Z){if(Z.isZero())return new V(1).toRed(this);if(Z.cmpn(1)===0)return U.clone();var Q=4,I=new Array(1<<Q);I[0]=new V(1).toRed(this),I[1]=U;for(var $=2;$<I.length;$++)I[$]=this.mul(I[$-1],U);var K=I[0],J=0,Y=0,X=Z.bitLength()%26;if(X===0)X=26;for($=Z.length-1;$>=0;$--){var O=Z.words[$];for(var v=X-1;v>=0;v--){var T=O>>v&1;if(K!==I[0])K=this.sqr(K);if(T===0&&J===0){Y=0;continue}if(J<<=1,J|=T,Y++,Y!==Q&&($!==0||v!==0))continue;K=this.mul(K,I[J]),Y=0,J=0}X=26}return K},u.prototype.convertTo=function F(U){var Z=U.umod(this.m);return Z===U?Z.clone():Z},u.prototype.convertFrom=function F(U){var Z=U.clone();return Z.red=null,Z},V.mont=function F(U){return new a(U)};function a(F){if(u.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}z(a,u),a.prototype.convertTo=function F(U){return this.imod(U.ushln(this.shift))},a.prototype.convertFrom=function F(U){var Z=this.imod(U.mul(this.rinv));return Z.red=null,Z},a.prototype.imul=function F(U,Z){if(U.isZero()||Z.isZero())return U.words[0]=0,U.length=1,U;var Q=U.imul(Z),I=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=Q.isub(I).iushrn(this.shift),K=$;if($.cmp(this.m)>=0)K=$.isub(this.m);else if($.cmpn(0)<0)K=$.iadd(this.m);return K._forceRed(this)},a.prototype.mul=function F(U,Z){if(U.isZero()||Z.isZero())return new V(0)._forceRed(this);var Q=U.mul(Z),I=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=Q.isub(I).iushrn(this.shift),K=$;if($.cmp(this.m)>=0)K=$.isub(this.m);else if($.cmpn(0)<0)K=$.iadd(this.m);return K._forceRed(this)},a.prototype.invm=function F(U){var Z=this.imod(U._invmp(this.m).mul(this.r2));return Z._forceRed(this)}})(typeof G==="undefined"||G,E)}),wZ=w0((E,G)=>{var W=AI(),C=PU().Buffer;function H(z,V){return C.from(z.toRed(W.mont(V.modulus)).redPow(new W(V.publicExponent)).fromRed().toArray())}G.exports=H}),QV=w0((E,G)=>{(function(W,C){function H(Q,I){if(!Q)throw new Error(I||"Assertion failed")}function z(Q,I){Q.super_=I;var $=function(){};$.prototype=I.prototype,Q.prototype=new $,Q.prototype.constructor=Q}function V(Q,I,$){if(V.isBN(Q))return Q;if(this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null){if(I==="le"||I==="be")$=I,I=10;this._init(Q||0,I||10,$||"be")}}if(typeof W==="object")W.exports=V;else C.BN=V;V.BN=V,V.wordSize=26;var P;try{if(typeof window!=="undefined"&&typeof window.Buffer!=="undefined")P=window.Buffer;else P=(HU(),y0(FU)).Buffer}catch(Q){}V.isBN=function Q(I){if(I instanceof V)return!0;return I!==null&&typeof I==="object"&&I.constructor.wordSize===V.wordSize&&Array.isArray(I.words)},V.max=function Q(I,$){if(I.cmp($)>0)return I;return $},V.min=function Q(I,$){if(I.cmp($)<0)return I;return $},V.prototype._init=function Q(I,$,K){if(typeof I==="number")return this._initNumber(I,$,K);if(typeof I==="object")return this._initArray(I,$,K);if($==="hex")$=16;H($===($|0)&&$>=2&&$<=36),I=I.toString().replace(/\s+/g,"");var J=0;if(I[0]==="-")J++,this.negative=1;if(J<I.length){if($===16)this._parseHex(I,J,K);else if(this._parseBase(I,$,J),K==="le")this._initArray(this.toArray(),$,K)}},V.prototype._initNumber=function Q(I,$,K){if(I<0)this.negative=1,I=-I;if(I<67108864)this.words=[I&67108863],this.length=1;else if(I<4503599627370496)this.words=[I&67108863,I/67108864&67108863],this.length=2;else H(I<9007199254740992),this.words=[I&67108863,I/67108864&67108863,1],this.length=3;if(K!=="le")return;this._initArray(this.toArray(),$,K)},V.prototype._initArray=function Q(I,$,K){if(H(typeof I.length==="number"),I.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(I.length/3),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var Y,X,O=0;if(K==="be"){for(J=I.length-1,Y=0;J>=0;J-=3)if(X=I[J]|I[J-1]<<8|I[J-2]<<16,this.words[Y]|=X<<O&67108863,this.words[Y+1]=X>>>26-O&67108863,O+=24,O>=26)O-=26,Y++}else if(K==="le"){for(J=0,Y=0;J<I.length;J+=3)if(X=I[J]|I[J+1]<<8|I[J+2]<<16,this.words[Y]|=X<<O&67108863,this.words[Y+1]=X>>>26-O&67108863,O+=24,O>=26)O-=26,Y++}return this._strip()};function k(Q,I){var $=Q.charCodeAt(I);if($>=48&&$<=57)return $-48;else if($>=65&&$<=70)return $-55;else if($>=97&&$<=102)return $-87;else H(!1,"Invalid character in "+Q)}function R(Q,I,$){var K=k(Q,$);if($-1>=I)K|=k(Q,$-1)<<4;return K}V.prototype._parseHex=function Q(I,$,K){this.length=Math.ceil((I.length-$)/6),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var Y=0,X=0,O;if(K==="be")for(J=I.length-1;J>=$;J-=2)if(O=R(I,$,J)<<Y,this.words[X]|=O&67108863,Y>=18)Y-=18,X+=1,this.words[X]|=O>>>26;else Y+=8;else{var v=I.length-$;for(J=v%2===0?$+1:$;J<I.length;J+=2)if(O=R(I,$,J)<<Y,this.words[X]|=O&67108863,Y>=18)Y-=18,X+=1,this.words[X]|=O>>>26;else Y+=8}this._strip()};function S(Q,I,$,K){var J=0,Y=0,X=Math.min(Q.length,$);for(var O=I;O<X;O++){var v=Q.charCodeAt(O)-48;if(J*=K,v>=49)Y=v-49+10;else if(v>=17)Y=v-17+10;else Y=v;H(v>=0&&Y<K,"Invalid character"),J+=Y}return J}V.prototype._parseBase=function Q(I,$,K){this.words=[0],this.length=1;for(var J=0,Y=1;Y<=67108863;Y*=$)J++;J--,Y=Y/$|0;var X=I.length-K,O=X%J,v=Math.min(X,X-O)+K,T=0;for(var B=K;B<v;B+=J)if(T=S(I,B,B+J,$),this.imuln(Y),this.words[0]+T<67108864)this.words[0]+=T;else this._iaddn(T);if(O!==0){var c=1;T=S(I,B,I.length,$);for(B=0;B<O;B++)c*=$;if(this.imuln(c),this.words[0]+T<67108864)this.words[0]+=T;else this._iaddn(T)}this._strip()},V.prototype.copy=function Q(I){I.words=new Array(this.length);for(var $=0;$<this.length;$++)I.words[$]=this.words[$];I.length=this.length,I.negative=this.negative,I.red=this.red};function D(Q,I){Q.words=I.words,Q.length=I.length,Q.negative=I.negative,Q.red=I.red}if(V.prototype._move=function Q(I){D(I,this)},V.prototype.clone=function Q(){var I=new V(null);return this.copy(I),I},V.prototype._expand=function Q(I){while(this.length<I)this.words[this.length++]=0;return this},V.prototype._strip=function Q(){while(this.length>1&&this.words[this.length-1]===0)this.length--;return this._normSign()},V.prototype._normSign=function Q(){if(this.length===1&&this.words[0]===0)this.negative=0;return this},typeof Symbol!=="undefined"&&typeof Symbol.for==="function")try{V.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch(Q){V.prototype.inspect=A}else V.prototype.inspect=A;function A(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var L=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],M=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],q=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64000000,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,24300000,28629151,33554432,39135393,45435424,52521875,60466176];if(V.prototype.toString=function Q(I,$){I=I||10,$=$|0||1;var K;if(I===16||I==="hex"){K="";var J=0,Y=0;for(var X=0;X<this.length;X++){var O=this.words[X],v=((O<<J|Y)&16777215).toString(16);if(Y=O>>>24-J&16777215,J+=2,J>=26)J-=26,X--;if(Y!==0||X!==this.length-1)K=L[6-v.length]+v+K;else K=v+K}if(Y!==0)K=Y.toString(16)+K;while(K.length%$!==0)K="0"+K;if(this.negative!==0)K="-"+K;return K}if(I===(I|0)&&I>=2&&I<=36){var T=M[I],B=q[I];K="";var c=this.clone();c.negative=0;while(!c.isZero()){var l=c.modrn(B).toString(I);if(c=c.idivn(B),!c.isZero())K=L[T-l.length]+l+K;else K=l+K}if(this.isZero())K="0"+K;while(K.length%$!==0)K="0"+K;if(this.negative!==0)K="-"+K;return K}H(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function Q(){var I=this.words[0];if(this.length===2)I+=this.words[1]*67108864;else if(this.length===3&&this.words[2]===1)I+=4503599627370496+this.words[1]*67108864;else if(this.length>2)H(!1,"Number can only safely store up to 53 bits");return this.negative!==0?-I:I},V.prototype.toJSON=function Q(){return this.toString(16,2)},P)V.prototype.toBuffer=function Q(I,$){return this.toArrayLike(P,I,$)};V.prototype.toArray=function Q(I,$){return this.toArrayLike(Array,I,$)};var j=function Q(I,$){if(I.allocUnsafe)return I.allocUnsafe($);return new I($)};if(V.prototype.toArrayLike=function Q(I,$,K){this._strip();var J=this.byteLength(),Y=K||Math.max(1,J);H(J<=Y,"byte array longer than desired length"),H(Y>0,"Requested array length <= 0");var X=j(I,Y),O=$==="le"?"LE":"BE";return this["_toArrayLike"+O](X,J),X},V.prototype._toArrayLikeLE=function Q(I,$){var K=0,J=0;for(var Y=0,X=0;Y<this.length;Y++){var O=this.words[Y]<<X|J;if(I[K++]=O&255,K<I.length)I[K++]=O>>8&255;if(K<I.length)I[K++]=O>>16&255;if(X===6){if(K<I.length)I[K++]=O>>24&255;J=0,X=0}else J=O>>>24,X+=2}if(K<I.length){I[K++]=J;while(K<I.length)I[K++]=0}},V.prototype._toArrayLikeBE=function Q(I,$){var K=I.length-1,J=0;for(var Y=0,X=0;Y<this.length;Y++){var O=this.words[Y]<<X|J;if(I[K--]=O&255,K>=0)I[K--]=O>>8&255;if(K>=0)I[K--]=O>>16&255;if(X===6){if(K>=0)I[K--]=O>>24&255;J=0,X=0}else J=O>>>24,X+=2}if(K>=0){I[K--]=J;while(K>=0)I[K--]=0}},Math.clz32)V.prototype._countBits=function Q(I){return 32-Math.clz32(I)};else V.prototype._countBits=function Q(I){var $=I,K=0;if($>=4096)K+=13,$>>>=13;if($>=64)K+=7,$>>>=7;if($>=8)K+=4,$>>>=4;if($>=2)K+=2,$>>>=2;return K+$};V.prototype._zeroBits=function Q(I){if(I===0)return 26;var $=I,K=0;if(($&8191)===0)K+=13,$>>>=13;if(($&127)===0)K+=7,$>>>=7;if(($&15)===0)K+=4,$>>>=4;if(($&3)===0)K+=2,$>>>=2;if(($&1)===0)K++;return K},V.prototype.bitLength=function Q(){var I=this.words[this.length-1],$=this._countBits(I);return(this.length-1)*26+$};function x(Q){var I=new Array(Q.bitLength());for(var $=0;$<I.length;$++){var K=$/26|0,J=$%26;I[$]=Q.words[K]>>>J&1}return I}V.prototype.zeroBits=function Q(){if(this.isZero())return 0;var I=0;for(var $=0;$<this.length;$++){var K=this._zeroBits(this.words[$]);if(I+=K,K!==26)break}return I},V.prototype.byteLength=function Q(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function Q(I){if(this.negative!==0)return this.abs().inotn(I).iaddn(1);return this.clone()},V.prototype.fromTwos=function Q(I){if(this.testn(I-1))return this.notn(I).iaddn(1).ineg();return this.clone()},V.prototype.isNeg=function Q(){return this.negative!==0},V.prototype.neg=function Q(){return this.clone().ineg()},V.prototype.ineg=function Q(){if(!this.isZero())this.negative^=1;return this},V.prototype.iuor=function Q(I){while(this.length<I.length)this.words[this.length++]=0;for(var $=0;$<I.length;$++)this.words[$]=this.words[$]|I.words[$];return this._strip()},V.prototype.ior=function Q(I){return H((this.negative|I.negative)===0),this.iuor(I)},V.prototype.or=function Q(I){if(this.length>I.length)return this.clone().ior(I);return I.clone().ior(this)},V.prototype.uor=function Q(I){if(this.length>I.length)return this.clone().iuor(I);return I.clone().iuor(this)},V.prototype.iuand=function Q(I){var $;if(this.length>I.length)$=I;else $=this;for(var K=0;K<$.length;K++)this.words[K]=this.words[K]&I.words[K];return this.length=$.length,this._strip()},V.prototype.iand=function Q(I){return H((this.negative|I.negative)===0),this.iuand(I)},V.prototype.and=function Q(I){if(this.length>I.length)return this.clone().iand(I);return I.clone().iand(this)},V.prototype.uand=function Q(I){if(this.length>I.length)return this.clone().iuand(I);return I.clone().iuand(this)},V.prototype.iuxor=function Q(I){var $,K;if(this.length>I.length)$=this,K=I;else $=I,K=this;for(var J=0;J<K.length;J++)this.words[J]=$.words[J]^K.words[J];if(this!==$)for(;J<$.length;J++)this.words[J]=$.words[J];return this.length=$.length,this._strip()},V.prototype.ixor=function Q(I){return H((this.negative|I.negative)===0),this.iuxor(I)},V.prototype.xor=function Q(I){if(this.length>I.length)return this.clone().ixor(I);return I.clone().ixor(this)},V.prototype.uxor=function Q(I){if(this.length>I.length)return this.clone().iuxor(I);return I.clone().iuxor(this)},V.prototype.inotn=function Q(I){H(typeof I==="number"&&I>=0);var $=Math.ceil(I/26)|0,K=I%26;if(this._expand($),K>0)$--;for(var J=0;J<$;J++)this.words[J]=~this.words[J]&67108863;if(K>0)this.words[J]=~this.words[J]&67108863>>26-K;return this._strip()},V.prototype.notn=function Q(I){return this.clone().inotn(I)},V.prototype.setn=function Q(I,$){H(typeof I==="number"&&I>=0);var K=I/26|0,J=I%26;if(this._expand(K+1),$)this.words[K]=this.words[K]|1<<J;else this.words[K]=this.words[K]&~(1<<J);return this._strip()},V.prototype.iadd=function Q(I){var $;if(this.negative!==0&&I.negative===0)return this.negative=0,$=this.isub(I),this.negative^=1,this._normSign();else if(this.negative===0&&I.negative!==0)return I.negative=0,$=this.isub(I),I.negative=1,$._normSign();var K,J;if(this.length>I.length)K=this,J=I;else K=I,J=this;var Y=0;for(var X=0;X<J.length;X++)$=(K.words[X]|0)+(J.words[X]|0)+Y,this.words[X]=$&67108863,Y=$>>>26;for(;Y!==0&&X<K.length;X++)$=(K.words[X]|0)+Y,this.words[X]=$&67108863,Y=$>>>26;if(this.length=K.length,Y!==0)this.words[this.length]=Y,this.length++;else if(K!==this)for(;X<K.length;X++)this.words[X]=K.words[X];return this},V.prototype.add=function Q(I){var $;if(I.negative!==0&&this.negative===0)return I.negative=0,$=this.sub(I),I.negative^=1,$;else if(I.negative===0&&this.negative!==0)return this.negative=0,$=I.sub(this),this.negative=1,$;if(this.length>I.length)return this.clone().iadd(I);return I.clone().iadd(this)},V.prototype.isub=function Q(I){if(I.negative!==0){I.negative=0;var $=this.iadd(I);return I.negative=1,$._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(I),this.negative=1,this._normSign();var K=this.cmp(I);if(K===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,Y;if(K>0)J=this,Y=I;else J=I,Y=this;var X=0;for(var O=0;O<Y.length;O++)$=(J.words[O]|0)-(Y.words[O]|0)+X,X=$>>26,this.words[O]=$&67108863;for(;X!==0&&O<J.length;O++)$=(J.words[O]|0)+X,X=$>>26,this.words[O]=$&67108863;if(X===0&&O<J.length&&J!==this)for(;O<J.length;O++)this.words[O]=J.words[O];if(this.length=Math.max(this.length,O),J!==this)this.negative=1;return this._strip()},V.prototype.sub=function Q(I){return this.clone().isub(I)};function g(Q,I,$){$.negative=I.negative^Q.negative;var K=Q.length+I.length|0;$.length=K,K=K-1|0;var J=Q.words[0]|0,Y=I.words[0]|0,X=J*Y,O=X&67108863,v=X/67108864|0;$.words[0]=O;for(var T=1;T<K;T++){var B=v>>>26,c=v&67108863,l=Math.min(T,I.length-1);for(var s=Math.max(0,T-Q.length+1);s<=l;s++){var O0=T-s|0;J=Q.words[O0]|0,Y=I.words[s]|0,X=J*Y+c,B+=X/67108864|0,c=X&67108863}$.words[T]=c|0,v=B|0}if(v!==0)$.words[T]=v|0;else $.length--;return $._strip()}var N=function Q(I,$,K){var J=I.words,Y=$.words,X=K.words,O=0,v,T,B,c=J[0]|0,l=c&8191,s=c>>>13,O0=J[1]|0,h=O0&8191,d=O0>>>13,g0=J[2]|0,Q0=g0&8191,$0=g0>>>13,m=J[3]|0,p=m&8191,b=m>>>13,N0=J[4]|0,i=N0&8191,e=N0>>>13,t=J[5]|0,n=t&8191,X0=t>>>13,H0=J[6]|0,Z0=H0&8191,W0=H0>>>13,c0=J[7]|0,G0=c0&8191,A0=c0>>>13,u0=J[8]|0,J0=u0&8191,T0=u0>>>13,r0=J[9]|0,E0=r0&8191,v0=r0>>>13,AU=Y[0]|0,k0=AU&8191,j0=AU>>>13,DU=Y[1]|0,R0=DU&8191,S0=DU>>>13,LU=Y[2]|0,P0=LU&8191,D0=LU>>>13,zU=Y[3]|0,B0=zU&8191,L0=zU>>>13,EU=Y[4]|0,_=EU&8191,w=EU>>>13,_0=Y[5]|0,U0=_0&8191,I0=_0>>>13,l0=Y[6]|0,F0=l0&8191,C0=l0>>>13,CU=Y[7]|0,x0=CU&8191,q0=CU>>>13,TU=Y[8]|0,z0=TU&8191,M0=TU>>>13,t0=Y[9]|0,p0=t0&8191,f0=t0>>>13;K.negative=I.negative^$.negative,K.length=19,v=Math.imul(l,k0),T=Math.imul(l,j0),T=T+Math.imul(s,k0)|0,B=Math.imul(s,j0);var b0=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(b0>>>26)|0,b0&=67108863,v=Math.imul(h,k0),T=Math.imul(h,j0),T=T+Math.imul(d,k0)|0,B=Math.imul(d,j0),v=v+Math.imul(l,R0)|0,T=T+Math.imul(l,S0)|0,T=T+Math.imul(s,R0)|0,B=B+Math.imul(s,S0)|0;var a0=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(a0>>>26)|0,a0&=67108863,v=Math.imul(Q0,k0),T=Math.imul(Q0,j0),T=T+Math.imul($0,k0)|0,B=Math.imul($0,j0),v=v+Math.imul(h,R0)|0,T=T+Math.imul(h,S0)|0,T=T+Math.imul(d,R0)|0,B=B+Math.imul(d,S0)|0,v=v+Math.imul(l,P0)|0,T=T+Math.imul(l,D0)|0,T=T+Math.imul(s,P0)|0,B=B+Math.imul(s,D0)|0;var e0=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(e0>>>26)|0,e0&=67108863,v=Math.imul(p,k0),T=Math.imul(p,j0),T=T+Math.imul(b,k0)|0,B=Math.imul(b,j0),v=v+Math.imul(Q0,R0)|0,T=T+Math.imul(Q0,S0)|0,T=T+Math.imul($0,R0)|0,B=B+Math.imul($0,S0)|0,v=v+Math.imul(h,P0)|0,T=T+Math.imul(h,D0)|0,T=T+Math.imul(d,P0)|0,B=B+Math.imul(d,D0)|0,v=v+Math.imul(l,B0)|0,T=T+Math.imul(l,L0)|0,T=T+Math.imul(s,B0)|0,B=B+Math.imul(s,L0)|0;var i0=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(i0>>>26)|0,i0&=67108863,v=Math.imul(i,k0),T=Math.imul(i,j0),T=T+Math.imul(e,k0)|0,B=Math.imul(e,j0),v=v+Math.imul(p,R0)|0,T=T+Math.imul(p,S0)|0,T=T+Math.imul(b,R0)|0,B=B+Math.imul(b,S0)|0,v=v+Math.imul(Q0,P0)|0,T=T+Math.imul(Q0,D0)|0,T=T+Math.imul($0,P0)|0,B=B+Math.imul($0,D0)|0,v=v+Math.imul(h,B0)|0,T=T+Math.imul(h,L0)|0,T=T+Math.imul(d,B0)|0,B=B+Math.imul(d,L0)|0,v=v+Math.imul(l,_)|0,T=T+Math.imul(l,w)|0,T=T+Math.imul(s,_)|0,B=B+Math.imul(s,w)|0;var UU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(UU>>>26)|0,UU&=67108863,v=Math.imul(n,k0),T=Math.imul(n,j0),T=T+Math.imul(X0,k0)|0,B=Math.imul(X0,j0),v=v+Math.imul(i,R0)|0,T=T+Math.imul(i,S0)|0,T=T+Math.imul(e,R0)|0,B=B+Math.imul(e,S0)|0,v=v+Math.imul(p,P0)|0,T=T+Math.imul(p,D0)|0,T=T+Math.imul(b,P0)|0,B=B+Math.imul(b,D0)|0,v=v+Math.imul(Q0,B0)|0,T=T+Math.imul(Q0,L0)|0,T=T+Math.imul($0,B0)|0,B=B+Math.imul($0,L0)|0,v=v+Math.imul(h,_)|0,T=T+Math.imul(h,w)|0,T=T+Math.imul(d,_)|0,B=B+Math.imul(d,w)|0,v=v+Math.imul(l,U0)|0,T=T+Math.imul(l,I0)|0,T=T+Math.imul(s,U0)|0,B=B+Math.imul(s,I0)|0;var XU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(XU>>>26)|0,XU&=67108863,v=Math.imul(Z0,k0),T=Math.imul(Z0,j0),T=T+Math.imul(W0,k0)|0,B=Math.imul(W0,j0),v=v+Math.imul(n,R0)|0,T=T+Math.imul(n,S0)|0,T=T+Math.imul(X0,R0)|0,B=B+Math.imul(X0,S0)|0,v=v+Math.imul(i,P0)|0,T=T+Math.imul(i,D0)|0,T=T+Math.imul(e,P0)|0,B=B+Math.imul(e,D0)|0,v=v+Math.imul(p,B0)|0,T=T+Math.imul(p,L0)|0,T=T+Math.imul(b,B0)|0,B=B+Math.imul(b,L0)|0,v=v+Math.imul(Q0,_)|0,T=T+Math.imul(Q0,w)|0,T=T+Math.imul($0,_)|0,B=B+Math.imul($0,w)|0,v=v+Math.imul(h,U0)|0,T=T+Math.imul(h,I0)|0,T=T+Math.imul(d,U0)|0,B=B+Math.imul(d,I0)|0,v=v+Math.imul(l,F0)|0,T=T+Math.imul(l,C0)|0,T=T+Math.imul(s,F0)|0,B=B+Math.imul(s,C0)|0;var IU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(IU>>>26)|0,IU&=67108863,v=Math.imul(G0,k0),T=Math.imul(G0,j0),T=T+Math.imul(A0,k0)|0,B=Math.imul(A0,j0),v=v+Math.imul(Z0,R0)|0,T=T+Math.imul(Z0,S0)|0,T=T+Math.imul(W0,R0)|0,B=B+Math.imul(W0,S0)|0,v=v+Math.imul(n,P0)|0,T=T+Math.imul(n,D0)|0,T=T+Math.imul(X0,P0)|0,B=B+Math.imul(X0,D0)|0,v=v+Math.imul(i,B0)|0,T=T+Math.imul(i,L0)|0,T=T+Math.imul(e,B0)|0,B=B+Math.imul(e,L0)|0,v=v+Math.imul(p,_)|0,T=T+Math.imul(p,w)|0,T=T+Math.imul(b,_)|0,B=B+Math.imul(b,w)|0,v=v+Math.imul(Q0,U0)|0,T=T+Math.imul(Q0,I0)|0,T=T+Math.imul($0,U0)|0,B=B+Math.imul($0,I0)|0,v=v+Math.imul(h,F0)|0,T=T+Math.imul(h,C0)|0,T=T+Math.imul(d,F0)|0,B=B+Math.imul(d,C0)|0,v=v+Math.imul(l,x0)|0,T=T+Math.imul(l,q0)|0,T=T+Math.imul(s,x0)|0,B=B+Math.imul(s,q0)|0;var ZU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(ZU>>>26)|0,ZU&=67108863,v=Math.imul(J0,k0),T=Math.imul(J0,j0),T=T+Math.imul(T0,k0)|0,B=Math.imul(T0,j0),v=v+Math.imul(G0,R0)|0,T=T+Math.imul(G0,S0)|0,T=T+Math.imul(A0,R0)|0,B=B+Math.imul(A0,S0)|0,v=v+Math.imul(Z0,P0)|0,T=T+Math.imul(Z0,D0)|0,T=T+Math.imul(W0,P0)|0,B=B+Math.imul(W0,D0)|0,v=v+Math.imul(n,B0)|0,T=T+Math.imul(n,L0)|0,T=T+Math.imul(X0,B0)|0,B=B+Math.imul(X0,L0)|0,v=v+Math.imul(i,_)|0,T=T+Math.imul(i,w)|0,T=T+Math.imul(e,_)|0,B=B+Math.imul(e,w)|0,v=v+Math.imul(p,U0)|0,T=T+Math.imul(p,I0)|0,T=T+Math.imul(b,U0)|0,B=B+Math.imul(b,I0)|0,v=v+Math.imul(Q0,F0)|0,T=T+Math.imul(Q0,C0)|0,T=T+Math.imul($0,F0)|0,B=B+Math.imul($0,C0)|0,v=v+Math.imul(h,x0)|0,T=T+Math.imul(h,q0)|0,T=T+Math.imul(d,x0)|0,B=B+Math.imul(d,q0)|0,v=v+Math.imul(l,z0)|0,T=T+Math.imul(l,M0)|0,T=T+Math.imul(s,z0)|0,B=B+Math.imul(s,M0)|0;var QU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(QU>>>26)|0,QU&=67108863,v=Math.imul(E0,k0),T=Math.imul(E0,j0),T=T+Math.imul(v0,k0)|0,B=Math.imul(v0,j0),v=v+Math.imul(J0,R0)|0,T=T+Math.imul(J0,S0)|0,T=T+Math.imul(T0,R0)|0,B=B+Math.imul(T0,S0)|0,v=v+Math.imul(G0,P0)|0,T=T+Math.imul(G0,D0)|0,T=T+Math.imul(A0,P0)|0,B=B+Math.imul(A0,D0)|0,v=v+Math.imul(Z0,B0)|0,T=T+Math.imul(Z0,L0)|0,T=T+Math.imul(W0,B0)|0,B=B+Math.imul(W0,L0)|0,v=v+Math.imul(n,_)|0,T=T+Math.imul(n,w)|0,T=T+Math.imul(X0,_)|0,B=B+Math.imul(X0,w)|0,v=v+Math.imul(i,U0)|0,T=T+Math.imul(i,I0)|0,T=T+Math.imul(e,U0)|0,B=B+Math.imul(e,I0)|0,v=v+Math.imul(p,F0)|0,T=T+Math.imul(p,C0)|0,T=T+Math.imul(b,F0)|0,B=B+Math.imul(b,C0)|0,v=v+Math.imul(Q0,x0)|0,T=T+Math.imul(Q0,q0)|0,T=T+Math.imul($0,x0)|0,B=B+Math.imul($0,q0)|0,v=v+Math.imul(h,z0)|0,T=T+Math.imul(h,M0)|0,T=T+Math.imul(d,z0)|0,B=B+Math.imul(d,M0)|0,v=v+Math.imul(l,p0)|0,T=T+Math.imul(l,f0)|0,T=T+Math.imul(s,p0)|0,B=B+Math.imul(s,f0)|0;var $U=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+($U>>>26)|0,$U&=67108863,v=Math.imul(E0,R0),T=Math.imul(E0,S0),T=T+Math.imul(v0,R0)|0,B=Math.imul(v0,S0),v=v+Math.imul(J0,P0)|0,T=T+Math.imul(J0,D0)|0,T=T+Math.imul(T0,P0)|0,B=B+Math.imul(T0,D0)|0,v=v+Math.imul(G0,B0)|0,T=T+Math.imul(G0,L0)|0,T=T+Math.imul(A0,B0)|0,B=B+Math.imul(A0,L0)|0,v=v+Math.imul(Z0,_)|0,T=T+Math.imul(Z0,w)|0,T=T+Math.imul(W0,_)|0,B=B+Math.imul(W0,w)|0,v=v+Math.imul(n,U0)|0,T=T+Math.imul(n,I0)|0,T=T+Math.imul(X0,U0)|0,B=B+Math.imul(X0,I0)|0,v=v+Math.imul(i,F0)|0,T=T+Math.imul(i,C0)|0,T=T+Math.imul(e,F0)|0,B=B+Math.imul(e,C0)|0,v=v+Math.imul(p,x0)|0,T=T+Math.imul(p,q0)|0,T=T+Math.imul(b,x0)|0,B=B+Math.imul(b,q0)|0,v=v+Math.imul(Q0,z0)|0,T=T+Math.imul(Q0,M0)|0,T=T+Math.imul($0,z0)|0,B=B+Math.imul($0,M0)|0,v=v+Math.imul(h,p0)|0,T=T+Math.imul(h,f0)|0,T=T+Math.imul(d,p0)|0,B=B+Math.imul(d,f0)|0;var YU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(YU>>>26)|0,YU&=67108863,v=Math.imul(E0,P0),T=Math.imul(E0,D0),T=T+Math.imul(v0,P0)|0,B=Math.imul(v0,D0),v=v+Math.imul(J0,B0)|0,T=T+Math.imul(J0,L0)|0,T=T+Math.imul(T0,B0)|0,B=B+Math.imul(T0,L0)|0,v=v+Math.imul(G0,_)|0,T=T+Math.imul(G0,w)|0,T=T+Math.imul(A0,_)|0,B=B+Math.imul(A0,w)|0,v=v+Math.imul(Z0,U0)|0,T=T+Math.imul(Z0,I0)|0,T=T+Math.imul(W0,U0)|0,B=B+Math.imul(W0,I0)|0,v=v+Math.imul(n,F0)|0,T=T+Math.imul(n,C0)|0,T=T+Math.imul(X0,F0)|0,B=B+Math.imul(X0,C0)|0,v=v+Math.imul(i,x0)|0,T=T+Math.imul(i,q0)|0,T=T+Math.imul(e,x0)|0,B=B+Math.imul(e,q0)|0,v=v+Math.imul(p,z0)|0,T=T+Math.imul(p,M0)|0,T=T+Math.imul(b,z0)|0,B=B+Math.imul(b,M0)|0,v=v+Math.imul(Q0,p0)|0,T=T+Math.imul(Q0,f0)|0,T=T+Math.imul($0,p0)|0,B=B+Math.imul($0,f0)|0;var VU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(VU>>>26)|0,VU&=67108863,v=Math.imul(E0,B0),T=Math.imul(E0,L0),T=T+Math.imul(v0,B0)|0,B=Math.imul(v0,L0),v=v+Math.imul(J0,_)|0,T=T+Math.imul(J0,w)|0,T=T+Math.imul(T0,_)|0,B=B+Math.imul(T0,w)|0,v=v+Math.imul(G0,U0)|0,T=T+Math.imul(G0,I0)|0,T=T+Math.imul(A0,U0)|0,B=B+Math.imul(A0,I0)|0,v=v+Math.imul(Z0,F0)|0,T=T+Math.imul(Z0,C0)|0,T=T+Math.imul(W0,F0)|0,B=B+Math.imul(W0,C0)|0,v=v+Math.imul(n,x0)|0,T=T+Math.imul(n,q0)|0,T=T+Math.imul(X0,x0)|0,B=B+Math.imul(X0,q0)|0,v=v+Math.imul(i,z0)|0,T=T+Math.imul(i,M0)|0,T=T+Math.imul(e,z0)|0,B=B+Math.imul(e,M0)|0,v=v+Math.imul(p,p0)|0,T=T+Math.imul(p,f0)|0,T=T+Math.imul(b,p0)|0,B=B+Math.imul(b,f0)|0;var OU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(OU>>>26)|0,OU&=67108863,v=Math.imul(E0,_),T=Math.imul(E0,w),T=T+Math.imul(v0,_)|0,B=Math.imul(v0,w),v=v+Math.imul(J0,U0)|0,T=T+Math.imul(J0,I0)|0,T=T+Math.imul(T0,U0)|0,B=B+Math.imul(T0,I0)|0,v=v+Math.imul(G0,F0)|0,T=T+Math.imul(G0,C0)|0,T=T+Math.imul(A0,F0)|0,B=B+Math.imul(A0,C0)|0,v=v+Math.imul(Z0,x0)|0,T=T+Math.imul(Z0,q0)|0,T=T+Math.imul(W0,x0)|0,B=B+Math.imul(W0,q0)|0,v=v+Math.imul(n,z0)|0,T=T+Math.imul(n,M0)|0,T=T+Math.imul(X0,z0)|0,B=B+Math.imul(X0,M0)|0,v=v+Math.imul(i,p0)|0,T=T+Math.imul(i,f0)|0,T=T+Math.imul(e,p0)|0,B=B+Math.imul(e,f0)|0;var GU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(GU>>>26)|0,GU&=67108863,v=Math.imul(E0,U0),T=Math.imul(E0,I0),T=T+Math.imul(v0,U0)|0,B=Math.imul(v0,I0),v=v+Math.imul(J0,F0)|0,T=T+Math.imul(J0,C0)|0,T=T+Math.imul(T0,F0)|0,B=B+Math.imul(T0,C0)|0,v=v+Math.imul(G0,x0)|0,T=T+Math.imul(G0,q0)|0,T=T+Math.imul(A0,x0)|0,B=B+Math.imul(A0,q0)|0,v=v+Math.imul(Z0,z0)|0,T=T+Math.imul(Z0,M0)|0,T=T+Math.imul(W0,z0)|0,B=B+Math.imul(W0,M0)|0,v=v+Math.imul(n,p0)|0,T=T+Math.imul(n,f0)|0,T=T+Math.imul(X0,p0)|0,B=B+Math.imul(X0,f0)|0;var KU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(KU>>>26)|0,KU&=67108863,v=Math.imul(E0,F0),T=Math.imul(E0,C0),T=T+Math.imul(v0,F0)|0,B=Math.imul(v0,C0),v=v+Math.imul(J0,x0)|0,T=T+Math.imul(J0,q0)|0,T=T+Math.imul(T0,x0)|0,B=B+Math.imul(T0,q0)|0,v=v+Math.imul(G0,z0)|0,T=T+Math.imul(G0,M0)|0,T=T+Math.imul(A0,z0)|0,B=B+Math.imul(A0,M0)|0,v=v+Math.imul(Z0,p0)|0,T=T+Math.imul(Z0,f0)|0,T=T+Math.imul(W0,p0)|0,B=B+Math.imul(W0,f0)|0;var WU=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(WU>>>26)|0,WU&=67108863,v=Math.imul(E0,x0),T=Math.imul(E0,q0),T=T+Math.imul(v0,x0)|0,B=Math.imul(v0,q0),v=v+Math.imul(J0,z0)|0,T=T+Math.imul(J0,M0)|0,T=T+Math.imul(T0,z0)|0,B=B+Math.imul(T0,M0)|0,v=v+Math.imul(G0,p0)|0,T=T+Math.imul(G0,f0)|0,T=T+Math.imul(A0,p0)|0,B=B+Math.imul(A0,f0)|0;var yX=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(yX>>>26)|0,yX&=67108863,v=Math.imul(E0,z0),T=Math.imul(E0,M0),T=T+Math.imul(v0,z0)|0,B=Math.imul(v0,M0),v=v+Math.imul(J0,p0)|0,T=T+Math.imul(J0,f0)|0,T=T+Math.imul(T0,p0)|0,B=B+Math.imul(T0,f0)|0;var fX=(O+v|0)+((T&8191)<<13)|0;O=(B+(T>>>13)|0)+(fX>>>26)|0,fX&=67108863,v=Math.imul(E0,p0),T=Math.imul(E0,f0),T=T+Math.imul(v0,p0)|0,B=Math.imul(v0,f0);var cX=(O+v|0)+((T&8191)<<13)|0;if(O=(B+(T>>>13)|0)+(cX>>>26)|0,cX&=67108863,X[0]=b0,X[1]=a0,X[2]=e0,X[3]=i0,X[4]=UU,X[5]=XU,X[6]=IU,X[7]=ZU,X[8]=QU,X[9]=$U,X[10]=YU,X[11]=VU,X[12]=OU,X[13]=GU,X[14]=KU,X[15]=WU,X[16]=yX,X[17]=fX,X[18]=cX,O!==0)X[19]=O,K.length++;return K};if(!Math.imul)N=g;function y(Q,I,$){$.negative=I.negative^Q.negative,$.length=Q.length+I.length;var K=0,J=0;for(var Y=0;Y<$.length-1;Y++){var X=J;J=0;var O=K&67108863,v=Math.min(Y,I.length-1);for(var T=Math.max(0,Y-Q.length+1);T<=v;T++){var B=Y-T,c=Q.words[B]|0,l=I.words[T]|0,s=c*l,O0=s&67108863;X=X+(s/67108864|0)|0,O0=O0+O|0,O=O0&67108863,X=X+(O0>>>26)|0,J+=X>>>26,X&=67108863}$.words[Y]=O,K=X,X=J}if(K!==0)$.words[Y]=K;else $.length--;return $._strip()}function f(Q,I,$){return y(Q,I,$)}V.prototype.mulTo=function Q(I,$){var K,J=this.length+I.length;if(this.length===10&&I.length===10)K=N(this,I,$);else if(J<63)K=g(this,I,$);else if(J<1024)K=y(this,I,$);else K=f(this,I,$);return K};function o(Q,I){this.x=Q,this.y=I}o.prototype.makeRBT=function Q(I){var $=new Array(I),K=V.prototype._countBits(I)-1;for(var J=0;J<I;J++)$[J]=this.revBin(J,K,I);return $},o.prototype.revBin=function Q(I,$,K){if(I===0||I===K-1)return I;var J=0;for(var Y=0;Y<$;Y++)J|=(I&1)<<$-Y-1,I>>=1;return J},o.prototype.permute=function Q(I,$,K,J,Y,X){for(var O=0;O<X;O++)J[O]=$[I[O]],Y[O]=K[I[O]]},o.prototype.transform=function Q(I,$,K,J,Y,X){this.permute(X,I,$,K,J,Y);for(var O=1;O<Y;O<<=1){var v=O<<1,T=Math.cos(2*Math.PI/v),B=Math.sin(2*Math.PI/v);for(var c=0;c<Y;c+=v){var l=T,s=B;for(var O0=0;O0<O;O0++){var h=K[c+O0],d=J[c+O0],g0=K[c+O0+O],Q0=J[c+O0+O],$0=l*g0-s*Q0;if(Q0=l*Q0+s*g0,g0=$0,K[c+O0]=h+g0,J[c+O0]=d+Q0,K[c+O0+O]=h-g0,J[c+O0+O]=d-Q0,O0!==v)$0=T*l-B*s,s=T*s+B*l,l=$0}}}},o.prototype.guessLen13b=function Q(I,$){var K=Math.max($,I)|1,J=K&1,Y=0;for(K=K/2|0;K;K=K>>>1)Y++;return 1<<Y+1+J},o.prototype.conjugate=function Q(I,$,K){if(K<=1)return;for(var J=0;J<K/2;J++){var Y=I[J];I[J]=I[K-J-1],I[K-J-1]=Y,Y=$[J],$[J]=-$[K-J-1],$[K-J-1]=-Y}},o.prototype.normalize13b=function Q(I,$){var K=0;for(var J=0;J<$/2;J++){var Y=Math.round(I[2*J+1]/$)*8192+Math.round(I[2*J]/$)+K;if(I[J]=Y&67108863,Y<67108864)K=0;else K=Y/67108864|0}return I},o.prototype.convert13b=function Q(I,$,K,J){var Y=0;for(var X=0;X<$;X++)Y=Y+(I[X]|0),K[2*X]=Y&8191,Y=Y>>>13,K[2*X+1]=Y&8191,Y=Y>>>13;for(X=2*$;X<J;++X)K[X]=0;H(Y===0),H((Y&-8192)===0)},o.prototype.stub=function Q(I){var $=new Array(I);for(var K=0;K<I;K++)$[K]=0;return $},o.prototype.mulp=function Q(I,$,K){var J=2*this.guessLen13b(I.length,$.length),Y=this.makeRBT(J),X=this.stub(J),O=new Array(J),v=new Array(J),T=new Array(J),B=new Array(J),c=new Array(J),l=new Array(J),s=K.words;s.length=J,this.convert13b(I.words,I.length,O,J),this.convert13b($.words,$.length,B,J),this.transform(O,X,v,T,J,Y),this.transform(B,X,c,l,J,Y);for(var O0=0;O0<J;O0++){var h=v[O0]*c[O0]-T[O0]*l[O0];T[O0]=v[O0]*l[O0]+T[O0]*c[O0],v[O0]=h}return this.conjugate(v,T,J),this.transform(v,T,s,X,J,Y),this.conjugate(s,X,J),this.normalize13b(s,J),K.negative=I.negative^$.negative,K.length=I.length+$.length,K._strip()},V.prototype.mul=function Q(I){var $=new V(null);return $.words=new Array(this.length+I.length),this.mulTo(I,$)},V.prototype.mulf=function Q(I){var $=new V(null);return $.words=new Array(this.length+I.length),f(this,I,$)},V.prototype.imul=function Q(I){return this.clone().mulTo(I,this)},V.prototype.imuln=function Q(I){var $=I<0;if($)I=-I;H(typeof I==="number"),H(I<67108864);var K=0;for(var J=0;J<this.length;J++){var Y=(this.words[J]|0)*I,X=(Y&67108863)+(K&67108863);K>>=26,K+=Y/67108864|0,K+=X>>>26,this.words[J]=X&67108863}if(K!==0)this.words[J]=K,this.length++;return this.length=I===0?1:this.length,$?this.ineg():this},V.prototype.muln=function Q(I){return this.clone().imuln(I)},V.prototype.sqr=function Q(){return this.mul(this)},V.prototype.isqr=function Q(){return this.imul(this.clone())},V.prototype.pow=function Q(I){var $=x(I);if($.length===0)return new V(1);var K=this;for(var J=0;J<$.length;J++,K=K.sqr())if($[J]!==0)break;if(++J<$.length)for(var Y=K.sqr();J<$.length;J++,Y=Y.sqr()){if($[J]===0)continue;K=K.mul(Y)}return K},V.prototype.iushln=function Q(I){H(typeof I==="number"&&I>=0);var $=I%26,K=(I-$)/26,J=67108863>>>26-$<<26-$,Y;if($!==0){var X=0;for(Y=0;Y<this.length;Y++){var O=this.words[Y]&J,v=(this.words[Y]|0)-O<<$;this.words[Y]=v|X,X=O>>>26-$}if(X)this.words[Y]=X,this.length++}if(K!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+K]=this.words[Y];for(Y=0;Y<K;Y++)this.words[Y]=0;this.length+=K}return this._strip()},V.prototype.ishln=function Q(I){return H(this.negative===0),this.iushln(I)},V.prototype.iushrn=function Q(I,$,K){H(typeof I==="number"&&I>=0);var J;if($)J=($-$%26)/26;else J=0;var Y=I%26,X=Math.min((I-Y)/26,this.length),O=67108863^67108863>>>Y<<Y,v=K;if(J-=X,J=Math.max(0,J),v){for(var T=0;T<X;T++)v.words[T]=this.words[T];v.length=X}if(X===0);else if(this.length>X){this.length-=X;for(T=0;T<this.length;T++)this.words[T]=this.words[T+X]}else this.words[0]=0,this.length=1;var B=0;for(T=this.length-1;T>=0&&(B!==0||T>=J);T--){var c=this.words[T]|0;this.words[T]=B<<26-Y|c>>>Y,B=c&O}if(v&&B!==0)v.words[v.length++]=B;if(this.length===0)this.words[0]=0,this.length=1;return this._strip()},V.prototype.ishrn=function Q(I,$,K){return H(this.negative===0),this.iushrn(I,$,K)},V.prototype.shln=function Q(I){return this.clone().ishln(I)},V.prototype.ushln=function Q(I){return this.clone().iushln(I)},V.prototype.shrn=function Q(I){return this.clone().ishrn(I)},V.prototype.ushrn=function Q(I){return this.clone().iushrn(I)},V.prototype.testn=function Q(I){H(typeof I==="number"&&I>=0);var $=I%26,K=(I-$)/26,J=1<<$;if(this.length<=K)return!1;var Y=this.words[K];return!!(Y&J)},V.prototype.imaskn=function Q(I){H(typeof I==="number"&&I>=0);var $=I%26,K=(I-$)/26;if(H(this.negative===0,"imaskn works only with positive numbers"),this.length<=K)return this;if($!==0)K++;if(this.length=Math.min(K,this.length),$!==0){var J=67108863^67108863>>>$<<$;this.words[this.length-1]&=J}return this._strip()},V.prototype.maskn=function Q(I){return this.clone().imaskn(I)},V.prototype.iaddn=function Q(I){if(H(typeof I==="number"),H(I<67108864),I<0)return this.isubn(-I);if(this.negative!==0){if(this.length===1&&(this.words[0]|0)<=I)return this.words[0]=I-(this.words[0]|0),this.negative=0,this;return this.negative=0,this.isubn(I),this.negative=1,this}return this._iaddn(I)},V.prototype._iaddn=function Q(I){this.words[0]+=I;for(var $=0;$<this.length&&this.words[$]>=67108864;$++)if(this.words[$]-=67108864,$===this.length-1)this.words[$+1]=1;else this.words[$+1]++;return this.length=Math.max(this.length,$+1),this},V.prototype.isubn=function Q(I){if(H(typeof I==="number"),H(I<67108864),I<0)return this.iaddn(-I);if(this.negative!==0)return this.negative=0,this.iaddn(I),this.negative=1,this;if(this.words[0]-=I,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var $=0;$<this.length&&this.words[$]<0;$++)this.words[$]+=67108864,this.words[$+1]-=1;return this._strip()},V.prototype.addn=function Q(I){return this.clone().iaddn(I)},V.prototype.subn=function Q(I){return this.clone().isubn(I)},V.prototype.iabs=function Q(){return this.negative=0,this},V.prototype.abs=function Q(){return this.clone().iabs()},V.prototype._ishlnsubmul=function Q(I,$,K){var J=I.length+K,Y;this._expand(J);var X,O=0;for(Y=0;Y<I.length;Y++){X=(this.words[Y+K]|0)+O;var v=(I.words[Y]|0)*$;X-=v&67108863,O=(X>>26)-(v/67108864|0),this.words[Y+K]=X&67108863}for(;Y<this.length-K;Y++)X=(this.words[Y+K]|0)+O,O=X>>26,this.words[Y+K]=X&67108863;if(O===0)return this._strip();H(O===-1),O=0;for(Y=0;Y<this.length;Y++)X=-(this.words[Y]|0)+O,O=X>>26,this.words[Y]=X&67108863;return this.negative=1,this._strip()},V.prototype._wordDiv=function Q(I,$){var K=this.length-I.length,J=this.clone(),Y=I,X=Y.words[Y.length-1]|0,O=this._countBits(X);if(K=26-O,K!==0)Y=Y.ushln(K),J.iushln(K),X=Y.words[Y.length-1]|0;var v=J.length-Y.length,T;if($!=="mod"){T=new V(null),T.length=v+1,T.words=new Array(T.length);for(var B=0;B<T.length;B++)T.words[B]=0}var c=J.clone()._ishlnsubmul(Y,1,v);if(c.negative===0){if(J=c,T)T.words[v]=1}for(var l=v-1;l>=0;l--){var s=(J.words[Y.length+l]|0)*67108864+(J.words[Y.length+l-1]|0);s=Math.min(s/X|0,67108863),J._ishlnsubmul(Y,s,l);while(J.negative!==0)if(s--,J.negative=0,J._ishlnsubmul(Y,1,l),!J.isZero())J.negative^=1;if(T)T.words[l]=s}if(T)T._strip();if(J._strip(),$!=="div"&&K!==0)J.iushrn(K);return{div:T||null,mod:J}},V.prototype.divmod=function Q(I,$,K){if(H(!I.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var J,Y,X;if(this.negative!==0&&I.negative===0){if(X=this.neg().divmod(I,$),$!=="mod")J=X.div.neg();if($!=="div"){if(Y=X.mod.neg(),K&&Y.negative!==0)Y.iadd(I)}return{div:J,mod:Y}}if(this.negative===0&&I.negative!==0){if(X=this.divmod(I.neg(),$),$!=="mod")J=X.div.neg();return{div:J,mod:X.mod}}if((this.negative&I.negative)!==0){if(X=this.neg().divmod(I.neg(),$),$!=="div"){if(Y=X.mod.neg(),K&&Y.negative!==0)Y.isub(I)}return{div:X.div,mod:Y}}if(I.length>this.length||this.cmp(I)<0)return{div:new V(0),mod:this};if(I.length===1){if($==="div")return{div:this.divn(I.words[0]),mod:null};if($==="mod")return{div:null,mod:new V(this.modrn(I.words[0]))};return{div:this.divn(I.words[0]),mod:new V(this.modrn(I.words[0]))}}return this._wordDiv(I,$)},V.prototype.div=function Q(I){return this.divmod(I,"div",!1).div},V.prototype.mod=function Q(I){return this.divmod(I,"mod",!1).mod},V.prototype.umod=function Q(I){return this.divmod(I,"mod",!0).mod},V.prototype.divRound=function Q(I){var $=this.divmod(I);if($.mod.isZero())return $.div;var K=$.div.negative!==0?$.mod.isub(I):$.mod,J=I.ushrn(1),Y=I.andln(1),X=K.cmp(J);if(X<0||Y===1&&X===0)return $.div;return $.div.negative!==0?$.div.isubn(1):$.div.iaddn(1)},V.prototype.modrn=function Q(I){var $=I<0;if($)I=-I;H(I<=67108863);var K=67108864%I,J=0;for(var Y=this.length-1;Y>=0;Y--)J=(K*J+(this.words[Y]|0))%I;return $?-J:J},V.prototype.modn=function Q(I){return this.modrn(I)},V.prototype.idivn=function Q(I){var $=I<0;if($)I=-I;H(I<=67108863);var K=0;for(var J=this.length-1;J>=0;J--){var Y=(this.words[J]|0)+K*67108864;this.words[J]=Y/I|0,K=Y%I}return this._strip(),$?this.ineg():this},V.prototype.divn=function Q(I){return this.clone().idivn(I)},V.prototype.egcd=function Q(I){H(I.negative===0),H(!I.isZero());var $=this,K=I.clone();if($.negative!==0)$=$.umod(I);else $=$.clone();var J=new V(1),Y=new V(0),X=new V(0),O=new V(1),v=0;while($.isEven()&&K.isEven())$.iushrn(1),K.iushrn(1),++v;var T=K.clone(),B=$.clone();while(!$.isZero()){for(var c=0,l=1;($.words[0]&l)===0&&c<26;++c,l<<=1);if(c>0){$.iushrn(c);while(c-- >0){if(J.isOdd()||Y.isOdd())J.iadd(T),Y.isub(B);J.iushrn(1),Y.iushrn(1)}}for(var s=0,O0=1;(K.words[0]&O0)===0&&s<26;++s,O0<<=1);if(s>0){K.iushrn(s);while(s-- >0){if(X.isOdd()||O.isOdd())X.iadd(T),O.isub(B);X.iushrn(1),O.iushrn(1)}}if($.cmp(K)>=0)$.isub(K),J.isub(X),Y.isub(O);else K.isub($),X.isub(J),O.isub(Y)}return{a:X,b:O,gcd:K.iushln(v)}},V.prototype._invmp=function Q(I){H(I.negative===0),H(!I.isZero());var $=this,K=I.clone();if($.negative!==0)$=$.umod(I);else $=$.clone();var J=new V(1),Y=new V(0),X=K.clone();while($.cmpn(1)>0&&K.cmpn(1)>0){for(var O=0,v=1;($.words[0]&v)===0&&O<26;++O,v<<=1);if(O>0){$.iushrn(O);while(O-- >0){if(J.isOdd())J.iadd(X);J.iushrn(1)}}for(var T=0,B=1;(K.words[0]&B)===0&&T<26;++T,B<<=1);if(T>0){K.iushrn(T);while(T-- >0){if(Y.isOdd())Y.iadd(X);Y.iushrn(1)}}if($.cmp(K)>=0)$.isub(K),J.isub(Y);else K.isub($),Y.isub(J)}var c;if($.cmpn(1)===0)c=J;else c=Y;if(c.cmpn(0)<0)c.iadd(I);return c},V.prototype.gcd=function Q(I){if(this.isZero())return I.abs();if(I.isZero())return this.abs();var $=this.clone(),K=I.clone();$.negative=0,K.negative=0;for(var J=0;$.isEven()&&K.isEven();J++)$.iushrn(1),K.iushrn(1);do{while($.isEven())$.iushrn(1);while(K.isEven())K.iushrn(1);var Y=$.cmp(K);if(Y<0){var X=$;$=K,K=X}else if(Y===0||K.cmpn(1)===0)break;$.isub(K)}while(!0);return K.iushln(J)},V.prototype.invm=function Q(I){return this.egcd(I).a.umod(I)},V.prototype.isEven=function Q(){return(this.words[0]&1)===0},V.prototype.isOdd=function Q(){return(this.words[0]&1)===1},V.prototype.andln=function Q(I){return this.words[0]&I},V.prototype.bincn=function Q(I){H(typeof I==="number");var $=I%26,K=(I-$)/26,J=1<<$;if(this.length<=K)return this._expand(K+1),this.words[K]|=J,this;var Y=J;for(var X=K;Y!==0&&X<this.length;X++){var O=this.words[X]|0;O+=Y,Y=O>>>26,O&=67108863,this.words[X]=O}if(Y!==0)this.words[X]=Y,this.length++;return this},V.prototype.isZero=function Q(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function Q(I){var $=I<0;if(this.negative!==0&&!$)return-1;if(this.negative===0&&$)return 1;this._strip();var K;if(this.length>1)K=1;else{if($)I=-I;H(I<=67108863,"Number is too big");var J=this.words[0]|0;K=J===I?0:J<I?-1:1}if(this.negative!==0)return-K|0;return K},V.prototype.cmp=function Q(I){if(this.negative!==0&&I.negative===0)return-1;if(this.negative===0&&I.negative!==0)return 1;var $=this.ucmp(I);if(this.negative!==0)return-$|0;return $},V.prototype.ucmp=function Q(I){if(this.length>I.length)return 1;if(this.length<I.length)return-1;var $=0;for(var K=this.length-1;K>=0;K--){var J=this.words[K]|0,Y=I.words[K]|0;if(J===Y)continue;if(J<Y)$=-1;else if(J>Y)$=1;break}return $},V.prototype.gtn=function Q(I){return this.cmpn(I)===1},V.prototype.gt=function Q(I){return this.cmp(I)===1},V.prototype.gten=function Q(I){return this.cmpn(I)>=0},V.prototype.gte=function Q(I){return this.cmp(I)>=0},V.prototype.ltn=function Q(I){return this.cmpn(I)===-1},V.prototype.lt=function Q(I){return this.cmp(I)===-1},V.prototype.lten=function Q(I){return this.cmpn(I)<=0},V.prototype.lte=function Q(I){return this.cmp(I)<=0},V.prototype.eqn=function Q(I){return this.cmpn(I)===0},V.prototype.eq=function Q(I){return this.cmp(I)===0},V.red=function Q(I){return new U(I)},V.prototype.toRed=function Q(I){return H(!this.red,"Already a number in reduction context"),H(this.negative===0,"red works only with positives"),I.convertTo(this)._forceRed(I)},V.prototype.fromRed=function Q(){return H(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function Q(I){return this.red=I,this},V.prototype.forceRed=function Q(I){return H(!this.red,"Already a number in reduction context"),this._forceRed(I)},V.prototype.redAdd=function Q(I){return H(this.red,"redAdd works only with red numbers"),this.red.add(this,I)},V.prototype.redIAdd=function Q(I){return H(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,I)},V.prototype.redSub=function Q(I){return H(this.red,"redSub works only with red numbers"),this.red.sub(this,I)},V.prototype.redISub=function Q(I){return H(this.red,"redISub works only with red numbers"),this.red.isub(this,I)},V.prototype.redShl=function Q(I){return H(this.red,"redShl works only with red numbers"),this.red.shl(this,I)},V.prototype.redMul=function Q(I){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,I),this.red.mul(this,I)},V.prototype.redIMul=function Q(I){return H(this.red,"redMul works only with red numbers"),this.red._verify2(this,I),this.red.imul(this,I)},V.prototype.redSqr=function Q(){return H(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function Q(){return H(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function Q(){return H(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function Q(){return H(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function Q(){return H(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function Q(I){return H(this.red&&!I.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,I)};var r={k256:null,p224:null,p192:null,p25519:null};function V0(Q,I){this.name=Q,this.p=new V(I,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}V0.prototype._tmp=function Q(){var I=new V(null);return I.words=new Array(Math.ceil(this.n/13)),I},V0.prototype.ireduce=function Q(I){var $=I,K;do this.split($,this.tmp),$=this.imulK($),$=$.iadd(this.tmp),K=$.bitLength();while(K>this.n);var J=K<this.n?-1:$.ucmp(this.p);if(J===0)$.words[0]=0,$.length=1;else if(J>0)$.isub(this.p);else if($.strip!==void 0)$.strip();else $._strip();return $},V0.prototype.split=function Q(I,$){I.iushrn(this.n,0,$)},V0.prototype.imulK=function Q(I){return I.imul(this.k)};function Y0(){V0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}z(Y0,V0),Y0.prototype.split=function Q(I,$){var K=4194303,J=Math.min(I.length,9);for(var Y=0;Y<J;Y++)$.words[Y]=I.words[Y];if($.length=J,I.length<=9){I.words[0]=0,I.length=1;return}var X=I.words[9];$.words[$.length++]=X&K;for(Y=10;Y<I.length;Y++){var O=I.words[Y]|0;I.words[Y-10]=(O&K)<<4|X>>>22,X=O}if(X>>>=22,I.words[Y-10]=X,X===0&&I.length>10)I.length-=10;else I.length-=9},Y0.prototype.imulK=function Q(I){I.words[I.length]=0,I.words[I.length+1]=0,I.length+=2;var $=0;for(var K=0;K<I.length;K++){var J=I.words[K]|0;$+=J*977,I.words[K]=$&67108863,$=J*64+($/67108864|0)}if(I.words[I.length-1]===0){if(I.length--,I.words[I.length-1]===0)I.length--}return I};function u(){V0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}z(u,V0);function a(){V0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}z(a,V0);function F(){V0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}z(F,V0),F.prototype.imulK=function Q(I){var $=0;for(var K=0;K<I.length;K++){var J=(I.words[K]|0)*19+$,Y=J&67108863;J>>>=26,I.words[K]=Y,$=J}if($!==0)I.words[I.length++]=$;return I},V._prime=function Q(I){if(r[I])return r[I];var $;if(I==="k256")$=new Y0;else if(I==="p224")$=new u;else if(I==="p192")$=new a;else if(I==="p25519")$=new F;else throw new Error("Unknown prime "+I);return r[I]=$,$};function U(Q){if(typeof Q==="string"){var I=V._prime(Q);this.m=I.p,this.prime=I}else H(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}U.prototype._verify1=function Q(I){H(I.negative===0,"red works only with positives"),H(I.red,"red works only with red numbers")},U.prototype._verify2=function Q(I,$){H((I.negative|$.negative)===0,"red works only with positives"),H(I.red&&I.red===$.red,"red works only with red numbers")},U.prototype.imod=function Q(I){if(this.prime)return this.prime.ireduce(I)._forceRed(this);return D(I,I.umod(this.m)._forceRed(this)),I},U.prototype.neg=function Q(I){if(I.isZero())return I.clone();return this.m.sub(I)._forceRed(this)},U.prototype.add=function Q(I,$){this._verify2(I,$);var K=I.add($);if(K.cmp(this.m)>=0)K.isub(this.m);return K._forceRed(this)},U.prototype.iadd=function Q(I,$){this._verify2(I,$);var K=I.iadd($);if(K.cmp(this.m)>=0)K.isub(this.m);return K},U.prototype.sub=function Q(I,$){this._verify2(I,$);var K=I.sub($);if(K.cmpn(0)<0)K.iadd(this.m);return K._forceRed(this)},U.prototype.isub=function Q(I,$){this._verify2(I,$);var K=I.isub($);if(K.cmpn(0)<0)K.iadd(this.m);return K},U.prototype.shl=function Q(I,$){return this._verify1(I),this.imod(I.ushln($))},U.prototype.imul=function Q(I,$){return this._verify2(I,$),this.imod(I.imul($))},U.prototype.mul=function Q(I,$){return this._verify2(I,$),this.imod(I.mul($))},U.prototype.isqr=function Q(I){return this.imul(I,I.clone())},U.prototype.sqr=function Q(I){return this.mul(I,I)},U.prototype.sqrt=function Q(I){if(I.isZero())return I.clone();var $=this.m.andln(3);if(H($%2===1),$===3){var K=this.m.add(new V(1)).iushrn(2);return this.pow(I,K)}var J=this.m.subn(1),Y=0;while(!J.isZero()&&J.andln(1)===0)Y++,J.iushrn(1);H(!J.isZero());var X=new V(1).toRed(this),O=X.redNeg(),v=this.m.subn(1).iushrn(1),T=this.m.bitLength();T=new V(2*T*T).toRed(this);while(this.pow(T,v).cmp(O)!==0)T.redIAdd(O);var B=this.pow(T,J),c=this.pow(I,J.addn(1).iushrn(1)),l=this.pow(I,J),s=Y;while(l.cmp(X)!==0){var O0=l;for(var h=0;O0.cmp(X)!==0;h++)O0=O0.redSqr();H(h<s);var d=this.pow(B,new V(1).iushln(s-h-1));c=c.redMul(d),B=d.redSqr(),l=l.redMul(B),s=h}return c},U.prototype.invm=function Q(I){var $=I._invmp(this.m);if($.negative!==0)return $.negative=0,this.imod($).redNeg();else return this.imod($)},U.prototype.pow=function Q(I,$){if($.isZero())return new V(1).toRed(this);if($.cmpn(1)===0)return I.clone();var K=4,J=new Array(1<<K);J[0]=new V(1).toRed(this),J[1]=I;for(var Y=2;Y<J.length;Y++)J[Y]=this.mul(J[Y-1],I);var X=J[0],O=0,v=0,T=$.bitLength()%26;if(T===0)T=26;for(Y=$.length-1;Y>=0;Y--){var B=$.words[Y];for(var c=T-1;c>=0;c--){var l=B>>c&1;if(X!==J[0])X=this.sqr(X);if(l===0&&O===0){v=0;continue}if(O<<=1,O|=l,v++,v!==K&&(Y!==0||c!==0))continue;X=this.mul(X,J[O]),v=0,O=0}T=26}return X},U.prototype.convertTo=function Q(I){var $=I.umod(this.m);return $===I?$.clone():$},U.prototype.convertFrom=function Q(I){var $=I.clone();return $.red=null,$},V.mont=function Q(I){return new Z(I)};function Z(Q){if(U.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0)this.shift+=26-this.shift%26;this.r=new V(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)}z(Z,U),Z.prototype.convertTo=function Q(I){return this.imod(I.ushln(this.shift))},Z.prototype.convertFrom=function Q(I){var $=this.imod(I.mul(this.rinv));return $.red=null,$},Z.prototype.imul=function Q(I,$){if(I.isZero()||$.isZero())return I.words[0]=0,I.length=1,I;var K=I.imul($),J=K.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=K.isub(J).iushrn(this.shift),X=Y;if(Y.cmp(this.m)>=0)X=Y.isub(this.m);else if(Y.cmpn(0)<0)X=Y.iadd(this.m);return X._forceRed(this)},Z.prototype.mul=function Q(I,$){if(I.isZero()||$.isZero())return new V(0)._forceRed(this);var K=I.mul($),J=K.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=K.isub(J).iushrn(this.shift),X=Y;if(Y.cmp(this.m)>=0)X=Y.isub(this.m);else if(Y.cmpn(0)<0)X=Y.iadd(this.m);return X._forceRed(this)},Z.prototype.invm=function Q(I){var $=this.imod(I._invmp(this.m).mul(this.r2));return $._forceRed(this)}})(typeof G==="undefined"||G,E)}),yZ=w0((E,G)=>{var W=QV(),C=gX(),H=PU().Buffer;function z(k){var R=k.modulus.byteLength(),S;do S=new W(C(R));while(S.cmp(k.modulus)>=0||!S.umod(k.prime1)||!S.umod(k.prime2));return S}function V(k){var R=z(k),S=R.toRed(W.mont(k.modulus)).redPow(new W(k.publicExponent)).fromRed();return{blinder:S,unblinder:R.invm(k.modulus)}}function P(k,R){var S=V(R),D=R.modulus.byteLength(),A=new W(k).mul(S.blinder).umod(R.modulus),L=A.toRed(W.mont(R.prime1)),M=A.toRed(W.mont(R.prime2)),q=R.coefficient,j=R.prime1,x=R.prime2,g=L.redPow(R.exponent1).fromRed(),N=M.redPow(R.exponent2).fromRed(),y=g.isub(N).imul(q).umod(j).imul(x);return N.iadd(y).imul(S.unblinder).umod(R.modulus).toArrayLike(H,"be",D)}P.getr=z,G.exports=P}),$V=w0((E,G)=>{var W=gZ(),C=gX(),H=NX(),z=NZ(),V=_Z(),P=AI(),k=wZ(),R=yZ(),S=PU().Buffer;G.exports=function M(q,j,x){var g;if(q.padding)g=q.padding;else if(x)g=1;else g=4;var N=W(q),y;if(g===4)y=D(N,j);else if(g===1)y=A(N,j,x);else if(g===3){if(y=new P(j),y.cmp(N.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");if(x)return R(y,N);else return k(y,N)};function D(M,q){var j=M.modulus.byteLength(),x=q.length,g=H("sha1").update(S.alloc(0)).digest(),N=g.length,y=2*N;if(x>j-y-2)throw new Error("message too long");var f=S.alloc(j-x-y-2),o=j-N-1,r=C(N),V0=V(S.concat([g,f,S.alloc(1,1),q],o),z(r,o)),Y0=V(r,z(V0,N));return new P(S.concat([S.alloc(1),Y0,V0],j))}function A(M,q,j){var x=q.length,g=M.modulus.byteLength();if(x>g-11)throw new Error("message too long");var N;if(j)N=S.alloc(g-x-3,255);else N=L(g-x-3);return new P(S.concat([S.from([0,j?1:2]),N,S.alloc(1),q],g))}function L(M){var q=S.allocUnsafe(M),j=0,x=C(M*2),g=0,N;while(j<M){if(g===x.length)x=C(M*2),g=0;if(N=x[g++],N)q[j++]=N}return q}}),YV=w0((E,G)=>{var W=gZ(),C=NZ(),H=_Z(),z=AI(),V=yZ(),P=NX(),k=wZ(),R=PU().Buffer;G.exports=function L(M,q,j){var x;if(M.padding)x=M.padding;else if(j)x=1;else x=4;var g=W(M),N=g.modulus.byteLength();if(q.length>N||new z(q).cmp(g.modulus)>=0)throw new Error("decryption error");var y;if(j)y=k(new z(q),g);else y=V(q,g);var f=R.alloc(N-y.length);if(y=R.concat([f,y],N),x===4)return S(g,y);else if(x===1)return D(g,y,j);else if(x===3)return y;else throw new Error("unknown padding")};function S(L,M){var q=L.modulus.byteLength(),j=P("sha1").update(R.alloc(0)).digest(),x=j.length;if(M[0]!==0)throw new Error("decryption error");var g=M.slice(1,x+1),N=M.slice(x+1),y=H(g,C(N,x)),f=H(N,C(y,q-x-1));if(A(j,f.slice(0,x)))throw new Error("decryption error");var o=x;while(f[o]===0)o++;if(f[o++]!==1)throw new Error("decryption error");return f.slice(o)}function D(L,M,q){var j=M.slice(0,2),x=2,g=0;while(M[x++]!==0)if(x>=M.length){g++;break}var N=M.slice(2,x-1);if(j.toString("hex")!=="0002"&&!q||j.toString("hex")!=="0001"&&q)g++;if(N.length<8)g++;if(g)throw new Error("decryption error");return M.slice(x)}function A(L,M){L=R.from(L),M=R.from(M);var q=0,j=L.length;if(L.length!==M.length)q++,j=Math.min(L.length,M.length);var x=-1;while(++x<j)q+=L[x]^M[x];return q}}),GI=w0((E)=>{E.publicEncrypt=$V(),E.privateDecrypt=YV(),E.privateEncrypt=function G(W,C){return E.publicEncrypt(W,C,!0)},E.publicDecrypt=function G(W,C){return E.privateDecrypt(W,C,!0)}}),VV=w0((E)=>{var G=(qU(),y0(kU));if(typeof G.publicEncrypt!=="function")G=GI();if(E.publicEncrypt=G.publicEncrypt,E.privateDecrypt=G.privateDecrypt,typeof G.privateEncrypt!=="function")E.privateEncrypt=GI().privateEncrypt;else E.privateEncrypt=G.privateEncrypt;if(typeof G.publicDecrypt!=="function")E.publicDecrypt=GI().publicDecrypt;else E.publicDecrypt=G.publicDecrypt}),OV=w0((E)=>{var G=PU(),W=gX(),C=G.Buffer,H=G.kMaxLength,z=global.crypto||global.msCrypto,V=Math.pow(2,32)-1;function P(A,L){if(typeof A!=="number"||A!==A)throw new TypeError("offset must be a number");if(A>V||A<0)throw new TypeError("offset must be a uint32");if(A>H||A>L)throw new RangeError("offset out of range")}function k(A,L,M){if(typeof A!=="number"||A!==A)throw new TypeError("size must be a number");if(A>V||A<0)throw new TypeError("size must be a uint32");if(A+L>M||A>H)throw new RangeError("buffer too small")}z&&z.getRandomValues,E.randomFill=R,E.randomFillSync=D;function R(A,L,M,q){if(!C.isBuffer(A)&&!(A instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof L==="function")q=L,L=0,M=A.length;else if(typeof M==="function")q=M,M=A.length-L;else if(typeof q!=="function")throw new TypeError('"cb" argument must be a function');return P(L,A.length),k(M,L,A.length),S(A,L,M,q)}function S(A,L,M,q){if(!1)var j,x;if(q){W(M,function(N,y){if(N)return q(N);y.copy(A,L),q(null,A)});return}var g=W(M);return g.copy(A,L),A}function D(A,L,M){if(typeof L==="undefined")L=0;if(!C.isBuffer(A)&&!(A instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(P(L,A.length),M===void 0)M=A.length-L;return k(M,L,A.length),S(A,L,M)}}),GV=w0((E,G)=>{var W=(qU(),y0(kU));if(typeof W.randomFill==="function"&&typeof W.randomFillSync==="function")E.randomFill=W.randomFill,E.randomFillSync=W.randomFillSync;else G.exports=OV()}),KV=w0((E)=>{E.randomBytes=E.rng=E.pseudoRandomBytes=E.prng=gX(),E.createHash=E.Hash=NX(),E.createHmac=E.Hmac=DZ();var G=HY(),W=Object.keys(G),C=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(W);E.getHashes=function(){return C};var H=zZ();E.pbkdf2=H.pbkdf2,E.pbkdf2Sync=H.pbkdf2Sync;var z=EY();E.Cipher=z.Cipher,E.createCipher=z.createCipher,E.Cipheriv=z.Cipheriv,E.createCipheriv=z.createCipheriv,E.Decipher=z.Decipher,E.createDecipher=z.createDecipher,E.Decipheriv=z.Decipheriv,E.createDecipheriv=z.createDecipheriv,E.getCiphers=z.getCiphers,E.listCiphers=z.listCiphers;var V=CY();E.DiffieHellmanGroup=V.DiffieHellmanGroup,E.createDiffieHellmanGroup=V.createDiffieHellmanGroup,E.getDiffieHellman=V.getDiffieHellman,E.createDiffieHellman=V.createDiffieHellman,E.DiffieHellman=V.DiffieHellman;var P=TY();E.createSign=P.createSign,E.Sign=P.Sign,E.createVerify=P.createVerify,E.Verify=P.Verify,E.createECDH=uY();var k=VV();E.publicEncrypt=k.publicEncrypt,E.privateEncrypt=k.privateEncrypt,E.publicDecrypt=k.publicDecrypt,E.privateDecrypt=k.privateDecrypt;var R=GV();E.randomFill=R.randomFill,E.randomFillSync=R.randomFillSync,E.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
|
|
15
|
-
we accept pull requests
|
|
16
|
-
https://github.com/browserify/crypto-browserify`)},E.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}}),h0=FY(KV(),1),WV=h0.default.prng,JV=h0.default.pseudoRandomBytes,FV=h0.default.rng,wX=h0.default.randomBytes,HV=h0.default.Hash,AV=h0.default.createHash,EV=h0.default.Hmac,CV=h0.default.createHmac,TV=h0.default.getHashes,EI=h0.default.pbkdf2,DV=h0.default.pbkdf2Sync,LV=h0.default.Cipher,zV=h0.default.createCipher,MV=h0.default.Cipheriv,CI=h0.default.createCipheriv,RV=h0.default.Decipher,SV=h0.default.createDecipher,PV=h0.default.Decipheriv,TI=h0.default.createDecipheriv,qV=h0.default.getCiphers,vV=h0.default.listCiphers,kV=h0.default.DiffieHellmanGroup,jV=h0.default.createDiffieHellmanGroup,BV=h0.default.getDiffieHellman,xV=h0.default.createDiffieHellman,gV=h0.default.DiffieHellman,NV=h0.default.createSign,_V=h0.default.Sign,wV=h0.default.createVerify,yV=h0.default.Verify,fV=h0.default.createECDH,cV=h0.default.publicEncrypt,pV=h0.default.privateEncrypt,hV=h0.default.publicDecrypt,uV=h0.default.privateDecrypt,lV=h0.default.randomFill,dV=h0.default.randomFillSync,bV=h0.default.createCredentials,oV=h0.default.constants,tV=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"];aV=crypto});qU();import{generateMnemonic as eV,validateMnemonic as iV}from"@scure/bip39";import{wordlist as fZ}from"@scure/bip39/wordlists/english";import DI from"blakejs";var cZ=(E)=>{let G=E;if(!(G instanceof Buffer))G=Buffer.from(G,"hex");let W=DI.blake2bInit(32);return DI.blake2bUpdate(W,G),Array.from(DI.blake2bFinal(W)).map((C)=>C<16?`0${C.toString(16)}`:C.toString(16)).join("")},pZ=(E,G,W,C,H)=>new Promise((z,V)=>{EI(E,G,W,C,H,(P,k)=>{if(P)V(P);else z(k)})}),CO=async(E,G)=>{let W=wX(32),C=wX(16),H={c:262144,prf:"hmac-sha256",dklen:32,salt:W.toString("hex")},z="aes-128-ctr",V=await pZ(Buffer.from(G),W,H.c,H.dklen,"sha256"),P=CI("aes-128-ctr",V.subarray(0,16),C),k=Buffer.concat([P.update(Buffer.from(E,"utf8")),P.final()]);return{meta:"xchain-keystore",version:1,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:C.toString("hex")},ciphertext:k.toString("hex"),kdf:"pbkdf2",kdfparams:H,mac:cZ(Buffer.concat([V.subarray(16,32),Buffer.from(k)]))}}},TO=(E=12)=>{return eV(fZ,E===12?128:256)},DO=(E)=>{return iV(E,fZ)},LO=async(E,G)=>{switch(E.version){case 1:{let W=E.crypto.kdfparams,C=await pZ(Buffer.from(G),Buffer.from(W.salt,"hex"),W.c,W.dklen,"sha256"),H=Buffer.from(E.crypto.ciphertext,"hex");if(cZ(Buffer.concat([C.subarray(16,32),H]))!==E.crypto.mac)throw new Error("Invalid password");let V=TI(E.crypto.cipher,C.subarray(0,16),Buffer.from(E.crypto.cipherparams.iv,"hex"));return Buffer.concat([V.update(H),V.final()]).toString("utf8")}default:throw new Error("Unsupported keystore version")}};import{Chain as o0,CosmosChains as UO,EVMChains as XO,NetworkDerivationPath as IO,UTXOChains as ZO,WalletOption as hZ,derivationPathToString as QO,filterSupportedChains as $O,getRPCUrl as uZ,pickEvmApiKey as YO,setRequestClientConfig as VO,updatedLastIndex as OO}from"@swapkit/helpers";var GO=[...XO,...ZO,...UO,o0.Polkadot,o0.Chainflip,o0.Solana,o0.Ripple],KO=async({apis:E,rpcUrl:G,chain:W,phrase:C,ethplorerApiKey:H,covalentApiKey:z,blockchairApiKey:V,swapkitApiKey:P,derivationPath:k,stagenet:R})=>{switch(W){case o0.Arbitrum:case o0.Avalanche:case o0.Base:case o0.BinanceSmartChain:case o0.Ethereum:case o0.Optimism:case o0.Polygon:{let{getProvider:S,getToolboxByChain:D}=await import("@swapkit/toolbox-evm"),{HDNodeWallet:A}=await import("./chunk-54v0n09z.js"),L=E?.[W],M=YO({chain:W,nonEthApiKey:z,ethApiKey:H}),q=S(W,G),j=A.fromPhrase(C).connect(q),x={api:L,apiKey:M,provider:q,signer:j};return{address:j.address,walletMethods:D(W)(x)}}case o0.BitcoinCash:{let q=function({builder:x,utxos:g}){return g.forEach((N,y)=>{x.sign(y,L,void 0,65,N.witnessUtxo.value)}),x.build()},{BCHToolbox:S}=await import("@swapkit/toolbox-utxo"),D=E?.[W],A=S({rpcUrl:G,apiKey:V,apiClient:D}),L=await A.createKeysForPath({phrase:C,derivationPath:k}),M=A.getAddressFromKeys(L),j={...A,transfer:(x)=>A.transfer({...x,from:M,signTransaction:q})};return{address:M,walletMethods:j}}case o0.Bitcoin:case o0.Dash:case o0.Dogecoin:case o0.Litecoin:{let{getToolboxByChain:S}=await import("@swapkit/toolbox-utxo"),D=E?.[W],A=S(W)({rpcUrl:G,apiKey:V,apiClient:D}),L=A.createKeysForPath({phrase:C,derivationPath:k}),M=A.getAddressFromKeys(L);return{address:M,walletMethods:{...A,transfer:(q)=>A.transfer({...q,from:M,signTransaction:(j)=>j.signAllInputs(L)})}}}case o0.Cosmos:case o0.Kujira:{let{getToolboxByChain:S}=await import("@swapkit/toolbox-cosmos"),D=E?.[W],A=S(W)({server:D,stagenet:R,swapkitApiKey:P}),L=await A.getAddressFromMnemonic(C),M=await A.getSigner(C);return{address:L,walletMethods:{...A,transfer:(j)=>A.transfer({...j,signer:M})}}}case o0.Maya:case o0.THORChain:{let{getToolboxByChain:S}=await import("@swapkit/toolbox-cosmos"),D=E?.[W],A=S(W)({server:D,stagenet:R}),L=await A.getSigner(C),M=await A.getAddressFromMnemonic(C);return{address:M,walletMethods:{...A,deposit:({assetValue:q,memo:j})=>A.deposit({assetValue:q,memo:j,from:M,signer:L}),transfer:(q)=>A.transfer({...q,from:M,signer:L}),signMessage:async(q)=>{let j=await A.createPrivateKeyFromPhrase(C);return A.signWithPrivateKey({privateKey:j,message:q})}}}}case o0.Polkadot:case o0.Chainflip:{let{Network:S,getToolboxByChain:D,createKeyring:A}=await import("@swapkit/toolbox-substrate"),L=await A(C,S[W].prefix),M=await D(W,{signer:L,providerUrl:W===o0.Polkadot?uZ(o0.Polkadot):uZ(o0.Chainflip)});return{address:L.address,walletMethods:M}}case o0.Solana:{let{SOLToolbox:S,createKeysForPath:D}=await import("@swapkit/toolbox-solana"),A=D({phrase:C,derivationPath:k}),L=S({rpcUrl:G,signer:A});return{address:L.getAddressFromKeys(A),walletMethods:{...L}}}case o0.Ripple:{let{XRPToolbox:S,createSigner:D}=await import("@swapkit/toolbox-ripple"),A=D(C),L=S({rpcUrl:G,signer:A});return{address:A.address,walletMethods:{...L}}}default:throw new Error(`Unsupported chain ${W}`)}};function WO({addChain:E,apis:G,rpcUrls:W,config:{thorswapApiKey:C,covalentApiKey:H,ethplorerApiKey:z,blockchairApiKey:V,stagenet:P,swapkitApiKey:k}}){return async function R(S,D,A){VO({apiKey:C});let M=$O(S,GO,hZ.KEYSTORE).map(async(q)=>{let j=typeof A==="number"?A:0,x=A&&typeof A==="object"?A[q]:void 0,[g,N,y,f,o]=IO[q],r=x||OO(q===o0.Solana?[g,N,y,f]:[g,N,y,f,o],j),V0=QO(r),{address:Y0,walletMethods:u}=await KO({derivationPath:V0,chain:q,apis:G,rpcUrl:W[q],covalentApiKey:H,ethplorerApiKey:z,phrase:D,blockchairApiKey:V,swapkitApiKey:k,stagenet:P});E({...u,chain:q,address:Y0,balance:[],walletType:hZ.KEYSTORE})});return await Promise.all(M),!0}}var JO={connectKeystore:WO};export{DO as validatePhrase,JO as keystoreWallet,TO as generatePhrase,CO as encryptToKeyStore,LO as decryptFromKeystore};
|
|
1
|
+
var N=Object.create;var{getPrototypeOf:L,defineProperty:E,getOwnPropertyNames:Y}=Object;var v=Object.prototype.hasOwnProperty;var u=(o,e,s)=>{s=o!=null?N(L(o)):{};let n=e||!o||!o.__esModule?E(s,"default",{value:o,enumerable:!0}):s;for(let g of Y(o))if(!v.call(n,g))E(n,g,{get:()=>o[g],enumerable:!0});return n};var w=((o)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(o,{get:(e,s)=>(typeof require!=="undefined"?require:e)[s]}):o)(function(o){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});import{createCipheriv as q,createDecipheriv as $,pbkdf2 as G,randomBytes as b}from"node:crypto";import{generateMnemonic as J,validateMnemonic as Q}from"@scure/bip39";import{wordlist as R}from"@scure/bip39/wordlists/english";import S from"blakejs";var W=(o)=>{let e=o;if(!(e instanceof Buffer))e=Buffer.from(e,"hex");let s=S.blake2bInit(32);return S.blake2bUpdate(s,e),Array.from(S.blake2bFinal(s)).map((n)=>n<16?`0${n.toString(16)}`:n.toString(16)).join("")},F=(o,e,s,n,g)=>new Promise((y,T)=>{G(o,e,s,n,g,(f,C)=>{if(f)T(f);else y(C)})}),gt=async(o,e)=>{let s=b(32),n=b(16),g={c:262144,prf:"hmac-sha256",dklen:32,salt:s.toString("hex")},y="aes-128-ctr",T=await F(Buffer.from(e),s,g.c,g.dklen,"sha256"),f=q("aes-128-ctr",T.subarray(0,16),n),C=Buffer.concat([f.update(Buffer.from(o,"utf8")),f.final()]);return{meta:"xchain-keystore",version:1,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:n.toString("hex")},ciphertext:C.toString("hex"),kdf:"pbkdf2",kdfparams:g,mac:W(Buffer.concat([T.subarray(16,32),Buffer.from(C)]))}}},pt=(o=12)=>{return J(R,o===12?128:256)},Tt=(o)=>{return Q(o,R)},ft=async(o,e)=>{switch(o.version){case 1:{let s=o.crypto.kdfparams,n=await F(Buffer.from(e),Buffer.from(s.salt,"hex"),s.c,s.dklen,"sha256"),g=Buffer.from(o.crypto.ciphertext,"hex");if(W(Buffer.concat([n.subarray(16,32),g]))!==o.crypto.mac)throw new Error("Invalid password");let T=$(o.crypto.cipher,n.subarray(0,16),Buffer.from(o.crypto.cipherparams.iv,"hex"));return Buffer.concat([T.update(g),T.final()]).toString("utf8")}default:throw new Error("Unsupported keystore version")}};import{Chain as a,CosmosChains as Z,EVMChains as _,NetworkDerivationPath as V,UTXOChains as z,WalletOption as O,derivationPathToString as I,filterSupportedChains as j,getRPCUrl as B,pickEvmApiKey as k,setRequestClientConfig as tt,updatedLastIndex as ot}from"@swapkit/helpers";var st=[..._,...z,...Z,a.Polkadot,a.Chainflip,a.Solana,a.Ripple],nt=async({apis:o,rpcUrl:e,chain:s,phrase:n,ethplorerApiKey:g,covalentApiKey:y,blockchairApiKey:T,swapkitApiKey:f,derivationPath:C,stagenet:x})=>{switch(s){case a.Arbitrum:case a.Avalanche:case a.Base:case a.BinanceSmartChain:case a.Ethereum:case a.Optimism:case a.Polygon:{let{getProvider:c,getToolboxByChain:l}=await import("@swapkit/toolbox-evm"),{HDNodeWallet:t}=await import("ethers"),r=o?.[s],m=k({chain:s,nonEthApiKey:y,ethApiKey:g}),i=c(s,e),p=t.fromPhrase(n).connect(i),P={api:r,apiKey:m,provider:i,signer:p};return{address:p.address,walletMethods:l(s)(P)}}case a.BitcoinCash:{let i=function({builder:P,utxos:d}){return d.forEach((K,A)=>{P.sign(A,r,void 0,65,K.witnessUtxo.value)}),P.build()},{BCHToolbox:c}=await import("@swapkit/toolbox-utxo"),l=o?.[s],t=c({rpcUrl:e,apiKey:T,apiClient:l}),r=await t.createKeysForPath({phrase:n,derivationPath:C}),m=t.getAddressFromKeys(r),p={...t,transfer:(P)=>t.transfer({...P,from:m,signTransaction:i})};return{address:m,walletMethods:p}}case a.Bitcoin:case a.Dash:case a.Dogecoin:case a.Litecoin:{let{getToolboxByChain:c}=await import("@swapkit/toolbox-utxo"),l=o?.[s],t=c(s)({rpcUrl:e,apiKey:T,apiClient:l}),r=t.createKeysForPath({phrase:n,derivationPath:C}),m=t.getAddressFromKeys(r);return{address:m,walletMethods:{...t,transfer:(i)=>t.transfer({...i,from:m,signTransaction:(p)=>p.signAllInputs(r)})}}}case a.Cosmos:case a.Kujira:{let{getToolboxByChain:c}=await import("@swapkit/toolbox-cosmos"),l=o?.[s],t=c(s)({server:l,stagenet:x,swapkitApiKey:f}),r=await t.getAddressFromMnemonic(n),m=await t.getSigner(n);return{address:r,walletMethods:{...t,transfer:(p)=>t.transfer({...p,signer:m})}}}case a.Maya:case a.THORChain:{let{getToolboxByChain:c}=await import("@swapkit/toolbox-cosmos"),l=o?.[s],t=c(s)({server:l,stagenet:x}),r=await t.getSigner(n),m=await t.getAddressFromMnemonic(n);return{address:m,walletMethods:{...t,deposit:({assetValue:i,memo:p})=>t.deposit({assetValue:i,memo:p,from:m,signer:r}),transfer:(i)=>t.transfer({...i,from:m,signer:r}),signMessage:async(i)=>{let p=await t.createPrivateKeyFromPhrase(n);return t.signWithPrivateKey({privateKey:p,message:i})}}}}case a.Polkadot:case a.Chainflip:{let{Network:c,getToolboxByChain:l,createKeyring:t}=await import("@swapkit/toolbox-substrate"),r=await t(n,c[s].prefix),m=await l(s,{signer:r,providerUrl:s===a.Polkadot?B(a.Polkadot):B(a.Chainflip)});return{address:r.address,walletMethods:m}}case a.Solana:{let{SOLToolbox:c,createKeysForPath:l}=await import("@swapkit/toolbox-solana"),t=l({phrase:n,derivationPath:C}),r=c({rpcUrl:e,signer:t});return{address:r.getAddressFromKeys(t),walletMethods:{...r}}}case a.Ripple:{let{XRPToolbox:c,createSigner:l}=await import("@swapkit/toolbox-ripple"),t=l(n),r=c({rpcUrl:e,signer:t});return{address:t.address,walletMethods:{...r}}}default:throw new Error(`Unsupported chain ${s}`)}};function at({addChain:o,apis:e,rpcUrls:s,config:{thorswapApiKey:n,covalentApiKey:g,ethplorerApiKey:y,blockchairApiKey:T,stagenet:f,swapkitApiKey:C}}){return async function x(c,l,t){tt({apiKey:n});let m=j(c,st,O.KEYSTORE).map(async(i)=>{let p=typeof t==="number"?t:0,P=t&&typeof t==="object"?t[i]:void 0,[d,K,A,h,M]=V[i],U=P||ot(i===a.Solana?[d,K,A,h]:[d,K,A,h,M],p),D=I(U),{address:H,walletMethods:X}=await nt({derivationPath:D,chain:i,apis:e,rpcUrl:s[i],covalentApiKey:g,ethplorerApiKey:y,phrase:l,blockchairApiKey:T,swapkitApiKey:C,stagenet:f});o({...X,chain:i,address:H,balance:[],walletType:O.KEYSTORE})});return await Promise.all(m),!0}}var et={connectKeystore:at};export{Tt as validatePhrase,et as keystoreWallet,pt as generatePhrase,gt as encryptToKeyStore,ft as decryptFromKeystore};
|
|
17
2
|
|
|
18
|
-
//# debugId=
|
|
3
|
+
//# debugId=2450FB17B8B76C2364756E2164756E21
|