lufi/themes/default/public/js/lufi-api.browser.js

12 lines
706 KiB
JavaScript

var O8=Object.create;var{getPrototypeOf:$8,defineProperty:o2,getOwnPropertyNames:E5,getOwnPropertyDescriptor:G8}=Object,x5=Object.prototype.hasOwnProperty;var Y8=(B,k,V)=>{V=B!=null?O8($8(B)):{};const N=k||!B||!B.__esModule?o2(V,"default",{value:B,enumerable:!0}):V;for(let Q of E5(B))if(!x5.call(N,Q))o2(N,Q,{get:()=>B[Q],enumerable:!0});return N},I5=new WeakMap,C8=(B)=>{var k=I5.get(B),V;if(k)return k;if(k=o2({},"__esModule",{value:!0}),B&&typeof B==="object"||typeof B==="function")E5(B).map((N)=>!x5.call(k,N)&&o2(k,N,{get:()=>B[N],enumerable:!(V=G8(B,N))||V.enumerable}));return I5.set(B,k),k};var K8=(B,k)=>()=>(k||B((k={exports:{}}).exports,k),k.exports);var j1=(B,k)=>{for(var V in k)o2(B,V,{get:k[V],enumerable:!0,configurable:!0,set:(N)=>k[V]=()=>N})};var j8=(B,k)=>()=>(B&&(k=B(B=0)),k);var g6={};j1(g6,{webcrypto:()=>K5,timingSafeEqual:()=>n2,scryptSync:()=>N1,scrypt:()=>L1,randomUUID:()=>Y5,getRandomValues:()=>G5,getCurves:()=>C5,default:()=>_6,DEFAULT_ENCODING:()=>_2});function C5(){return o3}var W8,Q1,Z8,Q8,z8,H8,v1=(B,k)=>()=>(B&&(k=B(B=0)),k),K0=(B,k)=>()=>(k||B((k={exports:{}}).exports,k),k.exports),z1=(B,k)=>{for(var V in k)Q1(B,V,{get:k[V],enumerable:!0})},W1=(B,k,V,N)=>{if(k&&typeof k=="object"||typeof k=="function")for(let Q of Q8(k))!H8.call(B,Q)&&Q!==V&&Q1(B,Q,{get:()=>k[Q],enumerable:!(N=Z8(k,Q))||N.enumerable});return B},A1=(B,k,V)=>(W1(B,k,"default"),V&&W1(V,k,"default")),E2=(B,k,V)=>(V=B!=null?W8(z8(B)):{},W1(k||!B||!B.__esModule?Q1(V,"default",{value:B,enumerable:!0}):V,B)),T2=(B)=>W1(Q1({},"__esModule",{value:!0}),B),V8,P8,P2,h0,g2,c0,x2,M5,H1,U8,w5,m2,y5,_5,g5,w2,M1,s2,S1,Z1,w1,F8,T8,m5,p5,D8,N8,L8,c5,y1,_1,p2,k8,B8,b5,R8,d5,q8,g1,H2,k2,m1,U2,V1,S5,R2,h5,S2,v2,A2,I8,c2,p1,c1,E8,b1,l5,P1,o5,x8,B2,u5,s5,d1,S8,f5,v8,v5,h1,n5,A8,I2,a2,M8,a5,r5,i5,w8,t5,e5,X6,J6,y8,O6,$6,D2,l1,G6,_8,g8,m8,p8,c8,r2,b8,d8,h8,l8,o8,Y6,A5,C6,o1,U1,u8,K6,j6,F1,s8,f8,u1,n8,a8,M2,W6,r8,i8,s1,Z6,Q6,t8,e8,X3,z6,J3,H6,b2,V6,P6,y2,f1,O3,$3,U6,F6,G3,Y3,C3,n1,a1,K3,q2,T6,N2,T1,j3,W3,Z3,D6,L2,i2,N6,Q3,L6,z3,k6,H3,V3,P3,U3,r1,F3,i1,T3,D3,N3,L3,k3,B3,R3,t1,B6,e1,X5,f2,J5,O5,R6,q3,q6,I6,I3,E6,E3,x3,S3,x6,v3,A3,M3,w3,D1,S6,y3,_3,g3,m3,p3,v6,A6,$5,M6,c3,b3,d3,h3,w6,y6,l3,_2="buffer",G5=(B)=>crypto.getRandomValues(B),Y5=()=>crypto.randomUUID(),o3,n2,N1,L1,K5,_6;var m6=j8(()=>{W8=Object.create,Q1=Object.defineProperty,Z8=Object.getOwnPropertyDescriptor,Q8=Object.getOwnPropertyNames,z8=Object.getPrototypeOf,H8=Object.prototype.hasOwnProperty,V8=K0((B)=>{B.byteLength=L,B.toByteArray=U,B.fromByteArray=q;var k=[],V=[],N=typeof Uint8Array<"u"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(R=0,C=Q.length;R<C;++R)k[R]=Q[R],V[Q.charCodeAt(R)]=R;var R,C;V["-".charCodeAt(0)]=62,V["_".charCodeAt(0)]=63;function H(F){var I=F.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var x=F.indexOf("=");x===-1&&(x=I);var w=x===I?0:4-x%4;return[x,w]}function L(F){var I=H(F),x=I[0],w=I[1];return(x+w)*3/4-w}function P(F,I,x){return(I+x)*3/4-x}function U(F){var I,x=H(F),w=x[0],M=x[1],y=new N(P(F,w,M)),m=0,c=M>0?w-4:w,h;for(h=0;h<c;h+=4)I=V[F.charCodeAt(h)]<<18|V[F.charCodeAt(h+1)]<<12|V[F.charCodeAt(h+2)]<<6|V[F.charCodeAt(h+3)],y[m++]=I>>16&255,y[m++]=I>>8&255,y[m++]=I&255;return M===2&&(I=V[F.charCodeAt(h)]<<2|V[F.charCodeAt(h+1)]>>4,y[m++]=I&255),M===1&&(I=V[F.charCodeAt(h)]<<10|V[F.charCodeAt(h+1)]<<4|V[F.charCodeAt(h+2)]>>2,y[m++]=I>>8&255,y[m++]=I&255),y}function z(F){return k[F>>18&63]+k[F>>12&63]+k[F>>6&63]+k[F&63]}function T(F,I,x){for(var w,M=[],y=I;y<x;y+=3)w=(F[y]<<16&16711680)+(F[y+1]<<8&65280)+(F[y+2]&255),M.push(z(w));return M.join("")}function q(F){for(var I,x=F.length,w=x%3,M=[],y=16383,m=0,c=x-w;m<c;m+=y)M.push(T(F,m,m+y>c?c:m+y));return w===1?(I=F[x-1],M.push(k[I>>2]+k[I<<4&63]+"==")):w===2&&(I=(F[x-2]<<8)+F[x-1],M.push(k[I>>10]+k[I>>4&63]+k[I<<2&63]+"=")),M.join("")}}),P8=K0((B)=>{B.read=function(k,V,N,Q,R){var C,H,L=R*8-Q-1,P=(1<<L)-1,U=P>>1,z=-7,T=N?R-1:0,q=N?-1:1,F=k[V+T];for(T+=q,C=F&(1<<-z)-1,F>>=-z,z+=L;z>0;C=C*256+k[V+T],T+=q,z-=8);for(H=C&(1<<-z)-1,C>>=-z,z+=Q;z>0;H=H*256+k[V+T],T+=q,z-=8);if(C===0)C=1-U;else{if(C===P)return H?NaN:(F?-1:1)*(1/0);H=H+Math.pow(2,Q),C=C-U}return(F?-1:1)*H*Math.pow(2,C-Q)},B.write=function(k,V,N,Q,R,C){var H,L,P,U=C*8-R-1,z=(1<<U)-1,T=z>>1,q=R===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=Q?0:C-1,I=Q?1:-1,x=V<0||V===0&&1/V<0?1:0;for(V=Math.abs(V),isNaN(V)||V===1/0?(L=isNaN(V)?1:0,H=z):(H=Math.floor(Math.log(V)/Math.LN2),V*(P=Math.pow(2,-H))<1&&(H--,P*=2),H+T>=1?V+=q/P:V+=q*Math.pow(2,1-T),V*P>=2&&(H++,P/=2),H+T>=z?(L=0,H=z):H+T>=1?(L=(V*P-1)*Math.pow(2,R),H=H+T):(L=V*Math.pow(2,T-1)*Math.pow(2,R),H=0));R>=8;k[N+F]=L&255,F+=I,L/=256,R-=8);for(H=H<<R|L,U+=R;U>0;k[N+F]=H&255,F+=I,H/=256,U-=8);k[N+F-I]|=x*128}}),P2=K0((B)=>{var k=V8(),V=P8(),N=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;B.Buffer=H,B.SlowBuffer=M,B.INSPECT_MAX_BYTES=50;var Q=2147483647;B.kMaxLength=Q,H.TYPED_ARRAY_SUPPORT=R(),!H.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function R(){try{let D=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(D,v),D.foo()===42}catch{return!1}}Object.defineProperty(H.prototype,"parent",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.buffer}}),Object.defineProperty(H.prototype,"offset",{enumerable:!0,get:function(){if(H.isBuffer(this))return this.byteOffset}});function C(D){if(D>Q)throw new RangeError('The value "'+D+'" is invalid for option "size"');let v=new Uint8Array(D);return Object.setPrototypeOf(v,H.prototype),v}function H(D,v,b){if(typeof D=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return z(D)}return L(D,v,b)}H.poolSize=8192;function L(D,v,b){if(typeof D=="string")return T(D,v);if(ArrayBuffer.isView(D))return F(D);if(D==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D);if(W0(D,ArrayBuffer)||D&&W0(D.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(W0(D,SharedArrayBuffer)||D&&W0(D.buffer,SharedArrayBuffer)))return I(D,v,b);if(typeof D=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let l=D.valueOf&&D.valueOf();if(l!=null&&l!==D)return H.from(l,v,b);let u=x(D);if(u)return u;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof D[Symbol.toPrimitive]=="function")return H.from(D[Symbol.toPrimitive]("string"),v,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D)}H.from=function(D,v,b){return L(D,v,b)},Object.setPrototypeOf(H.prototype,Uint8Array.prototype),Object.setPrototypeOf(H,Uint8Array);function P(D){if(typeof D!="number")throw new TypeError('"size" argument must be of type number');if(D<0)throw new RangeError('The value "'+D+'" is invalid for option "size"')}function U(D,v,b){return P(D),D<=0?C(D):v!==void 0?typeof b=="string"?C(D).fill(v,b):C(D).fill(v):C(D)}H.alloc=function(D,v,b){return U(D,v,b)};function z(D){return P(D),C(D<0?0:w(D)|0)}H.allocUnsafe=function(D){return z(D)},H.allocUnsafeSlow=function(D){return z(D)};function T(D,v){if((typeof v!="string"||v==="")&&(v="utf8"),!H.isEncoding(v))throw new TypeError("Unknown encoding: "+v);let b=y(D,v)|0,l=C(b),u=l.write(D,v);return u!==b&&(l=l.slice(0,u)),l}function q(D){let v=D.length<0?0:w(D.length)|0,b=C(v);for(let l=0;l<v;l+=1)b[l]=D[l]&255;return b}function F(D){if(W0(D,Uint8Array)){let v=new Uint8Array(D);return I(v.buffer,v.byteOffset,v.byteLength)}return q(D)}function I(D,v,b){if(v<0||D.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(D.byteLength<v+(b||0))throw new RangeError('"length" is outside of buffer bounds');let l;return v===void 0&&b===void 0?l=new Uint8Array(D):b===void 0?l=new Uint8Array(D,v):l=new Uint8Array(D,v,b),Object.setPrototypeOf(l,H.prototype),l}function x(D){if(H.isBuffer(D)){let v=w(D.length)|0,b=C(v);return b.length===0||D.copy(b,0,0,v),b}if(D.length!==void 0)return typeof D.length!="number"||_0(D.length)?C(0):q(D);if(D.type==="Buffer"&&Array.isArray(D.data))return q(D.data)}function w(D){if(D>=Q)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q.toString(16)+" bytes");return D|0}function M(D){return+D!=D&&(D=0),H.alloc(+D)}H.isBuffer=function(D){return D!=null&&D._isBuffer===!0&&D!==H.prototype},H.compare=function(D,v){if(W0(D,Uint8Array)&&(D=H.from(D,D.offset,D.byteLength)),W0(v,Uint8Array)&&(v=H.from(v,v.offset,v.byteLength)),!H.isBuffer(D)||!H.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(D===v)return 0;let b=D.length,l=v.length;for(let u=0,F0=Math.min(b,l);u<F0;++u)if(D[u]!==v[u]){b=D[u],l=v[u];break}return b<l?-1:l<b?1:0},H.isEncoding=function(D){switch(String(D).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}},H.concat=function(D,v){if(!Array.isArray(D))throw new TypeError('"list" argument must be an Array of Buffers');if(D.length===0)return H.alloc(0);let b;if(v===void 0)for(v=0,b=0;b<D.length;++b)v+=D[b].length;let l=H.allocUnsafe(v),u=0;for(b=0;b<D.length;++b){let F0=D[b];if(W0(F0,Uint8Array))u+F0.length>l.length?(H.isBuffer(F0)||(F0=H.from(F0)),F0.copy(l,u)):Uint8Array.prototype.set.call(l,F0,u);else if(H.isBuffer(F0))F0.copy(l,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=F0.length}return l};function y(D,v){if(H.isBuffer(D))return D.length;if(ArrayBuffer.isView(D)||W0(D,ArrayBuffer))return D.byteLength;if(typeof D!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof D);let b=D.length,l=arguments.length>2&&arguments[2]===!0;if(!l&&b===0)return 0;let u=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return e(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b*2;case"hex":return b>>>1;case"base64":return y0(D).length;default:if(u)return l?-1:e(D).length;v=(""+v).toLowerCase(),u=!0}}H.byteLength=y;function m(D,v,b){let l=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((b===void 0||b>this.length)&&(b=this.length),b<=0)||(b>>>=0,v>>>=0,b<=v))return"";for(D||(D="utf8");;)switch(D){case"hex":return K(this,v,b);case"utf8":case"utf-8":return G(this,v,b);case"ascii":return W(this,v,b);case"latin1":case"binary":return Z(this,v,b);case"base64":return O(this,v,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,v,b);default:if(l)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),l=!0}}H.prototype._isBuffer=!0;function c(D,v,b){let l=D[v];D[v]=D[b],D[b]=l}H.prototype.swap16=function(){let D=this.length;if(D%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<D;v+=2)c(this,v,v+1);return this},H.prototype.swap32=function(){let D=this.length;if(D%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<D;v+=4)c(this,v,v+3),c(this,v+1,v+2);return this},H.prototype.swap64=function(){let D=this.length;if(D%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<D;v+=8)c(this,v,v+7),c(this,v+1,v+6),c(this,v+2,v+5),c(this,v+3,v+4);return this},H.prototype.toString=function(){let D=this.length;return D===0?"":arguments.length===0?G(this,0,D):m.apply(this,arguments)},H.prototype.toLocaleString=H.prototype.toString,H.prototype.equals=function(D){if(!H.isBuffer(D))throw new TypeError("Argument must be a Buffer");return this===D?!0:H.compare(this,D)===0},H.prototype.inspect=function(){let D="",v=B.INSPECT_MAX_BYTES;return D=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(D+=" ... "),"<Buffer "+D+">"},N&&(H.prototype[N]=H.prototype.inspect),H.prototype.compare=function(D,v,b,l,u){if(W0(D,Uint8Array)&&(D=H.from(D,D.offset,D.byteLength)),!H.isBuffer(D))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof D);if(v===void 0&&(v=0),b===void 0&&(b=D?D.length:0),l===void 0&&(l=0),u===void 0&&(u=this.length),v<0||b>D.length||l<0||u>this.length)throw new RangeError("out of range index");if(l>=u&&v>=b)return 0;if(l>=u)return-1;if(v>=b)return 1;if(v>>>=0,b>>>=0,l>>>=0,u>>>=0,this===D)return 0;let F0=u-l,$0=b-v,z0=Math.min(F0,$0),b0=this.slice(l,u),V0=D.slice(v,b);for(let H0=0;H0<z0;++H0)if(b0[H0]!==V0[H0]){F0=b0[H0],$0=V0[H0];break}return F0<$0?-1:$0<F0?1:0};function h(D,v,b,l,u){if(D.length===0)return-1;if(typeof b=="string"?(l=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,_0(b)&&(b=u?0:D.length-1),b<0&&(b=D.length+b),b>=D.length){if(u)return-1;b=D.length-1}else if(b<0)if(u)b=0;else return-1;if(typeof v=="string"&&(v=H.from(v,l)),H.isBuffer(v))return v.length===0?-1:a(D,v,b,l,u);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?u?Uint8Array.prototype.indexOf.call(D,v,b):Uint8Array.prototype.lastIndexOf.call(D,v,b):a(D,[v],b,l,u);throw new TypeError("val must be string, number or Buffer")}function a(D,v,b,l,u){let F0=1,$0=D.length,z0=v.length;if(l!==void 0&&(l=String(l).toLowerCase(),l==="ucs2"||l==="ucs-2"||l==="utf16le"||l==="utf-16le")){if(D.length<2||v.length<2)return-1;F0=2,$0/=2,z0/=2,b/=2}function b0(H0,g0){return F0===1?H0[g0]:H0.readUInt16BE(g0*F0)}let V0;if(u){let H0=-1;for(V0=b;V0<$0;V0++)if(b0(D,V0)===b0(v,H0===-1?0:V0-H0)){if(H0===-1&&(H0=V0),V0-H0+1===z0)return H0*F0}else H0!==-1&&(V0-=V0-H0),H0=-1}else for(b+z0>$0&&(b=$0-z0),V0=b;V0>=0;V0--){let H0=!0;for(let g0=0;g0<z0;g0++)if(b0(D,V0+g0)!==b0(v,g0)){H0=!1;break}if(H0)return V0}return-1}H.prototype.includes=function(D,v,b){return this.indexOf(D,v,b)!==-1},H.prototype.indexOf=function(D,v,b){return h(this,D,v,b,!0)},H.prototype.lastIndexOf=function(D,v,b){return h(this,D,v,b,!1)};function i(D,v,b,l){b=Number(b)||0;let u=D.length-b;l?(l=Number(l),l>u&&(l=u)):l=u;let F0=v.length;l>F0/2&&(l=F0/2);let $0;for($0=0;$0<l;++$0){let z0=parseInt(v.substr($0*2,2),16);if(_0(z0))return $0;D[b+$0]=z0}return $0}function G0(D,v,b,l){return C0(e(v,D.length-b),D,b,l)}function n(D,v,b,l){return C0(J0(v),D,b,l)}function Z0(D,v,b,l){return C0(y0(v),D,b,l)}function X(D,v,b,l){return C0(t(v,D.length-b),D,b,l)}H.prototype.write=function(D,v,b,l){if(v===void 0)l="utf8",b=this.length,v=0;else if(b===void 0&&typeof v=="string")l=v,b=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(b)?(b=b>>>0,l===void 0&&(l="utf8")):(l=b,b=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let u=this.length-v;if((b===void 0||b>u)&&(b=u),D.length>0&&(b<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");l||(l="utf8");let F0=!1;for(;;)switch(l){case"hex":return i(this,D,v,b);case"utf8":case"utf-8":return G0(this,D,v,b);case"ascii":case"latin1":case"binary":return n(this,D,v,b);case"base64":return Z0(this,D,v,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,D,v,b);default:if(F0)throw new TypeError("Unknown encoding: "+l);l=(""+l).toLowerCase(),F0=!0}},H.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(D,v,b){return v===0&&b===D.length?k.fromByteArray(D):k.fromByteArray(D.slice(v,b))}function G(D,v,b){b=Math.min(D.length,b);let l=[],u=v;for(;u<b;){let F0=D[u],$0=null,z0=F0>239?4:F0>223?3:F0>191?2:1;if(u+z0<=b){let b0,V0,H0,g0;switch(z0){case 1:F0<128&&($0=F0);break;case 2:b0=D[u+1],(b0&192)===128&&(g0=(F0&31)<<6|b0&63,g0>127&&($0=g0));break;case 3:b0=D[u+1],V0=D[u+2],(b0&192)===128&&(V0&192)===128&&(g0=(F0&15)<<12|(b0&63)<<6|V0&63,g0>2047&&(g0<55296||g0>57343)&&($0=g0));break;case 4:b0=D[u+1],V0=D[u+2],H0=D[u+3],(b0&192)===128&&(V0&192)===128&&(H0&192)===128&&(g0=(F0&15)<<18|(b0&63)<<12|(V0&63)<<6|H0&63,g0>65535&&g0<1114112&&($0=g0))}}$0===null?($0=65533,z0=1):$0>65535&&($0-=65536,l.push($0>>>10&1023|55296),$0=56320|$0&1023),l.push($0),u+=z0}return Y(l)}var $=4096;function Y(D){let v=D.length;if(v<=$)return String.fromCharCode.apply(String,D);let b="",l=0;for(;l<v;)b+=String.fromCharCode.apply(String,D.slice(l,l+=$));return b}function W(D,v,b){let l="";b=Math.min(D.length,b);for(let u=v;u<b;++u)l+=String.fromCharCode(D[u]&127);return l}function Z(D,v,b){let l="";b=Math.min(D.length,b);for(let u=v;u<b;++u)l+=String.fromCharCode(D[u]);return l}function K(D,v,b){let l=D.length;(!v||v<0)&&(v=0),(!b||b<0||b>l)&&(b=l);let u="";for(let F0=v;F0<b;++F0)u+=P0[D[F0]];return u}function J(D,v,b){let l=D.slice(v,b),u="";for(let F0=0;F0<l.length-1;F0+=2)u+=String.fromCharCode(l[F0]+l[F0+1]*256);return u}H.prototype.slice=function(D,v){let b=this.length;D=~~D,v=v===void 0?b:~~v,D<0?(D+=b,D<0&&(D=0)):D>b&&(D=b),v<0?(v+=b,v<0&&(v=0)):v>b&&(v=b),v<D&&(v=D);let l=this.subarray(D,v);return Object.setPrototypeOf(l,H.prototype),l};function j(D,v,b){if(D%1!==0||D<0)throw new RangeError("offset is not uint");if(D+v>b)throw new RangeError("Trying to access beyond buffer length")}H.prototype.readUintLE=H.prototype.readUIntLE=function(D,v,b){D=D>>>0,v=v>>>0,b||j(D,v,this.length);let l=this[D],u=1,F0=0;for(;++F0<v&&(u*=256);)l+=this[D+F0]*u;return l},H.prototype.readUintBE=H.prototype.readUIntBE=function(D,v,b){D=D>>>0,v=v>>>0,b||j(D,v,this.length);let l=this[D+--v],u=1;for(;v>0&&(u*=256);)l+=this[D+--v]*u;return l},H.prototype.readUint8=H.prototype.readUInt8=function(D,v){return D=D>>>0,v||j(D,1,this.length),this[D]},H.prototype.readUint16LE=H.prototype.readUInt16LE=function(D,v){return D=D>>>0,v||j(D,2,this.length),this[D]|this[D+1]<<8},H.prototype.readUint16BE=H.prototype.readUInt16BE=function(D,v){return D=D>>>0,v||j(D,2,this.length),this[D]<<8|this[D+1]},H.prototype.readUint32LE=H.prototype.readUInt32LE=function(D,v){return D=D>>>0,v||j(D,4,this.length),(this[D]|this[D+1]<<8|this[D+2]<<16)+this[D+3]*16777216},H.prototype.readUint32BE=H.prototype.readUInt32BE=function(D,v){return D=D>>>0,v||j(D,4,this.length),this[D]*16777216+(this[D+1]<<16|this[D+2]<<8|this[D+3])},H.prototype.readBigUInt64LE=Q0(function(D){D=D>>>0,Y0(D,"offset");let v=this[D],b=this[D+7];(v===void 0||b===void 0)&&g(D,this.length-8);let l=v+this[++D]*256+this[++D]*65536+this[++D]*16777216,u=this[++D]+this[++D]*256+this[++D]*65536+b*16777216;return BigInt(l)+(BigInt(u)<<BigInt(32))}),H.prototype.readBigUInt64BE=Q0(function(D){D=D>>>0,Y0(D,"offset");let v=this[D],b=this[D+7];(v===void 0||b===void 0)&&g(D,this.length-8);let l=v*16777216+this[++D]*65536+this[++D]*256+this[++D],u=this[++D]*16777216+this[++D]*65536+this[++D]*256+b;return(BigInt(l)<<BigInt(32))+BigInt(u)}),H.prototype.readIntLE=function(D,v,b){D=D>>>0,v=v>>>0,b||j(D,v,this.length);let l=this[D],u=1,F0=0;for(;++F0<v&&(u*=256);)l+=this[D+F0]*u;return u*=128,l>=u&&(l-=Math.pow(2,8*v)),l},H.prototype.readIntBE=function(D,v,b){D=D>>>0,v=v>>>0,b||j(D,v,this.length);let l=v,u=1,F0=this[D+--l];for(;l>0&&(u*=256);)F0+=this[D+--l]*u;return u*=128,F0>=u&&(F0-=Math.pow(2,8*v)),F0},H.prototype.readInt8=function(D,v){return D=D>>>0,v||j(D,1,this.length),this[D]&128?(255-this[D]+1)*-1:this[D]},H.prototype.readInt16LE=function(D,v){D=D>>>0,v||j(D,2,this.length);let b=this[D]|this[D+1]<<8;return b&32768?b|4294901760:b},H.prototype.readInt16BE=function(D,v){D=D>>>0,v||j(D,2,this.length);let b=this[D+1]|this[D]<<8;return b&32768?b|4294901760:b},H.prototype.readInt32LE=function(D,v){return D=D>>>0,v||j(D,4,this.length),this[D]|this[D+1]<<8|this[D+2]<<16|this[D+3]<<24},H.prototype.readInt32BE=function(D,v){return D=D>>>0,v||j(D,4,this.length),this[D]<<24|this[D+1]<<16|this[D+2]<<8|this[D+3]},H.prototype.readBigInt64LE=Q0(function(D){D=D>>>0,Y0(D,"offset");let v=this[D],b=this[D+7];(v===void 0||b===void 0)&&g(D,this.length-8);let l=this[D+4]+this[D+5]*256+this[D+6]*65536+(b<<24);return(BigInt(l)<<BigInt(32))+BigInt(v+this[++D]*256+this[++D]*65536+this[++D]*16777216)}),H.prototype.readBigInt64BE=Q0(function(D){D=D>>>0,Y0(D,"offset");let v=this[D],b=this[D+7];(v===void 0||b===void 0)&&g(D,this.length-8);let l=(v<<24)+this[++D]*65536+this[++D]*256+this[++D];return(BigInt(l)<<BigInt(32))+BigInt(this[++D]*16777216+this[++D]*65536+this[++D]*256+b)}),H.prototype.readFloatLE=function(D,v){return D=D>>>0,v||j(D,4,this.length),V.read(this,D,!0,23,4)},H.prototype.readFloatBE=function(D,v){return D=D>>>0,v||j(D,4,this.length),V.read(this,D,!1,23,4)},H.prototype.readDoubleLE=function(D,v){return D=D>>>0,v||j(D,8,this.length),V.read(this,D,!0,52,8)},H.prototype.readDoubleBE=function(D,v){return D=D>>>0,v||j(D,8,this.length),V.read(this,D,!1,52,8)};function A(D,v,b,l,u,F0){if(!H.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>u||v<F0)throw new RangeError('"value" argument is out of bounds');if(b+l>D.length)throw new RangeError("Index out of range")}H.prototype.writeUintLE=H.prototype.writeUIntLE=function(D,v,b,l){if(D=+D,v=v>>>0,b=b>>>0,!l){let $0=Math.pow(2,8*b)-1;A(this,D,v,b,$0,0)}let u=1,F0=0;for(this[v]=D&255;++F0<b&&(u*=256);)this[v+F0]=D/u&255;return v+b},H.prototype.writeUintBE=H.prototype.writeUIntBE=function(D,v,b,l){if(D=+D,v=v>>>0,b=b>>>0,!l){let $0=Math.pow(2,8*b)-1;A(this,D,v,b,$0,0)}let u=b-1,F0=1;for(this[v+u]=D&255;--u>=0&&(F0*=256);)this[v+u]=D/F0&255;return v+b},H.prototype.writeUint8=H.prototype.writeUInt8=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,1,255,0),this[v]=D&255,v+1},H.prototype.writeUint16LE=H.prototype.writeUInt16LE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,2,65535,0),this[v]=D&255,this[v+1]=D>>>8,v+2},H.prototype.writeUint16BE=H.prototype.writeUInt16BE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,2,65535,0),this[v]=D>>>8,this[v+1]=D&255,v+2},H.prototype.writeUint32LE=H.prototype.writeUInt32LE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,4,4294967295,0),this[v+3]=D>>>24,this[v+2]=D>>>16,this[v+1]=D>>>8,this[v]=D&255,v+4},H.prototype.writeUint32BE=H.prototype.writeUInt32BE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,4,4294967295,0),this[v]=D>>>24,this[v+1]=D>>>16,this[v+2]=D>>>8,this[v+3]=D&255,v+4};function E(D,v,b,l,u){X0(v,l,u,D,b,7);let F0=Number(v&BigInt(4294967295));D[b++]=F0,F0=F0>>8,D[b++]=F0,F0=F0>>8,D[b++]=F0,F0=F0>>8,D[b++]=F0;let $0=Number(v>>BigInt(32)&BigInt(4294967295));return D[b++]=$0,$0=$0>>8,D[b++]=$0,$0=$0>>8,D[b++]=$0,$0=$0>>8,D[b++]=$0,b}function _(D,v,b,l,u){X0(v,l,u,D,b,7);let F0=Number(v&BigInt(4294967295));D[b+7]=F0,F0=F0>>8,D[b+6]=F0,F0=F0>>8,D[b+5]=F0,F0=F0>>8,D[b+4]=F0;let $0=Number(v>>BigInt(32)&BigInt(4294967295));return D[b+3]=$0,$0=$0>>8,D[b+2]=$0,$0=$0>>8,D[b+1]=$0,$0=$0>>8,D[b]=$0,b+8}H.prototype.writeBigUInt64LE=Q0(function(D,v=0){return E(this,D,v,BigInt(0),BigInt("0xffffffffffffffff"))}),H.prototype.writeBigUInt64BE=Q0(function(D,v=0){return _(this,D,v,BigInt(0),BigInt("0xffffffffffffffff"))}),H.prototype.writeIntLE=function(D,v,b,l){if(D=+D,v=v>>>0,!l){let z0=Math.pow(2,8*b-1);A(this,D,v,b,z0-1,-z0)}let u=0,F0=1,$0=0;for(this[v]=D&255;++u<b&&(F0*=256);)D<0&&$0===0&&this[v+u-1]!==0&&($0=1),this[v+u]=(D/F0>>0)-$0&255;return v+b},H.prototype.writeIntBE=function(D,v,b,l){if(D=+D,v=v>>>0,!l){let z0=Math.pow(2,8*b-1);A(this,D,v,b,z0-1,-z0)}let u=b-1,F0=1,$0=0;for(this[v+u]=D&255;--u>=0&&(F0*=256);)D<0&&$0===0&&this[v+u+1]!==0&&($0=1),this[v+u]=(D/F0>>0)-$0&255;return v+b},H.prototype.writeInt8=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,1,127,-128),D<0&&(D=255+D+1),this[v]=D&255,v+1},H.prototype.writeInt16LE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,2,32767,-32768),this[v]=D&255,this[v+1]=D>>>8,v+2},H.prototype.writeInt16BE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,2,32767,-32768),this[v]=D>>>8,this[v+1]=D&255,v+2},H.prototype.writeInt32LE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,4,2147483647,-2147483648),this[v]=D&255,this[v+1]=D>>>8,this[v+2]=D>>>16,this[v+3]=D>>>24,v+4},H.prototype.writeInt32BE=function(D,v,b){return D=+D,v=v>>>0,b||A(this,D,v,4,2147483647,-2147483648),D<0&&(D=4294967295+D+1),this[v]=D>>>24,this[v+1]=D>>>16,this[v+2]=D>>>8,this[v+3]=D&255,v+4},H.prototype.writeBigInt64LE=Q0(function(D,v=0){return E(this,D,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),H.prototype.writeBigInt64BE=Q0(function(D,v=0){return _(this,D,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function s(D,v,b,l,u,F0){if(b+l>D.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function r(D,v,b,l,u){return v=+v,b=b>>>0,u||s(D,v,b,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),V.write(D,v,b,l,23,4),b+4}H.prototype.writeFloatLE=function(D,v,b){return r(this,D,v,!0,b)},H.prototype.writeFloatBE=function(D,v,b){return r(this,D,v,!1,b)};function O0(D,v,b,l,u){return v=+v,b=b>>>0,u||s(D,v,b,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),V.write(D,v,b,l,52,8),b+8}H.prototype.writeDoubleLE=function(D,v,b){return O0(this,D,v,!0,b)},H.prototype.writeDoubleBE=function(D,v,b){return O0(this,D,v,!1,b)},H.prototype.copy=function(D,v,b,l){if(!H.isBuffer(D))throw new TypeError("argument should be a Buffer");if(b||(b=0),!l&&l!==0&&(l=this.length),v>=D.length&&(v=D.length),v||(v=0),l>0&&l<b&&(l=b),l===b||D.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(b<0||b>=this.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("sourceEnd out of bounds");l>this.length&&(l=this.length),D.length-v<l-b&&(l=D.length-v+b);let u=l-b;return this===D&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,b,l):Uint8Array.prototype.set.call(D,this.subarray(b,l),v),u},H.prototype.fill=function(D,v,b,l){if(typeof D=="string"){if(typeof v=="string"?(l=v,v=0,b=this.length):typeof b=="string"&&(l=b,b=this.length),l!==void 0&&typeof l!="string")throw new TypeError("encoding must be a string");if(typeof l=="string"&&!H.isEncoding(l))throw new TypeError("Unknown encoding: "+l);if(D.length===1){let F0=D.charCodeAt(0);(l==="utf8"&&F0<128||l==="latin1")&&(D=F0)}}else typeof D=="number"?D=D&255:typeof D=="boolean"&&(D=Number(D));if(v<0||this.length<v||this.length<b)throw new RangeError("Out of range index");if(b<=v)return this;v=v>>>0,b=b===void 0?this.length:b>>>0,D||(D=0);let u;if(typeof D=="number")for(u=v;u<b;++u)this[u]=D;else{let F0=H.isBuffer(D)?D:H.from(D,l),$0=F0.length;if($0===0)throw new TypeError('The value "'+D+'" is invalid for argument "value"');for(u=0;u<b-v;++u)this[u+v]=F0[u%$0]}return this};var o={};function d(D,v,b){o[D]=class extends b{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${D}]`,this.stack,delete this.name}get code(){return D}set code(l){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:l,writable:!0})}toString(){return`${this.name} [${D}]: ${this.message}`}}}d("ERR_BUFFER_OUT_OF_BOUNDS",function(D){return D?`${D} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),d("ERR_INVALID_ARG_TYPE",function(D,v){return`The "${D}" argument must be of type number. Received type ${typeof v}`},TypeError),d("ERR_OUT_OF_RANGE",function(D,v,b){let l=`The value of "${D}" is out of range.`,u=b;return Number.isInteger(b)&&Math.abs(b)>4294967296?u=f(String(b)):typeof b=="bigint"&&(u=String(b),(b>BigInt(2)**BigInt(32)||b<-(BigInt(2)**BigInt(32)))&&(u=f(u)),u+="n"),l+=` It must be ${v}. Received ${u}`,l},RangeError);function f(D){let v="",b=D.length,l=D[0]==="-"?1:0;for(;b>=l+4;b-=3)v=`_${D.slice(b-3,b)}${v}`;return`${D.slice(0,b)}${v}`}function U0(D,v,b){Y0(v,"offset"),(D[v]===void 0||D[v+b]===void 0)&&g(v,D.length-(b+1))}function X0(D,v,b,l,u,F0){if(D>b||D<v){let $0=typeof v=="bigint"?"n":"",z0;throw F0>3?v===0||v===BigInt(0)?z0=`>= 0${$0} and < 2${$0} ** ${(F0+1)*8}${$0}`:z0=`>= -(2${$0} ** ${(F0+1)*8-1}${$0}) and < 2 ** ${(F0+1)*8-1}${$0}`:z0=`>= ${v}${$0} and <= ${b}${$0}`,new o.ERR_OUT_OF_RANGE("value",z0,D)}U0(l,u,F0)}function Y0(D,v){if(typeof D!="number")throw new o.ERR_INVALID_ARG_TYPE(v,"number",D)}function g(D,v,b){throw Math.floor(D)!==D?(Y0(D,b),new o.ERR_OUT_OF_RANGE(b||"offset","an integer",D)):v<0?new o.ERR_BUFFER_OUT_OF_BOUNDS:new o.ERR_OUT_OF_RANGE(b||"offset",`>= ${b?1:0} and <= ${v}`,D)}var S=/[^+/0-9A-Za-z-_]/g;function p(D){if(D=D.split("=")[0],D=D.trim().replace(S,""),D.length<2)return"";for(;D.length%4!==0;)D=D+"=";return D}function e(D,v){v=v||1/0;let b,l=D.length,u=null,F0=[];for(let $0=0;$0<l;++$0){if(b=D.charCodeAt($0),b>55295&&b<57344){if(!u){if(b>56319){(v-=3)>-1&&F0.push(239,191,189);continue}else if($0+1===l){(v-=3)>-1&&F0.push(239,191,189);continue}u=b;continue}if(b<56320){(v-=3)>-1&&F0.push(239,191,189),u=b;continue}b=(u-55296<<10|b-56320)+65536}else u&&(v-=3)>-1&&F0.push(239,191,189);if(u=null,b<128){if((v-=1)<0)break;F0.push(b)}else if(b<2048){if((v-=2)<0)break;F0.push(b>>6|192,b&63|128)}else if(b<65536){if((v-=3)<0)break;F0.push(b>>12|224,b>>6&63|128,b&63|128)}else if(b<1114112){if((v-=4)<0)break;F0.push(b>>18|240,b>>12&63|128,b>>6&63|128,b&63|128)}else throw new Error("Invalid code point")}return F0}function J0(D){let v=[];for(let b=0;b<D.length;++b)v.push(D.charCodeAt(b)&255);return v}function t(D,v){let b,l,u,F0=[];for(let $0=0;$0<D.length&&!((v-=2)<0);++$0)b=D.charCodeAt($0),l=b>>8,u=b%256,F0.push(u),F0.push(l);return F0}function y0(D){return k.toByteArray(p(D))}function C0(D,v,b,l){let u;for(u=0;u<l&&!(u+b>=v.length||u>=D.length);++u)v[u+b]=D[u];return u}function W0(D,v){return D instanceof v||D!=null&&D.constructor!=null&&D.constructor.name!=null&&D.constructor.name===v.name}function _0(D){return D!==D}var P0=function(){let D="0123456789abcdef",v=new Array(256);for(let b=0;b<16;++b){let l=b*16;for(let u=0;u<16;++u)v[l+u]=D[b]+D[u]}return v}();function Q0(D){return typeof BigInt>"u"?d0:D}function d0(){throw new Error("BigInt not supported")}}),h0=K0((B,k)=>{var V=P2(),N=V.Buffer;function Q(C,H){for(var L in C)H[L]=C[L]}N.from&&N.alloc&&N.allocUnsafe&&N.allocUnsafeSlow?k.exports=V:(Q(V,B),B.Buffer=R);function R(C,H,L){return N(C,H,L)}R.prototype=Object.create(N.prototype),Q(N,R),R.from=function(C,H,L){if(typeof C=="number")throw new TypeError("Argument must not be a number");return N(C,H,L)},R.alloc=function(C,H,L){if(typeof C!="number")throw new TypeError("Argument must be a number");var P=N(C);return H!==void 0?typeof L=="string"?P.fill(H,L):P.fill(H):P.fill(0),P},R.allocUnsafe=function(C){if(typeof C!="number")throw new TypeError("Argument must be a number");return N(C)},R.allocUnsafeSlow=function(C){if(typeof C!="number")throw new TypeError("Argument must be a number");return V.SlowBuffer(C)}}),g2=K0((B,k)=>{var V=65536,N=4294967295;function Q(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}var R=h0().Buffer,C=global.crypto||global.msCrypto;C&&C.getRandomValues?k.exports=H:k.exports=Q;function H(L,P){if(L>N)throw new RangeError("requested too many random bytes");var U=R.allocUnsafe(L);if(L>0)if(L>V)for(var z=0;z<L;z+=V)C.getRandomValues(U.slice(z,z+V));else C.getRandomValues(U);return typeof P=="function"?process.nextTick(function(){P(null,U)}):U}}),c0=K0((B,k)=>{typeof Object.create=="function"?k.exports=function(V,N){N&&(V.super_=N,V.prototype=Object.create(N.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(V,N){if(N){V.super_=N;var Q=function(){};Q.prototype=N.prototype,V.prototype=new Q,V.prototype.constructor=V}}}),x2=K0((B,k)=>{var V=typeof Reflect=="object"?Reflect:null,N=V&&typeof V.apply=="function"?V.apply:function(h,a,i){return Function.prototype.apply.call(h,a,i)},Q;V&&typeof V.ownKeys=="function"?Q=V.ownKeys:Object.getOwnPropertySymbols?Q=function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:Q=function(h){return Object.getOwnPropertyNames(h)};function R(h){console&&console.warn&&console.warn(h)}var C=Number.isNaN||function(h){return h!==h};function H(){H.init.call(this)}k.exports=H,k.exports.once=y,H.EventEmitter=H,H.prototype._events=void 0,H.prototype._eventsCount=0,H.prototype._maxListeners=void 0;var L=10;function P(h){if(typeof h!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof h)}Object.defineProperty(H,"defaultMaxListeners",{enumerable:!0,get:function(){return L},set:function(h){if(typeof h!="number"||h<0||C(h))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+h+".");L=h}}),H.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},H.prototype.setMaxListeners=function(h){if(typeof h!="number"||h<0||C(h))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+h+".");return this._maxListeners=h,this};function U(h){return h._maxListeners===void 0?H.defaultMaxListeners:h._maxListeners}H.prototype.getMaxListeners=function(){return U(this)},H.prototype.emit=function(h){for(var a=[],i=1;i<arguments.length;i++)a.push(arguments[i]);var G0=h==="error",n=this._events;if(n!==void 0)G0=G0&&n.error===void 0;else if(!G0)return!1;if(G0){var Z0;if(a.length>0&&(Z0=a[0]),Z0 instanceof Error)throw Z0;var X=new Error("Unhandled error."+(Z0?" ("+Z0.message+")":""));throw X.context=Z0,X}var O=n[h];if(O===void 0)return!1;if(typeof O=="function")N(O,this,a);else for(var G=O.length,$=x(O,G),i=0;i<G;++i)N($[i],this,a);return!0};function z(h,a,i,G0){var n,Z0,X;if(P(i),Z0=h._events,Z0===void 0?(Z0=h._events=Object.create(null),h._eventsCount=0):(Z0.newListener!==void 0&&(h.emit("newListener",a,i.listener?i.listener:i),Z0=h._events),X=Z0[a]),X===void 0)X=Z0[a]=i,++h._eventsCount;else if(typeof X=="function"?X=Z0[a]=G0?[i,X]:[X,i]:G0?X.unshift(i):X.push(i),n=U(h),n>0&&X.length>n&&!X.warned){X.warned=!0;var O=new Error("Possible EventEmitter memory leak detected. "+X.length+" "+String(a)+" listeners added. Use emitter.setMaxListeners() to increase limit");O.name="MaxListenersExceededWarning",O.emitter=h,O.type=a,O.count=X.length,R(O)}return h}H.prototype.addListener=function(h,a){return z(this,h,a,!1)},H.prototype.on=H.prototype.addListener,H.prototype.prependListener=function(h,a){return z(this,h,a,!0)};function T(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function q(h,a,i){var G0={fired:!1,wrapFn:void 0,target:h,type:a,listener:i},n=T.bind(G0);return n.listener=i,G0.wrapFn=n,n}H.prototype.once=function(h,a){return P(a),this.on(h,q(this,h,a)),this},H.prototype.prependOnceListener=function(h,a){return P(a),this.prependListener(h,q(this,h,a)),this},H.prototype.removeListener=function(h,a){var i,G0,n,Z0,X;if(P(a),G0=this._events,G0===void 0)return this;if(i=G0[h],i===void 0)return this;if(i===a||i.listener===a)--this._eventsCount===0?this._events=Object.create(null):(delete G0[h],G0.removeListener&&this.emit("removeListener",h,i.listener||a));else if(typeof i!="function"){for(n=-1,Z0=i.length-1;Z0>=0;Z0--)if(i[Z0]===a||i[Z0].listener===a){X=i[Z0].listener,n=Z0;break}if(n<0)return this;n===0?i.shift():w(i,n),i.length===1&&(G0[h]=i[0]),G0.removeListener!==void 0&&this.emit("removeListener",h,X||a)}return this},H.prototype.off=H.prototype.removeListener,H.prototype.removeAllListeners=function(h){var a,i,G0;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[h]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[h]),this;if(arguments.length===0){var n=Object.keys(i),Z0;for(G0=0;G0<n.length;++G0)Z0=n[G0],Z0!=="removeListener"&&this.removeAllListeners(Z0);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(a=i[h],typeof a=="function")this.removeListener(h,a);else if(a!==void 0)for(G0=a.length-1;G0>=0;G0--)this.removeListener(h,a[G0]);return this};function F(h,a,i){var G0=h._events;if(G0===void 0)return[];var n=G0[a];return n===void 0?[]:typeof n=="function"?i?[n.listener||n]:[n]:i?M(n):x(n,n.length)}H.prototype.listeners=function(h){return F(this,h,!0)},H.prototype.rawListeners=function(h){return F(this,h,!1)},H.listenerCount=function(h,a){return typeof h.listenerCount=="function"?h.listenerCount(a):I.call(h,a)},H.prototype.listenerCount=I;function I(h){var a=this._events;if(a!==void 0){var i=a[h];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}H.prototype.eventNames=function(){return this._eventsCount>0?Q(this._events):[]};function x(h,a){for(var i=new Array(a),G0=0;G0<a;++G0)i[G0]=h[G0];return i}function w(h,a){for(;a+1<h.length;a++)h[a]=h[a+1];h.pop()}function M(h){for(var a=new Array(h.length),i=0;i<a.length;++i)a[i]=h[i].listener||h[i];return a}function y(h,a){return new Promise(function(i,G0){function n(X){h.removeListener(a,Z0),G0(X)}function Z0(){typeof h.removeListener=="function"&&h.removeListener("error",n),i([].slice.call(arguments))}c(h,a,Z0,{once:!0}),a!=="error"&&m(h,n,{once:!0})})}function m(h,a,i){typeof h.on=="function"&&c(h,"error",a,i)}function c(h,a,i,G0){if(typeof h.on=="function")G0.once?h.once(a,i):h.on(a,i);else if(typeof h.addEventListener=="function")h.addEventListener(a,function n(Z0){G0.once&&h.removeEventListener(a,n),i(Z0)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof h)}}),M5=K0((B,k)=>{k.exports=x2().EventEmitter}),H1=K0(()=>{}),U8=K0((B,k)=>{function V(F,I){var x=Object.keys(F);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(F);I&&(w=w.filter(function(M){return Object.getOwnPropertyDescriptor(F,M).enumerable})),x.push.apply(x,w)}return x}function N(F){for(var I=1;I<arguments.length;I++){var x=arguments[I]!=null?arguments[I]:{};I%2?V(Object(x),!0).forEach(function(w){Q(F,w,x[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(x)):V(Object(x)).forEach(function(w){Object.defineProperty(F,w,Object.getOwnPropertyDescriptor(x,w))})}return F}function Q(F,I,x){return I in F?Object.defineProperty(F,I,{value:x,enumerable:!0,configurable:!0,writable:!0}):F[I]=x,F}function R(F,I){if(!(F instanceof I))throw new TypeError("Cannot call a class as a function")}function C(F,I){for(var x=0;x<I.length;x++){var w=I[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(F,w.key,w)}}function H(F,I,x){return I&&C(F.prototype,I),x&&C(F,x),F}var L=P2(),P=L.Buffer,U=H1(),z=U.inspect,T=z&&z.custom||"inspect";function q(F,I,x){P.prototype.copy.call(F,I,x)}k.exports=function(){function F(){R(this,F),this.head=null,this.tail=null,this.length=0}return H(F,[{key:"push",value:function(I){var x={data:I,next:null};this.length>0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(I){var x={data:I,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var I=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,I}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(I){if(this.length===0)return"";for(var x=this.head,w=""+x.data;x=x.next;)w+=I+x.data;return w}},{key:"concat",value:function(I){if(this.length===0)return P.alloc(0);for(var x=P.allocUnsafe(I>>>0),w=this.head,M=0;w;)q(w.data,x,M),M+=w.data.length,w=w.next;return x}},{key:"consume",value:function(I,x){var w;return I<this.head.data.length?(w=this.head.data.slice(0,I),this.head.data=this.head.data.slice(I)):I===this.head.data.length?w=this.shift():w=x?this._getString(I):this._getBuffer(I),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(I){var x=this.head,w=1,M=x.data;for(I-=M.length;x=x.next;){var y=x.data,m=I>y.length?y.length:I;if(m===y.length?M+=y:M+=y.slice(0,I),I-=m,I===0){m===y.length?(++w,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=y.slice(m));break}++w}return this.length-=w,M}},{key:"_getBuffer",value:function(I){var x=P.allocUnsafe(I),w=this.head,M=1;for(w.data.copy(x),I-=w.data.length;w=w.next;){var y=w.data,m=I>y.length?y.length:I;if(y.copy(x,x.length-I,0,m),I-=m,I===0){m===y.length?(++M,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=y.slice(m));break}++M}return this.length-=M,x}},{key:T,value:function(I,x){return z(this,N({},x,{depth:0,customInspect:!1}))}}]),F}()}),w5=K0((B,k)=>{function V(L,P){var U=this,z=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return z||T?(P?P(L):L&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(C,this,L)):process.nextTick(C,this,L)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(L||null,function(q){!P&&q?U._writableState?U._writableState.errorEmitted?process.nextTick(Q,U):(U._writableState.errorEmitted=!0,process.nextTick(N,U,q)):process.nextTick(N,U,q):P?(process.nextTick(Q,U),P(q)):process.nextTick(Q,U)}),this)}function N(L,P){C(L,P),Q(L)}function Q(L){L._writableState&&!L._writableState.emitClose||L._readableState&&!L._readableState.emitClose||L.emit("close")}function R(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function C(L,P){L.emit("error",P)}function H(L,P){var{_readableState:U,_writableState:z}=L;U&&U.autoDestroy||z&&z.autoDestroy?L.destroy(P):L.emit("error",P)}k.exports={destroy:V,undestroy:R,errorOrDestroy:H}}),m2=K0((B,k)=>{function V(P,U){P.prototype=Object.create(U.prototype),P.prototype.constructor=P,P.__proto__=U}var N={};function Q(P,U,z){z||(z=Error);function T(F,I,x){return typeof U=="string"?U:U(F,I,x)}var q=function(F){V(I,F);function I(x,w,M){return F.call(this,T(x,w,M))||this}return I}(z);q.prototype.name=z.name,q.prototype.code=P,N[P]=q}function R(P,U){if(Array.isArray(P)){var z=P.length;return P=P.map(function(T){return String(T)}),z>2?"one of ".concat(U," ").concat(P.slice(0,z-1).join(", "),", or ")+P[z-1]:z===2?"one of ".concat(U," ").concat(P[0]," or ").concat(P[1]):"of ".concat(U," ").concat(P[0])}else return"of ".concat(U," ").concat(String(P))}function C(P,U,z){return P.substr(!z||z<0?0:+z,U.length)===U}function H(P,U,z){return(z===void 0||z>P.length)&&(z=P.length),P.substring(z-U.length,z)===U}function L(P,U,z){return typeof z!="number"&&(z=0),z+U.length>P.length?!1:P.indexOf(U,z)!==-1}Q("ERR_INVALID_OPT_VALUE",function(P,U){return'The value "'+U+'" is invalid for option "'+P+'"'},TypeError),Q("ERR_INVALID_ARG_TYPE",function(P,U,z){var T;typeof U=="string"&&C(U,"not ")?(T="must not be",U=U.replace(/^not /,"")):T="must be";var q;if(H(P," argument"))q="The ".concat(P," ").concat(T," ").concat(R(U,"type"));else{var F=L(P,".")?"property":"argument";q='The "'.concat(P,'" ').concat(F," ").concat(T," ").concat(R(U,"type"))}return q+=". Received type ".concat(typeof z),q},TypeError),Q("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Q("ERR_METHOD_NOT_IMPLEMENTED",function(P){return"The "+P+" method is not implemented"}),Q("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Q("ERR_STREAM_DESTROYED",function(P){return"Cannot call "+P+" after a stream was destroyed"}),Q("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Q("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Q("ERR_STREAM_WRITE_AFTER_END","write after end"),Q("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Q("ERR_UNKNOWN_ENCODING",function(P){return"Unknown encoding: "+P},TypeError),Q("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),k.exports.codes=N}),y5=K0((B,k)=>{var V=m2().codes.ERR_INVALID_OPT_VALUE;function N(R,C,H){return R.highWaterMark!=null?R.highWaterMark:C?R[H]:null}function Q(R,C,H,L){var P=N(C,L,H);if(P!=null){if(!(isFinite(P)&&Math.floor(P)===P)||P<0){var U=L?H:"highWaterMark";throw new V(U,P)}return Math.floor(P)}return R.objectMode?16:16384}k.exports={getHighWaterMark:Q}}),_5=K0((B,k)=>{k.exports=V;function V(Q,R){if(N("noDeprecation"))return Q;var C=!1;function H(){if(!C){if(N("throwDeprecation"))throw new Error(R);N("traceDeprecation")?console.trace(R):console.warn(R),C=!0}return Q.apply(this,arguments)}return H}function N(Q){try{if(!global.localStorage)return!1}catch{return!1}var R=global.localStorage[Q];return R==null?!1:String(R).toLowerCase()==="true"}}),g5=K0((B,k)=>{k.exports=n;function V(o){var d=this;this.next=null,this.entry=null,this.finish=function(){O0(d,o)}}var N;n.WritableState=i;var Q={deprecate:_5()},R=M5(),C=P2().Buffer,H=global.Uint8Array||function(){};function L(o){return C.from(o)}function P(o){return C.isBuffer(o)||o instanceof H}var U=w5(),z=y5(),T=z.getHighWaterMark,q=m2().codes,F=q.ERR_INVALID_ARG_TYPE,I=q.ERR_METHOD_NOT_IMPLEMENTED,x=q.ERR_MULTIPLE_CALLBACK,w=q.ERR_STREAM_CANNOT_PIPE,M=q.ERR_STREAM_DESTROYED,y=q.ERR_STREAM_NULL_VALUES,m=q.ERR_STREAM_WRITE_AFTER_END,c=q.ERR_UNKNOWN_ENCODING,h=U.errorOrDestroy;c0()(n,R);function a(){}function i(o,d,f){N=N||w2(),o=o||{},typeof f!="boolean"&&(f=d instanceof N),this.objectMode=!!o.objectMode,f&&(this.objectMode=this.objectMode||!!o.writableObjectMode),this.highWaterMark=T(this,o,"writableHighWaterMark",f),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U0=o.decodeStrings===!1;this.decodeStrings=!U0,this.defaultEncoding=o.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){Z(d,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new V(this)}i.prototype.getBuffer=function(){for(var o=this.bufferedRequest,d=[];o;)d.push(o),o=o.next;return d},function(){try{Object.defineProperty(i.prototype,"buffer",{get:Q.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G0=Function.prototype[Symbol.hasInstance],Object.defineProperty(n,Symbol.hasInstance,{value:function(o){return G0.call(this,o)?!0:this!==n?!1:o&&o._writableState instanceof i}})):G0=function(o){return o instanceof this};function n(o){N=N||w2();var d=this instanceof N;if(!d&&!G0.call(n,this))return new n(o);this._writableState=new i(o,this,d),this.writable=!0,o&&(typeof o.write=="function"&&(this._write=o.write),typeof o.writev=="function"&&(this._writev=o.writev),typeof o.destroy=="function"&&(this._destroy=o.destroy),typeof o.final=="function"&&(this._final=o.final)),R.call(this)}n.prototype.pipe=function(){h(this,new w)};function Z0(o,d){var f=new m;h(o,f),process.nextTick(d,f)}function X(o,d,f,U0){var X0;return f===null?X0=new y:typeof f!="string"&&!d.objectMode&&(X0=new F("chunk",["string","Buffer"],f)),X0?(h(o,X0),process.nextTick(U0,X0),!1):!0}n.prototype.write=function(o,d,f){var U0=this._writableState,X0=!1,Y0=!U0.objectMode&&P(o);return Y0&&!C.isBuffer(o)&&(o=L(o)),typeof d=="function"&&(f=d,d=null),Y0?d="buffer":d||(d=U0.defaultEncoding),typeof f!="function"&&(f=a),U0.ending?Z0(this,f):(Y0||X(this,U0,o,f))&&(U0.pendingcb++,X0=G(this,U0,Y0,o,d,f)),X0},n.prototype.cork=function(){this._writableState.corked++},n.prototype.uncork=function(){var o=this._writableState;o.corked&&(o.corked--,!o.writing&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&j(this,o))},n.prototype.setDefaultEncoding=function(o){if(typeof o=="string"&&(o=o.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((o+"").toLowerCase())>-1))throw new c(o);return this._writableState.defaultEncoding=o,this},Object.defineProperty(n.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(o,d,f){return!o.objectMode&&o.decodeStrings!==!1&&typeof d=="string"&&(d=C.from(d,f)),d}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(o,d,f,U0,X0,Y0){if(!f){var g=O(d,U0,X0);U0!==g&&(f=!0,X0="buffer",U0=g)}var S=d.objectMode?1:U0.length;d.length+=S;var p=d.length<d.highWaterMark;if(p||(d.needDrain=!0),d.writing||d.corked){var e=d.lastBufferedRequest;d.lastBufferedRequest={chunk:U0,encoding:X0,isBuf:f,callback:Y0,next:null},e?e.next=d.lastBufferedRequest:d.bufferedRequest=d.lastBufferedRequest,d.bufferedRequestCount+=1}else $(o,d,!1,S,U0,X0,Y0);return p}function $(o,d,f,U0,X0,Y0,g){d.writelen=U0,d.writecb=g,d.writing=!0,d.sync=!0,d.destroyed?d.onwrite(new M("write")):f?o._writev(X0,d.onwrite):o._write(X0,Y0,d.onwrite),d.sync=!1}function Y(o,d,f,U0,X0){--d.pendingcb,f?(process.nextTick(X0,U0),process.nextTick(s,o,d),o._writableState.errorEmitted=!0,h(o,U0)):(X0(U0),o._writableState.errorEmitted=!0,h(o,U0),s(o,d))}function W(o){o.writing=!1,o.writecb=null,o.length-=o.writelen,o.writelen=0}function Z(o,d){var f=o._writableState,U0=f.sync,X0=f.writecb;if(typeof X0!="function")throw new x;if(W(f),d)Y(o,f,U0,d,X0);else{var Y0=A(f)||o.destroyed;!Y0&&!f.corked&&!f.bufferProcessing&&f.bufferedRequest&&j(o,f),U0?process.nextTick(K,o,f,Y0,X0):K(o,f,Y0,X0)}}function K(o,d,f,U0){f||J(o,d),d.pendingcb--,U0(),s(o,d)}function J(o,d){d.length===0&&d.needDrain&&(d.needDrain=!1,o.emit("drain"))}function j(o,d){d.bufferProcessing=!0;var f=d.bufferedRequest;if(o._writev&&f&&f.next){var U0=d.bufferedRequestCount,X0=new Array(U0),Y0=d.corkedRequestsFree;Y0.entry=f;for(var g=0,S=!0;f;)X0[g]=f,f.isBuf||(S=!1),f=f.next,g+=1;X0.allBuffers=S,$(o,d,!0,d.length,X0,"",Y0.finish),d.pendingcb++,d.lastBufferedRequest=null,Y0.next?(d.corkedRequestsFree=Y0.next,Y0.next=null):d.corkedRequestsFree=new V(d),d.bufferedRequestCount=0}else{for(;f;){var{chunk:p,encoding:e,callback:J0}=f,t=d.objectMode?1:p.length;if($(o,d,!1,t,p,e,J0),f=f.next,d.bufferedRequestCount--,d.writing)break}f===null&&(d.lastBufferedRequest=null)}d.bufferedRequest=f,d.bufferProcessing=!1}n.prototype._write=function(o,d,f){f(new I("_write()"))},n.prototype._writev=null,n.prototype.end=function(o,d,f){var U0=this._writableState;return typeof o=="function"?(f=o,o=null,d=null):typeof d=="function"&&(f=d,d=null),o!=null&&this.write(o,d),U0.corked&&(U0.corked=1,this.uncork()),U0.ending||r(this,U0,f),this},Object.defineProperty(n.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A(o){return o.ending&&o.length===0&&o.bufferedRequest===null&&!o.finished&&!o.writing}function E(o,d){o._final(function(f){d.pendingcb--,f&&h(o,f),d.prefinished=!0,o.emit("prefinish"),s(o,d)})}function _(o,d){!d.prefinished&&!d.finalCalled&&(typeof o._final=="function"&&!d.destroyed?(d.pendingcb++,d.finalCalled=!0,process.nextTick(E,o,d)):(d.prefinished=!0,o.emit("prefinish")))}function s(o,d){var f=A(d);if(f&&(_(o,d),d.pendingcb===0&&(d.finished=!0,o.emit("finish"),d.autoDestroy))){var U0=o._readableState;(!U0||U0.autoDestroy&&U0.endEmitted)&&o.destroy()}return f}function r(o,d,f){d.ending=!0,s(o,d),f&&(d.finished?process.nextTick(f):o.once("finish",f)),d.ended=!0,o.writable=!1}function O0(o,d,f){var U0=o.entry;for(o.entry=null;U0;){var X0=U0.callback;d.pendingcb--,X0(f),U0=U0.next}d.corkedRequestsFree.next=o}Object.defineProperty(n.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(o){!this._writableState||(this._writableState.destroyed=o)}}),n.prototype.destroy=U.destroy,n.prototype._undestroy=U.undestroy,n.prototype._destroy=function(o,d){d(o)}}),w2=K0((B,k)=>{var V=Object.keys||function(z){var T=[];for(var q in z)T.push(q);return T};k.exports=L;var N=m5(),Q=g5();c0()(L,N);for(R=V(Q.prototype),H=0;H<R.length;H++)C=R[H],L.prototype[C]||(L.prototype[C]=Q.prototype[C]);var R,C,H;function L(z){if(!(this instanceof L))return new L(z);N.call(this,z),Q.call(this,z),this.allowHalfOpen=!0,z&&(z.readable===!1&&(this.readable=!1),z.writable===!1&&(this.writable=!1),z.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",P)))}Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function P(){this._writableState.ended||process.nextTick(U,this)}function U(z){z.end()}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(z){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=z,this._writableState.destroyed=z)}})}),M1=K0((B)=>{var k=h0().Buffer,V=k.isEncoding||function(M){switch(M=""+M,M&&M.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 N(M){if(!M)return"utf8";for(var y;;)switch(M){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 M;default:if(y)return;M=(""+M).toLowerCase(),y=!0}}function Q(M){var y=N(M);if(typeof y!="string"&&(k.isEncoding===V||!V(M)))throw new Error("Unknown encoding: "+M);return y||M}B.StringDecoder=R;function R(M){this.encoding=Q(M);var y;switch(this.encoding){case"utf16le":this.text=T,this.end=q,y=4;break;case"utf8":this.fillLast=P,y=4;break;case"base64":this.text=F,this.end=I,y=3;break;default:this.write=x,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.allocUnsafe(y)}R.prototype.write=function(M){if(M.length===0)return"";var y,m;if(this.lastNeed){if(y=this.fillLast(M),y===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m<M.length?y?y+this.text(M,m):this.text(M,m):y||""},R.prototype.end=z,R.prototype.text=U,R.prototype.fillLast=function(M){if(this.lastNeed<=M.length)return M.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,this.lastTotal-this.lastNeed,0,M.length),this.lastNeed-=M.length};function C(M){return M<=127?0:M>>5===6?2:M>>4===14?3:M>>3===30?4:M>>6===2?-1:-2}function H(M,y,m){var c=y.length-1;if(c<m)return 0;var h=C(y[c]);return h>=0?(h>0&&(M.lastNeed=h-1),h):--c<m||h===-2?0:(h=C(y[c]),h>=0?(h>0&&(M.lastNeed=h-2),h):--c<m||h===-2?0:(h=C(y[c]),h>=0?(h>0&&(h===2?h=0:M.lastNeed=h-3),h):0))}function L(M,y,m){if((y[0]&192)!==128)return M.lastNeed=0,"\uFFFD";if(M.lastNeed>1&&y.length>1){if((y[1]&192)!==128)return M.lastNeed=1,"\uFFFD";if(M.lastNeed>2&&y.length>2&&(y[2]&192)!==128)return M.lastNeed=2,"\uFFFD"}}function P(M){var y=this.lastTotal-this.lastNeed,m=L(this,M,y);if(m!==void 0)return m;if(this.lastNeed<=M.length)return M.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,y,0,M.length),this.lastNeed-=M.length}function U(M,y){var m=H(this,M,y);if(!this.lastNeed)return M.toString("utf8",y);this.lastTotal=m;var c=M.length-(m-this.lastNeed);return M.copy(this.lastChar,0,c),M.toString("utf8",y,c)}function z(M){var y=M&&M.length?this.write(M):"";return this.lastNeed?y+"\uFFFD":y}function T(M,y){if((M.length-y)%2===0){var m=M.toString("utf16le",y);if(m){var c=m.charCodeAt(m.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=M[M.length-1],M.toString("utf16le",y,M.length-1)}function q(M){var y=M&&M.length?this.write(M):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,m)}return y}function F(M,y){var m=(M.length-y)%3;return m===0?M.toString("base64",y):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=M[M.length-1]:(this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1]),M.toString("base64",y,M.length-m))}function I(M){var y=M&&M.length?this.write(M):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function x(M){return M.toString(this.encoding)}function w(M){return M&&M.length?this.write(M):""}}),s2={};z1(s2,{StringDecoder:()=>S1.StringDecoder,default:()=>S1.StringDecoder});Z1=v1(()=>{S1=E2(M1())}),w1=K0((B,k)=>{var V=m2().codes.ERR_STREAM_PREMATURE_CLOSE;function N(H){var L=!1;return function(){if(!L){L=!0;for(var P=arguments.length,U=new Array(P),z=0;z<P;z++)U[z]=arguments[z];H.apply(this,U)}}}function Q(){}function R(H){return H.setHeader&&typeof H.abort=="function"}function C(H,L,P){if(typeof L=="function")return C(H,null,L);L||(L={}),P=N(P||Q);var U=L.readable||L.readable!==!1&&H.readable,z=L.writable||L.writable!==!1&&H.writable,T=function(){H.writable||F()},q=H._writableState&&H._writableState.finished,F=function(){z=!1,q=!0,U||P.call(H)},I=H._readableState&&H._readableState.endEmitted,x=function(){U=!1,I=!0,z||P.call(H)},w=function(m){P.call(H,m)},M=function(){var m;if(U&&!I)return(!H._readableState||!H._readableState.ended)&&(m=new V),P.call(H,m);if(z&&!q)return(!H._writableState||!H._writableState.ended)&&(m=new V),P.call(H,m)},y=function(){H.req.on("finish",F)};return R(H)?(H.on("complete",F),H.on("abort",M),H.req?y():H.on("request",y)):z&&!H._writableState&&(H.on("end",T),H.on("close",T)),H.on("end",x),H.on("finish",F),L.error!==!1&&H.on("error",w),H.on("close",M),function(){H.removeListener("complete",F),H.removeListener("abort",M),H.removeListener("request",y),H.req&&H.req.removeListener("finish",F),H.removeListener("end",T),H.removeListener("close",T),H.removeListener("finish",F),H.removeListener("end",x),H.removeListener("error",w),H.removeListener("close",M)}}k.exports=C}),F8=K0((B,k)=>{var V;function N(y,m,c){return m in y?Object.defineProperty(y,m,{value:c,enumerable:!0,configurable:!0,writable:!0}):y[m]=c,y}var Q=w1(),R=Symbol("lastResolve"),C=Symbol("lastReject"),H=Symbol("error"),L=Symbol("ended"),P=Symbol("lastPromise"),U=Symbol("handlePromise"),z=Symbol("stream");function T(y,m){return{value:y,done:m}}function q(y){var m=y[R];if(m!==null){var c=y[z].read();c!==null&&(y[P]=null,y[R]=null,y[C]=null,m(T(c,!1)))}}function F(y){process.nextTick(q,y)}function I(y,m){return function(c,h){y.then(function(){if(m[L]){c(T(void 0,!0));return}m[U](c,h)},h)}}var x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((V={get stream(){return this[z]},next:function(){var y=this,m=this[H];if(m!==null)return Promise.reject(m);if(this[L])return Promise.resolve(T(void 0,!0));if(this[z].destroyed)return new Promise(function(i,G0){process.nextTick(function(){y[H]?G0(y[H]):i(T(void 0,!0))})});var c=this[P],h;if(c)h=new Promise(I(c,this));else{var a=this[z].read();if(a!==null)return Promise.resolve(T(a,!1));h=new Promise(this[U])}return this[P]=h,h}},N(V,Symbol.asyncIterator,function(){return this}),N(V,"return",function(){var y=this;return new Promise(function(m,c){y[z].destroy(null,function(h){if(h){c(h);return}m(T(void 0,!0))})})}),V),x),M=function(y){var m,c=Object.create(w,(m={},N(m,z,{value:y,writable:!0}),N(m,R,{value:null,writable:!0}),N(m,C,{value:null,writable:!0}),N(m,H,{value:null,writable:!0}),N(m,L,{value:y._readableState.endEmitted,writable:!0}),N(m,U,{value:function(h,a){var i=c[z].read();i?(c[P]=null,c[R]=null,c[C]=null,h(T(i,!1))):(c[R]=h,c[C]=a)},writable:!0}),m));return c[P]=null,Q(y,function(h){if(h&&h.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=c[C];a!==null&&(c[P]=null,c[R]=null,c[C]=null,a(h)),c[H]=h;return}var i=c[R];i!==null&&(c[P]=null,c[R]=null,c[C]=null,i(T(void 0,!0))),c[L]=!0}),y.on("readable",F.bind(null,c)),c};k.exports=M}),T8=K0((B,k)=>{k.exports=function(){throw new Error("Readable.from is not available in the browser")}}),m5=K0((B,k)=>{k.exports=X;var V;X.ReadableState=Z0;var N=x2().EventEmitter,Q=function(g,S){return g.listeners(S).length},R=M5(),C=P2().Buffer,H=global.Uint8Array||function(){};function L(g){return C.from(g)}function P(g){return C.isBuffer(g)||g instanceof H}var U=H1(),z;U&&U.debuglog?z=U.debuglog("stream"):z=function(){};var T=U8(),q=w5(),F=y5(),I=F.getHighWaterMark,x=m2().codes,w=x.ERR_INVALID_ARG_TYPE,M=x.ERR_STREAM_PUSH_AFTER_EOF,y=x.ERR_METHOD_NOT_IMPLEMENTED,m=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,c,h,a;c0()(X,R);var i=q.errorOrDestroy,G0=["error","close","destroy","pause","resume"];function n(g,S,p){if(typeof g.prependListener=="function")return g.prependListener(S,p);!g._events||!g._events[S]?g.on(S,p):Array.isArray(g._events[S])?g._events[S].unshift(p):g._events[S]=[p,g._events[S]]}function Z0(g,S,p){V=V||w2(),g=g||{},typeof p!="boolean"&&(p=S instanceof V),this.objectMode=!!g.objectMode,p&&(this.objectMode=this.objectMode||!!g.readableObjectMode),this.highWaterMark=I(this,g,"readableHighWaterMark",p),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding&&(c||(c=(Z1(),T2(s2)).StringDecoder),this.decoder=new c(g.encoding),this.encoding=g.encoding)}function X(g){if(V=V||w2(),!(this instanceof X))return new X(g);var S=this instanceof V;this._readableState=new Z0(g,this,S),this.readable=!0,g&&(typeof g.read=="function"&&(this._read=g.read),typeof g.destroy=="function"&&(this._destroy=g.destroy)),R.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){!this._readableState||(this._readableState.destroyed=g)}}),X.prototype.destroy=q.destroy,X.prototype._undestroy=q.undestroy,X.prototype._destroy=function(g,S){S(g)},X.prototype.push=function(g,S){var p=this._readableState,e;return p.objectMode?e=!0:typeof g=="string"&&(S=S||p.defaultEncoding,S!==p.encoding&&(g=C.from(g,S),S=""),e=!0),O(this,g,S,!1,e)},X.prototype.unshift=function(g){return O(this,g,null,!0,!1)};function O(g,S,p,e,J0){z("readableAddChunk",S);var t=g._readableState;if(S===null)t.reading=!1,K(g,t);else{var y0;if(J0||(y0=$(t,S)),y0)i(g,y0);else if(t.objectMode||S&&S.length>0)if(typeof S!="string"&&!t.objectMode&&Object.getPrototypeOf(S)!==C.prototype&&(S=L(S)),e)t.endEmitted?i(g,new m):G(g,t,S,!0);else if(t.ended)i(g,new M);else{if(t.destroyed)return!1;t.reading=!1,t.decoder&&!p?(S=t.decoder.write(S),t.objectMode||S.length!==0?G(g,t,S,!1):A(g,t)):G(g,t,S,!1)}else e||(t.reading=!1,A(g,t))}return!t.ended&&(t.length<t.highWaterMark||t.length===0)}function G(g,S,p,e){S.flowing&&S.length===0&&!S.sync?(S.awaitDrain=0,g.emit("data",p)):(S.length+=S.objectMode?1:p.length,e?S.buffer.unshift(p):S.buffer.push(p),S.needReadable&&J(g)),A(g,S)}function $(g,S){var p;return!P(S)&&typeof S!="string"&&S!==void 0&&!g.objectMode&&(p=new w("chunk",["string","Buffer","Uint8Array"],S)),p}X.prototype.isPaused=function(){return this._readableState.flowing===!1},X.prototype.setEncoding=function(g){c||(c=(Z1(),T2(s2)).StringDecoder);var S=new c(g);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;for(var p=this._readableState.buffer.head,e="";p!==null;)e+=S.write(p.data),p=p.next;return this._readableState.buffer.clear(),e!==""&&this._readableState.buffer.push(e),this._readableState.length=e.length,this};var Y=1073741824;function W(g){return g>=Y?g=Y:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}function Z(g,S){return g<=0||S.length===0&&S.ended?0:S.objectMode?1:g!==g?S.flowing&&S.length?S.buffer.head.data.length:S.length:(g>S.highWaterMark&&(S.highWaterMark=W(g)),g<=S.length?g:S.ended?S.length:(S.needReadable=!0,0))}X.prototype.read=function(g){z("read",g),g=parseInt(g,10);var S=this._readableState,p=g;if(g!==0&&(S.emittedReadable=!1),g===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return z("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?U0(this):J(this),null;if(g=Z(g,S),g===0&&S.ended)return S.length===0&&U0(this),null;var e=S.needReadable;z("need readable",e),(S.length===0||S.length-g<S.highWaterMark)&&(e=!0,z("length less than watermark",e)),S.ended||S.reading?(e=!1,z("reading or ended",e)):e&&(z("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0),this._read(S.highWaterMark),S.sync=!1,S.reading||(g=Z(p,S)));var J0;return g>0?J0=f(g,S):J0=null,J0===null?(S.needReadable=S.length<=S.highWaterMark,g=0):(S.length-=g,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),p!==g&&S.ended&&U0(this)),J0!==null&&this.emit("data",J0),J0};function K(g,S){if(z("onEofChunk"),!S.ended){if(S.decoder){var p=S.decoder.end();p&&p.length&&(S.buffer.push(p),S.length+=S.objectMode?1:p.length)}S.ended=!0,S.sync?J(g):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,j(g)))}}function J(g){var S=g._readableState;z("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(z("emitReadable",S.flowing),S.emittedReadable=!0,process.nextTick(j,g))}function j(g){var S=g._readableState;z("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(g.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,d(g)}function A(g,S){S.readingMore||(S.readingMore=!0,process.nextTick(E,g,S))}function E(g,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){var p=S.length;if(z("maybeReadMore read 0"),g.read(0),p===S.length)break}S.readingMore=!1}X.prototype._read=function(g){i(this,new y("_read()"))},X.prototype.pipe=function(g,S){var p=this,e=this._readableState;switch(e.pipesCount){case 0:e.pipes=g;break;case 1:e.pipes=[e.pipes,g];break;default:e.pipes.push(g);break}e.pipesCount+=1,z("pipe count=%d opts=%j",e.pipesCount,S);var J0=(!S||S.end!==!1)&&g!==process.stdout&&g!==process.stderr,t=J0?C0:b;e.endEmitted?process.nextTick(t):p.once("end",t),g.on("unpipe",y0);function y0(l,u){z("onunpipe"),l===p&&u&&u.hasUnpiped===!1&&(u.hasUnpiped=!0,P0())}function C0(){z("onend"),g.end()}var W0=_(p);g.on("drain",W0);var _0=!1;function P0(){z("cleanup"),g.removeListener("close",D),g.removeListener("finish",v),g.removeListener("drain",W0),g.removeListener("error",d0),g.removeListener("unpipe",y0),p.removeListener("end",C0),p.removeListener("end",b),p.removeListener("data",Q0),_0=!0,e.awaitDrain&&(!g._writableState||g._writableState.needDrain)&&W0()}p.on("data",Q0);function Q0(l){z("ondata");var u=g.write(l);z("dest.write",u),u===!1&&((e.pipesCount===1&&e.pipes===g||e.pipesCount>1&&Y0(e.pipes,g)!==-1)&&!_0&&(z("false write response, pause",e.awaitDrain),e.awaitDrain++),p.pause())}function d0(l){z("onerror",l),b(),g.removeListener("error",d0),Q(g,"error")===0&&i(g,l)}n(g,"error",d0);function D(){g.removeListener("finish",v),b()}g.once("close",D);function v(){z("onfinish"),g.removeListener("close",D),b()}g.once("finish",v);function b(){z("unpipe"),p.unpipe(g)}return g.emit("pipe",p),e.flowing||(z("pipe resume"),p.resume()),g};function _(g){return function(){var S=g._readableState;z("pipeOnDrain",S.awaitDrain),S.awaitDrain&&S.awaitDrain--,S.awaitDrain===0&&Q(g,"data")&&(S.flowing=!0,d(g))}}X.prototype.unpipe=function(g){var S=this._readableState,p={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return g&&g!==S.pipes?this:(g||(g=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,g&&g.emit("unpipe",this,p),this);if(!g){var{pipes:e,pipesCount:J0}=S;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var t=0;t<J0;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}var y0=Y0(S.pipes,g);return y0===-1?this:(S.pipes.splice(y0,1),S.pipesCount-=1,S.pipesCount===1&&(S.pipes=S.pipes[0]),g.emit("unpipe",this,p),this)},X.prototype.on=function(g,S){var p=R.prototype.on.call(this,g,S),e=this._readableState;return g==="data"?(e.readableListening=this.listenerCount("readable")>0,e.flowing!==!1&&this.resume()):g==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,z("on readable",e.length,e.reading),e.length?J(this):e.reading||process.nextTick(r,this)),p},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(g,S){var p=R.prototype.removeListener.call(this,g,S);return g==="readable"&&process.nextTick(s,this),p},X.prototype.removeAllListeners=function(g){var S=R.prototype.removeAllListeners.apply(this,arguments);return(g==="readable"||g===void 0)&&process.nextTick(s,this),S};function s(g){var S=g._readableState;S.readableListening=g.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:g.listenerCount("data")>0&&g.resume()}function r(g){z("readable nexttick read 0"),g.read(0)}X.prototype.resume=function(){var g=this._readableState;return g.flowing||(z("resume"),g.flowing=!g.readableListening,O0(this,g)),g.paused=!1,this};function O0(g,S){S.resumeScheduled||(S.resumeScheduled=!0,process.nextTick(o,g,S))}function o(g,S){z("resume",S.reading),S.reading||g.read(0),S.resumeScheduled=!1,g.emit("resume"),d(g),S.flowing&&!S.reading&&g.read(0)}X.prototype.pause=function(){return z("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(z("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function d(g){var S=g._readableState;for(z("flow",S.flowing);S.flowing&&g.read()!==null;);}X.prototype.wrap=function(g){var S=this,p=this._readableState,e=!1;g.on("end",function(){if(z("wrapped end"),p.decoder&&!p.ended){var y0=p.decoder.end();y0&&y0.length&&S.push(y0)}S.push(null)}),g.on("data",function(y0){if(z("wrapped data"),p.decoder&&(y0=p.decoder.write(y0)),!(p.objectMode&&y0==null)&&!(!p.objectMode&&(!y0||!y0.length))){var C0=S.push(y0);C0||(e=!0,g.pause())}});for(var J0 in g)this[J0]===void 0&&typeof g[J0]=="function"&&(this[J0]=function(y0){return function(){return g[y0].apply(g,arguments)}}(J0));for(var t=0;t<G0.length;t++)g.on(G0[t],this.emit.bind(this,G0[t]));return this._read=function(y0){z("wrapped _read",y0),e&&(e=!1,g.resume())},this},typeof Symbol=="function"&&(X.prototype[Symbol.asyncIterator]=function(){return h===void 0&&(h=F8()),h(this)}),Object.defineProperty(X.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(X.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(X.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(g){this._readableState&&(this._readableState.flowing=g)}}),X._fromList=f,Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function f(g,S){if(S.length===0)return null;var p;return S.objectMode?p=S.buffer.shift():!g||g>=S.length?(S.decoder?p=S.buffer.join(""):S.buffer.length===1?p=S.buffer.first():p=S.buffer.concat(S.length),S.buffer.clear()):p=S.buffer.consume(g,S.decoder),p}function U0(g){var S=g._readableState;z("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,process.nextTick(X0,S,g))}function X0(g,S){if(z("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0&&(g.endEmitted=!0,S.readable=!1,S.emit("end"),g.autoDestroy)){var p=S._writableState;(!p||p.autoDestroy&&p.finished)&&S.destroy()}}typeof Symbol=="function"&&(X.from=function(g,S){return a===void 0&&(a=T8()),a(X,g,S)});function Y0(g,S){for(var p=0,e=g.length;p<e;p++)if(g[p]===S)return p;return-1}}),p5=K0((B,k)=>{k.exports=P;var V=m2().codes,N=V.ERR_METHOD_NOT_IMPLEMENTED,Q=V.ERR_MULTIPLE_CALLBACK,R=V.ERR_TRANSFORM_ALREADY_TRANSFORMING,C=V.ERR_TRANSFORM_WITH_LENGTH_0,H=w2();c0()(P,H);function L(T,q){var F=this._transformState;F.transforming=!1;var I=F.writecb;if(I===null)return this.emit("error",new Q);F.writechunk=null,F.writecb=null,q!=null&&this.push(q),I(T);var x=this._readableState;x.reading=!1,(x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}function P(T){if(!(this instanceof P))return new P(T);H.call(this,T),this._transformState={afterTransform:L.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,T&&(typeof T.transform=="function"&&(this._transform=T.transform),typeof T.flush=="function"&&(this._flush=T.flush)),this.on("prefinish",U)}function U(){var T=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(q,F){z(T,q,F)}):z(this,null,null)}P.prototype.push=function(T,q){return this._transformState.needTransform=!1,H.prototype.push.call(this,T,q)},P.prototype._transform=function(T,q,F){F(new N("_transform()"))},P.prototype._write=function(T,q,F){var I=this._transformState;if(I.writecb=F,I.writechunk=T,I.writeencoding=q,!I.transforming){var x=this._readableState;(I.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},P.prototype._read=function(T){var q=this._transformState;q.writechunk!==null&&!q.transforming?(q.transforming=!0,this._transform(q.writechunk,q.writeencoding,q.afterTransform)):q.needTransform=!0},P.prototype._destroy=function(T,q){H.prototype._destroy.call(this,T,function(F){q(F)})};function z(T,q,F){if(q)return T.emit("error",q);if(F!=null&&T.push(F),T._writableState.length)throw new C;if(T._transformState.transforming)throw new R;return T.push(null)}}),D8=K0((B,k)=>{k.exports=N;var V=p5();c0()(N,V);function N(Q){if(!(this instanceof N))return new N(Q);V.call(this,Q)}N.prototype._transform=function(Q,R,C){C(null,Q)}}),N8=K0((B,k)=>{var V;function N(F){var I=!1;return function(){I||(I=!0,F.apply(void 0,arguments))}}var Q=m2().codes,R=Q.ERR_MISSING_ARGS,C=Q.ERR_STREAM_DESTROYED;function H(F){if(F)throw F}function L(F){return F.setHeader&&typeof F.abort=="function"}function P(F,I,x,w){w=N(w);var M=!1;F.on("close",function(){M=!0}),V===void 0&&(V=w1()),V(F,{readable:I,writable:x},function(m){if(m)return w(m);M=!0,w()});var y=!1;return function(m){if(!M&&!y){if(y=!0,L(F))return F.abort();if(typeof F.destroy=="function")return F.destroy();w(m||new C("pipe"))}}}function U(F){F()}function z(F,I){return F.pipe(I)}function T(F){return!F.length||typeof F[F.length-1]!="function"?H:F.pop()}function q(){for(var F=arguments.length,I=new Array(F),x=0;x<F;x++)I[x]=arguments[x];var w=T(I);if(Array.isArray(I[0])&&(I=I[0]),I.length<2)throw new R("streams");var M,y=I.map(function(m,c){var h=c<I.length-1,a=c>0;return P(m,h,a,function(i){M||(M=i),i&&y.forEach(U),!h&&(y.forEach(U),w(M))})});return I.reduce(z)}k.exports=q}),L8=K0((B,k)=>{B=k.exports=m5(),B.Stream=B,B.Readable=B,B.Writable=g5(),B.Duplex=w2(),B.Transform=p5(),B.PassThrough=D8(),B.finished=w1(),B.pipeline=N8()}),c5=K0((B,k)=>{var V=h0().Buffer,N=L8().Transform,Q=c0();function R(H,L){if(!V.isBuffer(H)&&typeof H!="string")throw new TypeError(L+" must be a string or a buffer")}function C(H){N.call(this),this._block=V.allocUnsafe(H),this._blockSize=H,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Q(C,N),C.prototype._transform=function(H,L,P){var U=null;try{this.update(H,L)}catch(z){U=z}P(U)},C.prototype._flush=function(H){var L=null;try{this.push(this.digest())}catch(P){L=P}H(L)},C.prototype.update=function(H,L){if(R(H,"Data"),this._finalized)throw new Error("Digest already called");V.isBuffer(H)||(H=V.from(H,L));for(var P=this._block,U=0;this._blockOffset+H.length-U>=this._blockSize;){for(var z=this._blockOffset;z<this._blockSize;)P[z++]=H[U++];this._update(),this._blockOffset=0}for(;U<H.length;)P[this._blockOffset++]=H[U++];for(var T=0,q=H.length*8;q>0;++T)this._length[T]+=q,q=this._length[T]/4294967296|0,q>0&&(this._length[T]-=4294967296*q);return this},C.prototype._update=function(){throw new Error("_update is not implemented")},C.prototype.digest=function(H){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var L=this._digest();H!==void 0&&(L=L.toString(H)),this._block.fill(0),this._blockOffset=0;for(var P=0;P<4;++P)this._length[P]=0;return L},C.prototype._digest=function(){throw new Error("_digest is not implemented")},k.exports=C}),y1=K0((B,k)=>{var V=c0(),N=c5(),Q=h0().Buffer,R=new Array(16);function C(){N.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}V(C,N),C.prototype._update=function(){for(var T=R,q=0;q<16;++q)T[q]=this._block.readInt32LE(q*4);var F=this._a,I=this._b,x=this._c,w=this._d;F=L(F,I,x,w,T[0],3614090360,7),w=L(w,F,I,x,T[1],3905402710,12),x=L(x,w,F,I,T[2],606105819,17),I=L(I,x,w,F,T[3],3250441966,22),F=L(F,I,x,w,T[4],4118548399,7),w=L(w,F,I,x,T[5],1200080426,12),x=L(x,w,F,I,T[6],2821735955,17),I=L(I,x,w,F,T[7],4249261313,22),F=L(F,I,x,w,T[8],1770035416,7),w=L(w,F,I,x,T[9],2336552879,12),x=L(x,w,F,I,T[10],4294925233,17),I=L(I,x,w,F,T[11],2304563134,22),F=L(F,I,x,w,T[12],1804603682,7),w=L(w,F,I,x,T[13],4254626195,12),x=L(x,w,F,I,T[14],2792965006,17),I=L(I,x,w,F,T[15],1236535329,22),F=P(F,I,x,w,T[1],4129170786,5),w=P(w,F,I,x,T[6],3225465664,9),x=P(x,w,F,I,T[11],643717713,14),I=P(I,x,w,F,T[0],3921069994,20),F=P(F,I,x,w,T[5],3593408605,5),w=P(w,F,I,x,T[10],38016083,9),x=P(x,w,F,I,T[15],3634488961,14),I=P(I,x,w,F,T[4],3889429448,20),F=P(F,I,x,w,T[9],568446438,5),w=P(w,F,I,x,T[14],3275163606,9),x=P(x,w,F,I,T[3],4107603335,14),I=P(I,x,w,F,T[8],1163531501,20),F=P(F,I,x,w,T[13],2850285829,5),w=P(w,F,I,x,T[2],4243563512,9),x=P(x,w,F,I,T[7],1735328473,14),I=P(I,x,w,F,T[12],2368359562,20),F=U(F,I,x,w,T[5],4294588738,4),w=U(w,F,I,x,T[8],2272392833,11),x=U(x,w,F,I,T[11],1839030562,16),I=U(I,x,w,F,T[14],4259657740,23),F=U(F,I,x,w,T[1],2763975236,4),w=U(w,F,I,x,T[4],1272893353,11),x=U(x,w,F,I,T[7],4139469664,16),I=U(I,x,w,F,T[10],3200236656,23),F=U(F,I,x,w,T[13],681279174,4),w=U(w,F,I,x,T[0],3936430074,11),x=U(x,w,F,I,T[3],3572445317,16),I=U(I,x,w,F,T[6],76029189,23),F=U(F,I,x,w,T[9],3654602809,4),w=U(w,F,I,x,T[12],3873151461,11),x=U(x,w,F,I,T[15],530742520,16),I=U(I,x,w,F,T[2],3299628645,23),F=z(F,I,x,w,T[0],4096336452,6),w=z(w,F,I,x,T[7],1126891415,10),x=z(x,w,F,I,T[14],2878612391,15),I=z(I,x,w,F,T[5],4237533241,21),F=z(F,I,x,w,T[12],1700485571,6),w=z(w,F,I,x,T[3],2399980690,10),x=z(x,w,F,I,T[10],4293915773,15),I=z(I,x,w,F,T[1],2240044497,21),F=z(F,I,x,w,T[8],1873313359,6),w=z(w,F,I,x,T[15],4264355552,10),x=z(x,w,F,I,T[6],2734768916,15),I=z(I,x,w,F,T[13],1309151649,21),F=z(F,I,x,w,T[4],4149444226,6),w=z(w,F,I,x,T[11],3174756917,10),x=z(x,w,F,I,T[2],718787259,15),I=z(I,x,w,F,T[9],3951481745,21),this._a=this._a+F|0,this._b=this._b+I|0,this._c=this._c+x|0,this._d=this._d+w|0},C.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var T=Q.allocUnsafe(16);return T.writeInt32LE(this._a,0),T.writeInt32LE(this._b,4),T.writeInt32LE(this._c,8),T.writeInt32LE(this._d,12),T};function H(T,q){return T<<q|T>>>32-q}function L(T,q,F,I,x,w,M){return H(T+(q&F|~q&I)+x+w|0,M)+q|0}function P(T,q,F,I,x,w,M){return H(T+(q&I|F&~I)+x+w|0,M)+q|0}function U(T,q,F,I,x,w,M){return H(T+(q^F^I)+x+w|0,M)+q|0}function z(T,q,F,I,x,w,M){return H(T+(F^(q|~I))+x+w|0,M)+q|0}k.exports=C}),_1=K0((B,k)=>{var V=P2().Buffer,N=c0(),Q=c5(),R=new Array(16),C=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],H=[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],L=[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],P=[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],U=[0,1518500249,1859775393,2400959708,2840853838],z=[1352829926,1548603684,1836072691,2053994217,0];function T(){Q.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}N(T,Q),T.prototype._update=function(){for(var y=R,m=0;m<16;++m)y[m]=this._block.readInt32LE(m*4);for(var c=this._a|0,h=this._b|0,a=this._c|0,i=this._d|0,G0=this._e|0,n=this._a|0,Z0=this._b|0,X=this._c|0,O=this._d|0,G=this._e|0,$=0;$<80;$+=1){var Y,W;$<16?(Y=F(c,h,a,i,G0,y[C[$]],U[0],L[$]),W=M(n,Z0,X,O,G,y[H[$]],z[0],P[$])):$<32?(Y=I(c,h,a,i,G0,y[C[$]],U[1],L[$]),W=w(n,Z0,X,O,G,y[H[$]],z[1],P[$])):$<48?(Y=x(c,h,a,i,G0,y[C[$]],U[2],L[$]),W=x(n,Z0,X,O,G,y[H[$]],z[2],P[$])):$<64?(Y=w(c,h,a,i,G0,y[C[$]],U[3],L[$]),W=I(n,Z0,X,O,G,y[H[$]],z[3],P[$])):(Y=M(c,h,a,i,G0,y[C[$]],U[4],L[$]),W=F(n,Z0,X,O,G,y[H[$]],z[4],P[$])),c=G0,G0=i,i=q(a,10),a=h,h=Y,n=G,G=O,O=q(X,10),X=Z0,Z0=W}var Z=this._b+a+O|0;this._b=this._c+i+G|0,this._c=this._d+G0+n|0,this._d=this._e+c+Z0|0,this._e=this._a+h+X|0,this._a=Z},T.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var y=V.alloc?V.alloc(20):new V(20);return y.writeInt32LE(this._a,0),y.writeInt32LE(this._b,4),y.writeInt32LE(this._c,8),y.writeInt32LE(this._d,12),y.writeInt32LE(this._e,16),y};function q(y,m){return y<<m|y>>>32-m}function F(y,m,c,h,a,i,G0,n){return q(y+(m^c^h)+i+G0|0,n)+a|0}function I(y,m,c,h,a,i,G0,n){return q(y+(m&c|~m&h)+i+G0|0,n)+a|0}function x(y,m,c,h,a,i,G0,n){return q(y+((m|~c)^h)+i+G0|0,n)+a|0}function w(y,m,c,h,a,i,G0,n){return q(y+(m&h|c&~h)+i+G0|0,n)+a|0}function M(y,m,c,h,a,i,G0,n){return q(y+(m^(c|~h))+i+G0|0,n)+a|0}k.exports=T}),p2=K0((B,k)=>{var V=h0().Buffer;function N(Q,R){this._block=V.alloc(Q),this._finalSize=R,this._blockSize=Q,this._len=0}N.prototype.update=function(Q,R){typeof Q=="string"&&(R=R||"utf8",Q=V.from(Q,R));for(var C=this._block,H=this._blockSize,L=Q.length,P=this._len,U=0;U<L;){for(var z=P%H,T=Math.min(L-U,H-z),q=0;q<T;q++)C[z+q]=Q[U+q];P+=T,U+=T,P%H===0&&this._update(C)}return this._len+=L,this},N.prototype.digest=function(Q){var R=this._len%this._blockSize;this._block[R]=128,this._block.fill(0,R+1),R>=this._finalSize&&(this._update(this._block),this._block.fill(0));var C=this._len*8;if(C<=4294967295)this._block.writeUInt32BE(C,this._blockSize-4);else{var H=(C&4294967295)>>>0,L=(C-H)/4294967296;this._block.writeUInt32BE(L,this._blockSize-8),this._block.writeUInt32BE(H,this._blockSize-4)}this._update(this._block);var P=this._hash();return Q?P.toString(Q):P},N.prototype._update=function(){throw new Error("_update must be implemented by subclass")},k.exports=N}),k8=K0((B,k)=>{var V=c0(),N=p2(),Q=h0().Buffer,R=[1518500249,1859775393,-1894007588,-899497514],C=new Array(80);function H(){this.init(),this._w=C,N.call(this,64,56)}V(H,N),H.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function L(z){return z<<5|z>>>27}function P(z){return z<<30|z>>>2}function U(z,T,q,F){return z===0?T&q|~T&F:z===2?T&q|T&F|q&F:T^q^F}H.prototype._update=function(z){for(var T=this._w,q=this._a|0,F=this._b|0,I=this._c|0,x=this._d|0,w=this._e|0,M=0;M<16;++M)T[M]=z.readInt32BE(M*4);for(;M<80;++M)T[M]=T[M-3]^T[M-8]^T[M-14]^T[M-16];for(var y=0;y<80;++y){var m=~~(y/20),c=L(q)+U(m,F,I,x)+w+T[y]+R[m]|0;w=x,x=I,I=P(F),F=q,q=c}this._a=q+this._a|0,this._b=F+this._b|0,this._c=I+this._c|0,this._d=x+this._d|0,this._e=w+this._e|0},H.prototype._hash=function(){var z=Q.allocUnsafe(20);return z.writeInt32BE(this._a|0,0),z.writeInt32BE(this._b|0,4),z.writeInt32BE(this._c|0,8),z.writeInt32BE(this._d|0,12),z.writeInt32BE(this._e|0,16),z},k.exports=H}),B8=K0((B,k)=>{var V=c0(),N=p2(),Q=h0().Buffer,R=[1518500249,1859775393,-1894007588,-899497514],C=new Array(80);function H(){this.init(),this._w=C,N.call(this,64,56)}V(H,N),H.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function L(T){return T<<1|T>>>31}function P(T){return T<<5|T>>>27}function U(T){return T<<30|T>>>2}function z(T,q,F,I){return T===0?q&F|~q&I:T===2?q&F|q&I|F&I:q^F^I}H.prototype._update=function(T){for(var q=this._w,F=this._a|0,I=this._b|0,x=this._c|0,w=this._d|0,M=this._e|0,y=0;y<16;++y)q[y]=T.readInt32BE(y*4);for(;y<80;++y)q[y]=L(q[y-3]^q[y-8]^q[y-14]^q[y-16]);for(var m=0;m<80;++m){var c=~~(m/20),h=P(F)+z(c,I,x,w)+M+q[m]+R[c]|0;M=w,w=x,x=U(I),I=F,F=h}this._a=F+this._a|0,this._b=I+this._b|0,this._c=x+this._c|0,this._d=w+this._d|0,this._e=M+this._e|0},H.prototype._hash=function(){var T=Q.allocUnsafe(20);return T.writeInt32BE(this._a|0,0),T.writeInt32BE(this._b|0,4),T.writeInt32BE(this._c|0,8),T.writeInt32BE(this._d|0,12),T.writeInt32BE(this._e|0,16),T},k.exports=H}),b5=K0((B,k)=>{var V=c0(),N=p2(),Q=h0().Buffer,R=[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],C=new Array(64);function H(){this.init(),this._w=C,N.call(this,64,56)}V(H,N),H.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function L(F,I,x){return x^F&(I^x)}function P(F,I,x){return F&I|x&(F|I)}function U(F){return(F>>>2|F<<30)^(F>>>13|F<<19)^(F>>>22|F<<10)}function z(F){return(F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7)}function T(F){return(F>>>7|F<<25)^(F>>>18|F<<14)^F>>>3}function q(F){return(F>>>17|F<<15)^(F>>>19|F<<13)^F>>>10}H.prototype._update=function(F){for(var I=this._w,x=this._a|0,w=this._b|0,M=this._c|0,y=this._d|0,m=this._e|0,c=this._f|0,h=this._g|0,a=this._h|0,i=0;i<16;++i)I[i]=F.readInt32BE(i*4);for(;i<64;++i)I[i]=q(I[i-2])+I[i-7]+T(I[i-15])+I[i-16]|0;for(var G0=0;G0<64;++G0){var n=a+z(m)+L(m,c,h)+R[G0]+I[G0]|0,Z0=U(x)+P(x,w,M)|0;a=h,h=c,c=m,m=y+n|0,y=M,M=w,w=x,x=n+Z0|0}this._a=x+this._a|0,this._b=w+this._b|0,this._c=M+this._c|0,this._d=y+this._d|0,this._e=m+this._e|0,this._f=c+this._f|0,this._g=h+this._g|0,this._h=a+this._h|0},H.prototype._hash=function(){var F=Q.allocUnsafe(32);return F.writeInt32BE(this._a,0),F.writeInt32BE(this._b,4),F.writeInt32BE(this._c,8),F.writeInt32BE(this._d,12),F.writeInt32BE(this._e,16),F.writeInt32BE(this._f,20),F.writeInt32BE(this._g,24),F.writeInt32BE(this._h,28),F},k.exports=H}),R8=K0((B,k)=>{var V=c0(),N=b5(),Q=p2(),R=h0().Buffer,C=new Array(64);function H(){this.init(),this._w=C,Q.call(this,64,56)}V(H,N),H.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},H.prototype._hash=function(){var L=R.allocUnsafe(28);return L.writeInt32BE(this._a,0),L.writeInt32BE(this._b,4),L.writeInt32BE(this._c,8),L.writeInt32BE(this._d,12),L.writeInt32BE(this._e,16),L.writeInt32BE(this._f,20),L.writeInt32BE(this._g,24),L},k.exports=H}),d5=K0((B,k)=>{var V=c0(),N=p2(),Q=h0().Buffer,R=[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],C=new Array(160);function H(){this.init(),this._w=C,N.call(this,128,112)}V(H,N),H.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function L(w,M,y){return y^w&(M^y)}function P(w,M,y){return w&M|y&(w|M)}function U(w,M){return(w>>>28|M<<4)^(M>>>2|w<<30)^(M>>>7|w<<25)}function z(w,M){return(w>>>14|M<<18)^(w>>>18|M<<14)^(M>>>9|w<<23)}function T(w,M){return(w>>>1|M<<31)^(w>>>8|M<<24)^w>>>7}function q(w,M){return(w>>>1|M<<31)^(w>>>8|M<<24)^(w>>>7|M<<25)}function F(w,M){return(w>>>19|M<<13)^(M>>>29|w<<3)^w>>>6}function I(w,M){return(w>>>19|M<<13)^(M>>>29|w<<3)^(w>>>6|M<<26)}function x(w,M){return w>>>0<M>>>0?1:0}H.prototype._update=function(w){for(var M=this._w,y=this._ah|0,m=this._bh|0,c=this._ch|0,h=this._dh|0,a=this._eh|0,i=this._fh|0,G0=this._gh|0,n=this._hh|0,Z0=this._al|0,X=this._bl|0,O=this._cl|0,G=this._dl|0,$=this._el|0,Y=this._fl|0,W=this._gl|0,Z=this._hl|0,K=0;K<32;K+=2)M[K]=w.readInt32BE(K*4),M[K+1]=w.readInt32BE(K*4+4);for(;K<160;K+=2){var J=M[K-30],j=M[K-30+1],A=T(J,j),E=q(j,J);J=M[K-4],j=M[K-4+1];var _=F(J,j),s=I(j,J),r=M[K-14],O0=M[K-14+1],o=M[K-32],d=M[K-32+1],f=E+O0|0,U0=A+r+x(f,E)|0;f=f+s|0,U0=U0+_+x(f,s)|0,f=f+d|0,U0=U0+o+x(f,d)|0,M[K]=U0,M[K+1]=f}for(var X0=0;X0<160;X0+=2){U0=M[X0],f=M[X0+1];var Y0=P(y,m,c),g=P(Z0,X,O),S=U(y,Z0),p=U(Z0,y),e=z(a,$),J0=z($,a),t=R[X0],y0=R[X0+1],C0=L(a,i,G0),W0=L($,Y,W),_0=Z+J0|0,P0=n+e+x(_0,Z)|0;_0=_0+W0|0,P0=P0+C0+x(_0,W0)|0,_0=_0+y0|0,P0=P0+t+x(_0,y0)|0,_0=_0+f|0,P0=P0+U0+x(_0,f)|0;var Q0=p+g|0,d0=S+Y0+x(Q0,p)|0;n=G0,Z=W,G0=i,W=Y,i=a,Y=$,$=G+_0|0,a=h+P0+x($,G)|0,h=c,G=O,c=m,O=X,m=y,X=Z0,Z0=_0+Q0|0,y=P0+d0+x(Z0,_0)|0}this._al=this._al+Z0|0,this._bl=this._bl+X|0,this._cl=this._cl+O|0,this._dl=this._dl+G|0,this._el=this._el+$|0,this._fl=this._fl+Y|0,this._gl=this._gl+W|0,this._hl=this._hl+Z|0,this._ah=this._ah+y+x(this._al,Z0)|0,this._bh=this._bh+m+x(this._bl,X)|0,this._ch=this._ch+c+x(this._cl,O)|0,this._dh=this._dh+h+x(this._dl,G)|0,this._eh=this._eh+a+x(this._el,$)|0,this._fh=this._fh+i+x(this._fl,Y)|0,this._gh=this._gh+G0+x(this._gl,W)|0,this._hh=this._hh+n+x(this._hl,Z)|0},H.prototype._hash=function(){var w=Q.allocUnsafe(64);function M(y,m,c){w.writeInt32BE(y,c),w.writeInt32BE(m,c+4)}return M(this._ah,this._al,0),M(this._bh,this._bl,8),M(this._ch,this._cl,16),M(this._dh,this._dl,24),M(this._eh,this._el,32),M(this._fh,this._fl,40),M(this._gh,this._gl,48),M(this._hh,this._hl,56),w},k.exports=H}),q8=K0((B,k)=>{var V=c0(),N=d5(),Q=p2(),R=h0().Buffer,C=new Array(160);function H(){this.init(),this._w=C,Q.call(this,128,112)}V(H,N),H.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},H.prototype._hash=function(){var L=R.allocUnsafe(48);function P(U,z,T){L.writeInt32BE(U,T),L.writeInt32BE(z,T+4)}return P(this._ah,this._al,0),P(this._bh,this._bl,8),P(this._ch,this._cl,16),P(this._dh,this._dl,24),P(this._eh,this._el,32),P(this._fh,this._fl,40),L},k.exports=H}),g1=K0((V,k)=>{var V=k.exports=function(N){N=N.toLowerCase();var Q=V[N];if(!Q)throw new Error(N+" is not supported (we accept pull requests)");return new Q};V.sha=k8(),V.sha1=B8(),V.sha224=R8(),V.sha256=b5(),V.sha384=q8(),V.sha512=d5()}),H2=K0((B,k)=>{k.exports={ArrayIsArray(V){return Array.isArray(V)},ArrayPrototypeIncludes(V,N){return V.includes(N)},ArrayPrototypeIndexOf(V,N){return V.indexOf(N)},ArrayPrototypeJoin(V,N){return V.join(N)},ArrayPrototypeMap(V,N){return V.map(N)},ArrayPrototypePop(V,N){return V.pop(N)},ArrayPrototypePush(V,N){return V.push(N)},ArrayPrototypeSlice(V,N,Q){return V.slice(N,Q)},Error,FunctionPrototypeCall(V,N,...Q){return V.call(N,...Q)},FunctionPrototypeSymbolHasInstance(V,N){return Function.prototype[Symbol.hasInstance].call(V,N)},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(V,N){return Object.defineProperties(V,N)},ObjectDefineProperty(V,N,Q){return Object.defineProperty(V,N,Q)},ObjectGetOwnPropertyDescriptor(V,N){return Object.getOwnPropertyDescriptor(V,N)},ObjectKeys(V){return Object.keys(V)},ObjectSetPrototypeOf(V,N){return Object.setPrototypeOf(V,N)},Promise,PromisePrototypeCatch(V,N){return V.catch(N)},PromisePrototypeThen(V,N,Q){return V.then(N,Q)},PromiseReject(V){return Promise.reject(V)},ReflectApply:Reflect.apply,RegExpPrototypeTest(V,N){return V.test(N)},SafeSet:Set,String,StringPrototypeSlice(V,N,Q){return V.slice(N,Q)},StringPrototypeToLowerCase(V){return V.toLowerCase()},StringPrototypeToUpperCase(V){return V.toUpperCase()},StringPrototypeTrim(V){return V.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(V,N,Q){return V.set(N,Q)},Uint8Array}}),k2=K0((B,k)=>{var V=P2(),N=Object.getPrototypeOf(async function(){}).constructor,Q=globalThis.Blob||V.Blob,R=typeof Q<"u"?function(H){return H instanceof Q}:function(H){return!1},C=class extends Error{constructor(H){if(!Array.isArray(H))throw new TypeError(`Expected input to be an Array, got ${typeof H}`);let L="";for(let P=0;P<H.length;P++)L+=` ${H[P].stack}
`;super(L),this.name="AggregateError",this.errors=H}};k.exports={AggregateError:C,kEmptyObject:Object.freeze({}),once(H){let L=!1;return function(...P){L||(L=!0,H.apply(this,P))}},createDeferredPromise:function(){let H,L;return{promise:new Promise((P,U)=>{H=P,L=U}),resolve:H,reject:L}},promisify(H){return new Promise((L,P)=>{H((U,...z)=>U?P(U):L(...z))})},debuglog(){return function(){}},format(H,...L){return H.replace(/%([sdifj])/g,function(...[P,U]){let z=L.shift();return U==="f"?z.toFixed(6):U==="j"?JSON.stringify(z):U==="s"&&typeof z=="object"?`${z.constructor!==Object?z.constructor.name:""} {}`.trim():z.toString()})},inspect(H){switch(typeof H){case"string":if(H.includes("'"))if(H.includes('"')){if(!H.includes("`")&&!H.includes("${"))return`\`${H}\``}else return`"${H}"`;return`'${H}'`;case"number":return isNaN(H)?"NaN":Object.is(H,-0)?String(H):H;case"bigint":return`${String(H)}n`;case"boolean":case"undefined":return String(H);case"object":return"{}"}},types:{isAsyncFunction(H){return H instanceof N},isArrayBufferView(H){return ArrayBuffer.isView(H)}},isBlob:R},k.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),m1=K0((B,k)=>{var{AbortController:V,AbortSignal:N}=typeof self<"u"?self:typeof window<"u"?window:void 0;k.exports=V,k.exports.AbortSignal=N,k.exports.default=V}),U2=K0((B,k)=>{var{format:V,inspect:N,AggregateError:Q}=k2(),R=globalThis.AggregateError||Q,C=Symbol("kIsNodeError"),H=["string","function","number","object","Function","Object","boolean","bigint","symbol"],L=/^([A-Z][a-z0-9]*)+$/,P="__node_internal_",U={};function z(M,y){if(!M)throw new U.ERR_INTERNAL_ASSERTION(y)}function T(M){let y="",m=M.length,c=M[0]==="-"?1:0;for(;m>=c+4;m-=3)y=`_${M.slice(m-3,m)}${y}`;return`${M.slice(0,m)}${y}`}function q(M,y,m){if(typeof y=="function")return z(y.length<=m.length,`Code: ${M}; The provided arguments length (${m.length}) does not match the required ones (${y.length}).`),y(...m);let c=(y.match(/%[dfijoOs]/g)||[]).length;return z(c===m.length,`Code: ${M}; The provided arguments length (${m.length}) does not match the required ones (${c}).`),m.length===0?y:V(y,...m)}function F(M,y,m){m||(m=Error);class c extends m{constructor(...h){super(q(M,y,h))}toString(){return`${this.name} [${M}]: ${this.message}`}}Object.defineProperties(c.prototype,{name:{value:m.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${M}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),c.prototype.code=M,c.prototype[C]=!0,U[M]=c}function I(M){let y=P+M.name;return Object.defineProperty(M,"name",{value:y}),M}function x(M,y){if(M&&y&&M!==y){if(Array.isArray(y.errors))return y.errors.push(M),y;let m=new R([y,M],y.message);return m.code=y.code,m}return M||y}var w=class extends Error{constructor(M="The operation was aborted",y=void 0){if(y!==void 0&&typeof y!="object")throw new U.ERR_INVALID_ARG_TYPE("options","Object",y);super(M,y),this.code="ABORT_ERR",this.name="AbortError"}};F("ERR_ASSERTION","%s",Error),F("ERR_INVALID_ARG_TYPE",(M,y,m)=>{z(typeof M=="string","'name' must be a string"),Array.isArray(y)||(y=[y]);let c="The ";M.endsWith(" argument")?c+=`${M} `:c+=`"${M}" ${M.includes(".")?"property":"argument"} `,c+="must be ";let h=[],a=[],i=[];for(let n of y)z(typeof n=="string","All expected entries have to be of type string"),H.includes(n)?h.push(n.toLowerCase()):L.test(n)?a.push(n):(z(n!=="object",'The value "object" should be written as "Object"'),i.push(n));if(a.length>0){let n=h.indexOf("object");n!==-1&&(h.splice(h,n,1),a.push("Object"))}if(h.length>0){switch(h.length){case 1:c+=`of type ${h[0]}`;break;case 2:c+=`one of type ${h[0]} or ${h[1]}`;break;default:{let n=h.pop();c+=`one of type ${h.join(", ")}, or ${n}`}}(a.length>0||i.length>0)&&(c+=" or ")}if(a.length>0){switch(a.length){case 1:c+=`an instance of ${a[0]}`;break;case 2:c+=`an instance of ${a[0]} or ${a[1]}`;break;default:{let n=a.pop();c+=`an instance of ${a.join(", ")}, or ${n}`}}i.length>0&&(c+=" or ")}switch(i.length){case 0:break;case 1:i[0].toLowerCase()!==i[0]&&(c+="an "),c+=`${i[0]}`;break;case 2:c+=`one of ${i[0]} or ${i[1]}`;break;default:{let n=i.pop();c+=`one of ${i.join(", ")}, or ${n}`}}if(m==null)c+=`. Received ${m}`;else if(typeof m=="function"&&m.name)c+=`. Received function ${m.name}`;else if(typeof m=="object"){var G0;(G0=m.constructor)!==null&&G0!==void 0&&G0.name?c+=`. Received an instance of ${m.constructor.name}`:c+=`. Received ${N(m,{depth:-1})}`}else{let n=N(m,{colors:!1});n.length>25&&(n=`${n.slice(0,25)}...`),c+=`. Received type ${typeof m} (${n})`}return c},TypeError),F("ERR_INVALID_ARG_VALUE",(M,y,m="is invalid")=>{let c=N(y);return c.length>128&&(c=c.slice(0,128)+"..."),`The ${M.includes(".")?"property":"argument"} '${M}' ${m}. Received ${c}`},TypeError),F("ERR_INVALID_RETURN_VALUE",(M,y,m)=>{var c;let h=m!=null&&(c=m.constructor)!==null&&c!==void 0&&c.name?`instance of ${m.constructor.name}`:`type ${typeof m}`;return`Expected ${M} to be returned from the "${y}" function but got ${h}.`},TypeError),F("ERR_MISSING_ARGS",(...M)=>{z(M.length>0,"At least one arg needs to be specified");let y,m=M.length;switch(M=(Array.isArray(M)?M:[M]).map((c)=>`"${c}"`).join(" or "),m){case 1:y+=`The ${M[0]} argument`;break;case 2:y+=`The ${M[0]} and ${M[1]} arguments`;break;default:{let c=M.pop();y+=`The ${M.join(", ")}, and ${c} arguments`}break}return`${y} must be specified`},TypeError),F("ERR_OUT_OF_RANGE",(M,y,m)=>{z(y,'Missing "range" argument');let c;return Number.isInteger(m)&&Math.abs(m)>4294967296?c=T(String(m)):typeof m=="bigint"?(c=String(m),(m>2n**32n||m<-(2n**32n))&&(c=T(c)),c+="n"):c=N(m),`The value of "${M}" is out of range. It must be ${y}. Received ${c}`},RangeError),F("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),F("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),F("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),F("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),F("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),F("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),F("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),F("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),F("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),F("ERR_STREAM_WRITE_AFTER_END","write after end",Error),F("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),k.exports={AbortError:w,aggregateTwoErrors:I(x),hideStackFrames:I,codes:U}}),V1=K0((B,k)=>{var{ArrayIsArray:V,ArrayPrototypeIncludes:N,ArrayPrototypeJoin:Q,ArrayPrototypeMap:R,NumberIsInteger:C,NumberIsNaN:H,NumberMAX_SAFE_INTEGER:L,NumberMIN_SAFE_INTEGER:P,NumberParseInt:U,ObjectPrototypeHasOwnProperty:z,RegExpPrototypeExec:T,String:q,StringPrototypeToUpperCase:F,StringPrototypeTrim:I}=H2(),{hideStackFrames:x,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:M,ERR_INVALID_ARG_VALUE:y,ERR_OUT_OF_RANGE:m,ERR_UNKNOWN_SIGNAL:c}}=U2(),{normalizeEncoding:h}=k2(),{isAsyncFunction:a,isArrayBufferView:i}=k2().types,G0={};function n(g){return g===(g|0)}function Z0(g){return g===g>>>0}var X=/^[0-7]+$/,O="must be a 32-bit unsigned integer or an octal string";function G(g,S,p){if(typeof g>"u"&&(g=p),typeof g=="string"){if(T(X,g)===null)throw new y(S,g,O);g=U(g,8)}return W(g,S),g}var $=x((g,S,p=P,e=L)=>{if(typeof g!="number")throw new M(S,"number",g);if(!C(g))throw new m(S,"an integer",g);if(g<p||g>e)throw new m(S,`>= ${p} && <= ${e}`,g)}),Y=x((g,S,p=-2147483648,e=2147483647)=>{if(typeof g!="number")throw new M(S,"number",g);if(!C(g))throw new m(S,"an integer",g);if(g<p||g>e)throw new m(S,`>= ${p} && <= ${e}`,g)}),W=x((g,S,p=!1)=>{if(typeof g!="number")throw new M(S,"number",g);if(!C(g))throw new m(S,"an integer",g);let e=p?1:0,J0=4294967295;if(g<e||g>J0)throw new m(S,`>= ${e} && <= ${J0}`,g)});function Z(g,S){if(typeof g!="string")throw new M(S,"string",g)}function K(g,S,p=void 0,e){if(typeof g!="number")throw new M(S,"number",g);if(p!=null&&g<p||e!=null&&g>e||(p!=null||e!=null)&&H(g))throw new m(S,`${p!=null?`>= ${p}`:""}${p!=null&&e!=null?" && ":""}${e!=null?`<= ${e}`:""}`,g)}var J=x((g,S,p)=>{if(!N(p,g)){let e=Q(R(p,(t)=>typeof t=="string"?`'${t}'`:q(t)),", "),J0="must be one of: "+e;throw new y(S,g,J0)}});function j(g,S){if(typeof g!="boolean")throw new M(S,"boolean",g)}function A(g,S,p){return g==null||!z(g,S)?p:g[S]}var E=x((g,S,p=null)=>{let e=A(p,"allowArray",!1),J0=A(p,"allowFunction",!1);if(!A(p,"nullable",!1)&&g===null||!e&&V(g)||typeof g!="object"&&(!J0||typeof g!="function"))throw new M(S,"Object",g)}),_=x((g,S,p=0)=>{if(!V(g))throw new M(S,"Array",g);if(g.length<p){let e=`must be longer than ${p}`;throw new y(S,g,e)}});function s(g,S="signal"){if(Z(g,S),G0[g]===void 0)throw G0[F(g)]!==void 0?new c(g+" (signals must use all capital letters)"):new c(g)}var r=x((g,S="buffer")=>{if(!i(g))throw new M(S,["Buffer","TypedArray","DataView"],g)});function O0(g,S){let p=h(S),e=g.length;if(p==="hex"&&e%2!==0)throw new y("encoding",S,`is invalid for data of length ${e}`)}function o(g,S="Port",p=!0){if(typeof g!="number"&&typeof g!="string"||typeof g=="string"&&I(g).length===0||+g!==+g>>>0||g>65535||g===0&&!p)throw new w(S,g,p);return g|0}var d=x((g,S)=>{if(g!==void 0&&(g===null||typeof g!="object"||!("aborted"in g)))throw new M(S,"AbortSignal",g)}),f=x((g,S)=>{if(typeof g!="function")throw new M(S,"Function",g)}),U0=x((g,S)=>{if(typeof g!="function"||a(g))throw new M(S,"Function",g)}),X0=x((g,S)=>{if(g!==void 0)throw new M(S,"undefined",g)});function Y0(g,S,p){if(!N(p,g))throw new M(S,`('${Q(p,"|")}')`,g)}k.exports={isInt32:n,isUint32:Z0,parseFileMode:G,validateArray:_,validateBoolean:j,validateBuffer:r,validateEncoding:O0,validateFunction:f,validateInt32:Y,validateInteger:$,validateNumber:K,validateObject:E,validateOneOf:J,validatePlainFunction:U0,validatePort:o,validateSignalName:s,validateString:Z,validateUint32:W,validateUndefined:X0,validateUnion:Y0,validateAbortSignal:d}}),S5=K0((B,k)=>{var V=k.exports={},N,Q;function R(){throw new Error("setTimeout has not been defined")}function C(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?N=setTimeout:N=R}catch{N=R}try{typeof clearTimeout=="function"?Q=clearTimeout:Q=C}catch{Q=C}})();function H(w){if(N===setTimeout)return setTimeout(w,0);if((N===R||!N)&&setTimeout)return N=setTimeout,setTimeout(w,0);try{return N(w,0)}catch{try{return N.call(null,w,0)}catch{return N.call(this,w,0)}}}function L(w){if(Q===clearTimeout)return clearTimeout(w);if((Q===C||!Q)&&clearTimeout)return Q=clearTimeout,clearTimeout(w);try{return Q(w)}catch{try{return Q.call(null,w)}catch{return Q.call(this,w)}}}var P=[],U=!1,z,T=-1;function q(){!U||!z||(U=!1,z.length?P=z.concat(P):T=-1,P.length&&F())}function F(){if(!U){var w=H(q);U=!0;for(var M=P.length;M;){for(z=P,P=[];++T<M;)z&&z[T].run();T=-1,M=P.length}z=null,U=!1,L(w)}}V.nextTick=function(w){var M=new Array(arguments.length-1);if(arguments.length>1)for(var y=1;y<arguments.length;y++)M[y-1]=arguments[y];P.push(new I(w,M)),P.length===1&&!U&&H(F)};function I(w,M){this.fun=w,this.array=M}I.prototype.run=function(){this.fun.apply(null,this.array)},V.title="browser",V.browser=!0,V.env={},V.argv=[],V.version="",V.versions={};function x(){}V.on=x,V.addListener=x,V.once=x,V.off=x,V.removeListener=x,V.removeAllListeners=x,V.emit=x,V.prependListener=x,V.prependOnceListener=x,V.listeners=function(w){return[]},V.binding=function(w){throw new Error("process.binding is not supported")},V.cwd=function(){return"/"},V.chdir=function(w){throw new Error("process.chdir is not supported")},V.umask=function(){return 0}}),R2={};z1(R2,{default:()=>h5});S2=v1(()=>{A1(R2,E2(S5())),h5=E2(S5())}),v2=K0((B,k)=>{var{Symbol:V,SymbolAsyncIterator:N,SymbolIterator:Q}=H2(),R=V("kDestroyed"),C=V("kIsErrored"),H=V("kIsReadable"),L=V("kIsDisturbed");function P($,Y=!1){var W;return!!($&&typeof $.pipe=="function"&&typeof $.on=="function"&&(!Y||typeof $.pause=="function"&&typeof $.resume=="function")&&(!$._writableState||((W=$._readableState)===null||W===void 0?void 0:W.readable)!==!1)&&(!$._writableState||$._readableState))}function U($){var Y;return!!($&&typeof $.write=="function"&&typeof $.on=="function"&&(!$._readableState||((Y=$._writableState)===null||Y===void 0?void 0:Y.writable)!==!1))}function z($){return!!($&&typeof $.pipe=="function"&&$._readableState&&typeof $.on=="function"&&typeof $.write=="function")}function T($){return $&&($._readableState||$._writableState||typeof $.write=="function"&&typeof $.on=="function"||typeof $.pipe=="function"&&typeof $.on=="function")}function q($,Y){return $==null?!1:Y===!0?typeof $[N]=="function":Y===!1?typeof $[Q]=="function":typeof $[N]=="function"||typeof $[Q]=="function"}function F($){if(!T($))return null;let{_writableState:Y,_readableState:W}=$,Z=Y||W;return!!($.destroyed||$[R]||Z!=null&&Z.destroyed)}function I($){if(!U($))return null;if($.writableEnded===!0)return!0;let Y=$._writableState;return Y!=null&&Y.errored?!1:typeof Y?.ended!="boolean"?null:Y.ended}function x($,Y){if(!U($))return null;if($.writableFinished===!0)return!0;let W=$._writableState;return W!=null&&W.errored?!1:typeof W?.finished!="boolean"?null:!!(W.finished||Y===!1&&W.ended===!0&&W.length===0)}function w($){if(!P($))return null;if($.readableEnded===!0)return!0;let Y=$._readableState;return!Y||Y.errored?!1:typeof Y?.ended!="boolean"?null:Y.ended}function M($,Y){if(!P($))return null;let W=$._readableState;return W!=null&&W.errored?!1:typeof W?.endEmitted!="boolean"?null:!!(W.endEmitted||Y===!1&&W.ended===!0&&W.length===0)}function y($){return $&&$[H]!=null?$[H]:typeof $?.readable!="boolean"?null:F($)?!1:P($)&&$.readable&&!M($)}function m($){return typeof $?.writable!="boolean"?null:F($)?!1:U($)&&$.writable&&!I($)}function c($,Y){return T($)?F($)?!0:!(Y?.readable!==!1&&y($)||Y?.writable!==!1&&m($)):null}function h($){var Y,W;return T($)?$.writableErrored?$.writableErrored:(Y=(W=$._writableState)===null||W===void 0?void 0:W.errored)!==null&&Y!==void 0?Y:null:null}function a($){var Y,W;return T($)?$.readableErrored?$.readableErrored:(Y=(W=$._readableState)===null||W===void 0?void 0:W.errored)!==null&&Y!==void 0?Y:null:null}function i($){if(!T($))return null;if(typeof $.closed=="boolean")return $.closed;let{_writableState:Y,_readableState:W}=$;return typeof Y?.closed=="boolean"||typeof W?.closed=="boolean"?Y?.closed||W?.closed:typeof $._closed=="boolean"&&G0($)?$._closed:null}function G0($){return typeof $._closed=="boolean"&&typeof $._defaultKeepAlive=="boolean"&&typeof $._removedConnection=="boolean"&&typeof $._removedContLen=="boolean"}function n($){return typeof $._sent100=="boolean"&&G0($)}function Z0($){var Y;return typeof $._consuming=="boolean"&&typeof $._dumped=="boolean"&&((Y=$.req)===null||Y===void 0?void 0:Y.upgradeOrConnect)===void 0}function X($){if(!T($))return null;let{_writableState:Y,_readableState:W}=$,Z=Y||W;return!Z&&n($)||!!(Z&&Z.autoDestroy&&Z.emitClose&&Z.closed===!1)}function O($){var Y;return!!($&&((Y=$[L])!==null&&Y!==void 0?Y:$.readableDidRead||$.readableAborted))}function G($){var Y,W,Z,K,J,j,A,E,_,s;return!!($&&((Y=(W=(Z=(K=(J=(j=$[C])!==null&&j!==void 0?j:$.readableErrored)!==null&&J!==void 0?J:$.writableErrored)!==null&&K!==void 0?K:(A=$._readableState)===null||A===void 0?void 0:A.errorEmitted)!==null&&Z!==void 0?Z:(E=$._writableState)===null||E===void 0?void 0:E.errorEmitted)!==null&&W!==void 0?W:(_=$._readableState)===null||_===void 0?void 0:_.errored)!==null&&Y!==void 0?Y:(s=$._writableState)===null||s===void 0?void 0:s.errored))}k.exports={kDestroyed:R,isDisturbed:O,kIsDisturbed:L,isErrored:G,kIsErrored:C,isReadable:y,kIsReadable:H,isClosed:i,isDestroyed:F,isDuplexNodeStream:z,isFinished:c,isIterable:q,isReadableNodeStream:P,isReadableEnded:w,isReadableFinished:M,isReadableErrored:a,isNodeStream:T,isWritable:m,isWritableNodeStream:U,isWritableEnded:I,isWritableFinished:x,isWritableErrored:h,isServerRequest:Z0,isServerResponse:n,willEmitClose:X}}),A2=K0((B,k)=>{var V=(S2(),T2(R2)),{AbortError:N,codes:Q}=U2(),{ERR_INVALID_ARG_TYPE:R,ERR_STREAM_PREMATURE_CLOSE:C}=Q,{kEmptyObject:H,once:L}=k2(),{validateAbortSignal:P,validateFunction:U,validateObject:z}=V1(),{Promise:T}=H2(),{isClosed:q,isReadable:F,isReadableNodeStream:I,isReadableFinished:x,isReadableErrored:w,isWritable:M,isWritableNodeStream:y,isWritableFinished:m,isWritableErrored:c,isNodeStream:h,willEmitClose:a}=v2();function i(X){return X.setHeader&&typeof X.abort=="function"}var G0=()=>{};function n(X,O,G){var $,Y;arguments.length===2?(G=O,O=H):O==null?O=H:z(O,"options"),U(G,"callback"),P(O.signal,"options.signal"),G=L(G);let W=($=O.readable)!==null&&$!==void 0?$:I(X),Z=(Y=O.writable)!==null&&Y!==void 0?Y:y(X);if(!h(X))throw new R("stream","Stream",X);let{_writableState:K,_readableState:J}=X,j=()=>{X.writable||_()},A=a(X)&&I(X)===W&&y(X)===Z,E=m(X,!1),_=()=>{E=!0,X.destroyed&&(A=!1),!(A&&(!X.readable||W))&&(!W||s)&&G.call(X)},s=x(X,!1),r=()=>{s=!0,X.destroyed&&(A=!1),!(A&&(!X.writable||Z))&&(!Z||E)&&G.call(X)},O0=(X0)=>{G.call(X,X0)},o=q(X),d=()=>{o=!0;let X0=c(X)||w(X);if(X0&&typeof X0!="boolean")return G.call(X,X0);if(W&&!s&&I(X,!0)&&!x(X,!1))return G.call(X,new C);if(Z&&!E&&!m(X,!1))return G.call(X,new C);G.call(X)},f=()=>{X.req.on("finish",_)};i(X)?(X.on("complete",_),A||X.on("abort",d),X.req?f():X.on("request",f)):Z&&!K&&(X.on("end",j),X.on("close",j)),!A&&typeof X.aborted=="boolean"&&X.on("aborted",d),X.on("end",r),X.on("finish",_),O.error!==!1&&X.on("error",O0),X.on("close",d),o?V.nextTick(d):K!=null&&K.errorEmitted||J!=null&&J.errorEmitted?A||V.nextTick(d):(!W&&(!A||F(X))&&(E||M(X)===!1)||!Z&&(!A||M(X))&&(s||F(X)===!1)||J&&X.req&&X.aborted)&&V.nextTick(d);let U0=()=>{G=G0,X.removeListener("aborted",d),X.removeListener("complete",_),X.removeListener("abort",d),X.removeListener("request",f),X.req&&X.req.removeListener("finish",_),X.removeListener("end",j),X.removeListener("close",j),X.removeListener("finish",_),X.removeListener("end",r),X.removeListener("error",O0),X.removeListener("close",d)};if(O.signal&&!o){let X0=()=>{let Y0=G;U0(),Y0.call(X,new N(void 0,{cause:O.signal.reason}))};if(O.signal.aborted)V.nextTick(X0);else{let Y0=G;G=L((...g)=>{O.signal.removeEventListener("abort",X0),Y0.apply(X,g)}),O.signal.addEventListener("abort",X0)}}return U0}function Z0(X,O){return new T((G,$)=>{n(X,O,(Y)=>{Y?$(Y):G()})})}k.exports=n,k.exports.finished=Z0}),I8=K0((B,k)=>{var V=globalThis.AbortController||m1().AbortController,{codes:{ERR_INVALID_ARG_TYPE:N,ERR_MISSING_ARGS:Q,ERR_OUT_OF_RANGE:R},AbortError:C}=U2(),{validateAbortSignal:H,validateInteger:L,validateObject:P}=V1(),U=H2().Symbol("kWeak"),{finished:z}=A2(),{ArrayPrototypePush:T,MathFloor:q,Number:F,NumberIsNaN:I,Promise:x,PromiseReject:w,PromisePrototypeThen:M,Symbol:y}=H2(),m=y("kEmpty"),c=y("kEof");function h(J,j){if(typeof J!="function")throw new N("fn",["Function","AsyncFunction"],J);j!=null&&P(j,"options"),j?.signal!=null&&H(j.signal,"options.signal");let A=1;return j?.concurrency!=null&&(A=q(j.concurrency)),L(A,"concurrency",1),async function*(){var E,_;let s=new V,r=this,O0=[],o=s.signal,d={signal:o},f=()=>s.abort();j!=null&&(E=j.signal)!==null&&E!==void 0&&E.aborted&&f(),j==null||(_=j.signal)===null||_===void 0||_.addEventListener("abort",f);let U0,X0,Y0=!1;function g(){Y0=!0}async function S(){try{for await(let J0 of r){var p;if(Y0)return;if(o.aborted)throw new C;try{J0=J(J0,d)}catch(t){J0=w(t)}J0!==m&&(typeof((p=J0)===null||p===void 0?void 0:p.catch)=="function"&&J0.catch(g),O0.push(J0),U0&&(U0(),U0=null),!Y0&&O0.length&&O0.length>=A&&await new x((t)=>{X0=t}))}O0.push(c)}catch(J0){let t=w(J0);M(t,void 0,g),O0.push(t)}finally{var e;Y0=!0,U0&&(U0(),U0=null),j==null||(e=j.signal)===null||e===void 0||e.removeEventListener("abort",f)}}S();try{for(;;){for(;O0.length>0;){let p=await O0[0];if(p===c)return;if(o.aborted)throw new C;p!==m&&(yield p),O0.shift(),X0&&(X0(),X0=null)}await new x((p)=>{U0=p})}}finally{s.abort(),Y0=!0,X0&&(X0(),X0=null)}}.call(this)}function a(J=void 0){return J!=null&&P(J,"options"),J?.signal!=null&&H(J.signal,"options.signal"),async function*(){let j=0;for await(let E of this){var A;if(J!=null&&(A=J.signal)!==null&&A!==void 0&&A.aborted)throw new C({cause:J.signal.reason});yield[j++,E]}}.call(this)}async function i(J,j=void 0){for await(let A of X.call(this,J,j))return!0;return!1}async function G0(J,j=void 0){if(typeof J!="function")throw new N("fn",["Function","AsyncFunction"],J);return!await i.call(this,async(...A)=>!await J(...A),j)}async function n(J,j){for await(let A of X.call(this,J,j))return A}async function Z0(J,j){if(typeof J!="function")throw new N("fn",["Function","AsyncFunction"],J);async function A(E,_){return await J(E,_),m}for await(let E of h.call(this,A,j));}function X(J,j){if(typeof J!="function")throw new N("fn",["Function","AsyncFunction"],J);async function A(E,_){return await J(E,_)?E:m}return h.call(this,A,j)}var O=class extends Q{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function G(J,j,A){var E;if(typeof J!="function")throw new N("reducer",["Function","AsyncFunction"],J);A!=null&&P(A,"options"),A?.signal!=null&&H(A.signal,"options.signal");let _=arguments.length>1;if(A!=null&&(E=A.signal)!==null&&E!==void 0&&E.aborted){let d=new C(void 0,{cause:A.signal.reason});throw this.once("error",()=>{}),await z(this.destroy(d)),d}let s=new V,r=s.signal;if(A!=null&&A.signal){let d={once:!0,[U]:this};A.signal.addEventListener("abort",()=>s.abort(),d)}let O0=!1;try{for await(let d of this){var o;if(O0=!0,A!=null&&(o=A.signal)!==null&&o!==void 0&&o.aborted)throw new C;_?j=await J(j,d,{signal:r}):(j=d,_=!0)}if(!O0&&!_)throw new O}finally{s.abort()}return j}async function $(J){J!=null&&P(J,"options"),J?.signal!=null&&H(J.signal,"options.signal");let j=[];for await(let E of this){var A;if(J!=null&&(A=J.signal)!==null&&A!==void 0&&A.aborted)throw new C(void 0,{cause:J.signal.reason});T(j,E)}return j}function Y(J,j){let A=h.call(this,J,j);return async function*(){for await(let E of A)yield*E}.call(this)}function W(J){if(J=F(J),I(J))return 0;if(J<0)throw new R("number",">= 0",J);return J}function Z(J,j=void 0){return j!=null&&P(j,"options"),j?.signal!=null&&H(j.signal,"options.signal"),J=W(J),async function*(){var A;if(j!=null&&(A=j.signal)!==null&&A!==void 0&&A.aborted)throw new C;for await(let _ of this){var E;if(j!=null&&(E=j.signal)!==null&&E!==void 0&&E.aborted)throw new C;J--<=0&&(yield _)}}.call(this)}function K(J,j=void 0){return j!=null&&P(j,"options"),j?.signal!=null&&H(j.signal,"options.signal"),J=W(J),async function*(){var A;if(j!=null&&(A=j.signal)!==null&&A!==void 0&&A.aborted)throw new C;for await(let _ of this){var E;if(j!=null&&(E=j.signal)!==null&&E!==void 0&&E.aborted)throw new C;if(J-- >0)yield _;else return}}.call(this)}k.exports.streamReturningOperators={asIndexedPairs:a,drop:Z,filter:X,flatMap:Y,map:h,take:K},k.exports.promiseReturningOperators={every:G0,forEach:Z0,reduce:G,toArray:$,some:i,find:n}}),c2=K0((B,k)=>{var V=(S2(),T2(R2)),{aggregateTwoErrors:N,codes:{ERR_MULTIPLE_CALLBACK:Q},AbortError:R}=U2(),{Symbol:C}=H2(),{kDestroyed:H,isDestroyed:L,isFinished:P,isServerRequest:U}=v2(),z=C("kDestroy"),T=C("kConstruct");function q(X,O,G){X&&(X.stack,O&&!O.errored&&(O.errored=X),G&&!G.errored&&(G.errored=X))}function F(X,O){let G=this._readableState,$=this._writableState,Y=$||G;return $&&$.destroyed||G&&G.destroyed?(typeof O=="function"&&O(),this):(q(X,$,G),$&&($.destroyed=!0),G&&(G.destroyed=!0),Y.constructed?I(this,X,O):this.once(z,function(W){I(this,N(W,X),O)}),this)}function I(X,O,G){let $=!1;function Y(W){if($)return;$=!0;let{_readableState:Z,_writableState:K}=X;q(W,K,Z),K&&(K.closed=!0),Z&&(Z.closed=!0),typeof G=="function"&&G(W),W?V.nextTick(x,X,W):V.nextTick(w,X)}try{X._destroy(O||null,Y)}catch(W){Y(W)}}function x(X,O){M(X,O),w(X)}function w(X){let{_readableState:O,_writableState:G}=X;G&&(G.closeEmitted=!0),O&&(O.closeEmitted=!0),(G&&G.emitClose||O&&O.emitClose)&&X.emit("close")}function M(X,O){let{_readableState:G,_writableState:$}=X;$&&$.errorEmitted||G&&G.errorEmitted||($&&($.errorEmitted=!0),G&&(G.errorEmitted=!0),X.emit("error",O))}function y(){let X=this._readableState,O=this._writableState;X&&(X.constructed=!0,X.closed=!1,X.closeEmitted=!1,X.destroyed=!1,X.errored=null,X.errorEmitted=!1,X.reading=!1,X.ended=X.readable===!1,X.endEmitted=X.readable===!1),O&&(O.constructed=!0,O.destroyed=!1,O.closed=!1,O.closeEmitted=!1,O.errored=null,O.errorEmitted=!1,O.finalCalled=!1,O.prefinished=!1,O.ended=O.writable===!1,O.ending=O.writable===!1,O.finished=O.writable===!1)}function m(X,O,G){let{_readableState:$,_writableState:Y}=X;if(Y&&Y.destroyed||$&&$.destroyed)return this;$&&$.autoDestroy||Y&&Y.autoDestroy?X.destroy(O):O&&(O.stack,Y&&!Y.errored&&(Y.errored=O),$&&!$.errored&&($.errored=O),G?V.nextTick(M,X,O):M(X,O))}function c(X,O){if(typeof X._construct!="function")return;let{_readableState:G,_writableState:$}=X;G&&(G.constructed=!1),$&&($.constructed=!1),X.once(T,O),!(X.listenerCount(T)>1)&&V.nextTick(h,X)}function h(X){let O=!1;function G($){if(O){m(X,$??new Q);return}O=!0;let{_readableState:Y,_writableState:W}=X,Z=W||Y;Y&&(Y.constructed=!0),W&&(W.constructed=!0),Z.destroyed?X.emit(z,$):$?m(X,$,!0):V.nextTick(a,X)}try{X._construct(G)}catch($){G($)}}function a(X){X.emit(T)}function i(X){return X&&X.setHeader&&typeof X.abort=="function"}function G0(X){X.emit("close")}function n(X,O){X.emit("error",O),V.nextTick(G0,X)}function Z0(X,O){!X||L(X)||(!O&&!P(X)&&(O=new R),U(X)?(X.socket=null,X.destroy(O)):i(X)?X.abort():i(X.req)?X.req.abort():typeof X.destroy=="function"?X.destroy(O):typeof X.close=="function"?X.close():O?V.nextTick(n,X,O):V.nextTick(G0,X),X.destroyed||(X[H]=!0))}k.exports={construct:c,destroyer:Z0,destroy:F,undestroy:y,errorOrDestroy:m}}),p1=K0((B,k)=>{var{ArrayIsArray:V,ObjectSetPrototypeOf:N}=H2(),{EventEmitter:Q}=x2();function R(H){Q.call(this,H)}N(R.prototype,Q.prototype),N(R,Q),R.prototype.pipe=function(H,L){let P=this;function U(w){H.writable&&H.write(w)===!1&&P.pause&&P.pause()}P.on("data",U);function z(){P.readable&&P.resume&&P.resume()}H.on("drain",z),!H._isStdio&&(!L||L.end!==!1)&&(P.on("end",q),P.on("close",F));let T=!1;function q(){T||(T=!0,H.end())}function F(){T||(T=!0,typeof H.destroy=="function"&&H.destroy())}function I(w){x(),Q.listenerCount(this,"error")===0&&this.emit("error",w)}C(P,"error",I),C(H,"error",I);function x(){P.removeListener("data",U),H.removeListener("drain",z),P.removeListener("end",q),P.removeListener("close",F),P.removeListener("error",I),H.removeListener("error",I),P.removeListener("end",x),P.removeListener("close",x),H.removeListener("close",x)}return P.on("end",x),P.on("close",x),H.on("close",x),H.emit("pipe",P),H};function C(H,L,P){if(typeof H.prependListener=="function")return H.prependListener(L,P);!H._events||!H._events[L]?H.on(L,P):V(H._events[L])?H._events[L].unshift(P):H._events[L]=[P,H._events[L]]}k.exports={Stream:R,prependListener:C}}),c1=K0((B,k)=>{var{AbortError:V,codes:N}=U2(),Q=A2(),{ERR_INVALID_ARG_TYPE:R}=N,C=(L,P)=>{if(typeof L!="object"||!("aborted"in L))throw new R(P,"AbortSignal",L)};function H(L){return!!(L&&typeof L.pipe=="function")}k.exports.addAbortSignal=function(L,P){if(C(L,"signal"),!H(P))throw new R("stream","stream.Stream",P);return k.exports.addAbortSignalNoValidate(L,P)},k.exports.addAbortSignalNoValidate=function(L,P){if(typeof L!="object"||!("aborted"in L))return P;let U=()=>{P.destroy(new V(void 0,{cause:L.reason}))};return L.aborted?U():(L.addEventListener("abort",U),Q(P,()=>L.removeEventListener("abort",U))),P}}),E8=K0((B,k)=>{var{StringPrototypeSlice:V,SymbolIterator:N,TypedArrayPrototypeSet:Q,Uint8Array:R}=H2(),{Buffer:C}=P2(),{inspect:H}=k2();k.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(L){let P={data:L,next:null};this.length>0?this.tail.next=P:this.head=P,this.tail=P,++this.length}unshift(L){let P={data:L,next:this.head};this.length===0&&(this.tail=P),this.head=P,++this.length}shift(){if(this.length===0)return;let L=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,L}clear(){this.head=this.tail=null,this.length=0}join(L){if(this.length===0)return"";let P=this.head,U=""+P.data;for(;(P=P.next)!==null;)U+=L+P.data;return U}concat(L){if(this.length===0)return C.alloc(0);let P=C.allocUnsafe(L>>>0),U=this.head,z=0;for(;U;)Q(P,U.data,z),z+=U.data.length,U=U.next;return P}consume(L,P){let U=this.head.data;if(L<U.length){let z=U.slice(0,L);return this.head.data=U.slice(L),z}return L===U.length?this.shift():P?this._getString(L):this._getBuffer(L)}first(){return this.head.data}*[N](){for(let L=this.head;L;L=L.next)yield L.data}_getString(L){let P="",U=this.head,z=0;do{let T=U.data;if(L>T.length)P+=T,L-=T.length;else{L===T.length?(P+=T,++z,U.next?this.head=U.next:this.head=this.tail=null):(P+=V(T,0,L),this.head=U,U.data=V(T,L));break}++z}while((U=U.next)!==null);return this.length-=z,P}_getBuffer(L){let P=C.allocUnsafe(L),U=L,z=this.head,T=0;do{let q=z.data;if(L>q.length)Q(P,q,U-L),L-=q.length;else{L===q.length?(Q(P,q,U-L),++T,z.next?this.head=z.next:this.head=this.tail=null):(Q(P,new R(q.buffer,q.byteOffset,L),U-L),this.head=z,z.data=q.slice(L));break}++T}while((z=z.next)!==null);return this.length-=T,P}[Symbol.for("nodejs.util.inspect.custom")](L,P){return H(this,{...P,depth:0,customInspect:!1})}}}),b1=K0((B,k)=>{var{MathFloor:V,NumberIsInteger:N}=H2(),{ERR_INVALID_ARG_VALUE:Q}=U2().codes;function R(L,P,U){return L.highWaterMark!=null?L.highWaterMark:P?L[U]:null}function C(L){return L?16:16384}function H(L,P,U,z){let T=R(P,z,U);if(T!=null){if(!N(T)||T<0){let q=z?`options.${U}`:"options.highWaterMark";throw new Q(q,T)}return V(T)}return C(L.objectMode)}k.exports={getHighWaterMark:H,getDefaultHighWaterMark:C}}),l5=K0((B,k)=>{var V=(S2(),T2(R2)),{PromisePrototypeThen:N,SymbolAsyncIterator:Q,SymbolIterator:R}=H2(),{Buffer:C}=P2(),{ERR_INVALID_ARG_TYPE:H,ERR_STREAM_NULL_VALUES:L}=U2().codes;function P(U,z,T){let q;if(typeof z=="string"||z instanceof C)return new U({objectMode:!0,...T,read(){this.push(z),this.push(null)}});let F;if(z&&z[Q])F=!0,q=z[Q]();else if(z&&z[R])F=!1,q=z[R]();else throw new H("iterable",["Iterable"],z);let I=new U({objectMode:!0,highWaterMark:1,...T}),x=!1;I._read=function(){x||(x=!0,M())},I._destroy=function(y,m){N(w(y),()=>V.nextTick(m,y),(c)=>V.nextTick(m,c||y))};async function w(y){let m=y!=null,c=typeof q.throw=="function";if(m&&c){let{value:h,done:a}=await q.throw(y);if(await h,a)return}if(typeof q.return=="function"){let{value:h}=await q.return();await h}}async function M(){for(;;){try{let{value:y,done:m}=F?await q.next():q.next();if(m)I.push(null);else{let c=y&&typeof y.then=="function"?await y:y;if(c===null)throw x=!1,new L;if(I.push(c))continue;x=!1}}catch(y){I.destroy(y)}break}}return I}k.exports=P}),P1=K0((B,k)=>{var V=(S2(),T2(R2)),{ArrayPrototypeIndexOf:N,NumberIsInteger:Q,NumberIsNaN:R,NumberParseInt:C,ObjectDefineProperties:H,ObjectKeys:L,ObjectSetPrototypeOf:P,Promise:U,SafeSet:z,SymbolAsyncIterator:T,Symbol:q}=H2();k.exports=A,A.ReadableState=j;var{EventEmitter:F}=x2(),{Stream:I,prependListener:x}=p1(),{Buffer:w}=P2(),{addAbortSignal:M}=c1(),y=A2(),m=k2().debuglog("stream",(D)=>{m=D}),c=E8(),h=c2(),{getHighWaterMark:a,getDefaultHighWaterMark:i}=b1(),{aggregateTwoErrors:G0,codes:{ERR_INVALID_ARG_TYPE:n,ERR_METHOD_NOT_IMPLEMENTED:Z0,ERR_OUT_OF_RANGE:X,ERR_STREAM_PUSH_AFTER_EOF:O,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:G}}=U2(),{validateObject:$}=V1(),Y=q("kPaused"),{StringDecoder:W}=M1(),Z=l5();P(A.prototype,I.prototype),P(A,I);var K=()=>{},{errorOrDestroy:J}=h;function j(D,v,b){typeof b!="boolean"&&(b=v instanceof B2()),this.objectMode=!!(D&&D.objectMode),b&&(this.objectMode=this.objectMode||!!(D&&D.readableObjectMode)),this.highWaterMark=D?a(this,D,"readableHighWaterMark",b):i(!1),this.buffer=new c,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[Y]=null,this.errorEmitted=!1,this.emitClose=!D||D.emitClose!==!1,this.autoDestroy=!D||D.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=D&&D.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,D&&D.encoding&&(this.decoder=new W(D.encoding),this.encoding=D.encoding)}function A(D){if(!(this instanceof A))return new A(D);let v=this instanceof B2();this._readableState=new j(D,this,v),D&&(typeof D.read=="function"&&(this._read=D.read),typeof D.destroy=="function"&&(this._destroy=D.destroy),typeof D.construct=="function"&&(this._construct=D.construct),D.signal&&!v&&M(D.signal,this)),I.call(this,D),h.construct(this,()=>{this._readableState.needReadable&&U0(this,this._readableState)})}A.prototype.destroy=h.destroy,A.prototype._undestroy=h.undestroy,A.prototype._destroy=function(D,v){v(D)},A.prototype[F.captureRejectionSymbol]=function(D){this.destroy(D)},A.prototype.push=function(D,v){return E(this,D,v,!1)},A.prototype.unshift=function(D,v){return E(this,D,v,!0)};function E(D,v,b,l){m("readableAddChunk",v);let u=D._readableState,F0;if(u.objectMode||(typeof v=="string"?(b=b||u.defaultEncoding,u.encoding!==b&&(l&&u.encoding?v=w.from(v,b).toString(u.encoding):(v=w.from(v,b),b=""))):v instanceof w?b="":I._isUint8Array(v)?(v=I._uint8ArrayToBuffer(v),b=""):v!=null&&(F0=new n("chunk",["string","Buffer","Uint8Array"],v))),F0)J(D,F0);else if(v===null)u.reading=!1,o(D,u);else if(u.objectMode||v&&v.length>0)if(l)if(u.endEmitted)J(D,new G);else{if(u.destroyed||u.errored)return!1;_(D,u,v,!0)}else if(u.ended)J(D,new O);else{if(u.destroyed||u.errored)return!1;u.reading=!1,u.decoder&&!b?(v=u.decoder.write(v),u.objectMode||v.length!==0?_(D,u,v,!1):U0(D,u)):_(D,u,v,!1)}else l||(u.reading=!1,U0(D,u));return!u.ended&&(u.length<u.highWaterMark||u.length===0)}function _(D,v,b,l){v.flowing&&v.length===0&&!v.sync&&D.listenerCount("data")>0?(v.multiAwaitDrain?v.awaitDrainWriters.clear():v.awaitDrainWriters=null,v.dataEmitted=!0,D.emit("data",b)):(v.length+=v.objectMode?1:b.length,l?v.buffer.unshift(b):v.buffer.push(b),v.needReadable&&d(D)),U0(D,v)}A.prototype.isPaused=function(){let D=this._readableState;return D[Y]===!0||D.flowing===!1},A.prototype.setEncoding=function(D){let v=new W(D);this._readableState.decoder=v,this._readableState.encoding=this._readableState.decoder.encoding;let b=this._readableState.buffer,l="";for(let u of b)l+=v.write(u);return b.clear(),l!==""&&b.push(l),this._readableState.length=l.length,this};var s=1073741824;function r(D){if(D>s)throw new X("size","<= 1GiB",D);return D--,D|=D>>>1,D|=D>>>2,D|=D>>>4,D|=D>>>8,D|=D>>>16,D++,D}function O0(D,v){return D<=0||v.length===0&&v.ended?0:v.objectMode?1:R(D)?v.flowing&&v.length?v.buffer.first().length:v.length:D<=v.length?D:v.ended?v.length:0}A.prototype.read=function(D){m("read",D),D===void 0?D=NaN:Q(D)||(D=C(D,10));let v=this._readableState,b=D;if(D>v.highWaterMark&&(v.highWaterMark=r(D)),D!==0&&(v.emittedReadable=!1),D===0&&v.needReadable&&((v.highWaterMark!==0?v.length>=v.highWaterMark:v.length>0)||v.ended))return m("read: emitReadable",v.length,v.ended),v.length===0&&v.ended?W0(this):d(this),null;if(D=O0(D,v),D===0&&v.ended)return v.length===0&&W0(this),null;let l=v.needReadable;if(m("need readable",l),(v.length===0||v.length-D<v.highWaterMark)&&(l=!0,m("length less than watermark",l)),v.ended||v.reading||v.destroyed||v.errored||!v.constructed)l=!1,m("reading, ended or constructing",l);else if(l){m("do read"),v.reading=!0,v.sync=!0,v.length===0&&(v.needReadable=!0);try{this._read(v.highWaterMark)}catch(F0){J(this,F0)}v.sync=!1,v.reading||(D=O0(b,v))}let u;return D>0?u=C0(D,v):u=null,u===null?(v.needReadable=v.length<=v.highWaterMark,D=0):(v.length-=D,v.multiAwaitDrain?v.awaitDrainWriters.clear():v.awaitDrainWriters=null),v.length===0&&(v.ended||(v.needReadable=!0),b!==D&&v.ended&&W0(this)),u!==null&&!v.errorEmitted&&!v.closeEmitted&&(v.dataEmitted=!0,this.emit("data",u)),u};function o(D,v){if(m("onEofChunk"),!v.ended){if(v.decoder){let b=v.decoder.end();b&&b.length&&(v.buffer.push(b),v.length+=v.objectMode?1:b.length)}v.ended=!0,v.sync?d(D):(v.needReadable=!1,v.emittedReadable=!0,f(D))}}function d(D){let v=D._readableState;m("emitReadable",v.needReadable,v.emittedReadable),v.needReadable=!1,v.emittedReadable||(m("emitReadable",v.flowing),v.emittedReadable=!0,V.nextTick(f,D))}function f(D){let v=D._readableState;m("emitReadable_",v.destroyed,v.length,v.ended),!v.destroyed&&!v.errored&&(v.length||v.ended)&&(D.emit("readable"),v.emittedReadable=!1),v.needReadable=!v.flowing&&!v.ended&&v.length<=v.highWaterMark,J0(D)}function U0(D,v){!v.readingMore&&v.constructed&&(v.readingMore=!0,V.nextTick(X0,D,v))}function X0(D,v){for(;!v.reading&&!v.ended&&(v.length<v.highWaterMark||v.flowing&&v.length===0);){let b=v.length;if(m("maybeReadMore read 0"),D.read(0),b===v.length)break}v.readingMore=!1}A.prototype._read=function(D){throw new Z0("_read()")},A.prototype.pipe=function(D,v){let b=this,l=this._readableState;l.pipes.length===1&&(l.multiAwaitDrain||(l.multiAwaitDrain=!0,l.awaitDrainWriters=new z(l.awaitDrainWriters?[l.awaitDrainWriters]:[]))),l.pipes.push(D),m("pipe count=%d opts=%j",l.pipes.length,v);let u=(!v||v.end!==!1)&&D!==V.stdout&&D!==V.stderr?$0:D0;l.endEmitted?V.nextTick(u):b.once("end",u),D.on("unpipe",F0);function F0(T0,l0){m("onunpipe"),T0===b&&l0&&l0.hasUnpiped===!1&&(l0.hasUnpiped=!0,V0())}function $0(){m("onend"),D.end()}let z0,b0=!1;function V0(){m("cleanup"),D.removeListener("close",L0),D.removeListener("finish",K2),z0&&D.removeListener("drain",z0),D.removeListener("error",N0),D.removeListener("unpipe",F0),b.removeListener("end",$0),b.removeListener("end",D0),b.removeListener("data",g0),b0=!0,z0&&l.awaitDrainWriters&&(!D._writableState||D._writableState.needDrain)&&z0()}function H0(){b0||(l.pipes.length===1&&l.pipes[0]===D?(m("false write response, pause",0),l.awaitDrainWriters=D,l.multiAwaitDrain=!1):l.pipes.length>1&&l.pipes.includes(D)&&(m("false write response, pause",l.awaitDrainWriters.size),l.awaitDrainWriters.add(D)),b.pause()),z0||(z0=Y0(b,D),D.on("drain",z0))}b.on("data",g0);function g0(T0){m("ondata");let l0=D.write(T0);m("dest.write",l0),l0===!1&&H0()}function N0(T0){if(m("onerror",T0),D0(),D.removeListener("error",N0),D.listenerCount("error")===0){let l0=D._writableState||D._readableState;l0&&!l0.errorEmitted?J(D,T0):D.emit("error",T0)}}x(D,"error",N0);function L0(){D.removeListener("finish",K2),D0()}D.once("close",L0);function K2(){m("onfinish"),D.removeListener("close",L0),D0()}D.once("finish",K2);function D0(){m("unpipe"),b.unpipe(D)}return D.emit("pipe",b),D.writableNeedDrain===!0?l.flowing&&H0():l.flowing||(m("pipe resume"),b.resume()),D};function Y0(D,v){return function(){let b=D._readableState;b.awaitDrainWriters===v?(m("pipeOnDrain",1),b.awaitDrainWriters=null):b.multiAwaitDrain&&(m("pipeOnDrain",b.awaitDrainWriters.size),b.awaitDrainWriters.delete(v)),(!b.awaitDrainWriters||b.awaitDrainWriters.size===0)&&D.listenerCount("data")&&D.resume()}}A.prototype.unpipe=function(D){let v=this._readableState,b={hasUnpiped:!1};if(v.pipes.length===0)return this;if(!D){let u=v.pipes;v.pipes=[],this.pause();for(let F0=0;F0<u.length;F0++)u[F0].emit("unpipe",this,{hasUnpiped:!1});return this}let l=N(v.pipes,D);return l===-1?this:(v.pipes.splice(l,1),v.pipes.length===0&&this.pause(),D.emit("unpipe",this,b),this)},A.prototype.on=function(D,v){let b=I.prototype.on.call(this,D,v),l=this._readableState;return D==="data"?(l.readableListening=this.listenerCount("readable")>0,l.flowing!==!1&&this.resume()):D==="readable"&&!l.endEmitted&&!l.readableListening&&(l.readableListening=l.needReadable=!0,l.flowing=!1,l.emittedReadable=!1,m("on readable",l.length,l.reading),l.length?d(this):l.reading||V.nextTick(S,this)),b},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(D,v){let b=I.prototype.removeListener.call(this,D,v);return D==="readable"&&V.nextTick(g,this),b},A.prototype.off=A.prototype.removeListener,A.prototype.removeAllListeners=function(D){let v=I.prototype.removeAllListeners.apply(this,arguments);return(D==="readable"||D===void 0)&&V.nextTick(g,this),v};function g(D){let v=D._readableState;v.readableListening=D.listenerCount("readable")>0,v.resumeScheduled&&v[Y]===!1?v.flowing=!0:D.listenerCount("data")>0?D.resume():v.readableListening||(v.flowing=null)}function S(D){m("readable nexttick read 0"),D.read(0)}A.prototype.resume=function(){let D=this._readableState;return D.flowing||(m("resume"),D.flowing=!D.readableListening,p(this,D)),D[Y]=!1,this};function p(D,v){v.resumeScheduled||(v.resumeScheduled=!0,V.nextTick(e,D,v))}function e(D,v){m("resume",v.reading),v.reading||D.read(0),v.resumeScheduled=!1,D.emit("resume"),J0(D),v.flowing&&!v.reading&&D.read(0)}A.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Y]=!0,this};function J0(D){let v=D._readableState;for(m("flow",v.flowing);v.flowing&&D.read()!==null;);}A.prototype.wrap=function(D){let v=!1;D.on("data",(l)=>{!this.push(l)&&D.pause&&(v=!0,D.pause())}),D.on("end",()=>{this.push(null)}),D.on("error",(l)=>{J(this,l)}),D.on("close",()=>{this.destroy()}),D.on("destroy",()=>{this.destroy()}),this._read=()=>{v&&D.resume&&(v=!1,D.resume())};let b=L(D);for(let l=1;l<b.length;l++){let u=b[l];this[u]===void 0&&typeof D[u]=="function"&&(this[u]=D[u].bind(D))}return this},A.prototype[T]=function(){return t(this)},A.prototype.iterator=function(D){return D!==void 0&&$(D,"options"),t(this,D)};function t(D,v){typeof D.read!="function"&&(D=A.wrap(D,{objectMode:!0}));let b=y0(D,v);return b.stream=D,b}async function*y0(D,v){let b=K;function l($0){this===D?(b(),b=K):b=$0}D.on("readable",l);let u,F0=y(D,{writable:!1},($0)=>{u=$0?G0(u,$0):null,b(),b=K});try{for(;;){let $0=D.destroyed?null:D.read();if($0!==null)yield $0;else{if(u)throw u;if(u===null)return;await new U(l)}}}catch($0){throw u=G0(u,$0),u}finally{(u||v?.destroyOnReturn!==!1)&&(u===void 0||D._readableState.autoDestroy)?h.destroyer(D,null):(D.off("readable",l),F0())}}H(A.prototype,{readable:{__proto__:null,get(){let D=this._readableState;return!!D&&D.readable!==!1&&!D.destroyed&&!D.errorEmitted&&!D.endEmitted},set(D){this._readableState&&(this._readableState.readable=!!D)}},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(D){this._readableState&&(this._readableState.flowing=D)}},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(D){!this._readableState||(this._readableState.destroyed=D)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),H(j.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Y]!==!1},set(D){this[Y]=!!D}}}),A._fromList=C0;function C0(D,v){if(v.length===0)return null;let b;return v.objectMode?b=v.buffer.shift():!D||D>=v.length?(v.decoder?b=v.buffer.join(""):v.buffer.length===1?b=v.buffer.first():b=v.buffer.concat(v.length),v.buffer.clear()):b=v.buffer.consume(D,v.decoder),b}function W0(D){let v=D._readableState;m("endReadable",v.endEmitted),v.endEmitted||(v.ended=!0,V.nextTick(_0,v,D))}function _0(D,v){if(m("endReadableNT",D.endEmitted,D.length),!D.errored&&!D.closeEmitted&&!D.endEmitted&&D.length===0){if(D.endEmitted=!0,v.emit("end"),v.writable&&v.allowHalfOpen===!1)V.nextTick(P0,v);else if(D.autoDestroy){let b=v._writableState;(!b||b.autoDestroy&&(b.finished||b.writable===!1))&&v.destroy()}}}function P0(D){D.writable&&!D.writableEnded&&!D.destroyed&&D.end()}A.from=function(D,v){return Z(A,D,v)};var Q0;function d0(){return Q0===void 0&&(Q0={}),Q0}A.fromWeb=function(D,v){return d0().newStreamReadableFromReadableStream(D,v)},A.toWeb=function(D,v){return d0().newReadableStreamFromStreamReadable(D,v)},A.wrap=function(D,v){var b,l;return new A({objectMode:(b=(l=D.readableObjectMode)!==null&&l!==void 0?l:D.objectMode)!==null&&b!==void 0?b:!0,...v,destroy(u,F0){h.destroyer(D,u),F0(u)}}).wrap(D)}}),o5=K0((B,k)=>{var V=(S2(),T2(R2)),{ArrayPrototypeSlice:N,Error:Q,FunctionPrototypeSymbolHasInstance:R,ObjectDefineProperty:C,ObjectDefineProperties:H,ObjectSetPrototypeOf:L,StringPrototypeToLowerCase:P,Symbol:U,SymbolHasInstance:z}=H2();k.exports=W,W.WritableState=$;var{EventEmitter:T}=x2(),q=p1().Stream,{Buffer:F}=P2(),I=c2(),{addAbortSignal:x}=c1(),{getHighWaterMark:w,getDefaultHighWaterMark:M}=b1(),{ERR_INVALID_ARG_TYPE:y,ERR_METHOD_NOT_IMPLEMENTED:m,ERR_MULTIPLE_CALLBACK:c,ERR_STREAM_CANNOT_PIPE:h,ERR_STREAM_DESTROYED:a,ERR_STREAM_ALREADY_FINISHED:i,ERR_STREAM_NULL_VALUES:G0,ERR_STREAM_WRITE_AFTER_END:n,ERR_UNKNOWN_ENCODING:Z0}=U2().codes,{errorOrDestroy:X}=I;L(W.prototype,q.prototype),L(W,q);function O(){}var G=U("kOnFinished");function $(S,p,e){typeof e!="boolean"&&(e=p instanceof B2()),this.objectMode=!!(S&&S.objectMode),e&&(this.objectMode=this.objectMode||!!(S&&S.writableObjectMode)),this.highWaterMark=S?w(this,S,"writableHighWaterMark",e):M(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let J0=!!(S&&S.decodeStrings===!1);this.decodeStrings=!J0,this.defaultEncoding=S&&S.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=A.bind(void 0,p),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,Y(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!S||S.emitClose!==!1,this.autoDestroy=!S||S.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[G]=[]}function Y(S){S.buffered=[],S.bufferedIndex=0,S.allBuffers=!0,S.allNoop=!0}$.prototype.getBuffer=function(){return N(this.buffered,this.bufferedIndex)},C($.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function W(S){let p=this instanceof B2();if(!p&&!R(W,this))return new W(S);this._writableState=new $(S,this,p),S&&(typeof S.write=="function"&&(this._write=S.write),typeof S.writev=="function"&&(this._writev=S.writev),typeof S.destroy=="function"&&(this._destroy=S.destroy),typeof S.final=="function"&&(this._final=S.final),typeof S.construct=="function"&&(this._construct=S.construct),S.signal&&x(S.signal,this)),q.call(this,S),I.construct(this,()=>{let e=this._writableState;e.writing||r(this,e),f(this,e)})}C(W,z,{__proto__:null,value:function(S){return R(this,S)?!0:this!==W?!1:S&&S._writableState instanceof $}}),W.prototype.pipe=function(){X(this,new h)};function Z(S,p,e,J0){let t=S._writableState;if(typeof e=="function")J0=e,e=t.defaultEncoding;else{if(!e)e=t.defaultEncoding;else if(e!=="buffer"&&!F.isEncoding(e))throw new Z0(e);typeof J0!="function"&&(J0=O)}if(p===null)throw new G0;if(!t.objectMode)if(typeof p=="string")t.decodeStrings!==!1&&(p=F.from(p,e),e="buffer");else if(p instanceof F)e="buffer";else if(q._isUint8Array(p))p=q._uint8ArrayToBuffer(p),e="buffer";else throw new y("chunk",["string","Buffer","Uint8Array"],p);let y0;return t.ending?y0=new n:t.destroyed&&(y0=new a("write")),y0?(V.nextTick(J0,y0),X(S,y0,!0),y0):(t.pendingcb++,K(S,t,p,e,J0))}W.prototype.write=function(S,p,e){return Z(this,S,p,e)===!0},W.prototype.cork=function(){this._writableState.corked++},W.prototype.uncork=function(){let S=this._writableState;S.corked&&(S.corked--,S.writing||r(this,S))},W.prototype.setDefaultEncoding=function(S){if(typeof S=="string"&&(S=P(S)),!F.isEncoding(S))throw new Z0(S);return this._writableState.defaultEncoding=S,this};function K(S,p,e,J0,t){let y0=p.objectMode?1:e.length;p.length+=y0;let C0=p.length<p.highWaterMark;return C0||(p.needDrain=!0),p.writing||p.corked||p.errored||!p.constructed?(p.buffered.push({chunk:e,encoding:J0,callback:t}),p.allBuffers&&J0!=="buffer"&&(p.allBuffers=!1),p.allNoop&&t!==O&&(p.allNoop=!1)):(p.writelen=y0,p.writecb=t,p.writing=!0,p.sync=!0,S._write(e,J0,p.onwrite),p.sync=!1),C0&&!p.errored&&!p.destroyed}function J(S,p,e,J0,t,y0,C0){p.writelen=J0,p.writecb=C0,p.writing=!0,p.sync=!0,p.destroyed?p.onwrite(new a("write")):e?S._writev(t,p.onwrite):S._write(t,y0,p.onwrite),p.sync=!1}function j(S,p,e,J0){--p.pendingcb,J0(e),s(p),X(S,e)}function A(S,p){let e=S._writableState,J0=e.sync,t=e.writecb;if(typeof t!="function"){X(S,new c);return}e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0,p?(p.stack,e.errored||(e.errored=p),S._readableState&&!S._readableState.errored&&(S._readableState.errored=p),J0?V.nextTick(j,S,e,p,t):j(S,e,p,t)):(e.buffered.length>e.bufferedIndex&&r(S,e),J0?e.afterWriteTickInfo!==null&&e.afterWriteTickInfo.cb===t?e.afterWriteTickInfo.count++:(e.afterWriteTickInfo={count:1,cb:t,stream:S,state:e},V.nextTick(E,e.afterWriteTickInfo)):_(S,e,1,t))}function E({stream:S,state:p,count:e,cb:J0}){return p.afterWriteTickInfo=null,_(S,p,e,J0)}function _(S,p,e,J0){for(!p.ending&&!S.destroyed&&p.length===0&&p.needDrain&&(p.needDrain=!1,S.emit("drain"));e-- >0;)p.pendingcb--,J0();p.destroyed&&s(p),f(S,p)}function s(S){if(S.writing)return;for(let t=S.bufferedIndex;t<S.buffered.length;++t){var p;let{chunk:y0,callback:C0}=S.buffered[t],W0=S.objectMode?1:y0.length;S.length-=W0,C0((p=S.errored)!==null&&p!==void 0?p:new a("write"))}let e=S[G].splice(0);for(let t=0;t<e.length;t++){var J0;e[t]((J0=S.errored)!==null&&J0!==void 0?J0:new a("end"))}Y(S)}function r(S,p){if(p.corked||p.bufferProcessing||p.destroyed||!p.constructed)return;let{buffered:e,bufferedIndex:J0,objectMode:t}=p,y0=e.length-J0;if(!y0)return;let C0=J0;if(p.bufferProcessing=!0,y0>1&&S._writev){p.pendingcb-=y0-1;let W0=p.allNoop?O:(P0)=>{for(let Q0=C0;Q0<e.length;++Q0)e[Q0].callback(P0)},_0=p.allNoop&&C0===0?e:N(e,C0);_0.allBuffers=p.allBuffers,J(S,p,!0,p.length,_0,"",W0),Y(p)}else{do{let{chunk:W0,encoding:_0,callback:P0}=e[C0];e[C0++]=null;let Q0=t?1:W0.length;J(S,p,!1,Q0,W0,_0,P0)}while(C0<e.length&&!p.writing);C0===e.length?Y(p):C0>256?(e.splice(0,C0),p.bufferedIndex=0):p.bufferedIndex=C0}p.bufferProcessing=!1}W.prototype._write=function(S,p,e){if(this._writev)this._writev([{chunk:S,encoding:p}],e);else throw new m("_write()")},W.prototype._writev=null,W.prototype.end=function(S,p,e){let J0=this._writableState;typeof S=="function"?(e=S,S=null,p=null):typeof p=="function"&&(e=p,p=null);let t;if(S!=null){let y0=Z(this,S,p);y0 instanceof Q&&(t=y0)}return J0.corked&&(J0.corked=1,this.uncork()),t||(!J0.errored&&!J0.ending?(J0.ending=!0,f(this,J0,!0),J0.ended=!0):J0.finished?t=new i("end"):J0.destroyed&&(t=new a("end"))),typeof e=="function"&&(t||J0.finished?V.nextTick(e,t):J0[G].push(e)),this};function O0(S){return S.ending&&!S.destroyed&&S.constructed&&S.length===0&&!S.errored&&S.buffered.length===0&&!S.finished&&!S.writing&&!S.errorEmitted&&!S.closeEmitted}function o(S,p){let e=!1;function J0(t){if(e){X(S,t??c());return}if(e=!0,p.pendingcb--,t){let y0=p[G].splice(0);for(let C0=0;C0<y0.length;C0++)y0[C0](t);X(S,t,p.sync)}else O0(p)&&(p.prefinished=!0,S.emit("prefinish"),p.pendingcb++,V.nextTick(U0,S,p))}p.sync=!0,p.pendingcb++;try{S._final(J0)}catch(t){J0(t)}p.sync=!1}function d(S,p){!p.prefinished&&!p.finalCalled&&(typeof S._final=="function"&&!p.destroyed?(p.finalCalled=!0,o(S,p)):(p.prefinished=!0,S.emit("prefinish")))}function f(S,p,e){O0(p)&&(d(S,p),p.pendingcb===0&&(e?(p.pendingcb++,V.nextTick((J0,t)=>{O0(t)?U0(J0,t):t.pendingcb--},S,p)):O0(p)&&(p.pendingcb++,U0(S,p))))}function U0(S,p){p.pendingcb--,p.finished=!0;let e=p[G].splice(0);for(let J0=0;J0<e.length;J0++)e[J0]();if(S.emit("finish"),p.autoDestroy){let J0=S._readableState;(!J0||J0.autoDestroy&&(J0.endEmitted||J0.readable===!1))&&S.destroy()}}H(W.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(S){this._writableState&&(this._writableState.destroyed=S)}},writable:{__proto__:null,get(){let S=this._writableState;return!!S&&S.writable!==!1&&!S.destroyed&&!S.errored&&!S.ending&&!S.ended},set(S){this._writableState&&(this._writableState.writable=!!S)}},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 S=this._writableState;return S?!S.destroyed&&!S.ending&&S.needDrain:!1}},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 X0=I.destroy;W.prototype.destroy=function(S,p){let e=this._writableState;return!e.destroyed&&(e.bufferedIndex<e.buffered.length||e[G].length)&&V.nextTick(s,e),X0.call(this,S,p),this},W.prototype._undestroy=I.undestroy,W.prototype._destroy=function(S,p){p(S)},W.prototype[T.captureRejectionSymbol]=function(S){this.destroy(S)};var Y0;function g(){return Y0===void 0&&(Y0={}),Y0}W.fromWeb=function(S,p){return g().newStreamWritableFromWritableStream(S,p)},W.toWeb=function(S){return g().newWritableStreamFromStreamWritable(S)}}),x8=K0((B,k)=>{var V=(S2(),T2(R2)),N=P2(),{isReadable:Q,isWritable:R,isIterable:C,isNodeStream:H,isReadableNodeStream:L,isWritableNodeStream:P,isDuplexNodeStream:U}=v2(),z=A2(),{AbortError:T,codes:{ERR_INVALID_ARG_TYPE:q,ERR_INVALID_RETURN_VALUE:F}}=U2(),{destroyer:I}=c2(),x=B2(),w=P1(),{createDeferredPromise:M}=k2(),y=l5(),m=globalThis.Blob||N.Blob,c=typeof m<"u"?function(Z0){return Z0 instanceof m}:function(Z0){return!1},h=globalThis.AbortController||m1().AbortController,{FunctionPrototypeCall:a}=H2(),i=class extends x{constructor(Z0){super(Z0),Z0?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),Z0?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};k.exports=function Z0(X,O){if(U(X))return X;if(L(X))return n({readable:X});if(P(X))return n({writable:X});if(H(X))return n({writable:!1,readable:!1});if(typeof X=="function"){let{value:$,write:Y,final:W,destroy:Z}=G0(X);if(C($))return y(i,$,{objectMode:!0,write:Y,final:W,destroy:Z});let K=$?.then;if(typeof K=="function"){let J,j=a(K,$,(A)=>{if(A!=null)throw new F("nully","body",A)},(A)=>{I(J,A)});return J=new i({objectMode:!0,readable:!1,write:Y,final(A){W(async()=>{try{await j,V.nextTick(A,null)}catch(E){V.nextTick(A,E)}})},destroy:Z})}throw new F("Iterable, AsyncIterable or AsyncFunction",O,$)}if(c(X))return Z0(X.arrayBuffer());if(C(X))return y(i,X,{objectMode:!0,writable:!1});if(typeof X?.writable=="object"||typeof X?.readable=="object"){let $=X!=null&&X.readable?L(X?.readable)?X?.readable:Z0(X.readable):void 0,Y=X!=null&&X.writable?P(X?.writable)?X?.writable:Z0(X.writable):void 0;return n({readable:$,writable:Y})}let G=X?.then;if(typeof G=="function"){let $;return a(G,X,(Y)=>{Y!=null&&$.push(Y),$.push(null)},(Y)=>{I($,Y)}),$=new i({objectMode:!0,writable:!1,read(){}})}throw new q(O,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],X)};function G0(Z0){let{promise:X,resolve:O}=M(),G=new h,$=G.signal;return{value:Z0(async function*(){for(;;){let Y=X;X=null;let{chunk:W,done:Z,cb:K}=await Y;if(V.nextTick(K),Z)return;if($.aborted)throw new T(void 0,{cause:$.reason});({promise:X,resolve:O}=M()),yield W}}(),{signal:$}),write(Y,W,Z){let K=O;O=null,K({chunk:Y,done:!1,cb:Z})},final(Y){let W=O;O=null,W({done:!0,cb:Y})},destroy(Y,W){G.abort(),W(Y)}}}function n(Z0){let X=Z0.readable&&typeof Z0.readable.read!="function"?w.wrap(Z0.readable):Z0.readable,O=Z0.writable,G=!!Q(X),$=!!R(O),Y,W,Z,K,J;function j(A){let E=K;K=null,E?E(A):A?J.destroy(A):!G&&!$&&J.destroy()}return J=new i({readableObjectMode:!!(X!=null&&X.readableObjectMode),writableObjectMode:!!(O!=null&&O.writableObjectMode),readable:G,writable:$}),$&&(z(O,(A)=>{$=!1,A&&I(X,A),j(A)}),J._write=function(A,E,_){O.write(A,E)?_():Y=_},J._final=function(A){O.end(),W=A},O.on("drain",function(){if(Y){let A=Y;Y=null,A()}}),O.on("finish",function(){if(W){let A=W;W=null,A()}})),G&&(z(X,(A)=>{G=!1,A&&I(X,A),j(A)}),X.on("readable",function(){if(Z){let A=Z;Z=null,A()}}),X.on("end",function(){J.push(null)}),J._read=function(){for(;;){let A=X.read();if(A===null){Z=J._read;return}if(!J.push(A))return}}),J._destroy=function(A,E){!A&&K!==null&&(A=new T),Z=null,Y=null,W=null,K===null?E(A):(K=E,I(O,A),I(X,A))},J}}),B2=K0((B,k)=>{var{ObjectDefineProperties:V,ObjectGetOwnPropertyDescriptor:N,ObjectKeys:Q,ObjectSetPrototypeOf:R}=H2();k.exports=L;var C=P1(),H=o5();R(L.prototype,C.prototype),R(L,C);{let T=Q(H.prototype);for(let q=0;q<T.length;q++){let F=T[q];L.prototype[F]||(L.prototype[F]=H.prototype[F])}}function L(T){if(!(this instanceof L))return new L(T);C.call(this,T),H.call(this,T),T?(this.allowHalfOpen=T.allowHalfOpen!==!1,T.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),T.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}V(L.prototype,{writable:{__proto__:null,...N(H.prototype,"writable")},writableHighWaterMark:{__proto__:null,...N(H.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...N(H.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...N(H.prototype,"writableBuffer")},writableLength:{__proto__:null,...N(H.prototype,"writableLength")},writableFinished:{__proto__:null,...N(H.prototype,"writableFinished")},writableCorked:{__proto__:null,...N(H.prototype,"writableCorked")},writableEnded:{__proto__:null,...N(H.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...N(H.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(T){this._readableState&&this._writableState&&(this._readableState.destroyed=T,this._writableState.destroyed=T)}}});var P;function U(){return P===void 0&&(P={}),P}L.fromWeb=function(T,q){return U().newStreamDuplexFromReadableWritablePair(T,q)},L.toWeb=function(T){return U().newReadableWritablePairFromDuplex(T)};var z;L.from=function(T){return z||(z=x8()),z(T,"body")}}),u5=K0((B,k)=>{var{ObjectSetPrototypeOf:V,Symbol:N}=H2();k.exports=L;var{ERR_METHOD_NOT_IMPLEMENTED:Q}=U2().codes,R=B2(),{getHighWaterMark:C}=b1();V(L.prototype,R.prototype),V(L,R);var H=N("kCallback");function L(z){if(!(this instanceof L))return new L(z);let T=z?C(this,z,"readableHighWaterMark",!0):null;T===0&&(z={...z,highWaterMark:null,readableHighWaterMark:T,writableHighWaterMark:z.writableHighWaterMark||0}),R.call(this,z),this._readableState.sync=!1,this[H]=null,z&&(typeof z.transform=="function"&&(this._transform=z.transform),typeof z.flush=="function"&&(this._flush=z.flush)),this.on("prefinish",U)}function P(z){typeof this._flush=="function"&&!this.destroyed?this._flush((T,q)=>{if(T){z?z(T):this.destroy(T);return}q!=null&&this.push(q),this.push(null),z&&z()}):(this.push(null),z&&z())}function U(){this._final!==P&&P.call(this)}L.prototype._final=P,L.prototype._transform=function(z,T,q){throw new Q("_transform()")},L.prototype._write=function(z,T,q){let F=this._readableState,I=this._writableState,x=F.length;this._transform(z,T,(w,M)=>{if(w){q(w);return}M!=null&&this.push(M),I.ended||x===F.length||F.length<F.highWaterMark?q():this[H]=q})},L.prototype._read=function(){if(this[H]){let z=this[H];this[H]=null,z()}}}),s5=K0((B,k)=>{var{ObjectSetPrototypeOf:V}=H2();k.exports=Q;var N=u5();V(Q.prototype,N.prototype),V(Q,N);function Q(R){if(!(this instanceof Q))return new Q(R);N.call(this,R)}Q.prototype._transform=function(R,C,H){H(null,R)}}),d1=K0((B,k)=>{var V=(S2(),T2(R2)),{ArrayIsArray:N,Promise:Q,SymbolAsyncIterator:R}=H2(),C=A2(),{once:H}=k2(),L=c2(),P=B2(),{aggregateTwoErrors:U,codes:{ERR_INVALID_ARG_TYPE:z,ERR_INVALID_RETURN_VALUE:T,ERR_MISSING_ARGS:q,ERR_STREAM_DESTROYED:F,ERR_STREAM_PREMATURE_CLOSE:I},AbortError:x}=U2(),{validateFunction:w,validateAbortSignal:M}=V1(),{isIterable:y,isReadable:m,isReadableNodeStream:c,isNodeStream:h}=v2(),a=globalThis.AbortController||m1().AbortController,i,G0;function n(Z,K,J){let j=!1;Z.on("close",()=>{j=!0});let A=C(Z,{readable:K,writable:J},(E)=>{j=!E});return{destroy:(E)=>{j||(j=!0,L.destroyer(Z,E||new F("pipe")))},cleanup:A}}function Z0(Z){return w(Z[Z.length-1],"streams[stream.length - 1]"),Z.pop()}function X(Z){if(y(Z))return Z;if(c(Z))return O(Z);throw new z("val",["Readable","Iterable","AsyncIterable"],Z)}async function*O(Z){G0||(G0=P1()),yield*G0.prototype[R].call(Z)}async function G(Z,K,J,{end:j}){let A,E=null,_=(O0)=>{if(O0&&(A=O0),E){let o=E;E=null,o()}},s=()=>new Q((O0,o)=>{A?o(A):E=()=>{A?o(A):O0()}});K.on("drain",_);let r=C(K,{readable:!1},_);try{K.writableNeedDrain&&await s();for await(let O0 of Z)K.write(O0)||await s();j&&K.end(),await s(),J()}catch(O0){J(A!==O0?U(A,O0):O0)}finally{r(),K.off("drain",_)}}function $(...Z){return Y(Z,H(Z0(Z)))}function Y(Z,K,J){if(Z.length===1&&N(Z[0])&&(Z=Z[0]),Z.length<2)throw new q("streams");let j=new a,A=j.signal,E=J?.signal,_=[];M(E,"options.signal");function s(){U0(new x)}E?.addEventListener("abort",s);let r,O0,o=[],d=0;function f(S){U0(S,--d===0)}function U0(S,p){if(S&&(!r||r.code==="ERR_STREAM_PREMATURE_CLOSE")&&(r=S),!(!r&&!p)){for(;o.length;)o.shift()(r);E?.removeEventListener("abort",s),j.abort(),p&&(r||_.forEach((e)=>e()),V.nextTick(K,r,O0))}}let X0;for(let S=0;S<Z.length;S++){let p=Z[S],e=S<Z.length-1,J0=S>0,t=e||J?.end!==!1,y0=S===Z.length-1;if(h(p)){let C0=function(W0){W0&&W0.name!=="AbortError"&&W0.code!=="ERR_STREAM_PREMATURE_CLOSE"&&f(W0)};var Y0=C0;if(t){let{destroy:W0,cleanup:_0}=n(p,e,J0);o.push(W0),m(p)&&y0&&_.push(_0)}p.on("error",C0),m(p)&&y0&&_.push(()=>{p.removeListener("error",C0)})}if(S===0)if(typeof p=="function"){if(X0=p({signal:A}),!y(X0))throw new T("Iterable, AsyncIterable or Stream","source",X0)}else y(p)||c(p)?X0=p:X0=P.from(p);else if(typeof p=="function")if(X0=X(X0),X0=p(X0,{signal:A}),e){if(!y(X0,!0))throw new T("AsyncIterable",`transform[${S-1}]`,X0)}else{var g;i||(i=s5());let C0=new i({objectMode:!0}),W0=(g=X0)===null||g===void 0?void 0:g.then;if(typeof W0=="function")d++,W0.call(X0,(Q0)=>{O0=Q0,Q0!=null&&C0.write(Q0),t&&C0.end(),V.nextTick(f)},(Q0)=>{C0.destroy(Q0),V.nextTick(f,Q0)});else if(y(X0,!0))d++,G(X0,C0,f,{end:t});else throw new T("AsyncIterable or Promise","destination",X0);X0=C0;let{destroy:_0,cleanup:P0}=n(X0,!1,!0);o.push(_0),y0&&_.push(P0)}else if(h(p)){if(c(X0)){d+=2;let C0=W(X0,p,f,{end:t});m(p)&&y0&&_.push(C0)}else if(y(X0))d++,G(X0,p,f,{end:t});else throw new z("val",["Readable","Iterable","AsyncIterable"],X0);X0=p}else X0=P.from(p)}return(A!=null&&A.aborted||E!=null&&E.aborted)&&V.nextTick(s),X0}function W(Z,K,J,{end:j}){let A=!1;return K.on("close",()=>{A||J(new I)}),Z.pipe(K,{end:j}),j?Z.once("end",()=>{A=!0,K.end()}):J(),C(Z,{readable:!0,writable:!1},(E)=>{let _=Z._readableState;E&&E.code==="ERR_STREAM_PREMATURE_CLOSE"&&_&&_.ended&&!_.errored&&!_.errorEmitted?Z.once("end",J).once("error",J):J(E)}),C(K,{readable:!1,writable:!0},J)}k.exports={pipelineImpl:Y,pipeline:$}}),S8=K0((B,k)=>{var{pipeline:V}=d1(),N=B2(),{destroyer:Q}=c2(),{isNodeStream:R,isReadable:C,isWritable:H}=v2(),{AbortError:L,codes:{ERR_INVALID_ARG_VALUE:P,ERR_MISSING_ARGS:U}}=U2();k.exports=function(...z){if(z.length===0)throw new U("streams");if(z.length===1)return N.from(z[0]);let T=[...z];if(typeof z[0]=="function"&&(z[0]=N.from(z[0])),typeof z[z.length-1]=="function"){let a=z.length-1;z[a]=N.from(z[a])}for(let a=0;a<z.length;++a)if(R(z[a])){if(a<z.length-1&&!C(z[a]))throw new P(`streams[${a}]`,T[a],"must be readable");if(a>0&&!H(z[a]))throw new P(`streams[${a}]`,T[a],"must be writable")}let q,F,I,x,w;function M(a){let i=x;x=null,i?i(a):a?w.destroy(a):!h&&!c&&w.destroy()}let y=z[0],m=V(z,M),c=!!H(y),h=!!C(m);return w=new N({writableObjectMode:!!(y!=null&&y.writableObjectMode),readableObjectMode:!!(m!=null&&m.writableObjectMode),writable:c,readable:h}),c&&(w._write=function(a,i,G0){y.write(a,i)?G0():q=G0},w._final=function(a){y.end(),F=a},y.on("drain",function(){if(q){let a=q;q=null,a()}}),m.on("finish",function(){if(F){let a=F;F=null,a()}})),h&&(m.on("readable",function(){if(I){let a=I;I=null,a()}}),m.on("end",function(){w.push(null)}),w._read=function(){for(;;){let a=m.read();if(a===null){I=w._read;return}if(!w.push(a))return}}),w._destroy=function(a,i){!a&&x!==null&&(a=new L),I=null,q=null,F=null,x===null?i(a):(x=i,Q(m,a))},w}}),f5=K0((B,k)=>{var{ArrayPrototypePop:V,Promise:N}=H2(),{isIterable:Q,isNodeStream:R}=v2(),{pipelineImpl:C}=d1(),{finished:H}=A2();function L(...P){return new N((U,z)=>{let T,q,F=P[P.length-1];if(F&&typeof F=="object"&&!R(F)&&!Q(F)){let I=V(P);T=I.signal,q=I.end}C(P,(I,x)=>{I?z(I):U(x)},{signal:T,end:q})})}k.exports={finished:H,pipeline:L}}),v8=K0((B,k)=>{var{Buffer:V}=P2(),{ObjectDefineProperty:N,ObjectKeys:Q,ReflectApply:R}=H2(),{promisify:{custom:C}}=k2(),{streamReturningOperators:H,promiseReturningOperators:L}=I8(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:P}}=U2(),U=S8(),{pipeline:z}=d1(),{destroyer:T}=c2(),q=A2(),F=f5(),I=v2(),x=k.exports=p1().Stream;x.isDisturbed=I.isDisturbed,x.isErrored=I.isErrored,x.isReadable=I.isReadable,x.Readable=P1();for(let y of Q(H)){let m=function(...h){if(new.target)throw P();return x.Readable.from(R(c,this,h))};w=m;let c=H[y];N(m,"name",{__proto__:null,value:c.name}),N(m,"length",{__proto__:null,value:c.length}),N(x.Readable.prototype,y,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}var w;for(let y of Q(L)){let m=function(...h){if(new.target)throw P();return R(c,this,h)};w=m;let c=L[y];N(m,"name",{__proto__:null,value:c.name}),N(m,"length",{__proto__:null,value:c.length}),N(x.Readable.prototype,y,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}var w;x.Writable=o5(),x.Duplex=B2(),x.Transform=u5(),x.PassThrough=s5(),x.pipeline=z;var{addAbortSignal:M}=c1();x.addAbortSignal=M,x.finished=q,x.destroy=T,x.compose=U,N(x,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return F}}),N(z,C,{__proto__:null,enumerable:!0,get(){return F.pipeline}}),N(q,C,{__proto__:null,enumerable:!0,get(){return F.finished}}),x.Stream=x,x._isUint8Array=function(y){return y instanceof Uint8Array},x._uint8ArrayToBuffer=function(y){return V.from(y.buffer,y.byteOffset,y.byteLength)}}),v5=K0((B,k)=>{var V=v8(),N=f5(),Q=V.Readable.destroy;k.exports=V.Readable,k.exports._uint8ArrayToBuffer=V._uint8ArrayToBuffer,k.exports._isUint8Array=V._isUint8Array,k.exports.isDisturbed=V.isDisturbed,k.exports.isErrored=V.isErrored,k.exports.isReadable=V.isReadable,k.exports.Readable=V.Readable,k.exports.Writable=V.Writable,k.exports.Duplex=V.Duplex,k.exports.Transform=V.Transform,k.exports.PassThrough=V.PassThrough,k.exports.addAbortSignal=V.addAbortSignal,k.exports.finished=V.finished,k.exports.destroy=V.destroy,k.exports.destroy=Q,k.exports.pipeline=V.pipeline,k.exports.compose=V.compose,Object.defineProperty(V,"promises",{configurable:!0,enumerable:!0,get(){return N}}),k.exports.Stream=V.Stream,k.exports.default=k.exports}),h1={};z1(h1,{default:()=>n5});A8=v1(()=>{A1(h1,E2(v5())),n5=E2(v5())}),I2=K0((B,k)=>{var V=h0().Buffer,N=(A8(),T2(h1)).Transform,Q=M1().StringDecoder,R=c0();function C(H){N.call(this),this.hashMode=typeof H=="string",this.hashMode?this[H]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}R(C,N),C.prototype.update=function(H,L,P){typeof H=="string"&&(H=V.from(H,L));var U=this._update(H);return this.hashMode?this:(P&&(U=this._toString(U,P)),U)},C.prototype.setAutoPadding=function(){},C.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},C.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},C.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},C.prototype._transform=function(H,L,P){var U;try{this.hashMode?this._update(H):this.push(this._update(H))}catch(z){U=z}finally{P(U)}},C.prototype._flush=function(H){var L;try{this.push(this.__final())}catch(P){L=P}H(L)},C.prototype._finalOrDigest=function(H){var L=this.__final()||V.alloc(0);return H&&(L=this._toString(L,H,!0)),L},C.prototype._toString=function(H,L,P){if(this._decoder||(this._decoder=new Q(L),this._encoding=L),this._encoding!==L)throw new Error("can't switch encodings");var U=this._decoder.write(H);return P&&(U+=this._decoder.end()),U},k.exports=C}),a2=K0((B,k)=>{var V=c0(),N=y1(),Q=_1(),R=g1(),C=I2();function H(L){C.call(this,"digest"),this._hash=L}V(H,C),H.prototype._update=function(L){this._hash.update(L)},H.prototype._final=function(){return this._hash.digest()},k.exports=function(L){return L=L.toLowerCase(),L==="md5"?new N:L==="rmd160"||L==="ripemd160"?new Q:new H(R(L))}}),M8=K0((B,k)=>{var V=c0(),N=h0().Buffer,Q=I2(),R=N.alloc(128),C=64;function H(L,P){Q.call(this,"digest"),typeof P=="string"&&(P=N.from(P)),this._alg=L,this._key=P,P.length>C?P=L(P):P.length<C&&(P=N.concat([P,R],C));for(var U=this._ipad=N.allocUnsafe(C),z=this._opad=N.allocUnsafe(C),T=0;T<C;T++)U[T]=P[T]^54,z[T]=P[T]^92;this._hash=[U]}V(H,Q),H.prototype._update=function(L){this._hash.push(L)},H.prototype._final=function(){var L=this._alg(N.concat(this._hash));return this._alg(N.concat([this._opad,L]))},k.exports=H}),a5=K0((B,k)=>{var V=y1();k.exports=function(N){return new V().update(N).digest()}}),r5=K0((B,k)=>{var V=c0(),N=M8(),Q=I2(),R=h0().Buffer,C=a5(),H=_1(),L=g1(),P=R.alloc(128);function U(z,T){Q.call(this,"digest"),typeof T=="string"&&(T=R.from(T));var q=z==="sha512"||z==="sha384"?128:64;if(this._alg=z,this._key=T,T.length>q){var F=z==="rmd160"?new H:L(z);T=F.update(T).digest()}else T.length<q&&(T=R.concat([T,P],q));for(var I=this._ipad=R.allocUnsafe(q),x=this._opad=R.allocUnsafe(q),w=0;w<q;w++)I[w]=T[w]^54,x[w]=T[w]^92;this._hash=z==="rmd160"?new H:L(z),this._hash.update(I)}V(U,Q),U.prototype._update=function(z){this._hash.update(z)},U.prototype._final=function(){var z=this._hash.digest(),T=this._alg==="rmd160"?new H:L(this._alg);return T.update(this._opad).update(z).digest()},k.exports=function(z,T){return z=z.toLowerCase(),z==="rmd160"||z==="ripemd160"?new U("rmd160",T):z==="md5"?new N(C,T):new U(z,T)}}),i5=K0((B,k)=>{k.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"}}}),w8=K0((B,k)=>{k.exports=i5()}),t5=K0((B,k)=>{var V=Math.pow(2,30)-1;k.exports=function(N,Q){if(typeof N!="number")throw new TypeError("Iterations not a number");if(N<0)throw new TypeError("Bad iterations");if(typeof Q!="number")throw new TypeError("Key length not a number");if(Q<0||Q>V||Q!==Q)throw new TypeError("Bad key length")}}),e5=K0((B,k)=>{var V;global.process&&global.process.browser?V="utf-8":global.process&&global.process.version?(N=parseInt(process.version.split(".")[0].slice(1),10),V=N>=6?"utf-8":"binary"):V="utf-8";var N;k.exports=V}),X6=K0((B,k)=>{var V=h0().Buffer;k.exports=function(N,Q,R){if(V.isBuffer(N))return N;if(typeof N=="string")return V.from(N,Q);if(ArrayBuffer.isView(N))return V.from(N.buffer);throw new TypeError(R+" must be a string, a Buffer, a typed array or a DataView")}}),J6=K0((B,k)=>{var V=a5(),N=_1(),Q=g1(),R=h0().Buffer,C=t5(),H=e5(),L=X6(),P=R.alloc(128),U={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function z(F,I,x){var w=T(F),M=F==="sha512"||F==="sha384"?128:64;I.length>M?I=w(I):I.length<M&&(I=R.concat([I,P],M));for(var y=R.allocUnsafe(M+U[F]),m=R.allocUnsafe(M+U[F]),c=0;c<M;c++)y[c]=I[c]^54,m[c]=I[c]^92;var h=R.allocUnsafe(M+x+4);y.copy(h,0,0,M),this.ipad1=h,this.ipad2=y,this.opad=m,this.alg=F,this.blocksize=M,this.hash=w,this.size=U[F]}z.prototype.run=function(F,I){F.copy(I,this.blocksize);var x=this.hash(I);return x.copy(this.opad,this.blocksize),this.hash(this.opad)};function T(F){function I(w){return Q(F).update(w).digest()}function x(w){return new N().update(w).digest()}return F==="rmd160"||F==="ripemd160"?x:F==="md5"?V:I}function q(F,I,x,w,M){C(x,w),F=L(F,H,"Password"),I=L(I,H,"Salt"),M=M||"sha1";var y=new z(M,F,I.length),m=R.allocUnsafe(w),c=R.allocUnsafe(I.length+4);I.copy(c,0,0,I.length);for(var h=0,a=U[M],i=Math.ceil(w/a),G0=1;G0<=i;G0++){c.writeUInt32BE(G0,I.length);for(var n=y.run(c,y.ipad1),Z0=n,X=1;X<x;X++){Z0=y.run(Z0,y.ipad2);for(var O=0;O<a;O++)n[O]^=Z0[O]}n.copy(m,h),h+=a}return m}k.exports=q}),y8=K0((B,k)=>{var V=h0().Buffer,N=t5(),Q=e5(),R=J6(),C=X6(),H,L=global.crypto&&global.crypto.subtle,P={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"},U=[];function z(x){if(global.process&&!global.process.browser||!L||!L.importKey||!L.deriveBits)return Promise.resolve(!1);if(U[x]!==void 0)return U[x];H=H||V.alloc(8);var w=F(H,H,10,128,x).then(function(){return!0}).catch(function(){return!1});return U[x]=w,w}var T;function q(){return T||(global.process&&global.process.nextTick?T=global.process.nextTick:global.queueMicrotask?T=global.queueMicrotask:global.setImmediate?T=global.setImmediate:T=global.setTimeout,T)}function F(x,w,M,y,m){return L.importKey("raw",x,{name:"PBKDF2"},!1,["deriveBits"]).then(function(c){return L.deriveBits({name:"PBKDF2",salt:w,iterations:M,hash:{name:m}},c,y<<3)}).then(function(c){return V.from(c)})}function I(x,w){x.then(function(M){q()(function(){w(null,M)})},function(M){q()(function(){w(M)})})}k.exports=function(x,w,M,y,m,c){typeof m=="function"&&(c=m,m=void 0),m=m||"sha1";var h=P[m.toLowerCase()];if(!h||typeof global.Promise!="function"){q()(function(){var a;try{a=R(x,w,M,y,m)}catch(i){return c(i)}c(null,a)});return}if(N(M,y),x=C(x,Q,"Password"),w=C(w,Q,"Salt"),typeof c!="function")throw new Error("No callback provided to pbkdf2");I(z(h).then(function(a){return a?F(x,w,M,y,h):R(x,w,M,y,m)}),c)}}),O6=K0((B)=>{B.pbkdf2=y8(),B.pbkdf2Sync=J6()}),$6=K0((B)=>{B.readUInt32BE=function(Q,R){var C=Q[0+R]<<24|Q[1+R]<<16|Q[2+R]<<8|Q[3+R];return C>>>0},B.writeUInt32BE=function(Q,R,C){Q[0+C]=R>>>24,Q[1+C]=R>>>16&255,Q[2+C]=R>>>8&255,Q[3+C]=R&255},B.ip=function(Q,R,C,H){for(var L=0,P=0,U=6;U>=0;U-=2){for(var z=0;z<=24;z+=8)L<<=1,L|=R>>>z+U&1;for(var z=0;z<=24;z+=8)L<<=1,L|=Q>>>z+U&1}for(var U=6;U>=0;U-=2){for(var z=1;z<=25;z+=8)P<<=1,P|=R>>>z+U&1;for(var z=1;z<=25;z+=8)P<<=1,P|=Q>>>z+U&1}C[H+0]=L>>>0,C[H+1]=P>>>0},B.rip=function(Q,R,C,H){for(var L=0,P=0,U=0;U<4;U++)for(var z=24;z>=0;z-=8)L<<=1,L|=R>>>z+U&1,L<<=1,L|=Q>>>z+U&1;for(var U=4;U<8;U++)for(var z=24;z>=0;z-=8)P<<=1,P|=R>>>z+U&1,P<<=1,P|=Q>>>z+U&1;C[H+0]=L>>>0,C[H+1]=P>>>0},B.pc1=function(Q,R,C,H){for(var L=0,P=0,U=7;U>=5;U--){for(var z=0;z<=24;z+=8)L<<=1,L|=R>>z+U&1;for(var z=0;z<=24;z+=8)L<<=1,L|=Q>>z+U&1}for(var z=0;z<=24;z+=8)L<<=1,L|=R>>z+U&1;for(var U=1;U<=3;U++){for(var z=0;z<=24;z+=8)P<<=1,P|=R>>z+U&1;for(var z=0;z<=24;z+=8)P<<=1,P|=Q>>z+U&1}for(var z=0;z<=24;z+=8)P<<=1,P|=Q>>z+U&1;C[H+0]=L>>>0,C[H+1]=P>>>0},B.r28shl=function(Q,R){return Q<<R&268435455|Q>>>28-R};var k=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];B.pc2=function(Q,R,C,H){for(var L=0,P=0,U=k.length>>>1,z=0;z<U;z++)L<<=1,L|=Q>>>k[z]&1;for(var z=U;z<k.length;z++)P<<=1,P|=R>>>k[z]&1;C[H+0]=L>>>0,C[H+1]=P>>>0},B.expand=function(Q,R,C){var H=0,L=0;H=(Q&1)<<5|Q>>>27;for(var P=23;P>=15;P-=4)H<<=6,H|=Q>>>P&63;for(var P=11;P>=3;P-=4)L|=Q>>>P&63,L<<=6;L|=(Q&31)<<1|Q>>>31,R[C+0]=H>>>0,R[C+1]=L>>>0};var V=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];B.substitute=function(Q,R){for(var C=0,H=0;H<4;H++){var L=Q>>>18-H*6&63,P=V[H*64+L];C<<=4,C|=P}for(var H=0;H<4;H++){var L=R>>>18-H*6&63,P=V[256+H*64+L];C<<=4,C|=P}return C>>>0};var N=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];B.permute=function(Q){for(var R=0,C=0;C<N.length;C++)R<<=1,R|=Q>>>N[C]&1;return R>>>0},B.padSplit=function(Q,R,C){for(var H=Q.toString(2);H.length<R;)H="0"+H;for(var L=[],P=0;P<R;P+=C)L.push(H.slice(P,P+C));return L.join(" ")}}),D2=K0((B,k)=>{k.exports=V;function V(N,Q){if(!N)throw new Error(Q||"Assertion failed")}V.equal=function(N,Q,R){if(N!=Q)throw new Error(R||"Assertion failed: "+N+" != "+Q)}}),l1=K0((B,k)=>{var V=D2();function N(Q){this.options=Q,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}k.exports=N,N.prototype._init=function(){},N.prototype.update=function(Q){return Q.length===0?[]:this.type==="decrypt"?this._updateDecrypt(Q):this._updateEncrypt(Q)},N.prototype._buffer=function(Q,R){for(var C=Math.min(this.buffer.length-this.bufferOff,Q.length-R),H=0;H<C;H++)this.buffer[this.bufferOff+H]=Q[R+H];return this.bufferOff+=C,C},N.prototype._flushBuffer=function(Q,R){return this._update(this.buffer,0,Q,R),this.bufferOff=0,this.blockSize},N.prototype._updateEncrypt=function(Q){var R=0,C=0,H=(this.bufferOff+Q.length)/this.blockSize|0,L=new Array(H*this.blockSize);this.bufferOff!==0&&(R+=this._buffer(Q,R),this.bufferOff===this.buffer.length&&(C+=this._flushBuffer(L,C)));for(var P=Q.length-(Q.length-R)%this.blockSize;R<P;R+=this.blockSize)this._update(Q,R,L,C),C+=this.blockSize;for(;R<Q.length;R++,this.bufferOff++)this.buffer[this.bufferOff]=Q[R];return L},N.prototype._updateDecrypt=function(Q){for(var R=0,C=0,H=Math.ceil((this.bufferOff+Q.length)/this.blockSize)-1,L=new Array(H*this.blockSize);H>0;H--)R+=this._buffer(Q,R),C+=this._flushBuffer(L,C);return R+=this._buffer(Q,R),L},N.prototype.final=function(Q){var R;Q&&(R=this.update(Q));var C;return this.type==="encrypt"?C=this._finalEncrypt():C=this._finalDecrypt(),R?R.concat(C):C},N.prototype._pad=function(Q,R){if(R===0)return!1;for(;R<Q.length;)Q[R++]=0;return!0},N.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var Q=new Array(this.blockSize);return this._update(this.buffer,0,Q,0),Q},N.prototype._unpad=function(Q){return Q},N.prototype._finalDecrypt=function(){V.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var Q=new Array(this.blockSize);return this._flushBuffer(Q,0),this._unpad(Q)}}),G6=K0((B,k)=>{var V=D2(),N=c0(),Q=$6(),R=l1();function C(){this.tmp=new Array(2),this.keys=null}function H(P){R.call(this,P);var U=new C;this._desState=U,this.deriveKeys(U,P.key)}N(H,R),k.exports=H,H.create=function(P){return new H(P)};var L=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];H.prototype.deriveKeys=function(P,U){P.keys=new Array(32),V.equal(U.length,this.blockSize,"Invalid key length");var z=Q.readUInt32BE(U,0),T=Q.readUInt32BE(U,4);Q.pc1(z,T,P.tmp,0),z=P.tmp[0],T=P.tmp[1];for(var q=0;q<P.keys.length;q+=2){var F=L[q>>>1];z=Q.r28shl(z,F),T=Q.r28shl(T,F),Q.pc2(z,T,P.keys,q)}},H.prototype._update=function(P,U,z,T){var q=this._desState,F=Q.readUInt32BE(P,U),I=Q.readUInt32BE(P,U+4);Q.ip(F,I,q.tmp,0),F=q.tmp[0],I=q.tmp[1],this.type==="encrypt"?this._encrypt(q,F,I,q.tmp,0):this._decrypt(q,F,I,q.tmp,0),F=q.tmp[0],I=q.tmp[1],Q.writeUInt32BE(z,F,T),Q.writeUInt32BE(z,I,T+4)},H.prototype._pad=function(P,U){for(var z=P.length-U,T=U;T<P.length;T++)P[T]=z;return!0},H.prototype._unpad=function(P){for(var U=P[P.length-1],z=P.length-U;z<P.length;z++)V.equal(P[z],U);return P.slice(0,P.length-U)},H.prototype._encrypt=function(P,U,z,T,q){for(var F=U,I=z,x=0;x<P.keys.length;x+=2){var w=P.keys[x],M=P.keys[x+1];Q.expand(I,P.tmp,0),w^=P.tmp[0],M^=P.tmp[1];var y=Q.substitute(w,M),m=Q.permute(y),c=I;I=(F^m)>>>0,F=c}Q.rip(I,F,T,q)},H.prototype._decrypt=function(P,U,z,T,q){for(var F=z,I=U,x=P.keys.length-2;x>=0;x-=2){var w=P.keys[x],M=P.keys[x+1];Q.expand(F,P.tmp,0),w^=P.tmp[0],M^=P.tmp[1];var y=Q.substitute(w,M),m=Q.permute(y),c=F;F=(I^m)>>>0,I=c}Q.rip(F,I,T,q)}}),_8=K0((B)=>{var k=D2(),V=c0(),N={};function Q(C){k.equal(C.length,8,"Invalid IV length"),this.iv=new Array(8);for(var H=0;H<this.iv.length;H++)this.iv[H]=C[H]}function R(C){function H(z){C.call(this,z),this._cbcInit()}V(H,C);for(var L=Object.keys(N),P=0;P<L.length;P++){var U=L[P];H.prototype[U]=N[U]}return H.create=function(z){return new H(z)},H}B.instantiate=R,N._cbcInit=function(){var C=new Q(this.options.iv);this._cbcState=C},N._update=function(C,H,L,P){var U=this._cbcState,z=this.constructor.super_.prototype,T=U.iv;if(this.type==="encrypt"){for(var q=0;q<this.blockSize;q++)T[q]^=C[H+q];z._update.call(this,T,0,L,P);for(var q=0;q<this.blockSize;q++)T[q]=L[P+q]}else{z._update.call(this,C,H,L,P);for(var q=0;q<this.blockSize;q++)L[P+q]^=T[q];for(var q=0;q<this.blockSize;q++)T[q]=C[H+q]}}}),g8=K0((B,k)=>{var V=D2(),N=c0(),Q=l1(),R=G6();function C(L,P){V.equal(P.length,24,"Invalid key length");var U=P.slice(0,8),z=P.slice(8,16),T=P.slice(16,24);L==="encrypt"?this.ciphers=[R.create({type:"encrypt",key:U}),R.create({type:"decrypt",key:z}),R.create({type:"encrypt",key:T})]:this.ciphers=[R.create({type:"decrypt",key:T}),R.create({type:"encrypt",key:z}),R.create({type:"decrypt",key:U})]}function H(L){Q.call(this,L);var P=new C(this.type,this.options.key);this._edeState=P}N(H,Q),k.exports=H,H.create=function(L){return new H(L)},H.prototype._update=function(L,P,U,z){var T=this._edeState;T.ciphers[0]._update(L,P,U,z),T.ciphers[1]._update(U,z,U,z),T.ciphers[2]._update(U,z,U,z)},H.prototype._pad=R.prototype._pad,H.prototype._unpad=R.prototype._unpad}),m8=K0((B)=>{B.utils=$6(),B.Cipher=l1(),B.DES=G6(),B.CBC=_8(),B.EDE=g8()}),p8=K0((B,k)=>{var V=I2(),N=m8(),Q=c0(),R=h0().Buffer,C={"des-ede3-cbc":N.CBC.instantiate(N.EDE),"des-ede3":N.EDE,"des-ede-cbc":N.CBC.instantiate(N.EDE),"des-ede":N.EDE,"des-cbc":N.CBC.instantiate(N.DES),"des-ecb":N.DES};C.des=C["des-cbc"],C.des3=C["des-ede3-cbc"],k.exports=H,Q(H,V);function H(L){V.call(this);var P=L.mode.toLowerCase(),U=C[P],z;L.decrypt?z="decrypt":z="encrypt";var T=L.key;R.isBuffer(T)||(T=R.from(T)),(P==="des-ede"||P==="des-ede-cbc")&&(T=R.concat([T,T.slice(0,8)]));var q=L.iv;R.isBuffer(q)||(q=R.from(q)),this._des=U.create({key:T,iv:q,type:z})}H.prototype._update=function(L){return R.from(this._des.update(L))},H.prototype._final=function(){return R.from(this._des.final())}}),c8=K0((B)=>{B.encrypt=function(k,V){return k._cipher.encryptBlock(V)},B.decrypt=function(k,V){return k._cipher.decryptBlock(V)}}),r2=K0((B,k)=>{k.exports=function(V,N){for(var Q=Math.min(V.length,N.length),R=new Buffer(Q),C=0;C<Q;++C)R[C]=V[C]^N[C];return R}}),b8=K0((B)=>{var k=r2();B.encrypt=function(V,N){var Q=k(N,V._prev);return V._prev=V._cipher.encryptBlock(Q),V._prev},B.decrypt=function(V,N){var Q=V._prev;V._prev=N;var R=V._cipher.decryptBlock(N);return k(R,Q)}}),d8=K0((B)=>{var k=h0().Buffer,V=r2();function N(Q,R,C){var H=R.length,L=V(R,Q._cache);return Q._cache=Q._cache.slice(H),Q._prev=k.concat([Q._prev,C?R:L]),L}B.encrypt=function(Q,R,C){for(var H=k.allocUnsafe(0),L;R.length;)if(Q._cache.length===0&&(Q._cache=Q._cipher.encryptBlock(Q._prev),Q._prev=k.allocUnsafe(0)),Q._cache.length<=R.length)L=Q._cache.length,H=k.concat([H,N(Q,R.slice(0,L),C)]),R=R.slice(L);else{H=k.concat([H,N(Q,R,C)]);break}return H}}),h8=K0((B)=>{var k=h0().Buffer;function V(N,Q,R){var C=N._cipher.encryptBlock(N._prev),H=C[0]^Q;return N._prev=k.concat([N._prev.slice(1),k.from([R?Q:H])]),H}B.encrypt=function(N,Q,R){for(var C=Q.length,H=k.allocUnsafe(C),L=-1;++L<C;)H[L]=V(N,Q[L],R);return H}}),l8=K0((B)=>{var k=h0().Buffer;function V(Q,R,C){for(var H,L=-1,P=8,U=0,z,T;++L<P;)H=Q._cipher.encryptBlock(Q._prev),z=R&1<<7-L?128:0,T=H[0]^z,U+=(T&128)>>L%8,Q._prev=N(Q._prev,C?z:T);return U}function N(Q,R){var C=Q.length,H=-1,L=k.allocUnsafe(Q.length);for(Q=k.concat([Q,k.from([R])]);++H<C;)L[H]=Q[H]<<1|Q[H+1]>>7;return L}B.encrypt=function(Q,R,C){for(var H=R.length,L=k.allocUnsafe(H),P=-1;++P<H;)L[P]=V(Q,R[P],C);return L}}),o8=K0((B)=>{var k=r2();function V(N){return N._prev=N._cipher.encryptBlock(N._prev),N._prev}B.encrypt=function(N,Q){for(;N._cache.length<Q.length;)N._cache=Buffer.concat([N._cache,V(N)]);var R=N._cache.slice(0,Q.length);return N._cache=N._cache.slice(Q.length),k(Q,R)}}),Y6=K0((B,k)=>{function V(N){for(var Q=N.length,R;Q--;)if(R=N.readUInt8(Q),R===255)N.writeUInt8(0,Q);else{R++,N.writeUInt8(R,Q);break}}k.exports=V}),A5=K0((B)=>{var k=r2(),V=h0().Buffer,N=Y6();function Q(C){var H=C._cipher.encryptBlockRaw(C._prev);return N(C._prev),H}var R=16;B.encrypt=function(C,H){var L=Math.ceil(H.length/R),P=C._cache.length;C._cache=V.concat([C._cache,V.allocUnsafe(L*R)]);for(var U=0;U<L;U++){var z=Q(C),T=P+U*R;C._cache.writeUInt32BE(z[0],T+0),C._cache.writeUInt32BE(z[1],T+4),C._cache.writeUInt32BE(z[2],T+8),C._cache.writeUInt32BE(z[3],T+12)}var q=C._cache.slice(0,H.length);return C._cache=C._cache.slice(H.length),k(H,q)}}),C6=K0((B,k)=>{k.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}}),o1=K0((B,k)=>{var V={ECB:c8(),CBC:b8(),CFB:d8(),CFB8:h8(),CFB1:l8(),OFB:o8(),CTR:A5(),GCM:A5()},N=C6();for(Q in N)N[Q].module=V[N[Q].mode];var Q;k.exports=N}),U1=K0((B,k)=>{var V=h0().Buffer;function N(P){V.isBuffer(P)||(P=V.from(P));for(var U=P.length/4|0,z=new Array(U),T=0;T<U;T++)z[T]=P.readUInt32BE(T*4);return z}function Q(P){for(var U=0;U<P.length;P++)P[U]=0}function R(P,U,z,T,q){for(var F=z[0],I=z[1],x=z[2],w=z[3],M=P[0]^U[0],y=P[1]^U[1],m=P[2]^U[2],c=P[3]^U[3],h,a,i,G0,n=4,Z0=1;Z0<q;Z0++)h=F[M>>>24]^I[y>>>16&255]^x[m>>>8&255]^w[c&255]^U[n++],a=F[y>>>24]^I[m>>>16&255]^x[c>>>8&255]^w[M&255]^U[n++],i=F[m>>>24]^I[c>>>16&255]^x[M>>>8&255]^w[y&255]^U[n++],G0=F[c>>>24]^I[M>>>16&255]^x[y>>>8&255]^w[m&255]^U[n++],M=h,y=a,m=i,c=G0;return h=(T[M>>>24]<<24|T[y>>>16&255]<<16|T[m>>>8&255]<<8|T[c&255])^U[n++],a=(T[y>>>24]<<24|T[m>>>16&255]<<16|T[c>>>8&255]<<8|T[M&255])^U[n++],i=(T[m>>>24]<<24|T[c>>>16&255]<<16|T[M>>>8&255]<<8|T[y&255])^U[n++],G0=(T[c>>>24]<<24|T[M>>>16&255]<<16|T[y>>>8&255]<<8|T[m&255])^U[n++],h=h>>>0,a=a>>>0,i=i>>>0,G0=G0>>>0,[h,a,i,G0]}var C=[0,1,2,4,8,16,32,64,128,27,54],H=function(){for(var P=new Array(256),U=0;U<256;U++)U<128?P[U]=U<<1:P[U]=U<<1^283;for(var z=[],T=[],q=[[],[],[],[]],F=[[],[],[],[]],I=0,x=0,w=0;w<256;++w){var M=x^x<<1^x<<2^x<<3^x<<4;M=M>>>8^M&255^99,z[I]=M,T[M]=I;var y=P[I],m=P[y],c=P[m],h=P[M]*257^M*16843008;q[0][I]=h<<24|h>>>8,q[1][I]=h<<16|h>>>16,q[2][I]=h<<8|h>>>24,q[3][I]=h,h=c*16843009^m*65537^y*257^I*16843008,F[0][M]=h<<24|h>>>8,F[1][M]=h<<16|h>>>16,F[2][M]=h<<8|h>>>24,F[3][M]=h,I===0?I=x=1:(I=y^P[P[P[c^y]]],x^=P[P[x]])}return{SBOX:z,INV_SBOX:T,SUB_MIX:q,INV_SUB_MIX:F}}();function L(P){this._key=N(P),this._reset()}L.blockSize=16,L.keySize=32,L.prototype.blockSize=L.blockSize,L.prototype.keySize=L.keySize,L.prototype._reset=function(){for(var P=this._key,U=P.length,z=U+6,T=(z+1)*4,q=[],F=0;F<U;F++)q[F]=P[F];for(F=U;F<T;F++){var I=q[F-1];F%U===0?(I=I<<8|I>>>24,I=H.SBOX[I>>>24]<<24|H.SBOX[I>>>16&255]<<16|H.SBOX[I>>>8&255]<<8|H.SBOX[I&255],I^=C[F/U|0]<<24):U>6&&F%U===4&&(I=H.SBOX[I>>>24]<<24|H.SBOX[I>>>16&255]<<16|H.SBOX[I>>>8&255]<<8|H.SBOX[I&255]),q[F]=q[F-U]^I}for(var x=[],w=0;w<T;w++){var M=T-w,y=q[M-(w%4?0:4)];w<4||M<=4?x[w]=y:x[w]=H.INV_SUB_MIX[0][H.SBOX[y>>>24]]^H.INV_SUB_MIX[1][H.SBOX[y>>>16&255]]^H.INV_SUB_MIX[2][H.SBOX[y>>>8&255]]^H.INV_SUB_MIX[3][H.SBOX[y&255]]}this._nRounds=z,this._keySchedule=q,this._invKeySchedule=x},L.prototype.encryptBlockRaw=function(P){return P=N(P),R(P,this._keySchedule,H.SUB_MIX,H.SBOX,this._nRounds)},L.prototype.encryptBlock=function(P){var U=this.encryptBlockRaw(P),z=V.allocUnsafe(16);return z.writeUInt32BE(U[0],0),z.writeUInt32BE(U[1],4),z.writeUInt32BE(U[2],8),z.writeUInt32BE(U[3],12),z},L.prototype.decryptBlock=function(P){P=N(P);var U=P[1];P[1]=P[3],P[3]=U;var z=R(P,this._invKeySchedule,H.INV_SUB_MIX,H.INV_SBOX,this._nRounds),T=V.allocUnsafe(16);return T.writeUInt32BE(z[0],0),T.writeUInt32BE(z[3],4),T.writeUInt32BE(z[2],8),T.writeUInt32BE(z[1],12),T},L.prototype.scrub=function(){Q(this._keySchedule),Q(this._invKeySchedule),Q(this._key)},k.exports.AES=L}),u8=K0((B,k)=>{var V=h0().Buffer,N=V.alloc(16,0);function Q(H){return[H.readUInt32BE(0),H.readUInt32BE(4),H.readUInt32BE(8),H.readUInt32BE(12)]}function R(H){var L=V.allocUnsafe(16);return L.writeUInt32BE(H[0]>>>0,0),L.writeUInt32BE(H[1]>>>0,4),L.writeUInt32BE(H[2]>>>0,8),L.writeUInt32BE(H[3]>>>0,12),L}function C(H){this.h=H,this.state=V.alloc(16,0),this.cache=V.allocUnsafe(0)}C.prototype.ghash=function(H){for(var L=-1;++L<H.length;)this.state[L]^=H[L];this._multiply()},C.prototype._multiply=function(){for(var H=Q(this.h),L=[0,0,0,0],P,U,z,T=-1;++T<128;){for(U=(this.state[~~(T/8)]&1<<7-T%8)!==0,U&&(L[0]^=H[0],L[1]^=H[1],L[2]^=H[2],L[3]^=H[3]),z=(H[3]&1)!==0,P=3;P>0;P--)H[P]=H[P]>>>1|(H[P-1]&1)<<31;H[0]=H[0]>>>1,z&&(H[0]=H[0]^-520093696)}this.state=R(L)},C.prototype.update=function(H){this.cache=V.concat([this.cache,H]);for(var L;this.cache.length>=16;)L=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(L)},C.prototype.final=function(H,L){return this.cache.length&&this.ghash(V.concat([this.cache,N],16)),this.ghash(R([0,H,0,L])),this.state},k.exports=C}),K6=K0((B,k)=>{var V=U1(),N=h0().Buffer,Q=I2(),R=c0(),C=u8(),H=r2(),L=Y6();function P(T,q){var F=0;T.length!==q.length&&F++;for(var I=Math.min(T.length,q.length),x=0;x<I;++x)F+=T[x]^q[x];return F}function U(T,q,F){if(q.length===12)return T._finID=N.concat([q,N.from([0,0,0,1])]),N.concat([q,N.from([0,0,0,2])]);var I=new C(F),x=q.length,w=x%16;I.update(q),w&&(w=16-w,I.update(N.alloc(w,0))),I.update(N.alloc(8,0));var M=x*8,y=N.alloc(8);y.writeUIntBE(M,0,8),I.update(y),T._finID=I.state;var m=N.from(T._finID);return L(m),m}function z(T,q,F,I){Q.call(this);var x=N.alloc(4,0);this._cipher=new V.AES(q);var w=this._cipher.encryptBlock(x);this._ghash=new C(w),F=U(this,F,w),this._prev=N.from(F),this._cache=N.allocUnsafe(0),this._secCache=N.allocUnsafe(0),this._decrypt=I,this._alen=0,this._len=0,this._mode=T,this._authTag=null,this._called=!1}R(z,Q),z.prototype._update=function(T){if(!this._called&&this._alen){var q=16-this._alen%16;q<16&&(q=N.alloc(q,0),this._ghash.update(q))}this._called=!0;var F=this._mode.encrypt(this,T);return this._decrypt?this._ghash.update(T):this._ghash.update(F),this._len+=T.length,F},z.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var T=H(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&P(T,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=T,this._cipher.scrub()},z.prototype.getAuthTag=function(){if(this._decrypt||!N.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},z.prototype.setAuthTag=function(T){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=T},z.prototype.setAAD=function(T){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(T),this._alen+=T.length},k.exports=z}),j6=K0((B,k)=>{var V=U1(),N=h0().Buffer,Q=I2(),R=c0();function C(H,L,P,U){Q.call(this),this._cipher=new V.AES(L),this._prev=N.from(P),this._cache=N.allocUnsafe(0),this._secCache=N.allocUnsafe(0),this._decrypt=U,this._mode=H}R(C,Q),C.prototype._update=function(H){return this._mode.encrypt(this,H,this._decrypt)},C.prototype._final=function(){this._cipher.scrub()},k.exports=C}),F1=K0((B,k)=>{var V=h0().Buffer,N=y1();function Q(R,C,H,L){if(V.isBuffer(R)||(R=V.from(R,"binary")),C&&(V.isBuffer(C)||(C=V.from(C,"binary")),C.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var P=H/8,U=V.alloc(P),z=V.alloc(L||0),T=V.alloc(0);P>0||L>0;){var q=new N;q.update(T),q.update(R),C&&q.update(C),T=q.digest();var F=0;if(P>0){var I=U.length-P;F=Math.min(P,T.length),T.copy(U,I,0,F),P-=F}if(F<T.length&&L>0){var x=z.length-L,w=Math.min(L,T.length-F);T.copy(z,x,F,F+w),L-=w}}return T.fill(0),{key:U,iv:z}}k.exports=Q}),s8=K0((B)=>{var k=o1(),V=K6(),N=h0().Buffer,Q=j6(),R=I2(),C=U1(),H=F1(),L=c0();function P(F,I,x){R.call(this),this._cache=new z,this._cipher=new C.AES(I),this._prev=N.from(x),this._mode=F,this._autopadding=!0}L(P,R),P.prototype._update=function(F){this._cache.add(F);for(var I,x,w=[];I=this._cache.get();)x=this._mode.encrypt(this,I),w.push(x);return N.concat(w)};var U=N.alloc(16,16);P.prototype._final=function(){var F=this._cache.flush();if(this._autopadding)return F=this._mode.encrypt(this,F),this._cipher.scrub(),F;if(!F.equals(U))throw this._cipher.scrub(),new Error("data not multiple of block length")},P.prototype.setAutoPadding=function(F){return this._autopadding=!!F,this};function z(){this.cache=N.allocUnsafe(0)}z.prototype.add=function(F){this.cache=N.concat([this.cache,F])},z.prototype.get=function(){if(this.cache.length>15){var F=this.cache.slice(0,16);return this.cache=this.cache.slice(16),F}return null},z.prototype.flush=function(){for(var F=16-this.cache.length,I=N.allocUnsafe(F),x=-1;++x<F;)I.writeUInt8(F,x);return N.concat([this.cache,I])};function T(F,I,x){var w=k[F.toLowerCase()];if(!w)throw new TypeError("invalid suite type");if(typeof I=="string"&&(I=N.from(I)),I.length!==w.key/8)throw new TypeError("invalid key length "+I.length);if(typeof x=="string"&&(x=N.from(x)),w.mode!=="GCM"&&x.length!==w.iv)throw new TypeError("invalid iv length "+x.length);return w.type==="stream"?new Q(w.module,I,x):w.type==="auth"?new V(w.module,I,x):new P(w.module,I,x)}function q(F,I){var x=k[F.toLowerCase()];if(!x)throw new TypeError("invalid suite type");var w=H(I,!1,x.key,x.iv);return T(F,w.key,w.iv)}B.createCipheriv=T,B.createCipher=q}),f8=K0((B)=>{var k=K6(),V=h0().Buffer,N=o1(),Q=j6(),R=I2(),C=U1(),H=F1(),L=c0();function P(F,I,x){R.call(this),this._cache=new U,this._last=void 0,this._cipher=new C.AES(I),this._prev=V.from(x),this._mode=F,this._autopadding=!0}L(P,R),P.prototype._update=function(F){this._cache.add(F);for(var I,x,w=[];I=this._cache.get(this._autopadding);)x=this._mode.decrypt(this,I),w.push(x);return V.concat(w)},P.prototype._final=function(){var F=this._cache.flush();if(this._autopadding)return z(this._mode.decrypt(this,F));if(F)throw new Error("data not multiple of block length")},P.prototype.setAutoPadding=function(F){return this._autopadding=!!F,this};function U(){this.cache=V.allocUnsafe(0)}U.prototype.add=function(F){this.cache=V.concat([this.cache,F])},U.prototype.get=function(F){var I;if(F){if(this.cache.length>16)return I=this.cache.slice(0,16),this.cache=this.cache.slice(16),I}else if(this.cache.length>=16)return I=this.cache.slice(0,16),this.cache=this.cache.slice(16),I;return null},U.prototype.flush=function(){if(this.cache.length)return this.cache};function z(F){var I=F[15];if(I<1||I>16)throw new Error("unable to decrypt data");for(var x=-1;++x<I;)if(F[x+(16-I)]!==I)throw new Error("unable to decrypt data");if(I!==16)return F.slice(0,16-I)}function T(F,I,x){var w=N[F.toLowerCase()];if(!w)throw new TypeError("invalid suite type");if(typeof x=="string"&&(x=V.from(x)),w.mode!=="GCM"&&x.length!==w.iv)throw new TypeError("invalid iv length "+x.length);if(typeof I=="string"&&(I=V.from(I)),I.length!==w.key/8)throw new TypeError("invalid key length "+I.length);return w.type==="stream"?new Q(w.module,I,x,!0):w.type==="auth"?new k(w.module,I,x,!0):new P(w.module,I,x)}function q(F,I){var x=N[F.toLowerCase()];if(!x)throw new TypeError("invalid suite type");var w=H(I,!1,x.key,x.iv);return T(F,w.key,w.iv)}B.createDecipher=q,B.createDecipheriv=T}),u1=K0((B)=>{var k=s8(),V=f8(),N=C6();function Q(){return Object.keys(N)}B.createCipher=B.Cipher=k.createCipher,B.createCipheriv=B.Cipheriv=k.createCipheriv,B.createDecipher=B.Decipher=V.createDecipher,B.createDecipheriv=B.Decipheriv=V.createDecipheriv,B.listCiphers=B.getCiphers=Q}),n8=K0((B)=>{B["des-ecb"]={key:8,iv:0},B["des-cbc"]=B.des={key:8,iv:8},B["des-ede3-cbc"]=B.des3={key:24,iv:8},B["des-ede3"]={key:24,iv:0},B["des-ede-cbc"]={key:16,iv:8},B["des-ede"]={key:16,iv:0}}),a8=K0((B)=>{var k=p8(),V=u1(),N=o1(),Q=n8(),R=F1();function C(z,T){z=z.toLowerCase();var q,F;if(N[z])q=N[z].key,F=N[z].iv;else if(Q[z])q=Q[z].key*8,F=Q[z].iv;else throw new TypeError("invalid suite type");var I=R(T,!1,q,F);return L(z,I.key,I.iv)}function H(z,T){z=z.toLowerCase();var q,F;if(N[z])q=N[z].key,F=N[z].iv;else if(Q[z])q=Q[z].key*8,F=Q[z].iv;else throw new TypeError("invalid suite type");var I=R(T,!1,q,F);return P(z,I.key,I.iv)}function L(z,T,q){if(z=z.toLowerCase(),N[z])return V.createCipheriv(z,T,q);if(Q[z])return new k({key:T,iv:q,mode:z});throw new TypeError("invalid suite type")}function P(z,T,q){if(z=z.toLowerCase(),N[z])return V.createDecipheriv(z,T,q);if(Q[z])return new k({key:T,iv:q,mode:z,decrypt:!0});throw new TypeError("invalid suite type")}function U(){return Object.keys(Q).concat(V.getCiphers())}B.createCipher=B.Cipher=C,B.createCipheriv=B.Cipheriv=L,B.createDecipher=B.Decipher=H,B.createDecipheriv=B.Decipheriv=P,B.listCiphers=B.getCiphers=U}),M2=K0(()=>{}),W6=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$<X.length&&(O===16?this._parseHex(X,$,G):(this._parseBase(X,O,$),G==="le"&&this._initArray(this.toArray(),O,G)))},C.prototype._initNumber=function(X,O,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(Q(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),O,G)},C.prototype._initArray=function(X,O,G){if(Q(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y,W,Z=0;if(G==="be")for($=X.length-1,Y=0;$>=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$<X.length;$+=3)W=X[$]|X[$+1]<<8|X[$+2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y=0,W=0,Z;if(G==="be")for($=X.length-1;$>=O;$-=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$<X.length;$+=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z<W;Z++){var K=X.charCodeAt(Z)-48;Y*=$,K>=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j<K;j+=$)J=U(X,j,j+$,O),this.imuln(Y),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(Z!==0){var A=1;for(J=U(X,j,X.length,O),j=0;j<Z;j++)A*=O;this.imuln(A),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},C.prototype.copy=function(X){X.words=new Array(this.length);for(var O=0;O<this.length;O++)X.words[O]=this.words[O];X.length=this.length,X.negative=this.negative,X.red=this.red},C.prototype.clone=function(){var X=new C(null);return this.copy(X),X},C.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},C.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var z=["","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"],T=[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];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W<this.length;W++){var Z=this.words[W],K=((Z<<$|Y)&16777215).toString(16);Y=Z>>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J<Y;J++)Z[J]=0}else{for(J=0;J<Y-$;J++)Z[J]=0;for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[Y-J-1]=K}return Z},Math.clz32?C.prototype._countBits=function(X){return 32-Math.clz32(X)}:C.prototype._countBits=function(X){var O=X,G=0;return O>=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G<O.length;G++){var $=G/26|0,Y=G%26;O[G]=(X.words[$]&1<<Y)>>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;O<this.length;O++){var G=this._zeroBits(this.words[O]);if(X+=G,G!==26)break}return X},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},C.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var O=0;O<X.length;O++)this.words[O]=this.words[O]|X.words[O];return this.strip()},C.prototype.ior=function(X){return Q((this.negative|X.negative)===0),this.iuor(X)},C.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=O.length,this.strip()},C.prototype.iand=function(X){return Q((this.negative|X.negative)===0),this.iuand(X)},C.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$<G.length;$++)this.words[$]=O.words[$]^G.words[$];if(this!==O)for(;$<O.length;$++)this.words[$]=O.words[$];return this.length=O.length,this.strip()},C.prototype.ixor=function(X){return Q((this.negative|X.negative)===0),this.iuxor(X)},C.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$<O;$++)this.words[$]=~this.words[$]&67108863;return G>0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W<G.length;W++)O=(G.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;W<G.length;W++)this.words[W]=G.words[W];return this},C.prototype.add=function(X){var O;return X.negative!==0&&this.negative===0?(X.negative=0,O=this.sub(X),X.negative^=1,O):X.negative===0&&this.negative!==0?(this.negative=0,O=X.sub(this),this.negative=1,O):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z<Y.length;Z++)O=($.words[Z]|0)-(Y.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W<G.length-1;W++){var Z=Y;Y=0;for(var K=$&67108863,J=Math.min(W,O.length-1),j=Math.max(0,W-X.length+1);j<=J;j++){var A=W-j,E=X.words[A]|0,_=O.words[j]|0,s=E*_,r=s&67108863;Z=Z+(s/67108864|0)|0,r=r+K|0,K=r&67108863,Z=Z+(r>>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$<X;$++)O[$]=this.revBin($,G,X);return O},y.prototype.revBin=function(X,O,G){if(X===0||X===G-1)return X;for(var $=0,Y=0;Y<O;Y++)$|=(X&1)<<O-Y-1,X>>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z<W;Z++)$[Z]=O[X[Z]],Y[Z]=G[X[Z]]},y.prototype.transform=function(X,O,G,$,Y,W){this.permute(W,X,O,G,$,Y);for(var Z=1;Z<Y;Z<<=1)for(var K=Z<<1,J=Math.cos(2*Math.PI/K),j=Math.sin(2*Math.PI/K),A=0;A<Y;A+=K)for(var E=J,_=j,s=0;s<Z;s++){var r=G[A+s],O0=$[A+s],o=G[A+s+Z],d=$[A+s+Z],f=E*o-_*d;d=E*d+_*o,o=f,G[A+s]=r+o,$[A+s]=O0+d,G[A+s+Z]=r-o,$[A+s+Z]=O0-d,s!==K&&(f=J*E-j*_,_=J*_+j*E,E=f)}},y.prototype.guessLen13b=function(X,O){var G=Math.max(O,X)|1,$=G&1,Y=0;for(G=G/2|0;G;G=G>>>1)Y++;return 1<<Y+1+$},y.prototype.conjugate=function(X,O,G){if(!(G<=1))for(var $=0;$<G/2;$++){var Y=X[$];X[$]=X[G-$-1],X[G-$-1]=Y,Y=O[$],O[$]=-O[G-$-1],O[G-$-1]=-Y}},y.prototype.normalize13b=function(X,O){for(var G=0,$=0;$<O/2;$++){var Y=Math.round(X[2*$+1]/O)*8192+Math.round(X[2*$]/O)+G;X[$]=Y&67108863,Y<67108864?G=0:G=Y/67108864|0}return X},y.prototype.convert13b=function(X,O,G,$){for(var Y=0,W=0;W<O;W++)Y=Y+(X[W]|0),G[2*W]=Y&8191,Y=Y>>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G<X;G++)O[G]=0;return O},y.prototype.mulp=function(X,O,G){var $=2*this.guessLen13b(X.length,O.length),Y=this.makeRBT($),W=this.stub($),Z=new Array($),K=new Array($),J=new Array($),j=new Array($),A=new Array($),E=new Array($),_=G.words;_.length=$,this.convert13b(X.words,X.length,Z,$),this.convert13b(O.words,O.length,j,$),this.transform(Z,W,K,J,$,Y),this.transform(j,W,A,E,$,Y);for(var s=0;s<$;s++){var r=K[s]*A[s]-J[s]*E[s];J[s]=K[s]*E[s]+J[s]*A[s],K[s]=r}return this.conjugate(K,J,$),this.transform(K,J,_,W,$,Y),this.conjugate(_,W,$),this.normalize13b(_,$),G.negative=X.negative^O.negative,G.length=X.length+O.length,G.strip()},C.prototype.mul=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),this.mulTo(X,O)},C.prototype.mulf=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),M(this,X,O)},C.prototype.imul=function(X){return this.clone().mulTo(X,this)},C.prototype.imuln=function(X){Q(typeof X=="number"),Q(X<67108864);for(var O=0,G=0;G<this.length;G++){var $=(this.words[G]|0)*X,Y=($&67108863)+(O&67108863);O>>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$<O.length&&O[$]===0;$++,G=G.sqr());if(++$<O.length)for(var Y=G.sqr();$<O.length;$++,Y=Y.sqr())O[$]!==0&&(G=G.mul(Y));return G},C.prototype.iushln=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y<this.length;Y++){var Z=this.words[Y]&$,K=(this.words[Y]|0)-Z<<O;this.words[Y]=K|W,W=Z>>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y<G;Y++)this.words[Y]=0;this.length+=G}return this.strip()},C.prototype.ishln=function(X){return Q(this.negative===0),this.iushln(X)},C.prototype.iushrn=function(X,O,G){Q(typeof X=="number"&&X>=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<<Y,K=G;if($-=W,$=Math.max(0,$),K){for(var J=0;J<W;J++)K.words[J]=this.words[J];K.length=W}if(W!==0)if(this.length>W)for(this.length-=W,J=0;J<this.length;J++)this.words[J]=this.words[J+W];else this.words[0]=0,this.length=1;var j=0;for(J=this.length-1;J>=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return!1;var Y=this.words[G];return!!(Y&$)},C.prototype.imaskn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>O<<O;this.words[this.length-1]&=$}return this.strip()},C.prototype.maskn=function(X){return this.clone().imaskn(X)},C.prototype.iaddn=function(X){return Q(typeof X=="number"),Q(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},C.prototype._iaddn=function(X){this.words[0]+=X;for(var O=0;O<this.length&&this.words[O]>=67108864;O++)this.words[O]-=67108864,O===this.length-1?this.words[O+1]=1:this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O<this.length&&this.words[O]<0;O++)this.words[O]+=67108864,this.words[O+1]-=1;return this.strip()},C.prototype.addn=function(X){return this.clone().iaddn(X)},C.prototype.subn=function(X){return this.clone().isubn(X)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function(X,O,G){var $=X.length+G,Y;this._expand($);var W,Z=0;for(Y=0;Y<X.length;Y++){W=(this.words[Y+G]|0)+Z;var K=(X.words[Y]|0)*O;W-=K&67108863,Z=(W>>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y<this.length-G;Y++)W=(this.words[Y+G]|0)+Z,Z=W>>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y<this.length;Y++)W=-(this.words[Y]|0)+Z,Z=W>>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j<J.length;j++)J.words[j]=0}var A=$.clone()._ishlnsubmul(Y,1,K);A.negative===0&&($=A,J&&(J.words[K]=1));for(var E=K-1;E>=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return this._expand(G+1),this.words[G]|=$,this;for(var Y=$,W=G;Y!==0&&W<this.length;W++){var Z=this.words[W]|0;Z+=Y,Y=Z>>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$<X?-1:1}return this.negative!==0?-G|0:G},C.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var O=this.ucmp(X);return this.negative!==0?-O|0:O},C.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var O=0,G=this.length-1;G>=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$<Y?O=-1:$>Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G<this.n?-1:O.ucmp(this.p);return $===0?(O.words[0]=0,O.length=1):$>0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y<X.length;Y++){var Z=X.words[Y]|0;X.words[Y-10]=(Z&G)<<4|W>>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G<X.length;G++){var $=X.words[G]|0;O+=$*977,X.words[G]=O&67108863,O=$*64+(O/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function a(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(a,c);function i(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(i,c);function G0(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(G0,c),G0.prototype.imulK=function(X){for(var O=0,G=0;G<X.length;G++){var $=(X.words[G]|0)*19+O,Y=$&67108863;$>>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<<G);$[0]=new C(1).toRed(this),$[1]=X;for(var Y=2;Y<$.length;Y++)$[Y]=this.mul($[Y-1],X);var W=$[0],Z=0,K=0,J=O.bitLength()%26;for(J===0&&(J=26),Y=O.length-1;Y>=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),r8=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$<X.length&&(O===16?this._parseHex(X,$,G):(this._parseBase(X,O,$),G==="le"&&this._initArray(this.toArray(),O,G)))},C.prototype._initNumber=function(X,O,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(Q(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),O,G)},C.prototype._initArray=function(X,O,G){if(Q(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y,W,Z=0;if(G==="be")for($=X.length-1,Y=0;$>=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$<X.length;$+=3)W=X[$]|X[$+1]<<8|X[$+2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y=0,W=0,Z;if(G==="be")for($=X.length-1;$>=O;$-=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$<X.length;$+=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z<W;Z++){var K=X.charCodeAt(Z)-48;Y*=$,K>=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j<K;j+=$)J=U(X,j,j+$,O),this.imuln(Y),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(Z!==0){var A=1;for(J=U(X,j,X.length,O),j=0;j<Z;j++)A*=O;this.imuln(A),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},C.prototype.copy=function(X){X.words=new Array(this.length);for(var O=0;O<this.length;O++)X.words[O]=this.words[O];X.length=this.length,X.negative=this.negative,X.red=this.red},C.prototype.clone=function(){var X=new C(null);return this.copy(X),X},C.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},C.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var z=["","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"],T=[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];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W<this.length;W++){var Z=this.words[W],K=((Z<<$|Y)&16777215).toString(16);Y=Z>>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J<Y;J++)Z[J]=0}else{for(J=0;J<Y-$;J++)Z[J]=0;for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[Y-J-1]=K}return Z},Math.clz32?C.prototype._countBits=function(X){return 32-Math.clz32(X)}:C.prototype._countBits=function(X){var O=X,G=0;return O>=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G<O.length;G++){var $=G/26|0,Y=G%26;O[G]=(X.words[$]&1<<Y)>>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;O<this.length;O++){var G=this._zeroBits(this.words[O]);if(X+=G,G!==26)break}return X},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},C.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var O=0;O<X.length;O++)this.words[O]=this.words[O]|X.words[O];return this.strip()},C.prototype.ior=function(X){return Q((this.negative|X.negative)===0),this.iuor(X)},C.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=O.length,this.strip()},C.prototype.iand=function(X){return Q((this.negative|X.negative)===0),this.iuand(X)},C.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$<G.length;$++)this.words[$]=O.words[$]^G.words[$];if(this!==O)for(;$<O.length;$++)this.words[$]=O.words[$];return this.length=O.length,this.strip()},C.prototype.ixor=function(X){return Q((this.negative|X.negative)===0),this.iuxor(X)},C.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$<O;$++)this.words[$]=~this.words[$]&67108863;return G>0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W<G.length;W++)O=(G.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;W<G.length;W++)this.words[W]=G.words[W];return this},C.prototype.add=function(X){var O;return X.negative!==0&&this.negative===0?(X.negative=0,O=this.sub(X),X.negative^=1,O):X.negative===0&&this.negative!==0?(this.negative=0,O=X.sub(this),this.negative=1,O):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z<Y.length;Z++)O=($.words[Z]|0)-(Y.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W<G.length-1;W++){var Z=Y;Y=0;for(var K=$&67108863,J=Math.min(W,O.length-1),j=Math.max(0,W-X.length+1);j<=J;j++){var A=W-j,E=X.words[A]|0,_=O.words[j]|0,s=E*_,r=s&67108863;Z=Z+(s/67108864|0)|0,r=r+K|0,K=r&67108863,Z=Z+(r>>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$<X;$++)O[$]=this.revBin($,G,X);return O},y.prototype.revBin=function(X,O,G){if(X===0||X===G-1)return X;for(var $=0,Y=0;Y<O;Y++)$|=(X&1)<<O-Y-1,X>>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z<W;Z++)$[Z]=O[X[Z]],Y[Z]=G[X[Z]]},y.prototype.transform=function(X,O,G,$,Y,W){this.permute(W,X,O,G,$,Y);for(var Z=1;Z<Y;Z<<=1)for(var K=Z<<1,J=Math.cos(2*Math.PI/K),j=Math.sin(2*Math.PI/K),A=0;A<Y;A+=K)for(var E=J,_=j,s=0;s<Z;s++){var r=G[A+s],O0=$[A+s],o=G[A+s+Z],d=$[A+s+Z],f=E*o-_*d;d=E*d+_*o,o=f,G[A+s]=r+o,$[A+s]=O0+d,G[A+s+Z]=r-o,$[A+s+Z]=O0-d,s!==K&&(f=J*E-j*_,_=J*_+j*E,E=f)}},y.prototype.guessLen13b=function(X,O){var G=Math.max(O,X)|1,$=G&1,Y=0;for(G=G/2|0;G;G=G>>>1)Y++;return 1<<Y+1+$},y.prototype.conjugate=function(X,O,G){if(!(G<=1))for(var $=0;$<G/2;$++){var Y=X[$];X[$]=X[G-$-1],X[G-$-1]=Y,Y=O[$],O[$]=-O[G-$-1],O[G-$-1]=-Y}},y.prototype.normalize13b=function(X,O){for(var G=0,$=0;$<O/2;$++){var Y=Math.round(X[2*$+1]/O)*8192+Math.round(X[2*$]/O)+G;X[$]=Y&67108863,Y<67108864?G=0:G=Y/67108864|0}return X},y.prototype.convert13b=function(X,O,G,$){for(var Y=0,W=0;W<O;W++)Y=Y+(X[W]|0),G[2*W]=Y&8191,Y=Y>>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G<X;G++)O[G]=0;return O},y.prototype.mulp=function(X,O,G){var $=2*this.guessLen13b(X.length,O.length),Y=this.makeRBT($),W=this.stub($),Z=new Array($),K=new Array($),J=new Array($),j=new Array($),A=new Array($),E=new Array($),_=G.words;_.length=$,this.convert13b(X.words,X.length,Z,$),this.convert13b(O.words,O.length,j,$),this.transform(Z,W,K,J,$,Y),this.transform(j,W,A,E,$,Y);for(var s=0;s<$;s++){var r=K[s]*A[s]-J[s]*E[s];J[s]=K[s]*E[s]+J[s]*A[s],K[s]=r}return this.conjugate(K,J,$),this.transform(K,J,_,W,$,Y),this.conjugate(_,W,$),this.normalize13b(_,$),G.negative=X.negative^O.negative,G.length=X.length+O.length,G.strip()},C.prototype.mul=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),this.mulTo(X,O)},C.prototype.mulf=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),M(this,X,O)},C.prototype.imul=function(X){return this.clone().mulTo(X,this)},C.prototype.imuln=function(X){Q(typeof X=="number"),Q(X<67108864);for(var O=0,G=0;G<this.length;G++){var $=(this.words[G]|0)*X,Y=($&67108863)+(O&67108863);O>>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$<O.length&&O[$]===0;$++,G=G.sqr());if(++$<O.length)for(var Y=G.sqr();$<O.length;$++,Y=Y.sqr())O[$]!==0&&(G=G.mul(Y));return G},C.prototype.iushln=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y<this.length;Y++){var Z=this.words[Y]&$,K=(this.words[Y]|0)-Z<<O;this.words[Y]=K|W,W=Z>>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y<G;Y++)this.words[Y]=0;this.length+=G}return this.strip()},C.prototype.ishln=function(X){return Q(this.negative===0),this.iushln(X)},C.prototype.iushrn=function(X,O,G){Q(typeof X=="number"&&X>=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<<Y,K=G;if($-=W,$=Math.max(0,$),K){for(var J=0;J<W;J++)K.words[J]=this.words[J];K.length=W}if(W!==0)if(this.length>W)for(this.length-=W,J=0;J<this.length;J++)this.words[J]=this.words[J+W];else this.words[0]=0,this.length=1;var j=0;for(J=this.length-1;J>=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return!1;var Y=this.words[G];return!!(Y&$)},C.prototype.imaskn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>O<<O;this.words[this.length-1]&=$}return this.strip()},C.prototype.maskn=function(X){return this.clone().imaskn(X)},C.prototype.iaddn=function(X){return Q(typeof X=="number"),Q(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},C.prototype._iaddn=function(X){this.words[0]+=X;for(var O=0;O<this.length&&this.words[O]>=67108864;O++)this.words[O]-=67108864,O===this.length-1?this.words[O+1]=1:this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O<this.length&&this.words[O]<0;O++)this.words[O]+=67108864,this.words[O+1]-=1;return this.strip()},C.prototype.addn=function(X){return this.clone().iaddn(X)},C.prototype.subn=function(X){return this.clone().isubn(X)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function(X,O,G){var $=X.length+G,Y;this._expand($);var W,Z=0;for(Y=0;Y<X.length;Y++){W=(this.words[Y+G]|0)+Z;var K=(X.words[Y]|0)*O;W-=K&67108863,Z=(W>>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y<this.length-G;Y++)W=(this.words[Y+G]|0)+Z,Z=W>>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y<this.length;Y++)W=-(this.words[Y]|0)+Z,Z=W>>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j<J.length;j++)J.words[j]=0}var A=$.clone()._ishlnsubmul(Y,1,K);A.negative===0&&($=A,J&&(J.words[K]=1));for(var E=K-1;E>=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return this._expand(G+1),this.words[G]|=$,this;for(var Y=$,W=G;Y!==0&&W<this.length;W++){var Z=this.words[W]|0;Z+=Y,Y=Z>>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$<X?-1:1}return this.negative!==0?-G|0:G},C.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var O=this.ucmp(X);return this.negative!==0?-O|0:O},C.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var O=0,G=this.length-1;G>=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$<Y?O=-1:$>Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G<this.n?-1:O.ucmp(this.p);return $===0?(O.words[0]=0,O.length=1):$>0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y<X.length;Y++){var Z=X.words[Y]|0;X.words[Y-10]=(Z&G)<<4|W>>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G<X.length;G++){var $=X.words[G]|0;O+=$*977,X.words[G]=O&67108863,O=$*64+(O/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function a(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(a,c);function i(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(i,c);function G0(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(G0,c),G0.prototype.imulK=function(X){for(var O=0,G=0;G<X.length;G++){var $=(X.words[G]|0)*19+O,Y=$&67108863;$>>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<<G);$[0]=new C(1).toRed(this),$[1]=X;for(var Y=2;Y<$.length;Y++)$[Y]=this.mul($[Y-1],X);var W=$[0],Z=0,K=0,J=O.bitLength()%26;for(J===0&&(J=26),Y=O.length-1;Y>=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),i8=K0(()=>{}),s1=K0((B,k)=>{var V;k.exports=function(R){return V||(V=new N(null)),V.generate(R)};function N(R){this.rand=R}if(k.exports.Rand=N,N.prototype.generate=function(R){return this._rand(R)},N.prototype._rand=function(R){if(this.rand.getBytes)return this.rand.getBytes(R);for(var C=new Uint8Array(R),H=0;H<C.length;H++)C[H]=this.rand.getByte();return C},typeof self=="object")self.crypto&&self.crypto.getRandomValues?N.prototype._rand=function(R){var C=new Uint8Array(R);return self.crypto.getRandomValues(C),C}:self.msCrypto&&self.msCrypto.getRandomValues?N.prototype._rand=function(R){var C=new Uint8Array(R);return self.msCrypto.getRandomValues(C),C}:typeof window=="object"&&(N.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Q=i8(),typeof Q.randomBytes!="function")throw new Error("Not supported");N.prototype._rand=function(R){return Q.randomBytes(R)}}catch{}var Q}),Z6=K0((B,k)=>{var V=r8(),N=s1();function Q(R){this.rand=R||new N.Rand}k.exports=Q,Q.create=function(R){return new Q(R)},Q.prototype._randbelow=function(R){var C=R.bitLength(),H=Math.ceil(C/8);do var L=new V(this.rand.generate(H));while(L.cmp(R)>=0);return L},Q.prototype._randrange=function(R,C){var H=C.sub(R);return R.add(this._randbelow(H))},Q.prototype.test=function(R,C,H){var L=R.bitLength(),P=V.mont(R),U=new V(1).toRed(P);C||(C=Math.max(1,L/48|0));for(var z=R.subn(1),T=0;!z.testn(T);T++);for(var q=R.shrn(T),F=z.toRed(P),I=!0;C>0;C--){var x=this._randrange(new V(2),z);H&&H(x);var w=x.toRed(P).redPow(q);if(!(w.cmp(U)===0||w.cmp(F)===0)){for(var M=1;M<T;M++){if(w=w.redSqr(),w.cmp(U)===0)return!1;if(w.cmp(F)===0)break}if(M===T)return!1}}return I},Q.prototype.getDivisor=function(R,C){var H=R.bitLength(),L=V.mont(R),P=new V(1).toRed(L);C||(C=Math.max(1,H/48|0));for(var U=R.subn(1),z=0;!U.testn(z);z++);for(var T=R.shrn(z),q=U.toRed(L);C>0;C--){var F=this._randrange(new V(2),U),I=R.gcd(F);if(I.cmpn(1)!==0)return I;var x=F.toRed(L).redPow(T);if(!(x.cmp(P)===0||x.cmp(q)===0)){for(var w=1;w<z;w++){if(x=x.redSqr(),x.cmp(P)===0)return x.fromRed().subn(1).gcd(R);if(x.cmp(q)===0)break}if(w===z)return x=x.redSqr(),x.fromRed().subn(1).gcd(R)}}return!1}}),Q6=K0((B,k)=>{var V=g2();k.exports=h,h.simpleSieve=m,h.fermatTest=c;var N=W6(),Q=new N(24),R=Z6(),C=new R,H=new N(1),L=new N(2),P=new N(5),U=new N(16),z=new N(8),T=new N(10),q=new N(3),F=new N(7),I=new N(11),x=new N(4),w=new N(12),M=null;function y(){if(M!==null)return M;var a=1048576,i=[];i[0]=2;for(var G0=1,n=3;n<a;n+=2){for(var Z0=Math.ceil(Math.sqrt(n)),X=0;X<G0&&i[X]<=Z0&&n%i[X]!==0;X++);G0!==X&&i[X]<=Z0||(i[G0++]=n)}return M=i,i}function m(a){for(var i=y(),G0=0;G0<i.length;G0++)if(a.modn(i[G0])===0)return a.cmpn(i[G0])===0;return!0}function c(a){var i=N.mont(a);return L.toRed(i).redPow(a.subn(1)).fromRed().cmpn(1)===0}function h(a,i){if(a<16)return i===2||i===5?new N([140,123]):new N([140,39]);i=new N(i);for(var G0,n;;){for(G0=new N(V(Math.ceil(a/8)));G0.bitLength()>a;)G0.ishrn(1);if(G0.isEven()&&G0.iadd(H),G0.testn(1)||G0.iadd(L),i.cmp(L)){if(!i.cmp(P))for(;G0.mod(T).cmp(q);)G0.iadd(x)}else for(;G0.mod(Q).cmp(I);)G0.iadd(x);if(n=G0.shrn(1),m(n)&&m(G0)&&c(n)&&c(G0)&&C.test(n)&&C.test(G0))return G0}}}),t8=K0((B,k)=>{k.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}}),e8=K0((B,k)=>{var V=W6(),N=Z6(),Q=new N,R=new V(24),C=new V(11),H=new V(10),L=new V(3),P=new V(7),U=Q6(),z=g2();k.exports=x;function T(M,y){return y=y||"utf8",Buffer.isBuffer(M)||(M=new Buffer(M,y)),this._pub=new V(M),this}function q(M,y){return y=y||"utf8",Buffer.isBuffer(M)||(M=new Buffer(M,y)),this._priv=new V(M),this}var F={};function I(M,y){var m=y.toString("hex"),c=[m,M.toString(16)].join("_");if(c in F)return F[c];var h=0;if(M.isEven()||!U.simpleSieve||!U.fermatTest(M)||!Q.test(M))return h+=1,m==="02"||m==="05"?h+=8:h+=4,F[c]=h,h;Q.test(M.shrn(1))||(h+=2);var a;switch(m){case"02":M.mod(R).cmp(C)&&(h+=8);break;case"05":a=M.mod(H),a.cmp(L)&&a.cmp(P)&&(h+=8);break;default:h+=4}return F[c]=h,h}function x(M,y,m){this.setGenerator(y),this.__prime=new V(M),this._prime=V.mont(this.__prime),this._primeLen=M.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,m?(this.setPublicKey=T,this.setPrivateKey=q):this._primeCode=8}Object.defineProperty(x.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=I(this.__prime,this.__gen)),this._primeCode}}),x.prototype.generateKeys=function(){return this._priv||(this._priv=new V(z(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},x.prototype.computeSecret=function(M){M=new V(M),M=M.toRed(this._prime);var y=M.redPow(this._priv).fromRed(),m=new Buffer(y.toArray()),c=this.getPrime();if(m.length<c.length){var h=new Buffer(c.length-m.length);h.fill(0),m=Buffer.concat([h,m])}return m},x.prototype.getPublicKey=function(M){return w(this._pub,M)},x.prototype.getPrivateKey=function(M){return w(this._priv,M)},x.prototype.getPrime=function(M){return w(this.__prime,M)},x.prototype.getGenerator=function(M){return w(this._gen,M)},x.prototype.setGenerator=function(M,y){return y=y||"utf8",Buffer.isBuffer(M)||(M=new Buffer(M,y)),this.__gen=M,this._gen=new V(M),this};function w(M,y){var m=new Buffer(M.toArray());return y?m.toString(y):m}}),X3=K0((B)=>{var k=Q6(),V=t8(),N=e8();function Q(H){var L=new Buffer(V[H].prime,"hex"),P=new Buffer(V[H].gen,"hex");return new N(L,P)}var R={binary:!0,hex:!0,base64:!0};function C(H,L,P,U){return Buffer.isBuffer(L)||R[L]===void 0?C(H,"binary",L,P):(L=L||"binary",U=U||"binary",P=P||new Buffer([2]),Buffer.isBuffer(P)||(P=new Buffer(P,U)),typeof H=="number"?new N(k(H,P),P,!0):(Buffer.isBuffer(H)||(H=new Buffer(H,L)),new N(H,P,!0)))}B.DiffieHellmanGroup=B.createDiffieHellmanGroup=B.getDiffieHellman=Q,B.createDiffieHellman=B.DiffieHellman=C}),z6=K0((B,k)=>{k.exports=x2().EventEmitter}),J3=K0((B,k)=>{function V(F,I){var x=Object.keys(F);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(F);I&&(w=w.filter(function(M){return Object.getOwnPropertyDescriptor(F,M).enumerable})),x.push.apply(x,w)}return x}function N(F){for(var I=1;I<arguments.length;I++){var x=arguments[I]!=null?arguments[I]:{};I%2?V(Object(x),!0).forEach(function(w){Q(F,w,x[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(x)):V(Object(x)).forEach(function(w){Object.defineProperty(F,w,Object.getOwnPropertyDescriptor(x,w))})}return F}function Q(F,I,x){return I in F?Object.defineProperty(F,I,{value:x,enumerable:!0,configurable:!0,writable:!0}):F[I]=x,F}function R(F,I){if(!(F instanceof I))throw new TypeError("Cannot call a class as a function")}function C(F,I){for(var x=0;x<I.length;x++){var w=I[x];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(F,w.key,w)}}function H(F,I,x){return I&&C(F.prototype,I),x&&C(F,x),F}var L=P2(),P=L.Buffer,U=H1(),z=U.inspect,T=z&&z.custom||"inspect";function q(F,I,x){P.prototype.copy.call(F,I,x)}k.exports=function(){function F(){R(this,F),this.head=null,this.tail=null,this.length=0}return H(F,[{key:"push",value:function(I){var x={data:I,next:null};this.length>0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(I){var x={data:I,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var I=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,I}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(I){if(this.length===0)return"";for(var x=this.head,w=""+x.data;x=x.next;)w+=I+x.data;return w}},{key:"concat",value:function(I){if(this.length===0)return P.alloc(0);for(var x=P.allocUnsafe(I>>>0),w=this.head,M=0;w;)q(w.data,x,M),M+=w.data.length,w=w.next;return x}},{key:"consume",value:function(I,x){var w;return I<this.head.data.length?(w=this.head.data.slice(0,I),this.head.data=this.head.data.slice(I)):I===this.head.data.length?w=this.shift():w=x?this._getString(I):this._getBuffer(I),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(I){var x=this.head,w=1,M=x.data;for(I-=M.length;x=x.next;){var y=x.data,m=I>y.length?y.length:I;if(m===y.length?M+=y:M+=y.slice(0,I),I-=m,I===0){m===y.length?(++w,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=y.slice(m));break}++w}return this.length-=w,M}},{key:"_getBuffer",value:function(I){var x=P.allocUnsafe(I),w=this.head,M=1;for(w.data.copy(x),I-=w.data.length;w=w.next;){var y=w.data,m=I>y.length?y.length:I;if(y.copy(x,x.length-I,0,m),I-=m,I===0){m===y.length?(++M,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=y.slice(m));break}++M}return this.length-=M,x}},{key:T,value:function(I,x){return z(this,N({},x,{depth:0,customInspect:!1}))}}]),F}()}),H6=K0((B,k)=>{function V(L,P){var U=this,z=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return z||T?(P?P(L):L&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(C,this,L)):process.nextTick(C,this,L)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(L||null,function(q){!P&&q?U._writableState?U._writableState.errorEmitted?process.nextTick(Q,U):(U._writableState.errorEmitted=!0,process.nextTick(N,U,q)):process.nextTick(N,U,q):P?(process.nextTick(Q,U),P(q)):process.nextTick(Q,U)}),this)}function N(L,P){C(L,P),Q(L)}function Q(L){L._writableState&&!L._writableState.emitClose||L._readableState&&!L._readableState.emitClose||L.emit("close")}function R(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function C(L,P){L.emit("error",P)}function H(L,P){var{_readableState:U,_writableState:z}=L;U&&U.autoDestroy||z&&z.autoDestroy?L.destroy(P):L.emit("error",P)}k.exports={destroy:V,undestroy:R,errorOrDestroy:H}}),b2=K0((B,k)=>{function V(P,U){P.prototype=Object.create(U.prototype),P.prototype.constructor=P,P.__proto__=U}var N={};function Q(P,U,z){z||(z=Error);function T(F,I,x){return typeof U=="string"?U:U(F,I,x)}var q=function(F){V(I,F);function I(x,w,M){return F.call(this,T(x,w,M))||this}return I}(z);q.prototype.name=z.name,q.prototype.code=P,N[P]=q}function R(P,U){if(Array.isArray(P)){var z=P.length;return P=P.map(function(T){return String(T)}),z>2?"one of ".concat(U," ").concat(P.slice(0,z-1).join(", "),", or ")+P[z-1]:z===2?"one of ".concat(U," ").concat(P[0]," or ").concat(P[1]):"of ".concat(U," ").concat(P[0])}else return"of ".concat(U," ").concat(String(P))}function C(P,U,z){return P.substr(!z||z<0?0:+z,U.length)===U}function H(P,U,z){return(z===void 0||z>P.length)&&(z=P.length),P.substring(z-U.length,z)===U}function L(P,U,z){return typeof z!="number"&&(z=0),z+U.length>P.length?!1:P.indexOf(U,z)!==-1}Q("ERR_INVALID_OPT_VALUE",function(P,U){return'The value "'+U+'" is invalid for option "'+P+'"'},TypeError),Q("ERR_INVALID_ARG_TYPE",function(P,U,z){var T;typeof U=="string"&&C(U,"not ")?(T="must not be",U=U.replace(/^not /,"")):T="must be";var q;if(H(P," argument"))q="The ".concat(P," ").concat(T," ").concat(R(U,"type"));else{var F=L(P,".")?"property":"argument";q='The "'.concat(P,'" ').concat(F," ").concat(T," ").concat(R(U,"type"))}return q+=". Received type ".concat(typeof z),q},TypeError),Q("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Q("ERR_METHOD_NOT_IMPLEMENTED",function(P){return"The "+P+" method is not implemented"}),Q("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Q("ERR_STREAM_DESTROYED",function(P){return"Cannot call "+P+" after a stream was destroyed"}),Q("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Q("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Q("ERR_STREAM_WRITE_AFTER_END","write after end"),Q("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Q("ERR_UNKNOWN_ENCODING",function(P){return"Unknown encoding: "+P},TypeError),Q("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),k.exports.codes=N}),V6=K0((B,k)=>{var V=b2().codes.ERR_INVALID_OPT_VALUE;function N(R,C,H){return R.highWaterMark!=null?R.highWaterMark:C?R[H]:null}function Q(R,C,H,L){var P=N(C,L,H);if(P!=null){if(!(isFinite(P)&&Math.floor(P)===P)||P<0){var U=L?H:"highWaterMark";throw new V(U,P)}return Math.floor(P)}return R.objectMode?16:16384}k.exports={getHighWaterMark:Q}}),P6=K0((B,k)=>{k.exports=n;function V(o){var d=this;this.next=null,this.entry=null,this.finish=function(){O0(d,o)}}var N;n.WritableState=i;var Q={deprecate:_5()},R=z6(),C=P2().Buffer,H=global.Uint8Array||function(){};function L(o){return C.from(o)}function P(o){return C.isBuffer(o)||o instanceof H}var U=H6(),z=V6(),T=z.getHighWaterMark,q=b2().codes,F=q.ERR_INVALID_ARG_TYPE,I=q.ERR_METHOD_NOT_IMPLEMENTED,x=q.ERR_MULTIPLE_CALLBACK,w=q.ERR_STREAM_CANNOT_PIPE,M=q.ERR_STREAM_DESTROYED,y=q.ERR_STREAM_NULL_VALUES,m=q.ERR_STREAM_WRITE_AFTER_END,c=q.ERR_UNKNOWN_ENCODING,h=U.errorOrDestroy;c0()(n,R);function a(){}function i(o,d,f){N=N||y2(),o=o||{},typeof f!="boolean"&&(f=d instanceof N),this.objectMode=!!o.objectMode,f&&(this.objectMode=this.objectMode||!!o.writableObjectMode),this.highWaterMark=T(this,o,"writableHighWaterMark",f),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U0=o.decodeStrings===!1;this.decodeStrings=!U0,this.defaultEncoding=o.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(X0){Z(d,X0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=o.emitClose!==!1,this.autoDestroy=!!o.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new V(this)}i.prototype.getBuffer=function(){for(var o=this.bufferedRequest,d=[];o;)d.push(o),o=o.next;return d},function(){try{Object.defineProperty(i.prototype,"buffer",{get:Q.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var G0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(G0=Function.prototype[Symbol.hasInstance],Object.defineProperty(n,Symbol.hasInstance,{value:function(o){return G0.call(this,o)?!0:this!==n?!1:o&&o._writableState instanceof i}})):G0=function(o){return o instanceof this};function n(o){N=N||y2();var d=this instanceof N;if(!d&&!G0.call(n,this))return new n(o);this._writableState=new i(o,this,d),this.writable=!0,o&&(typeof o.write=="function"&&(this._write=o.write),typeof o.writev=="function"&&(this._writev=o.writev),typeof o.destroy=="function"&&(this._destroy=o.destroy),typeof o.final=="function"&&(this._final=o.final)),R.call(this)}n.prototype.pipe=function(){h(this,new w)};function Z0(o,d){var f=new m;h(o,f),process.nextTick(d,f)}function X(o,d,f,U0){var X0;return f===null?X0=new y:typeof f!="string"&&!d.objectMode&&(X0=new F("chunk",["string","Buffer"],f)),X0?(h(o,X0),process.nextTick(U0,X0),!1):!0}n.prototype.write=function(o,d,f){var U0=this._writableState,X0=!1,Y0=!U0.objectMode&&P(o);return Y0&&!C.isBuffer(o)&&(o=L(o)),typeof d=="function"&&(f=d,d=null),Y0?d="buffer":d||(d=U0.defaultEncoding),typeof f!="function"&&(f=a),U0.ending?Z0(this,f):(Y0||X(this,U0,o,f))&&(U0.pendingcb++,X0=G(this,U0,Y0,o,d,f)),X0},n.prototype.cork=function(){this._writableState.corked++},n.prototype.uncork=function(){var o=this._writableState;o.corked&&(o.corked--,!o.writing&&!o.corked&&!o.bufferProcessing&&o.bufferedRequest&&j(this,o))},n.prototype.setDefaultEncoding=function(o){if(typeof o=="string"&&(o=o.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((o+"").toLowerCase())>-1))throw new c(o);return this._writableState.defaultEncoding=o,this},Object.defineProperty(n.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(o,d,f){return!o.objectMode&&o.decodeStrings!==!1&&typeof d=="string"&&(d=C.from(d,f)),d}Object.defineProperty(n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function G(o,d,f,U0,X0,Y0){if(!f){var g=O(d,U0,X0);U0!==g&&(f=!0,X0="buffer",U0=g)}var S=d.objectMode?1:U0.length;d.length+=S;var p=d.length<d.highWaterMark;if(p||(d.needDrain=!0),d.writing||d.corked){var e=d.lastBufferedRequest;d.lastBufferedRequest={chunk:U0,encoding:X0,isBuf:f,callback:Y0,next:null},e?e.next=d.lastBufferedRequest:d.bufferedRequest=d.lastBufferedRequest,d.bufferedRequestCount+=1}else $(o,d,!1,S,U0,X0,Y0);return p}function $(o,d,f,U0,X0,Y0,g){d.writelen=U0,d.writecb=g,d.writing=!0,d.sync=!0,d.destroyed?d.onwrite(new M("write")):f?o._writev(X0,d.onwrite):o._write(X0,Y0,d.onwrite),d.sync=!1}function Y(o,d,f,U0,X0){--d.pendingcb,f?(process.nextTick(X0,U0),process.nextTick(s,o,d),o._writableState.errorEmitted=!0,h(o,U0)):(X0(U0),o._writableState.errorEmitted=!0,h(o,U0),s(o,d))}function W(o){o.writing=!1,o.writecb=null,o.length-=o.writelen,o.writelen=0}function Z(o,d){var f=o._writableState,U0=f.sync,X0=f.writecb;if(typeof X0!="function")throw new x;if(W(f),d)Y(o,f,U0,d,X0);else{var Y0=A(f)||o.destroyed;!Y0&&!f.corked&&!f.bufferProcessing&&f.bufferedRequest&&j(o,f),U0?process.nextTick(K,o,f,Y0,X0):K(o,f,Y0,X0)}}function K(o,d,f,U0){f||J(o,d),d.pendingcb--,U0(),s(o,d)}function J(o,d){d.length===0&&d.needDrain&&(d.needDrain=!1,o.emit("drain"))}function j(o,d){d.bufferProcessing=!0;var f=d.bufferedRequest;if(o._writev&&f&&f.next){var U0=d.bufferedRequestCount,X0=new Array(U0),Y0=d.corkedRequestsFree;Y0.entry=f;for(var g=0,S=!0;f;)X0[g]=f,f.isBuf||(S=!1),f=f.next,g+=1;X0.allBuffers=S,$(o,d,!0,d.length,X0,"",Y0.finish),d.pendingcb++,d.lastBufferedRequest=null,Y0.next?(d.corkedRequestsFree=Y0.next,Y0.next=null):d.corkedRequestsFree=new V(d),d.bufferedRequestCount=0}else{for(;f;){var{chunk:p,encoding:e,callback:J0}=f,t=d.objectMode?1:p.length;if($(o,d,!1,t,p,e,J0),f=f.next,d.bufferedRequestCount--,d.writing)break}f===null&&(d.lastBufferedRequest=null)}d.bufferedRequest=f,d.bufferProcessing=!1}n.prototype._write=function(o,d,f){f(new I("_write()"))},n.prototype._writev=null,n.prototype.end=function(o,d,f){var U0=this._writableState;return typeof o=="function"?(f=o,o=null,d=null):typeof d=="function"&&(f=d,d=null),o!=null&&this.write(o,d),U0.corked&&(U0.corked=1,this.uncork()),U0.ending||r(this,U0,f),this},Object.defineProperty(n.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A(o){return o.ending&&o.length===0&&o.bufferedRequest===null&&!o.finished&&!o.writing}function E(o,d){o._final(function(f){d.pendingcb--,f&&h(o,f),d.prefinished=!0,o.emit("prefinish"),s(o,d)})}function _(o,d){!d.prefinished&&!d.finalCalled&&(typeof o._final=="function"&&!d.destroyed?(d.pendingcb++,d.finalCalled=!0,process.nextTick(E,o,d)):(d.prefinished=!0,o.emit("prefinish")))}function s(o,d){var f=A(d);if(f&&(_(o,d),d.pendingcb===0&&(d.finished=!0,o.emit("finish"),d.autoDestroy))){var U0=o._readableState;(!U0||U0.autoDestroy&&U0.endEmitted)&&o.destroy()}return f}function r(o,d,f){d.ending=!0,s(o,d),f&&(d.finished?process.nextTick(f):o.once("finish",f)),d.ended=!0,o.writable=!1}function O0(o,d,f){var U0=o.entry;for(o.entry=null;U0;){var X0=U0.callback;d.pendingcb--,X0(f),U0=U0.next}d.corkedRequestsFree.next=o}Object.defineProperty(n.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(o){!this._writableState||(this._writableState.destroyed=o)}}),n.prototype.destroy=U.destroy,n.prototype._undestroy=U.undestroy,n.prototype._destroy=function(o,d){d(o)}}),y2=K0((B,k)=>{var V=Object.keys||function(z){var T=[];for(var q in z)T.push(q);return T};k.exports=L;var N=U6(),Q=P6();c0()(L,N);for(R=V(Q.prototype),H=0;H<R.length;H++)C=R[H],L.prototype[C]||(L.prototype[C]=Q.prototype[C]);var R,C,H;function L(z){if(!(this instanceof L))return new L(z);N.call(this,z),Q.call(this,z),this.allowHalfOpen=!0,z&&(z.readable===!1&&(this.readable=!1),z.writable===!1&&(this.writable=!1),z.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",P)))}Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function P(){this._writableState.ended||process.nextTick(U,this)}function U(z){z.end()}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(z){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=z,this._writableState.destroyed=z)}})}),f1=K0((B,k)=>{var V=b2().codes.ERR_STREAM_PREMATURE_CLOSE;function N(H){var L=!1;return function(){if(!L){L=!0;for(var P=arguments.length,U=new Array(P),z=0;z<P;z++)U[z]=arguments[z];H.apply(this,U)}}}function Q(){}function R(H){return H.setHeader&&typeof H.abort=="function"}function C(H,L,P){if(typeof L=="function")return C(H,null,L);L||(L={}),P=N(P||Q);var U=L.readable||L.readable!==!1&&H.readable,z=L.writable||L.writable!==!1&&H.writable,T=function(){H.writable||F()},q=H._writableState&&H._writableState.finished,F=function(){z=!1,q=!0,U||P.call(H)},I=H._readableState&&H._readableState.endEmitted,x=function(){U=!1,I=!0,z||P.call(H)},w=function(m){P.call(H,m)},M=function(){var m;if(U&&!I)return(!H._readableState||!H._readableState.ended)&&(m=new V),P.call(H,m);if(z&&!q)return(!H._writableState||!H._writableState.ended)&&(m=new V),P.call(H,m)},y=function(){H.req.on("finish",F)};return R(H)?(H.on("complete",F),H.on("abort",M),H.req?y():H.on("request",y)):z&&!H._writableState&&(H.on("end",T),H.on("close",T)),H.on("end",x),H.on("finish",F),L.error!==!1&&H.on("error",w),H.on("close",M),function(){H.removeListener("complete",F),H.removeListener("abort",M),H.removeListener("request",y),H.req&&H.req.removeListener("finish",F),H.removeListener("end",T),H.removeListener("close",T),H.removeListener("finish",F),H.removeListener("end",x),H.removeListener("error",w),H.removeListener("close",M)}}k.exports=C}),O3=K0((B,k)=>{var V;function N(y,m,c){return m in y?Object.defineProperty(y,m,{value:c,enumerable:!0,configurable:!0,writable:!0}):y[m]=c,y}var Q=f1(),R=Symbol("lastResolve"),C=Symbol("lastReject"),H=Symbol("error"),L=Symbol("ended"),P=Symbol("lastPromise"),U=Symbol("handlePromise"),z=Symbol("stream");function T(y,m){return{value:y,done:m}}function q(y){var m=y[R];if(m!==null){var c=y[z].read();c!==null&&(y[P]=null,y[R]=null,y[C]=null,m(T(c,!1)))}}function F(y){process.nextTick(q,y)}function I(y,m){return function(c,h){y.then(function(){if(m[L]){c(T(void 0,!0));return}m[U](c,h)},h)}}var x=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((V={get stream(){return this[z]},next:function(){var y=this,m=this[H];if(m!==null)return Promise.reject(m);if(this[L])return Promise.resolve(T(void 0,!0));if(this[z].destroyed)return new Promise(function(i,G0){process.nextTick(function(){y[H]?G0(y[H]):i(T(void 0,!0))})});var c=this[P],h;if(c)h=new Promise(I(c,this));else{var a=this[z].read();if(a!==null)return Promise.resolve(T(a,!1));h=new Promise(this[U])}return this[P]=h,h}},N(V,Symbol.asyncIterator,function(){return this}),N(V,"return",function(){var y=this;return new Promise(function(m,c){y[z].destroy(null,function(h){if(h){c(h);return}m(T(void 0,!0))})})}),V),x),M=function(y){var m,c=Object.create(w,(m={},N(m,z,{value:y,writable:!0}),N(m,R,{value:null,writable:!0}),N(m,C,{value:null,writable:!0}),N(m,H,{value:null,writable:!0}),N(m,L,{value:y._readableState.endEmitted,writable:!0}),N(m,U,{value:function(h,a){var i=c[z].read();i?(c[P]=null,c[R]=null,c[C]=null,h(T(i,!1))):(c[R]=h,c[C]=a)},writable:!0}),m));return c[P]=null,Q(y,function(h){if(h&&h.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=c[C];a!==null&&(c[P]=null,c[R]=null,c[C]=null,a(h)),c[H]=h;return}var i=c[R];i!==null&&(c[P]=null,c[R]=null,c[C]=null,i(T(void 0,!0))),c[L]=!0}),y.on("readable",F.bind(null,c)),c};k.exports=M}),$3=K0((B,k)=>{k.exports=function(){throw new Error("Readable.from is not available in the browser")}}),U6=K0((B,k)=>{k.exports=X;var V;X.ReadableState=Z0;var N=x2().EventEmitter,Q=function(g,S){return g.listeners(S).length},R=z6(),C=P2().Buffer,H=global.Uint8Array||function(){};function L(g){return C.from(g)}function P(g){return C.isBuffer(g)||g instanceof H}var U=H1(),z;U&&U.debuglog?z=U.debuglog("stream"):z=function(){};var T=J3(),q=H6(),F=V6(),I=F.getHighWaterMark,x=b2().codes,w=x.ERR_INVALID_ARG_TYPE,M=x.ERR_STREAM_PUSH_AFTER_EOF,y=x.ERR_METHOD_NOT_IMPLEMENTED,m=x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,c,h,a;c0()(X,R);var i=q.errorOrDestroy,G0=["error","close","destroy","pause","resume"];function n(g,S,p){if(typeof g.prependListener=="function")return g.prependListener(S,p);!g._events||!g._events[S]?g.on(S,p):Array.isArray(g._events[S])?g._events[S].unshift(p):g._events[S]=[p,g._events[S]]}function Z0(g,S,p){V=V||y2(),g=g||{},typeof p!="boolean"&&(p=S instanceof V),this.objectMode=!!g.objectMode,p&&(this.objectMode=this.objectMode||!!g.readableObjectMode),this.highWaterMark=I(this,g,"readableHighWaterMark",p),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding&&(c||(c=(Z1(),T2(s2)).StringDecoder),this.decoder=new c(g.encoding),this.encoding=g.encoding)}function X(g){if(V=V||y2(),!(this instanceof X))return new X(g);var S=this instanceof V;this._readableState=new Z0(g,this,S),this.readable=!0,g&&(typeof g.read=="function"&&(this._read=g.read),typeof g.destroy=="function"&&(this._destroy=g.destroy)),R.call(this)}Object.defineProperty(X.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){!this._readableState||(this._readableState.destroyed=g)}}),X.prototype.destroy=q.destroy,X.prototype._undestroy=q.undestroy,X.prototype._destroy=function(g,S){S(g)},X.prototype.push=function(g,S){var p=this._readableState,e;return p.objectMode?e=!0:typeof g=="string"&&(S=S||p.defaultEncoding,S!==p.encoding&&(g=C.from(g,S),S=""),e=!0),O(this,g,S,!1,e)},X.prototype.unshift=function(g){return O(this,g,null,!0,!1)};function O(g,S,p,e,J0){z("readableAddChunk",S);var t=g._readableState;if(S===null)t.reading=!1,K(g,t);else{var y0;if(J0||(y0=$(t,S)),y0)i(g,y0);else if(t.objectMode||S&&S.length>0)if(typeof S!="string"&&!t.objectMode&&Object.getPrototypeOf(S)!==C.prototype&&(S=L(S)),e)t.endEmitted?i(g,new m):G(g,t,S,!0);else if(t.ended)i(g,new M);else{if(t.destroyed)return!1;t.reading=!1,t.decoder&&!p?(S=t.decoder.write(S),t.objectMode||S.length!==0?G(g,t,S,!1):A(g,t)):G(g,t,S,!1)}else e||(t.reading=!1,A(g,t))}return!t.ended&&(t.length<t.highWaterMark||t.length===0)}function G(g,S,p,e){S.flowing&&S.length===0&&!S.sync?(S.awaitDrain=0,g.emit("data",p)):(S.length+=S.objectMode?1:p.length,e?S.buffer.unshift(p):S.buffer.push(p),S.needReadable&&J(g)),A(g,S)}function $(g,S){var p;return!P(S)&&typeof S!="string"&&S!==void 0&&!g.objectMode&&(p=new w("chunk",["string","Buffer","Uint8Array"],S)),p}X.prototype.isPaused=function(){return this._readableState.flowing===!1},X.prototype.setEncoding=function(g){c||(c=(Z1(),T2(s2)).StringDecoder);var S=new c(g);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;for(var p=this._readableState.buffer.head,e="";p!==null;)e+=S.write(p.data),p=p.next;return this._readableState.buffer.clear(),e!==""&&this._readableState.buffer.push(e),this._readableState.length=e.length,this};var Y=1073741824;function W(g){return g>=Y?g=Y:(g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++),g}function Z(g,S){return g<=0||S.length===0&&S.ended?0:S.objectMode?1:g!==g?S.flowing&&S.length?S.buffer.head.data.length:S.length:(g>S.highWaterMark&&(S.highWaterMark=W(g)),g<=S.length?g:S.ended?S.length:(S.needReadable=!0,0))}X.prototype.read=function(g){z("read",g),g=parseInt(g,10);var S=this._readableState,p=g;if(g!==0&&(S.emittedReadable=!1),g===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return z("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?U0(this):J(this),null;if(g=Z(g,S),g===0&&S.ended)return S.length===0&&U0(this),null;var e=S.needReadable;z("need readable",e),(S.length===0||S.length-g<S.highWaterMark)&&(e=!0,z("length less than watermark",e)),S.ended||S.reading?(e=!1,z("reading or ended",e)):e&&(z("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0),this._read(S.highWaterMark),S.sync=!1,S.reading||(g=Z(p,S)));var J0;return g>0?J0=f(g,S):J0=null,J0===null?(S.needReadable=S.length<=S.highWaterMark,g=0):(S.length-=g,S.awaitDrain=0),S.length===0&&(S.ended||(S.needReadable=!0),p!==g&&S.ended&&U0(this)),J0!==null&&this.emit("data",J0),J0};function K(g,S){if(z("onEofChunk"),!S.ended){if(S.decoder){var p=S.decoder.end();p&&p.length&&(S.buffer.push(p),S.length+=S.objectMode?1:p.length)}S.ended=!0,S.sync?J(g):(S.needReadable=!1,S.emittedReadable||(S.emittedReadable=!0,j(g)))}}function J(g){var S=g._readableState;z("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(z("emitReadable",S.flowing),S.emittedReadable=!0,process.nextTick(j,g))}function j(g){var S=g._readableState;z("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&(S.length||S.ended)&&(g.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,d(g)}function A(g,S){S.readingMore||(S.readingMore=!0,process.nextTick(E,g,S))}function E(g,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){var p=S.length;if(z("maybeReadMore read 0"),g.read(0),p===S.length)break}S.readingMore=!1}X.prototype._read=function(g){i(this,new y("_read()"))},X.prototype.pipe=function(g,S){var p=this,e=this._readableState;switch(e.pipesCount){case 0:e.pipes=g;break;case 1:e.pipes=[e.pipes,g];break;default:e.pipes.push(g);break}e.pipesCount+=1,z("pipe count=%d opts=%j",e.pipesCount,S);var J0=(!S||S.end!==!1)&&g!==process.stdout&&g!==process.stderr,t=J0?C0:b;e.endEmitted?process.nextTick(t):p.once("end",t),g.on("unpipe",y0);function y0(l,u){z("onunpipe"),l===p&&u&&u.hasUnpiped===!1&&(u.hasUnpiped=!0,P0())}function C0(){z("onend"),g.end()}var W0=_(p);g.on("drain",W0);var _0=!1;function P0(){z("cleanup"),g.removeListener("close",D),g.removeListener("finish",v),g.removeListener("drain",W0),g.removeListener("error",d0),g.removeListener("unpipe",y0),p.removeListener("end",C0),p.removeListener("end",b),p.removeListener("data",Q0),_0=!0,e.awaitDrain&&(!g._writableState||g._writableState.needDrain)&&W0()}p.on("data",Q0);function Q0(l){z("ondata");var u=g.write(l);z("dest.write",u),u===!1&&((e.pipesCount===1&&e.pipes===g||e.pipesCount>1&&Y0(e.pipes,g)!==-1)&&!_0&&(z("false write response, pause",e.awaitDrain),e.awaitDrain++),p.pause())}function d0(l){z("onerror",l),b(),g.removeListener("error",d0),Q(g,"error")===0&&i(g,l)}n(g,"error",d0);function D(){g.removeListener("finish",v),b()}g.once("close",D);function v(){z("onfinish"),g.removeListener("close",D),b()}g.once("finish",v);function b(){z("unpipe"),p.unpipe(g)}return g.emit("pipe",p),e.flowing||(z("pipe resume"),p.resume()),g};function _(g){return function(){var S=g._readableState;z("pipeOnDrain",S.awaitDrain),S.awaitDrain&&S.awaitDrain--,S.awaitDrain===0&&Q(g,"data")&&(S.flowing=!0,d(g))}}X.prototype.unpipe=function(g){var S=this._readableState,p={hasUnpiped:!1};if(S.pipesCount===0)return this;if(S.pipesCount===1)return g&&g!==S.pipes?this:(g||(g=S.pipes),S.pipes=null,S.pipesCount=0,S.flowing=!1,g&&g.emit("unpipe",this,p),this);if(!g){var{pipes:e,pipesCount:J0}=S;S.pipes=null,S.pipesCount=0,S.flowing=!1;for(var t=0;t<J0;t++)e[t].emit("unpipe",this,{hasUnpiped:!1});return this}var y0=Y0(S.pipes,g);return y0===-1?this:(S.pipes.splice(y0,1),S.pipesCount-=1,S.pipesCount===1&&(S.pipes=S.pipes[0]),g.emit("unpipe",this,p),this)},X.prototype.on=function(g,S){var p=R.prototype.on.call(this,g,S),e=this._readableState;return g==="data"?(e.readableListening=this.listenerCount("readable")>0,e.flowing!==!1&&this.resume()):g==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,z("on readable",e.length,e.reading),e.length?J(this):e.reading||process.nextTick(r,this)),p},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(g,S){var p=R.prototype.removeListener.call(this,g,S);return g==="readable"&&process.nextTick(s,this),p},X.prototype.removeAllListeners=function(g){var S=R.prototype.removeAllListeners.apply(this,arguments);return(g==="readable"||g===void 0)&&process.nextTick(s,this),S};function s(g){var S=g._readableState;S.readableListening=g.listenerCount("readable")>0,S.resumeScheduled&&!S.paused?S.flowing=!0:g.listenerCount("data")>0&&g.resume()}function r(g){z("readable nexttick read 0"),g.read(0)}X.prototype.resume=function(){var g=this._readableState;return g.flowing||(z("resume"),g.flowing=!g.readableListening,O0(this,g)),g.paused=!1,this};function O0(g,S){S.resumeScheduled||(S.resumeScheduled=!0,process.nextTick(o,g,S))}function o(g,S){z("resume",S.reading),S.reading||g.read(0),S.resumeScheduled=!1,g.emit("resume"),d(g),S.flowing&&!S.reading&&g.read(0)}X.prototype.pause=function(){return z("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(z("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function d(g){var S=g._readableState;for(z("flow",S.flowing);S.flowing&&g.read()!==null;);}X.prototype.wrap=function(g){var S=this,p=this._readableState,e=!1;g.on("end",function(){if(z("wrapped end"),p.decoder&&!p.ended){var y0=p.decoder.end();y0&&y0.length&&S.push(y0)}S.push(null)}),g.on("data",function(y0){if(z("wrapped data"),p.decoder&&(y0=p.decoder.write(y0)),!(p.objectMode&&y0==null)&&!(!p.objectMode&&(!y0||!y0.length))){var C0=S.push(y0);C0||(e=!0,g.pause())}});for(var J0 in g)this[J0]===void 0&&typeof g[J0]=="function"&&(this[J0]=function(y0){return function(){return g[y0].apply(g,arguments)}}(J0));for(var t=0;t<G0.length;t++)g.on(G0[t],this.emit.bind(this,G0[t]));return this._read=function(y0){z("wrapped _read",y0),e&&(e=!1,g.resume())},this},typeof Symbol=="function"&&(X.prototype[Symbol.asyncIterator]=function(){return h===void 0&&(h=O3()),h(this)}),Object.defineProperty(X.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(X.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(X.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(g){this._readableState&&(this._readableState.flowing=g)}}),X._fromList=f,Object.defineProperty(X.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function f(g,S){if(S.length===0)return null;var p;return S.objectMode?p=S.buffer.shift():!g||g>=S.length?(S.decoder?p=S.buffer.join(""):S.buffer.length===1?p=S.buffer.first():p=S.buffer.concat(S.length),S.buffer.clear()):p=S.buffer.consume(g,S.decoder),p}function U0(g){var S=g._readableState;z("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,process.nextTick(X0,S,g))}function X0(g,S){if(z("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0&&(g.endEmitted=!0,S.readable=!1,S.emit("end"),g.autoDestroy)){var p=S._writableState;(!p||p.autoDestroy&&p.finished)&&S.destroy()}}typeof Symbol=="function"&&(X.from=function(g,S){return a===void 0&&(a=$3()),a(X,g,S)});function Y0(g,S){for(var p=0,e=g.length;p<e;p++)if(g[p]===S)return p;return-1}}),F6=K0((B,k)=>{k.exports=P;var V=b2().codes,N=V.ERR_METHOD_NOT_IMPLEMENTED,Q=V.ERR_MULTIPLE_CALLBACK,R=V.ERR_TRANSFORM_ALREADY_TRANSFORMING,C=V.ERR_TRANSFORM_WITH_LENGTH_0,H=y2();c0()(P,H);function L(T,q){var F=this._transformState;F.transforming=!1;var I=F.writecb;if(I===null)return this.emit("error",new Q);F.writechunk=null,F.writecb=null,q!=null&&this.push(q),I(T);var x=this._readableState;x.reading=!1,(x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}function P(T){if(!(this instanceof P))return new P(T);H.call(this,T),this._transformState={afterTransform:L.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,T&&(typeof T.transform=="function"&&(this._transform=T.transform),typeof T.flush=="function"&&(this._flush=T.flush)),this.on("prefinish",U)}function U(){var T=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(q,F){z(T,q,F)}):z(this,null,null)}P.prototype.push=function(T,q){return this._transformState.needTransform=!1,H.prototype.push.call(this,T,q)},P.prototype._transform=function(T,q,F){F(new N("_transform()"))},P.prototype._write=function(T,q,F){var I=this._transformState;if(I.writecb=F,I.writechunk=T,I.writeencoding=q,!I.transforming){var x=this._readableState;(I.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},P.prototype._read=function(T){var q=this._transformState;q.writechunk!==null&&!q.transforming?(q.transforming=!0,this._transform(q.writechunk,q.writeencoding,q.afterTransform)):q.needTransform=!0},P.prototype._destroy=function(T,q){H.prototype._destroy.call(this,T,function(F){q(F)})};function z(T,q,F){if(q)return T.emit("error",q);if(F!=null&&T.push(F),T._writableState.length)throw new C;if(T._transformState.transforming)throw new R;return T.push(null)}}),G3=K0((B,k)=>{k.exports=N;var V=F6();c0()(N,V);function N(Q){if(!(this instanceof N))return new N(Q);V.call(this,Q)}N.prototype._transform=function(Q,R,C){C(null,Q)}}),Y3=K0((B,k)=>{var V;function N(F){var I=!1;return function(){I||(I=!0,F.apply(void 0,arguments))}}var Q=b2().codes,R=Q.ERR_MISSING_ARGS,C=Q.ERR_STREAM_DESTROYED;function H(F){if(F)throw F}function L(F){return F.setHeader&&typeof F.abort=="function"}function P(F,I,x,w){w=N(w);var M=!1;F.on("close",function(){M=!0}),V===void 0&&(V=f1()),V(F,{readable:I,writable:x},function(m){if(m)return w(m);M=!0,w()});var y=!1;return function(m){if(!M&&!y){if(y=!0,L(F))return F.abort();if(typeof F.destroy=="function")return F.destroy();w(m||new C("pipe"))}}}function U(F){F()}function z(F,I){return F.pipe(I)}function T(F){return!F.length||typeof F[F.length-1]!="function"?H:F.pop()}function q(){for(var F=arguments.length,I=new Array(F),x=0;x<F;x++)I[x]=arguments[x];var w=T(I);if(Array.isArray(I[0])&&(I=I[0]),I.length<2)throw new R("streams");var M,y=I.map(function(m,c){var h=c<I.length-1,a=c>0;return P(m,h,a,function(i){M||(M=i),i&&y.forEach(U),!h&&(y.forEach(U),w(M))})});return I.reduce(z)}k.exports=q}),C3=K0((B,k)=>{B=k.exports=U6(),B.Stream=B,B.Readable=B,B.Writable=P6(),B.Duplex=y2(),B.Transform=F6(),B.PassThrough=G3(),B.finished=f1(),B.pipeline=Y3()}),n1=K0((B,k)=>{(function(V,N){function Q($,Y){if(!$)throw new Error(Y||"Assertion failed")}function R($,Y){$.super_=Y;var W=function(){};W.prototype=Y.prototype,$.prototype=new W,$.prototype.constructor=$}function C($,Y,W){if(C.isBN($))return $;this.negative=0,this.words=null,this.length=0,this.red=null,$!==null&&((Y==="le"||Y==="be")&&(W=Y,Y=10),this._init($||0,Y||10,W||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function($){return $ instanceof C?!0:$!==null&&typeof $=="object"&&$.constructor.wordSize===C.wordSize&&Array.isArray($.words)},C.max=function($,Y){return $.cmp(Y)>0?$:Y},C.min=function($,Y){return $.cmp(Y)<0?$:Y},C.prototype._init=function($,Y,W){if(typeof $=="number")return this._initNumber($,Y,W);if(typeof $=="object")return this._initArray($,Y,W);Y==="hex"&&(Y=16),Q(Y===(Y|0)&&Y>=2&&Y<=36),$=$.toString().replace(/\s+/g,"");var Z=0;$[0]==="-"&&(Z++,this.negative=1),Z<$.length&&(Y===16?this._parseHex($,Z,W):(this._parseBase($,Y,Z),W==="le"&&this._initArray(this.toArray(),Y,W)))},C.prototype._initNumber=function($,Y,W){$<0&&(this.negative=1,$=-$),$<67108864?(this.words=[$&67108863],this.length=1):$<4503599627370496?(this.words=[$&67108863,$/67108864&67108863],this.length=2):(Q($<9007199254740992),this.words=[$&67108863,$/67108864&67108863,1],this.length=3),W==="le"&&this._initArray(this.toArray(),Y,W)},C.prototype._initArray=function($,Y,W){if(Q(typeof $.length=="number"),$.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil($.length/3),this.words=new Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var K,J,j=0;if(W==="be")for(Z=$.length-1,K=0;Z>=0;Z-=3)J=$[Z]|$[Z-1]<<8|$[Z-2]<<16,this.words[K]|=J<<j&67108863,this.words[K+1]=J>>>26-j&67108863,j+=24,j>=26&&(j-=26,K++);else if(W==="le")for(Z=0,K=0;Z<$.length;Z+=3)J=$[Z]|$[Z+1]<<8|$[Z+2]<<16,this.words[K]|=J<<j&67108863,this.words[K+1]=J>>>26-j&67108863,j+=24,j>=26&&(j-=26,K++);return this._strip()};function L($,Y){var W=$.charCodeAt(Y);if(W>=48&&W<=57)return W-48;if(W>=65&&W<=70)return W-55;if(W>=97&&W<=102)return W-87;Q(!1,"Invalid character in "+$)}function P($,Y,W){var Z=L($,W);return W-1>=Y&&(Z|=L($,W-1)<<4),Z}C.prototype._parseHex=function($,Y,W){this.length=Math.ceil(($.length-Y)/6),this.words=new Array(this.length);for(var Z=0;Z<this.length;Z++)this.words[Z]=0;var K=0,J=0,j;if(W==="be")for(Z=$.length-1;Z>=Y;Z-=2)j=P($,Y,Z)<<K,this.words[J]|=j&67108863,K>=18?(K-=18,J+=1,this.words[J]|=j>>>26):K+=8;else{var A=$.length-Y;for(Z=A%2===0?Y+1:Y;Z<$.length;Z+=2)j=P($,Y,Z)<<K,this.words[J]|=j&67108863,K>=18?(K-=18,J+=1,this.words[J]|=j>>>26):K+=8}this._strip()};function U($,Y,W,Z){for(var K=0,J=0,j=Math.min($.length,W),A=Y;A<j;A++){var E=$.charCodeAt(A)-48;K*=Z,E>=49?J=E-49+10:E>=17?J=E-17+10:J=E,Q(E>=0&&J<Z,"Invalid character"),K+=J}return K}C.prototype._parseBase=function($,Y,W){this.words=[0],this.length=1;for(var Z=0,K=1;K<=67108863;K*=Y)Z++;Z--,K=K/Y|0;for(var J=$.length-W,j=J%Z,A=Math.min(J,J-j)+W,E=0,_=W;_<A;_+=Z)E=U($,_,_+Z,Y),this.imuln(K),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E);if(j!==0){var s=1;for(E=U($,_,$.length,Y),_=0;_<j;_++)s*=Y;this.imuln(s),this.words[0]+E<67108864?this.words[0]+=E:this._iaddn(E)}this._strip()},C.prototype.copy=function($){$.words=new Array(this.length);for(var Y=0;Y<this.length;Y++)$.words[Y]=this.words[Y];$.length=this.length,$.negative=this.negative,$.red=this.red};function z($,Y){$.words=Y.words,$.length=Y.length,$.negative=Y.negative,$.red=Y.red}if(C.prototype._move=function($){z($,this)},C.prototype.clone=function(){var $=new C(null);return this.copy($),$},C.prototype._expand=function($){for(;this.length<$;)this.words[this.length++]=0;return this},C.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{C.prototype[Symbol.for("nodejs.util.inspect.custom")]=T}catch{C.prototype.inspect=T}else C.prototype.inspect=T;function T(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var q=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],F=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[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];C.prototype.toString=function($,Y){$=$||10,Y=Y|0||1;var W;if($===16||$==="hex"){W="";for(var Z=0,K=0,J=0;J<this.length;J++){var j=this.words[J],A=((j<<Z|K)&16777215).toString(16);K=j>>>24-Z&16777215,Z+=2,Z>=26&&(Z-=26,J--),K!==0||J!==this.length-1?W=q[6-A.length]+A+W:W=A+W}for(K!==0&&(W=K.toString(16)+W);W.length%Y!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}if($===($|0)&&$>=2&&$<=36){var E=F[$],_=I[$];W="";var s=this.clone();for(s.negative=0;!s.isZero();){var r=s.modrn(_).toString($);s=s.idivn(_),s.isZero()?W=r+W:W=q[E-r.length]+r+W}for(this.isZero()&&(W="0"+W);W.length%Y!==0;)W="0"+W;return this.negative!==0&&(W="-"+W),W}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var $=this.words[0];return this.length===2?$+=this.words[1]*67108864:this.length===3&&this.words[2]===1?$+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-$:$},C.prototype.toJSON=function(){return this.toString(16,2)},H&&(C.prototype.toBuffer=function($,Y){return this.toArrayLike(H,$,Y)}),C.prototype.toArray=function($,Y){return this.toArrayLike(Array,$,Y)};var x=function($,Y){return $.allocUnsafe?$.allocUnsafe(Y):new $(Y)};C.prototype.toArrayLike=function($,Y,W){this._strip();var Z=this.byteLength(),K=W||Math.max(1,Z);Q(Z<=K,"byte array longer than desired length"),Q(K>0,"Requested array length <= 0");var J=x($,K),j=Y==="le"?"LE":"BE";return this["_toArrayLike"+j](J,Z),J},C.prototype._toArrayLikeLE=function($,Y){for(var W=0,Z=0,K=0,J=0;K<this.length;K++){var j=this.words[K]<<J|Z;$[W++]=j&255,W<$.length&&($[W++]=j>>8&255),W<$.length&&($[W++]=j>>16&255),J===6?(W<$.length&&($[W++]=j>>24&255),Z=0,J=0):(Z=j>>>24,J+=2)}if(W<$.length)for($[W++]=Z;W<$.length;)$[W++]=0},C.prototype._toArrayLikeBE=function($,Y){for(var W=$.length-1,Z=0,K=0,J=0;K<this.length;K++){var j=this.words[K]<<J|Z;$[W--]=j&255,W>=0&&($[W--]=j>>8&255),W>=0&&($[W--]=j>>16&255),J===6?(W>=0&&($[W--]=j>>24&255),Z=0,J=0):(Z=j>>>24,J+=2)}if(W>=0)for($[W--]=Z;W>=0;)$[W--]=0},Math.clz32?C.prototype._countBits=function($){return 32-Math.clz32($)}:C.prototype._countBits=function($){var Y=$,W=0;return Y>=4096&&(W+=13,Y>>>=13),Y>=64&&(W+=7,Y>>>=7),Y>=8&&(W+=4,Y>>>=4),Y>=2&&(W+=2,Y>>>=2),W+Y},C.prototype._zeroBits=function($){if($===0)return 26;var Y=$,W=0;return(Y&8191)===0&&(W+=13,Y>>>=13),(Y&127)===0&&(W+=7,Y>>>=7),(Y&15)===0&&(W+=4,Y>>>=4),(Y&3)===0&&(W+=2,Y>>>=2),(Y&1)===0&&W++,W},C.prototype.bitLength=function(){var $=this.words[this.length-1],Y=this._countBits($);return(this.length-1)*26+Y};function w($){for(var Y=new Array($.bitLength()),W=0;W<Y.length;W++){var Z=W/26|0,K=W%26;Y[W]=$.words[Z]>>>K&1}return Y}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var $=0,Y=0;Y<this.length;Y++){var W=this._zeroBits(this.words[Y]);if($+=W,W!==26)break}return $},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function($){return this.negative!==0?this.abs().inotn($).iaddn(1):this.clone()},C.prototype.fromTwos=function($){return this.testn($-1)?this.notn($).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function($){for(;this.length<$.length;)this.words[this.length++]=0;for(var Y=0;Y<$.length;Y++)this.words[Y]=this.words[Y]|$.words[Y];return this._strip()},C.prototype.ior=function($){return Q((this.negative|$.negative)===0),this.iuor($)},C.prototype.or=function($){return this.length>$.length?this.clone().ior($):$.clone().ior(this)},C.prototype.uor=function($){return this.length>$.length?this.clone().iuor($):$.clone().iuor(this)},C.prototype.iuand=function($){var Y;this.length>$.length?Y=$:Y=this;for(var W=0;W<Y.length;W++)this.words[W]=this.words[W]&$.words[W];return this.length=Y.length,this._strip()},C.prototype.iand=function($){return Q((this.negative|$.negative)===0),this.iuand($)},C.prototype.and=function($){return this.length>$.length?this.clone().iand($):$.clone().iand(this)},C.prototype.uand=function($){return this.length>$.length?this.clone().iuand($):$.clone().iuand(this)},C.prototype.iuxor=function($){var Y,W;this.length>$.length?(Y=this,W=$):(Y=$,W=this);for(var Z=0;Z<W.length;Z++)this.words[Z]=Y.words[Z]^W.words[Z];if(this!==Y)for(;Z<Y.length;Z++)this.words[Z]=Y.words[Z];return this.length=Y.length,this._strip()},C.prototype.ixor=function($){return Q((this.negative|$.negative)===0),this.iuxor($)},C.prototype.xor=function($){return this.length>$.length?this.clone().ixor($):$.clone().ixor(this)},C.prototype.uxor=function($){return this.length>$.length?this.clone().iuxor($):$.clone().iuxor(this)},C.prototype.inotn=function($){Q(typeof $=="number"&&$>=0);var Y=Math.ceil($/26)|0,W=$%26;this._expand(Y),W>0&&Y--;for(var Z=0;Z<Y;Z++)this.words[Z]=~this.words[Z]&67108863;return W>0&&(this.words[Z]=~this.words[Z]&67108863>>26-W),this._strip()},C.prototype.notn=function($){return this.clone().inotn($)},C.prototype.setn=function($,Y){Q(typeof $=="number"&&$>=0);var W=$/26|0,Z=$%26;return this._expand(W+1),Y?this.words[W]=this.words[W]|1<<Z:this.words[W]=this.words[W]&~(1<<Z),this._strip()},C.prototype.iadd=function($){var Y;if(this.negative!==0&&$.negative===0)return this.negative=0,Y=this.isub($),this.negative^=1,this._normSign();if(this.negative===0&&$.negative!==0)return $.negative=0,Y=this.isub($),$.negative=1,Y._normSign();var W,Z;this.length>$.length?(W=this,Z=$):(W=$,Z=this);for(var K=0,J=0;J<Z.length;J++)Y=(W.words[J]|0)+(Z.words[J]|0)+K,this.words[J]=Y&67108863,K=Y>>>26;for(;K!==0&&J<W.length;J++)Y=(W.words[J]|0)+K,this.words[J]=Y&67108863,K=Y>>>26;if(this.length=W.length,K!==0)this.words[this.length]=K,this.length++;else if(W!==this)for(;J<W.length;J++)this.words[J]=W.words[J];return this},C.prototype.add=function($){var Y;return $.negative!==0&&this.negative===0?($.negative=0,Y=this.sub($),$.negative^=1,Y):$.negative===0&&this.negative!==0?(this.negative=0,Y=$.sub(this),this.negative=1,Y):this.length>$.length?this.clone().iadd($):$.clone().iadd(this)},C.prototype.isub=function($){if($.negative!==0){$.negative=0;var Y=this.iadd($);return $.negative=1,Y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd($),this.negative=1,this._normSign();var W=this.cmp($);if(W===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,K;W>0?(Z=this,K=$):(Z=$,K=this);for(var J=0,j=0;j<K.length;j++)Y=(Z.words[j]|0)-(K.words[j]|0)+J,J=Y>>26,this.words[j]=Y&67108863;for(;J!==0&&j<Z.length;j++)Y=(Z.words[j]|0)+J,J=Y>>26,this.words[j]=Y&67108863;if(J===0&&j<Z.length&&Z!==this)for(;j<Z.length;j++)this.words[j]=Z.words[j];return this.length=Math.max(this.length,j),Z!==this&&(this.negative=1),this._strip()},C.prototype.sub=function($){return this.clone().isub($)};function M($,Y,W){W.negative=Y.negative^$.negative;var Z=$.length+Y.length|0;W.length=Z,Z=Z-1|0;var K=$.words[0]|0,J=Y.words[0]|0,j=K*J,A=j&67108863,E=j/67108864|0;W.words[0]=A;for(var _=1;_<Z;_++){for(var s=E>>>26,r=E&67108863,O0=Math.min(_,Y.length-1),o=Math.max(0,_-$.length+1);o<=O0;o++){var d=_-o|0;K=$.words[d]|0,J=Y.words[o]|0,j=K*J+r,s+=j/67108864|0,r=j&67108863}W.words[_]=r|0,E=s|0}return E!==0?W.words[_]=E|0:W.length--,W._strip()}var y=function($,Y,W){var Z=$.words,K=Y.words,J=W.words,j=0,A,E,_,s=Z[0]|0,r=s&8191,O0=s>>>13,o=Z[1]|0,d=o&8191,f=o>>>13,U0=Z[2]|0,X0=U0&8191,Y0=U0>>>13,g=Z[3]|0,S=g&8191,p=g>>>13,e=Z[4]|0,J0=e&8191,t=e>>>13,y0=Z[5]|0,C0=y0&8191,W0=y0>>>13,_0=Z[6]|0,P0=_0&8191,Q0=_0>>>13,d0=Z[7]|0,D=d0&8191,v=d0>>>13,b=Z[8]|0,l=b&8191,u=b>>>13,F0=Z[9]|0,$0=F0&8191,z0=F0>>>13,b0=K[0]|0,V0=b0&8191,H0=b0>>>13,g0=K[1]|0,N0=g0&8191,L0=g0>>>13,K2=K[2]|0,D0=K2&8191,T0=K2>>>13,l0=K[3]|0,k0=l0&8191,B0=l0>>>13,j2=K[4]|0,R0=j2&8191,q0=j2>>>13,W2=K[5]|0,I0=W2&8191,E0=W2>>>13,Z2=K[6]|0,x0=Z2&8191,S0=Z2>>>13,Q2=K[7]|0,v0=Q2&8191,A0=Q2>>>13,z2=K[8]|0,M0=z2&8191,w0=z2>>>13,C2=K[9]|0,m0=C2&8191,p0=C2>>>13;W.negative=$.negative^Y.negative,W.length=19,A=Math.imul(r,V0),E=Math.imul(r,H0),E=E+Math.imul(O0,V0)|0,_=Math.imul(O0,H0);var o0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(o0>>>26)|0,o0&=67108863,A=Math.imul(d,V0),E=Math.imul(d,H0),E=E+Math.imul(f,V0)|0,_=Math.imul(f,H0),A=A+Math.imul(r,N0)|0,E=E+Math.imul(r,L0)|0,E=E+Math.imul(O0,N0)|0,_=_+Math.imul(O0,L0)|0;var u0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(u0>>>26)|0,u0&=67108863,A=Math.imul(X0,V0),E=Math.imul(X0,H0),E=E+Math.imul(Y0,V0)|0,_=Math.imul(Y0,H0),A=A+Math.imul(d,N0)|0,E=E+Math.imul(d,L0)|0,E=E+Math.imul(f,N0)|0,_=_+Math.imul(f,L0)|0,A=A+Math.imul(r,D0)|0,E=E+Math.imul(r,T0)|0,E=E+Math.imul(O0,D0)|0,_=_+Math.imul(O0,T0)|0;var s0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(s0>>>26)|0,s0&=67108863,A=Math.imul(S,V0),E=Math.imul(S,H0),E=E+Math.imul(p,V0)|0,_=Math.imul(p,H0),A=A+Math.imul(X0,N0)|0,E=E+Math.imul(X0,L0)|0,E=E+Math.imul(Y0,N0)|0,_=_+Math.imul(Y0,L0)|0,A=A+Math.imul(d,D0)|0,E=E+Math.imul(d,T0)|0,E=E+Math.imul(f,D0)|0,_=_+Math.imul(f,T0)|0,A=A+Math.imul(r,k0)|0,E=E+Math.imul(r,B0)|0,E=E+Math.imul(O0,k0)|0,_=_+Math.imul(O0,B0)|0;var f0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(f0>>>26)|0,f0&=67108863,A=Math.imul(J0,V0),E=Math.imul(J0,H0),E=E+Math.imul(t,V0)|0,_=Math.imul(t,H0),A=A+Math.imul(S,N0)|0,E=E+Math.imul(S,L0)|0,E=E+Math.imul(p,N0)|0,_=_+Math.imul(p,L0)|0,A=A+Math.imul(X0,D0)|0,E=E+Math.imul(X0,T0)|0,E=E+Math.imul(Y0,D0)|0,_=_+Math.imul(Y0,T0)|0,A=A+Math.imul(d,k0)|0,E=E+Math.imul(d,B0)|0,E=E+Math.imul(f,k0)|0,_=_+Math.imul(f,B0)|0,A=A+Math.imul(r,R0)|0,E=E+Math.imul(r,q0)|0,E=E+Math.imul(O0,R0)|0,_=_+Math.imul(O0,q0)|0;var n0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(n0>>>26)|0,n0&=67108863,A=Math.imul(C0,V0),E=Math.imul(C0,H0),E=E+Math.imul(W0,V0)|0,_=Math.imul(W0,H0),A=A+Math.imul(J0,N0)|0,E=E+Math.imul(J0,L0)|0,E=E+Math.imul(t,N0)|0,_=_+Math.imul(t,L0)|0,A=A+Math.imul(S,D0)|0,E=E+Math.imul(S,T0)|0,E=E+Math.imul(p,D0)|0,_=_+Math.imul(p,T0)|0,A=A+Math.imul(X0,k0)|0,E=E+Math.imul(X0,B0)|0,E=E+Math.imul(Y0,k0)|0,_=_+Math.imul(Y0,B0)|0,A=A+Math.imul(d,R0)|0,E=E+Math.imul(d,q0)|0,E=E+Math.imul(f,R0)|0,_=_+Math.imul(f,q0)|0,A=A+Math.imul(r,I0)|0,E=E+Math.imul(r,E0)|0,E=E+Math.imul(O0,I0)|0,_=_+Math.imul(O0,E0)|0;var a0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(a0>>>26)|0,a0&=67108863,A=Math.imul(P0,V0),E=Math.imul(P0,H0),E=E+Math.imul(Q0,V0)|0,_=Math.imul(Q0,H0),A=A+Math.imul(C0,N0)|0,E=E+Math.imul(C0,L0)|0,E=E+Math.imul(W0,N0)|0,_=_+Math.imul(W0,L0)|0,A=A+Math.imul(J0,D0)|0,E=E+Math.imul(J0,T0)|0,E=E+Math.imul(t,D0)|0,_=_+Math.imul(t,T0)|0,A=A+Math.imul(S,k0)|0,E=E+Math.imul(S,B0)|0,E=E+Math.imul(p,k0)|0,_=_+Math.imul(p,B0)|0,A=A+Math.imul(X0,R0)|0,E=E+Math.imul(X0,q0)|0,E=E+Math.imul(Y0,R0)|0,_=_+Math.imul(Y0,q0)|0,A=A+Math.imul(d,I0)|0,E=E+Math.imul(d,E0)|0,E=E+Math.imul(f,I0)|0,_=_+Math.imul(f,E0)|0,A=A+Math.imul(r,x0)|0,E=E+Math.imul(r,S0)|0,E=E+Math.imul(O0,x0)|0,_=_+Math.imul(O0,S0)|0;var r0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(r0>>>26)|0,r0&=67108863,A=Math.imul(D,V0),E=Math.imul(D,H0),E=E+Math.imul(v,V0)|0,_=Math.imul(v,H0),A=A+Math.imul(P0,N0)|0,E=E+Math.imul(P0,L0)|0,E=E+Math.imul(Q0,N0)|0,_=_+Math.imul(Q0,L0)|0,A=A+Math.imul(C0,D0)|0,E=E+Math.imul(C0,T0)|0,E=E+Math.imul(W0,D0)|0,_=_+Math.imul(W0,T0)|0,A=A+Math.imul(J0,k0)|0,E=E+Math.imul(J0,B0)|0,E=E+Math.imul(t,k0)|0,_=_+Math.imul(t,B0)|0,A=A+Math.imul(S,R0)|0,E=E+Math.imul(S,q0)|0,E=E+Math.imul(p,R0)|0,_=_+Math.imul(p,q0)|0,A=A+Math.imul(X0,I0)|0,E=E+Math.imul(X0,E0)|0,E=E+Math.imul(Y0,I0)|0,_=_+Math.imul(Y0,E0)|0,A=A+Math.imul(d,x0)|0,E=E+Math.imul(d,S0)|0,E=E+Math.imul(f,x0)|0,_=_+Math.imul(f,S0)|0,A=A+Math.imul(r,v0)|0,E=E+Math.imul(r,A0)|0,E=E+Math.imul(O0,v0)|0,_=_+Math.imul(O0,A0)|0;var i0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(i0>>>26)|0,i0&=67108863,A=Math.imul(l,V0),E=Math.imul(l,H0),E=E+Math.imul(u,V0)|0,_=Math.imul(u,H0),A=A+Math.imul(D,N0)|0,E=E+Math.imul(D,L0)|0,E=E+Math.imul(v,N0)|0,_=_+Math.imul(v,L0)|0,A=A+Math.imul(P0,D0)|0,E=E+Math.imul(P0,T0)|0,E=E+Math.imul(Q0,D0)|0,_=_+Math.imul(Q0,T0)|0,A=A+Math.imul(C0,k0)|0,E=E+Math.imul(C0,B0)|0,E=E+Math.imul(W0,k0)|0,_=_+Math.imul(W0,B0)|0,A=A+Math.imul(J0,R0)|0,E=E+Math.imul(J0,q0)|0,E=E+Math.imul(t,R0)|0,_=_+Math.imul(t,q0)|0,A=A+Math.imul(S,I0)|0,E=E+Math.imul(S,E0)|0,E=E+Math.imul(p,I0)|0,_=_+Math.imul(p,E0)|0,A=A+Math.imul(X0,x0)|0,E=E+Math.imul(X0,S0)|0,E=E+Math.imul(Y0,x0)|0,_=_+Math.imul(Y0,S0)|0,A=A+Math.imul(d,v0)|0,E=E+Math.imul(d,A0)|0,E=E+Math.imul(f,v0)|0,_=_+Math.imul(f,A0)|0,A=A+Math.imul(r,M0)|0,E=E+Math.imul(r,w0)|0,E=E+Math.imul(O0,M0)|0,_=_+Math.imul(O0,w0)|0;var t0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(t0>>>26)|0,t0&=67108863,A=Math.imul($0,V0),E=Math.imul($0,H0),E=E+Math.imul(z0,V0)|0,_=Math.imul(z0,H0),A=A+Math.imul(l,N0)|0,E=E+Math.imul(l,L0)|0,E=E+Math.imul(u,N0)|0,_=_+Math.imul(u,L0)|0,A=A+Math.imul(D,D0)|0,E=E+Math.imul(D,T0)|0,E=E+Math.imul(v,D0)|0,_=_+Math.imul(v,T0)|0,A=A+Math.imul(P0,k0)|0,E=E+Math.imul(P0,B0)|0,E=E+Math.imul(Q0,k0)|0,_=_+Math.imul(Q0,B0)|0,A=A+Math.imul(C0,R0)|0,E=E+Math.imul(C0,q0)|0,E=E+Math.imul(W0,R0)|0,_=_+Math.imul(W0,q0)|0,A=A+Math.imul(J0,I0)|0,E=E+Math.imul(J0,E0)|0,E=E+Math.imul(t,I0)|0,_=_+Math.imul(t,E0)|0,A=A+Math.imul(S,x0)|0,E=E+Math.imul(S,S0)|0,E=E+Math.imul(p,x0)|0,_=_+Math.imul(p,S0)|0,A=A+Math.imul(X0,v0)|0,E=E+Math.imul(X0,A0)|0,E=E+Math.imul(Y0,v0)|0,_=_+Math.imul(Y0,A0)|0,A=A+Math.imul(d,M0)|0,E=E+Math.imul(d,w0)|0,E=E+Math.imul(f,M0)|0,_=_+Math.imul(f,w0)|0,A=A+Math.imul(r,m0)|0,E=E+Math.imul(r,p0)|0,E=E+Math.imul(O0,m0)|0,_=_+Math.imul(O0,p0)|0;var e0=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(e0>>>26)|0,e0&=67108863,A=Math.imul($0,N0),E=Math.imul($0,L0),E=E+Math.imul(z0,N0)|0,_=Math.imul(z0,L0),A=A+Math.imul(l,D0)|0,E=E+Math.imul(l,T0)|0,E=E+Math.imul(u,D0)|0,_=_+Math.imul(u,T0)|0,A=A+Math.imul(D,k0)|0,E=E+Math.imul(D,B0)|0,E=E+Math.imul(v,k0)|0,_=_+Math.imul(v,B0)|0,A=A+Math.imul(P0,R0)|0,E=E+Math.imul(P0,q0)|0,E=E+Math.imul(Q0,R0)|0,_=_+Math.imul(Q0,q0)|0,A=A+Math.imul(C0,I0)|0,E=E+Math.imul(C0,E0)|0,E=E+Math.imul(W0,I0)|0,_=_+Math.imul(W0,E0)|0,A=A+Math.imul(J0,x0)|0,E=E+Math.imul(J0,S0)|0,E=E+Math.imul(t,x0)|0,_=_+Math.imul(t,S0)|0,A=A+Math.imul(S,v0)|0,E=E+Math.imul(S,A0)|0,E=E+Math.imul(p,v0)|0,_=_+Math.imul(p,A0)|0,A=A+Math.imul(X0,M0)|0,E=E+Math.imul(X0,w0)|0,E=E+Math.imul(Y0,M0)|0,_=_+Math.imul(Y0,w0)|0,A=A+Math.imul(d,m0)|0,E=E+Math.imul(d,p0)|0,E=E+Math.imul(f,m0)|0,_=_+Math.imul(f,p0)|0;var X2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(X2>>>26)|0,X2&=67108863,A=Math.imul($0,D0),E=Math.imul($0,T0),E=E+Math.imul(z0,D0)|0,_=Math.imul(z0,T0),A=A+Math.imul(l,k0)|0,E=E+Math.imul(l,B0)|0,E=E+Math.imul(u,k0)|0,_=_+Math.imul(u,B0)|0,A=A+Math.imul(D,R0)|0,E=E+Math.imul(D,q0)|0,E=E+Math.imul(v,R0)|0,_=_+Math.imul(v,q0)|0,A=A+Math.imul(P0,I0)|0,E=E+Math.imul(P0,E0)|0,E=E+Math.imul(Q0,I0)|0,_=_+Math.imul(Q0,E0)|0,A=A+Math.imul(C0,x0)|0,E=E+Math.imul(C0,S0)|0,E=E+Math.imul(W0,x0)|0,_=_+Math.imul(W0,S0)|0,A=A+Math.imul(J0,v0)|0,E=E+Math.imul(J0,A0)|0,E=E+Math.imul(t,v0)|0,_=_+Math.imul(t,A0)|0,A=A+Math.imul(S,M0)|0,E=E+Math.imul(S,w0)|0,E=E+Math.imul(p,M0)|0,_=_+Math.imul(p,w0)|0,A=A+Math.imul(X0,m0)|0,E=E+Math.imul(X0,p0)|0,E=E+Math.imul(Y0,m0)|0,_=_+Math.imul(Y0,p0)|0;var J2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(J2>>>26)|0,J2&=67108863,A=Math.imul($0,k0),E=Math.imul($0,B0),E=E+Math.imul(z0,k0)|0,_=Math.imul(z0,B0),A=A+Math.imul(l,R0)|0,E=E+Math.imul(l,q0)|0,E=E+Math.imul(u,R0)|0,_=_+Math.imul(u,q0)|0,A=A+Math.imul(D,I0)|0,E=E+Math.imul(D,E0)|0,E=E+Math.imul(v,I0)|0,_=_+Math.imul(v,E0)|0,A=A+Math.imul(P0,x0)|0,E=E+Math.imul(P0,S0)|0,E=E+Math.imul(Q0,x0)|0,_=_+Math.imul(Q0,S0)|0,A=A+Math.imul(C0,v0)|0,E=E+Math.imul(C0,A0)|0,E=E+Math.imul(W0,v0)|0,_=_+Math.imul(W0,A0)|0,A=A+Math.imul(J0,M0)|0,E=E+Math.imul(J0,w0)|0,E=E+Math.imul(t,M0)|0,_=_+Math.imul(t,w0)|0,A=A+Math.imul(S,m0)|0,E=E+Math.imul(S,p0)|0,E=E+Math.imul(p,m0)|0,_=_+Math.imul(p,p0)|0;var O2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(O2>>>26)|0,O2&=67108863,A=Math.imul($0,R0),E=Math.imul($0,q0),E=E+Math.imul(z0,R0)|0,_=Math.imul(z0,q0),A=A+Math.imul(l,I0)|0,E=E+Math.imul(l,E0)|0,E=E+Math.imul(u,I0)|0,_=_+Math.imul(u,E0)|0,A=A+Math.imul(D,x0)|0,E=E+Math.imul(D,S0)|0,E=E+Math.imul(v,x0)|0,_=_+Math.imul(v,S0)|0,A=A+Math.imul(P0,v0)|0,E=E+Math.imul(P0,A0)|0,E=E+Math.imul(Q0,v0)|0,_=_+Math.imul(Q0,A0)|0,A=A+Math.imul(C0,M0)|0,E=E+Math.imul(C0,w0)|0,E=E+Math.imul(W0,M0)|0,_=_+Math.imul(W0,w0)|0,A=A+Math.imul(J0,m0)|0,E=E+Math.imul(J0,p0)|0,E=E+Math.imul(t,m0)|0,_=_+Math.imul(t,p0)|0;var $2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+($2>>>26)|0,$2&=67108863,A=Math.imul($0,I0),E=Math.imul($0,E0),E=E+Math.imul(z0,I0)|0,_=Math.imul(z0,E0),A=A+Math.imul(l,x0)|0,E=E+Math.imul(l,S0)|0,E=E+Math.imul(u,x0)|0,_=_+Math.imul(u,S0)|0,A=A+Math.imul(D,v0)|0,E=E+Math.imul(D,A0)|0,E=E+Math.imul(v,v0)|0,_=_+Math.imul(v,A0)|0,A=A+Math.imul(P0,M0)|0,E=E+Math.imul(P0,w0)|0,E=E+Math.imul(Q0,M0)|0,_=_+Math.imul(Q0,w0)|0,A=A+Math.imul(C0,m0)|0,E=E+Math.imul(C0,p0)|0,E=E+Math.imul(W0,m0)|0,_=_+Math.imul(W0,p0)|0;var G2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(G2>>>26)|0,G2&=67108863,A=Math.imul($0,x0),E=Math.imul($0,S0),E=E+Math.imul(z0,x0)|0,_=Math.imul(z0,S0),A=A+Math.imul(l,v0)|0,E=E+Math.imul(l,A0)|0,E=E+Math.imul(u,v0)|0,_=_+Math.imul(u,A0)|0,A=A+Math.imul(D,M0)|0,E=E+Math.imul(D,w0)|0,E=E+Math.imul(v,M0)|0,_=_+Math.imul(v,w0)|0,A=A+Math.imul(P0,m0)|0,E=E+Math.imul(P0,p0)|0,E=E+Math.imul(Q0,m0)|0,_=_+Math.imul(Q0,p0)|0;var Y2=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,A=Math.imul($0,v0),E=Math.imul($0,A0),E=E+Math.imul(z0,v0)|0,_=Math.imul(z0,A0),A=A+Math.imul(l,M0)|0,E=E+Math.imul(l,w0)|0,E=E+Math.imul(u,M0)|0,_=_+Math.imul(u,w0)|0,A=A+Math.imul(D,m0)|0,E=E+Math.imul(D,p0)|0,E=E+Math.imul(v,m0)|0,_=_+Math.imul(v,p0)|0;var I1=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(I1>>>26)|0,I1&=67108863,A=Math.imul($0,M0),E=Math.imul($0,w0),E=E+Math.imul(z0,M0)|0,_=Math.imul(z0,w0),A=A+Math.imul(l,m0)|0,E=E+Math.imul(l,p0)|0,E=E+Math.imul(u,m0)|0,_=_+Math.imul(u,p0)|0;var E1=(j+A|0)+((E&8191)<<13)|0;j=(_+(E>>>13)|0)+(E1>>>26)|0,E1&=67108863,A=Math.imul($0,m0),E=Math.imul($0,p0),E=E+Math.imul(z0,m0)|0,_=Math.imul(z0,p0);var x1=(j+A|0)+((E&8191)<<13)|0;return j=(_+(E>>>13)|0)+(x1>>>26)|0,x1&=67108863,J[0]=o0,J[1]=u0,J[2]=s0,J[3]=f0,J[4]=n0,J[5]=a0,J[6]=r0,J[7]=i0,J[8]=t0,J[9]=e0,J[10]=X2,J[11]=J2,J[12]=O2,J[13]=$2,J[14]=G2,J[15]=Y2,J[16]=I1,J[17]=E1,J[18]=x1,j!==0&&(J[19]=j,W.length++),W};Math.imul||(y=M);function m($,Y,W){W.negative=Y.negative^$.negative,W.length=$.length+Y.length;for(var Z=0,K=0,J=0;J<W.length-1;J++){var j=K;K=0;for(var A=Z&67108863,E=Math.min(J,Y.length-1),_=Math.max(0,J-$.length+1);_<=E;_++){var s=J-_,r=$.words[s]|0,O0=Y.words[_]|0,o=r*O0,d=o&67108863;j=j+(o/67108864|0)|0,d=d+A|0,A=d&67108863,j=j+(d>>>26)|0,K+=j>>>26,j&=67108863}W.words[J]=A,Z=j,j=K}return Z!==0?W.words[J]=Z:W.length--,W._strip()}function c($,Y,W){return m($,Y,W)}C.prototype.mulTo=function($,Y){var W,Z=this.length+$.length;return this.length===10&&$.length===10?W=y(this,$,Y):Z<63?W=M(this,$,Y):Z<1024?W=m(this,$,Y):W=c(this,$,Y),W};function h($,Y){this.x=$,this.y=Y}h.prototype.makeRBT=function($){for(var Y=new Array($),W=C.prototype._countBits($)-1,Z=0;Z<$;Z++)Y[Z]=this.revBin(Z,W,$);return Y},h.prototype.revBin=function($,Y,W){if($===0||$===W-1)return $;for(var Z=0,K=0;K<Y;K++)Z|=($&1)<<Y-K-1,$>>=1;return Z},h.prototype.permute=function($,Y,W,Z,K,J){for(var j=0;j<J;j++)Z[j]=Y[$[j]],K[j]=W[$[j]]},h.prototype.transform=function($,Y,W,Z,K,J){this.permute(J,$,Y,W,Z,K);for(var j=1;j<K;j<<=1)for(var A=j<<1,E=Math.cos(2*Math.PI/A),_=Math.sin(2*Math.PI/A),s=0;s<K;s+=A)for(var r=E,O0=_,o=0;o<j;o++){var d=W[s+o],f=Z[s+o],U0=W[s+o+j],X0=Z[s+o+j],Y0=r*U0-O0*X0;X0=r*X0+O0*U0,U0=Y0,W[s+o]=d+U0,Z[s+o]=f+X0,W[s+o+j]=d-U0,Z[s+o+j]=f-X0,o!==A&&(Y0=E*r-_*O0,O0=E*O0+_*r,r=Y0)}},h.prototype.guessLen13b=function($,Y){var W=Math.max(Y,$)|1,Z=W&1,K=0;for(W=W/2|0;W;W=W>>>1)K++;return 1<<K+1+Z},h.prototype.conjugate=function($,Y,W){if(!(W<=1))for(var Z=0;Z<W/2;Z++){var K=$[Z];$[Z]=$[W-Z-1],$[W-Z-1]=K,K=Y[Z],Y[Z]=-Y[W-Z-1],Y[W-Z-1]=-K}},h.prototype.normalize13b=function($,Y){for(var W=0,Z=0;Z<Y/2;Z++){var K=Math.round($[2*Z+1]/Y)*8192+Math.round($[2*Z]/Y)+W;$[Z]=K&67108863,K<67108864?W=0:W=K/67108864|0}return $},h.prototype.convert13b=function($,Y,W,Z){for(var K=0,J=0;J<Y;J++)K=K+($[J]|0),W[2*J]=K&8191,K=K>>>13,W[2*J+1]=K&8191,K=K>>>13;for(J=2*Y;J<Z;++J)W[J]=0;Q(K===0),Q((K&-8192)===0)},h.prototype.stub=function($){for(var Y=new Array($),W=0;W<$;W++)Y[W]=0;return Y},h.prototype.mulp=function($,Y,W){var Z=2*this.guessLen13b($.length,Y.length),K=this.makeRBT(Z),J=this.stub(Z),j=new Array(Z),A=new Array(Z),E=new Array(Z),_=new Array(Z),s=new Array(Z),r=new Array(Z),O0=W.words;O0.length=Z,this.convert13b($.words,$.length,j,Z),this.convert13b(Y.words,Y.length,_,Z),this.transform(j,J,A,E,Z,K),this.transform(_,J,s,r,Z,K);for(var o=0;o<Z;o++){var d=A[o]*s[o]-E[o]*r[o];E[o]=A[o]*r[o]+E[o]*s[o],A[o]=d}return this.conjugate(A,E,Z),this.transform(A,E,O0,J,Z,K),this.conjugate(O0,J,Z),this.normalize13b(O0,Z),W.negative=$.negative^Y.negative,W.length=$.length+Y.length,W._strip()},C.prototype.mul=function($){var Y=new C(null);return Y.words=new Array(this.length+$.length),this.mulTo($,Y)},C.prototype.mulf=function($){var Y=new C(null);return Y.words=new Array(this.length+$.length),c(this,$,Y)},C.prototype.imul=function($){return this.clone().mulTo($,this)},C.prototype.imuln=function($){var Y=$<0;Y&&($=-$),Q(typeof $=="number"),Q($<67108864);for(var W=0,Z=0;Z<this.length;Z++){var K=(this.words[Z]|0)*$,J=(K&67108863)+(W&67108863);W>>=26,W+=K/67108864|0,W+=J>>>26,this.words[Z]=J&67108863}return W!==0&&(this.words[Z]=W,this.length++),Y?this.ineg():this},C.prototype.muln=function($){return this.clone().imuln($)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function($){var Y=w($);if(Y.length===0)return new C(1);for(var W=this,Z=0;Z<Y.length&&Y[Z]===0;Z++,W=W.sqr());if(++Z<Y.length)for(var K=W.sqr();Z<Y.length;Z++,K=K.sqr())Y[Z]!==0&&(W=W.mul(K));return W},C.prototype.iushln=function($){Q(typeof $=="number"&&$>=0);var Y=$%26,W=($-Y)/26,Z=67108863>>>26-Y<<26-Y,K;if(Y!==0){var J=0;for(K=0;K<this.length;K++){var j=this.words[K]&Z,A=(this.words[K]|0)-j<<Y;this.words[K]=A|J,J=j>>>26-Y}J&&(this.words[K]=J,this.length++)}if(W!==0){for(K=this.length-1;K>=0;K--)this.words[K+W]=this.words[K];for(K=0;K<W;K++)this.words[K]=0;this.length+=W}return this._strip()},C.prototype.ishln=function($){return Q(this.negative===0),this.iushln($)},C.prototype.iushrn=function($,Y,W){Q(typeof $=="number"&&$>=0);var Z;Y?Z=(Y-Y%26)/26:Z=0;var K=$%26,J=Math.min(($-K)/26,this.length),j=67108863^67108863>>>K<<K,A=W;if(Z-=J,Z=Math.max(0,Z),A){for(var E=0;E<J;E++)A.words[E]=this.words[E];A.length=J}if(J!==0)if(this.length>J)for(this.length-=J,E=0;E<this.length;E++)this.words[E]=this.words[E+J];else this.words[0]=0,this.length=1;var _=0;for(E=this.length-1;E>=0&&(_!==0||E>=Z);E--){var s=this.words[E]|0;this.words[E]=_<<26-K|s>>>K,_=s&j}return A&&_!==0&&(A.words[A.length++]=_),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},C.prototype.ishrn=function($,Y,W){return Q(this.negative===0),this.iushrn($,Y,W)},C.prototype.shln=function($){return this.clone().ishln($)},C.prototype.ushln=function($){return this.clone().iushln($)},C.prototype.shrn=function($){return this.clone().ishrn($)},C.prototype.ushrn=function($){return this.clone().iushrn($)},C.prototype.testn=function($){Q(typeof $=="number"&&$>=0);var Y=$%26,W=($-Y)/26,Z=1<<Y;if(this.length<=W)return!1;var K=this.words[W];return!!(K&Z)},C.prototype.imaskn=function($){Q(typeof $=="number"&&$>=0);var Y=$%26,W=($-Y)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=W)return this;if(Y!==0&&W++,this.length=Math.min(W,this.length),Y!==0){var Z=67108863^67108863>>>Y<<Y;this.words[this.length-1]&=Z}return this._strip()},C.prototype.maskn=function($){return this.clone().imaskn($)},C.prototype.iaddn=function($){return Q(typeof $=="number"),Q($<67108864),$<0?this.isubn(-$):this.negative!==0?this.length===1&&(this.words[0]|0)<=$?(this.words[0]=$-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn($),this.negative=1,this):this._iaddn($)},C.prototype._iaddn=function($){this.words[0]+=$;for(var Y=0;Y<this.length&&this.words[Y]>=67108864;Y++)this.words[Y]-=67108864,Y===this.length-1?this.words[Y+1]=1:this.words[Y+1]++;return this.length=Math.max(this.length,Y+1),this},C.prototype.isubn=function($){if(Q(typeof $=="number"),Q($<67108864),$<0)return this.iaddn(-$);if(this.negative!==0)return this.negative=0,this.iaddn($),this.negative=1,this;if(this.words[0]-=$,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Y=0;Y<this.length&&this.words[Y]<0;Y++)this.words[Y]+=67108864,this.words[Y+1]-=1;return this._strip()},C.prototype.addn=function($){return this.clone().iaddn($)},C.prototype.subn=function($){return this.clone().isubn($)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function($,Y,W){var Z=$.length+W,K;this._expand(Z);var J,j=0;for(K=0;K<$.length;K++){J=(this.words[K+W]|0)+j;var A=($.words[K]|0)*Y;J-=A&67108863,j=(J>>26)-(A/67108864|0),this.words[K+W]=J&67108863}for(;K<this.length-W;K++)J=(this.words[K+W]|0)+j,j=J>>26,this.words[K+W]=J&67108863;if(j===0)return this._strip();for(Q(j===-1),j=0,K=0;K<this.length;K++)J=-(this.words[K]|0)+j,j=J>>26,this.words[K]=J&67108863;return this.negative=1,this._strip()},C.prototype._wordDiv=function($,Y){var W=this.length-$.length,Z=this.clone(),K=$,J=K.words[K.length-1]|0,j=this._countBits(J);W=26-j,W!==0&&(K=K.ushln(W),Z.iushln(W),J=K.words[K.length-1]|0);var A=Z.length-K.length,E;if(Y!=="mod"){E=new C(null),E.length=A+1,E.words=new Array(E.length);for(var _=0;_<E.length;_++)E.words[_]=0}var s=Z.clone()._ishlnsubmul(K,1,A);s.negative===0&&(Z=s,E&&(E.words[A]=1));for(var r=A-1;r>=0;r--){var O0=(Z.words[K.length+r]|0)*67108864+(Z.words[K.length+r-1]|0);for(O0=Math.min(O0/J|0,67108863),Z._ishlnsubmul(K,O0,r);Z.negative!==0;)O0--,Z.negative=0,Z._ishlnsubmul(K,1,r),Z.isZero()||(Z.negative^=1);E&&(E.words[r]=O0)}return E&&E._strip(),Z._strip(),Y!=="div"&&W!==0&&Z.iushrn(W),{div:E||null,mod:Z}},C.prototype.divmod=function($,Y,W){if(Q(!$.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var Z,K,J;return this.negative!==0&&$.negative===0?(J=this.neg().divmod($,Y),Y!=="mod"&&(Z=J.div.neg()),Y!=="div"&&(K=J.mod.neg(),W&&K.negative!==0&&K.iadd($)),{div:Z,mod:K}):this.negative===0&&$.negative!==0?(J=this.divmod($.neg(),Y),Y!=="mod"&&(Z=J.div.neg()),{div:Z,mod:J.mod}):(this.negative&$.negative)!==0?(J=this.neg().divmod($.neg(),Y),Y!=="div"&&(K=J.mod.neg(),W&&K.negative!==0&&K.isub($)),{div:J.div,mod:K}):$.length>this.length||this.cmp($)<0?{div:new C(0),mod:this}:$.length===1?Y==="div"?{div:this.divn($.words[0]),mod:null}:Y==="mod"?{div:null,mod:new C(this.modrn($.words[0]))}:{div:this.divn($.words[0]),mod:new C(this.modrn($.words[0]))}:this._wordDiv($,Y)},C.prototype.div=function($){return this.divmod($,"div",!1).div},C.prototype.mod=function($){return this.divmod($,"mod",!1).mod},C.prototype.umod=function($){return this.divmod($,"mod",!0).mod},C.prototype.divRound=function($){var Y=this.divmod($);if(Y.mod.isZero())return Y.div;var W=Y.div.negative!==0?Y.mod.isub($):Y.mod,Z=$.ushrn(1),K=$.andln(1),J=W.cmp(Z);return J<0||K===1&&J===0?Y.div:Y.div.negative!==0?Y.div.isubn(1):Y.div.iaddn(1)},C.prototype.modrn=function($){var Y=$<0;Y&&($=-$),Q($<=67108863);for(var W=67108864%$,Z=0,K=this.length-1;K>=0;K--)Z=(W*Z+(this.words[K]|0))%$;return Y?-Z:Z},C.prototype.modn=function($){return this.modrn($)},C.prototype.idivn=function($){var Y=$<0;Y&&($=-$),Q($<=67108863);for(var W=0,Z=this.length-1;Z>=0;Z--){var K=(this.words[Z]|0)+W*67108864;this.words[Z]=K/$|0,W=K%$}return this._strip(),Y?this.ineg():this},C.prototype.divn=function($){return this.clone().idivn($)},C.prototype.egcd=function($){Q($.negative===0),Q(!$.isZero());var Y=this,W=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new C(1),K=new C(0),J=new C(0),j=new C(1),A=0;Y.isEven()&&W.isEven();)Y.iushrn(1),W.iushrn(1),++A;for(var E=W.clone(),_=Y.clone();!Y.isZero();){for(var s=0,r=1;(Y.words[0]&r)===0&&s<26;++s,r<<=1);if(s>0)for(Y.iushrn(s);s-- >0;)(Z.isOdd()||K.isOdd())&&(Z.iadd(E),K.isub(_)),Z.iushrn(1),K.iushrn(1);for(var O0=0,o=1;(W.words[0]&o)===0&&O0<26;++O0,o<<=1);if(O0>0)for(W.iushrn(O0);O0-- >0;)(J.isOdd()||j.isOdd())&&(J.iadd(E),j.isub(_)),J.iushrn(1),j.iushrn(1);Y.cmp(W)>=0?(Y.isub(W),Z.isub(J),K.isub(j)):(W.isub(Y),J.isub(Z),j.isub(K))}return{a:J,b:j,gcd:W.iushln(A)}},C.prototype._invmp=function($){Q($.negative===0),Q(!$.isZero());var Y=this,W=$.clone();Y.negative!==0?Y=Y.umod($):Y=Y.clone();for(var Z=new C(1),K=new C(0),J=W.clone();Y.cmpn(1)>0&&W.cmpn(1)>0;){for(var j=0,A=1;(Y.words[0]&A)===0&&j<26;++j,A<<=1);if(j>0)for(Y.iushrn(j);j-- >0;)Z.isOdd()&&Z.iadd(J),Z.iushrn(1);for(var E=0,_=1;(W.words[0]&_)===0&&E<26;++E,_<<=1);if(E>0)for(W.iushrn(E);E-- >0;)K.isOdd()&&K.iadd(J),K.iushrn(1);Y.cmp(W)>=0?(Y.isub(W),Z.isub(K)):(W.isub(Y),K.isub(Z))}var s;return Y.cmpn(1)===0?s=Z:s=K,s.cmpn(0)<0&&s.iadd($),s},C.prototype.gcd=function($){if(this.isZero())return $.abs();if($.isZero())return this.abs();var Y=this.clone(),W=$.clone();Y.negative=0,W.negative=0;for(var Z=0;Y.isEven()&&W.isEven();Z++)Y.iushrn(1),W.iushrn(1);do{for(;Y.isEven();)Y.iushrn(1);for(;W.isEven();)W.iushrn(1);var K=Y.cmp(W);if(K<0){var J=Y;Y=W,W=J}else if(K===0||W.cmpn(1)===0)break;Y.isub(W)}while(!0);return W.iushln(Z)},C.prototype.invm=function($){return this.egcd($).a.umod($)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function($){return this.words[0]&$},C.prototype.bincn=function($){Q(typeof $=="number");var Y=$%26,W=($-Y)/26,Z=1<<Y;if(this.length<=W)return this._expand(W+1),this.words[W]|=Z,this;for(var K=Z,J=W;K!==0&&J<this.length;J++){var j=this.words[J]|0;j+=K,K=j>>>26,j&=67108863,this.words[J]=j}return K!==0&&(this.words[J]=K,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function($){var Y=$<0;if(this.negative!==0&&!Y)return-1;if(this.negative===0&&Y)return 1;this._strip();var W;if(this.length>1)W=1;else{Y&&($=-$),Q($<=67108863,"Number is too big");var Z=this.words[0]|0;W=Z===$?0:Z<$?-1:1}return this.negative!==0?-W|0:W},C.prototype.cmp=function($){if(this.negative!==0&&$.negative===0)return-1;if(this.negative===0&&$.negative!==0)return 1;var Y=this.ucmp($);return this.negative!==0?-Y|0:Y},C.prototype.ucmp=function($){if(this.length>$.length)return 1;if(this.length<$.length)return-1;for(var Y=0,W=this.length-1;W>=0;W--){var Z=this.words[W]|0,K=$.words[W]|0;if(Z!==K){Z<K?Y=-1:Z>K&&(Y=1);break}}return Y},C.prototype.gtn=function($){return this.cmpn($)===1},C.prototype.gt=function($){return this.cmp($)===1},C.prototype.gten=function($){return this.cmpn($)>=0},C.prototype.gte=function($){return this.cmp($)>=0},C.prototype.ltn=function($){return this.cmpn($)===-1},C.prototype.lt=function($){return this.cmp($)===-1},C.prototype.lten=function($){return this.cmpn($)<=0},C.prototype.lte=function($){return this.cmp($)<=0},C.prototype.eqn=function($){return this.cmpn($)===0},C.prototype.eq=function($){return this.cmp($)===0},C.red=function($){return new O($)},C.prototype.toRed=function($){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),$.convertTo(this)._forceRed($)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function($){return this.red=$,this},C.prototype.forceRed=function($){return Q(!this.red,"Already a number in reduction context"),this._forceRed($)},C.prototype.redAdd=function($){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,$)},C.prototype.redIAdd=function($){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,$)},C.prototype.redSub=function($){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,$)},C.prototype.redISub=function($){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,$)},C.prototype.redShl=function($){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,$)},C.prototype.redMul=function($){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.mul(this,$)},C.prototype.redIMul=function($){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,$),this.red.imul(this,$)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function($){return Q(this.red&&!$.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,$)};var a={k256:null,p224:null,p192:null,p25519:null};function i($,Y){this.name=$,this.p=new C(Y,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}i.prototype._tmp=function(){var $=new C(null);return $.words=new Array(Math.ceil(this.n/13)),$},i.prototype.ireduce=function($){var Y=$,W;do this.split(Y,this.tmp),Y=this.imulK(Y),Y=Y.iadd(this.tmp),W=Y.bitLength();while(W>this.n);var Z=W<this.n?-1:Y.ucmp(this.p);return Z===0?(Y.words[0]=0,Y.length=1):Z>0?Y.isub(this.p):Y.strip!==void 0?Y.strip():Y._strip(),Y},i.prototype.split=function($,Y){$.iushrn(this.n,0,Y)},i.prototype.imulK=function($){return $.imul(this.k)};function G0(){i.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(G0,i),G0.prototype.split=function($,Y){for(var W=4194303,Z=Math.min($.length,9),K=0;K<Z;K++)Y.words[K]=$.words[K];if(Y.length=Z,$.length<=9){$.words[0]=0,$.length=1;return}var J=$.words[9];for(Y.words[Y.length++]=J&W,K=10;K<$.length;K++){var j=$.words[K]|0;$.words[K-10]=(j&W)<<4|J>>>22,J=j}J>>>=22,$.words[K-10]=J,J===0&&$.length>10?$.length-=10:$.length-=9},G0.prototype.imulK=function($){$.words[$.length]=0,$.words[$.length+1]=0,$.length+=2;for(var Y=0,W=0;W<$.length;W++){var Z=$.words[W]|0;Y+=Z*977,$.words[W]=Y&67108863,Y=Z*64+(Y/67108864|0)}return $.words[$.length-1]===0&&($.length--,$.words[$.length-1]===0&&$.length--),$};function n(){i.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(n,i);function Z0(){i.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(Z0,i);function X(){i.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(X,i),X.prototype.imulK=function($){for(var Y=0,W=0;W<$.length;W++){var Z=($.words[W]|0)*19+Y,K=Z&67108863;Z>>>=26,$.words[W]=K,Y=Z}return Y!==0&&($.words[$.length++]=Y),$},C._prime=function($){if(a[$])return a[$];var Y;if($==="k256")Y=new G0;else if($==="p224")Y=new n;else if($==="p192")Y=new Z0;else if($==="p25519")Y=new X;else throw new Error("Unknown prime "+$);return a[$]=Y,Y};function O($){if(typeof $=="string"){var Y=C._prime($);this.m=Y.p,this.prime=Y}else Q($.gtn(1),"modulus must be greater than 1"),this.m=$,this.prime=null}O.prototype._verify1=function($){Q($.negative===0,"red works only with positives"),Q($.red,"red works only with red numbers")},O.prototype._verify2=function($,Y){Q(($.negative|Y.negative)===0,"red works only with positives"),Q($.red&&$.red===Y.red,"red works only with red numbers")},O.prototype.imod=function($){return this.prime?this.prime.ireduce($)._forceRed(this):(z($,$.umod(this.m)._forceRed(this)),$)},O.prototype.neg=function($){return $.isZero()?$.clone():this.m.sub($)._forceRed(this)},O.prototype.add=function($,Y){this._verify2($,Y);var W=$.add(Y);return W.cmp(this.m)>=0&&W.isub(this.m),W._forceRed(this)},O.prototype.iadd=function($,Y){this._verify2($,Y);var W=$.iadd(Y);return W.cmp(this.m)>=0&&W.isub(this.m),W},O.prototype.sub=function($,Y){this._verify2($,Y);var W=$.sub(Y);return W.cmpn(0)<0&&W.iadd(this.m),W._forceRed(this)},O.prototype.isub=function($,Y){this._verify2($,Y);var W=$.isub(Y);return W.cmpn(0)<0&&W.iadd(this.m),W},O.prototype.shl=function($,Y){return this._verify1($),this.imod($.ushln(Y))},O.prototype.imul=function($,Y){return this._verify2($,Y),this.imod($.imul(Y))},O.prototype.mul=function($,Y){return this._verify2($,Y),this.imod($.mul(Y))},O.prototype.isqr=function($){return this.imul($,$.clone())},O.prototype.sqr=function($){return this.mul($,$)},O.prototype.sqrt=function($){if($.isZero())return $.clone();var Y=this.m.andln(3);if(Q(Y%2===1),Y===3){var W=this.m.add(new C(1)).iushrn(2);return this.pow($,W)}for(var Z=this.m.subn(1),K=0;!Z.isZero()&&Z.andln(1)===0;)K++,Z.iushrn(1);Q(!Z.isZero());var J=new C(1).toRed(this),j=J.redNeg(),A=this.m.subn(1).iushrn(1),E=this.m.bitLength();for(E=new C(2*E*E).toRed(this);this.pow(E,A).cmp(j)!==0;)E.redIAdd(j);for(var _=this.pow(E,Z),s=this.pow($,Z.addn(1).iushrn(1)),r=this.pow($,Z),O0=K;r.cmp(J)!==0;){for(var o=r,d=0;o.cmp(J)!==0;d++)o=o.redSqr();Q(d<O0);var f=this.pow(_,new C(1).iushln(O0-d-1));s=s.redMul(f),_=f.redSqr(),r=r.redMul(_),O0=d}return s},O.prototype.invm=function($){var Y=$._invmp(this.m);return Y.negative!==0?(Y.negative=0,this.imod(Y).redNeg()):this.imod(Y)},O.prototype.pow=function($,Y){if(Y.isZero())return new C(1).toRed(this);if(Y.cmpn(1)===0)return $.clone();var W=4,Z=new Array(1<<W);Z[0]=new C(1).toRed(this),Z[1]=$;for(var K=2;K<Z.length;K++)Z[K]=this.mul(Z[K-1],$);var J=Z[0],j=0,A=0,E=Y.bitLength()%26;for(E===0&&(E=26),K=Y.length-1;K>=0;K--){for(var _=Y.words[K],s=E-1;s>=0;s--){var r=_>>s&1;if(J!==Z[0]&&(J=this.sqr(J)),r===0&&j===0){A=0;continue}j<<=1,j|=r,A++,!(A!==W&&(K!==0||s!==0))&&(J=this.mul(J,Z[j]),A=0,j=0)}E=26}return J},O.prototype.convertTo=function($){var Y=$.umod(this.m);return Y===$?Y.clone():Y},O.prototype.convertFrom=function($){var Y=$.clone();return Y.red=null,Y},C.mont=function($){return new G($)};function G($){O.call(this,$),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(G,O),G.prototype.convertTo=function($){return this.imod($.ushln(this.shift))},G.prototype.convertFrom=function($){var Y=this.imod($.mul(this.rinv));return Y.red=null,Y},G.prototype.imul=function($,Y){if($.isZero()||Y.isZero())return $.words[0]=0,$.length=1,$;var W=$.imul(Y),Z=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=W.isub(Z).iushrn(this.shift),J=K;return K.cmp(this.m)>=0?J=K.isub(this.m):K.cmpn(0)<0&&(J=K.iadd(this.m)),J._forceRed(this)},G.prototype.mul=function($,Y){if($.isZero()||Y.isZero())return new C(0)._forceRed(this);var W=$.mul(Y),Z=W.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=W.isub(Z).iushrn(this.shift),J=K;return K.cmp(this.m)>=0?J=K.isub(this.m):K.cmpn(0)<0&&(J=K.iadd(this.m)),J._forceRed(this)},G.prototype.invm=function($){var Y=this.imod($._invmp(this.m).mul(this.r2));return Y._forceRed(this)}})(typeof k>"u"||k,B)}),a1=K0((B,k)=>{var V=n1(),N=g2();function Q(H){var L=R(H),P=L.toRed(V.mont(H.modulus)).redPow(new V(H.publicExponent)).fromRed();return{blinder:P,unblinder:L.invm(H.modulus)}}function R(H){var L=H.modulus.byteLength(),P;do P=new V(N(L));while(P.cmp(H.modulus)>=0||!P.umod(H.prime1)||!P.umod(H.prime2));return P}function C(H,L){var P=Q(L),U=L.modulus.byteLength(),z=new V(H).mul(P.blinder).umod(L.modulus),T=z.toRed(V.mont(L.prime1)),q=z.toRed(V.mont(L.prime2)),F=L.coefficient,I=L.prime1,x=L.prime2,w=T.redPow(L.exponent1).fromRed(),M=q.redPow(L.exponent2).fromRed(),y=w.isub(M).imul(F).umod(I).imul(x);return M.iadd(y).imul(P.unblinder).umod(L.modulus).toArrayLike(Buffer,"be",U)}C.getr=R,k.exports=C}),K3=K0((B,k)=>{k.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <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"}}}),q2=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$<X.length&&(O===16?this._parseHex(X,$,G):(this._parseBase(X,O,$),G==="le"&&this._initArray(this.toArray(),O,G)))},C.prototype._initNumber=function(X,O,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(Q(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),O,G)},C.prototype._initArray=function(X,O,G){if(Q(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y,W,Z=0;if(G==="be")for($=X.length-1,Y=0;$>=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$<X.length;$+=3)W=X[$]|X[$+1]<<8|X[$+2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y=0,W=0,Z;if(G==="be")for($=X.length-1;$>=O;$-=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$<X.length;$+=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z<W;Z++){var K=X.charCodeAt(Z)-48;Y*=$,K>=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j<K;j+=$)J=U(X,j,j+$,O),this.imuln(Y),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(Z!==0){var A=1;for(J=U(X,j,X.length,O),j=0;j<Z;j++)A*=O;this.imuln(A),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},C.prototype.copy=function(X){X.words=new Array(this.length);for(var O=0;O<this.length;O++)X.words[O]=this.words[O];X.length=this.length,X.negative=this.negative,X.red=this.red},C.prototype.clone=function(){var X=new C(null);return this.copy(X),X},C.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},C.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var z=["","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"],T=[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];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W<this.length;W++){var Z=this.words[W],K=((Z<<$|Y)&16777215).toString(16);Y=Z>>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J<Y;J++)Z[J]=0}else{for(J=0;J<Y-$;J++)Z[J]=0;for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[Y-J-1]=K}return Z},Math.clz32?C.prototype._countBits=function(X){return 32-Math.clz32(X)}:C.prototype._countBits=function(X){var O=X,G=0;return O>=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G<O.length;G++){var $=G/26|0,Y=G%26;O[G]=(X.words[$]&1<<Y)>>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;O<this.length;O++){var G=this._zeroBits(this.words[O]);if(X+=G,G!==26)break}return X},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},C.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var O=0;O<X.length;O++)this.words[O]=this.words[O]|X.words[O];return this.strip()},C.prototype.ior=function(X){return Q((this.negative|X.negative)===0),this.iuor(X)},C.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=O.length,this.strip()},C.prototype.iand=function(X){return Q((this.negative|X.negative)===0),this.iuand(X)},C.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$<G.length;$++)this.words[$]=O.words[$]^G.words[$];if(this!==O)for(;$<O.length;$++)this.words[$]=O.words[$];return this.length=O.length,this.strip()},C.prototype.ixor=function(X){return Q((this.negative|X.negative)===0),this.iuxor(X)},C.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$<O;$++)this.words[$]=~this.words[$]&67108863;return G>0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W<G.length;W++)O=(G.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;W<G.length;W++)this.words[W]=G.words[W];return this},C.prototype.add=function(X){var O;return X.negative!==0&&this.negative===0?(X.negative=0,O=this.sub(X),X.negative^=1,O):X.negative===0&&this.negative!==0?(this.negative=0,O=X.sub(this),this.negative=1,O):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z<Y.length;Z++)O=($.words[Z]|0)-(Y.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W<G.length-1;W++){var Z=Y;Y=0;for(var K=$&67108863,J=Math.min(W,O.length-1),j=Math.max(0,W-X.length+1);j<=J;j++){var A=W-j,E=X.words[A]|0,_=O.words[j]|0,s=E*_,r=s&67108863;Z=Z+(s/67108864|0)|0,r=r+K|0,K=r&67108863,Z=Z+(r>>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$<X;$++)O[$]=this.revBin($,G,X);return O},y.prototype.revBin=function(X,O,G){if(X===0||X===G-1)return X;for(var $=0,Y=0;Y<O;Y++)$|=(X&1)<<O-Y-1,X>>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z<W;Z++)$[Z]=O[X[Z]],Y[Z]=G[X[Z]]},y.prototype.transform=function(X,O,G,$,Y,W){this.permute(W,X,O,G,$,Y);for(var Z=1;Z<Y;Z<<=1)for(var K=Z<<1,J=Math.cos(2*Math.PI/K),j=Math.sin(2*Math.PI/K),A=0;A<Y;A+=K)for(var E=J,_=j,s=0;s<Z;s++){var r=G[A+s],O0=$[A+s],o=G[A+s+Z],d=$[A+s+Z],f=E*o-_*d;d=E*d+_*o,o=f,G[A+s]=r+o,$[A+s]=O0+d,G[A+s+Z]=r-o,$[A+s+Z]=O0-d,s!==K&&(f=J*E-j*_,_=J*_+j*E,E=f)}},y.prototype.guessLen13b=function(X,O){var G=Math.max(O,X)|1,$=G&1,Y=0;for(G=G/2|0;G;G=G>>>1)Y++;return 1<<Y+1+$},y.prototype.conjugate=function(X,O,G){if(!(G<=1))for(var $=0;$<G/2;$++){var Y=X[$];X[$]=X[G-$-1],X[G-$-1]=Y,Y=O[$],O[$]=-O[G-$-1],O[G-$-1]=-Y}},y.prototype.normalize13b=function(X,O){for(var G=0,$=0;$<O/2;$++){var Y=Math.round(X[2*$+1]/O)*8192+Math.round(X[2*$]/O)+G;X[$]=Y&67108863,Y<67108864?G=0:G=Y/67108864|0}return X},y.prototype.convert13b=function(X,O,G,$){for(var Y=0,W=0;W<O;W++)Y=Y+(X[W]|0),G[2*W]=Y&8191,Y=Y>>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G<X;G++)O[G]=0;return O},y.prototype.mulp=function(X,O,G){var $=2*this.guessLen13b(X.length,O.length),Y=this.makeRBT($),W=this.stub($),Z=new Array($),K=new Array($),J=new Array($),j=new Array($),A=new Array($),E=new Array($),_=G.words;_.length=$,this.convert13b(X.words,X.length,Z,$),this.convert13b(O.words,O.length,j,$),this.transform(Z,W,K,J,$,Y),this.transform(j,W,A,E,$,Y);for(var s=0;s<$;s++){var r=K[s]*A[s]-J[s]*E[s];J[s]=K[s]*E[s]+J[s]*A[s],K[s]=r}return this.conjugate(K,J,$),this.transform(K,J,_,W,$,Y),this.conjugate(_,W,$),this.normalize13b(_,$),G.negative=X.negative^O.negative,G.length=X.length+O.length,G.strip()},C.prototype.mul=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),this.mulTo(X,O)},C.prototype.mulf=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),M(this,X,O)},C.prototype.imul=function(X){return this.clone().mulTo(X,this)},C.prototype.imuln=function(X){Q(typeof X=="number"),Q(X<67108864);for(var O=0,G=0;G<this.length;G++){var $=(this.words[G]|0)*X,Y=($&67108863)+(O&67108863);O>>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$<O.length&&O[$]===0;$++,G=G.sqr());if(++$<O.length)for(var Y=G.sqr();$<O.length;$++,Y=Y.sqr())O[$]!==0&&(G=G.mul(Y));return G},C.prototype.iushln=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y<this.length;Y++){var Z=this.words[Y]&$,K=(this.words[Y]|0)-Z<<O;this.words[Y]=K|W,W=Z>>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y<G;Y++)this.words[Y]=0;this.length+=G}return this.strip()},C.prototype.ishln=function(X){return Q(this.negative===0),this.iushln(X)},C.prototype.iushrn=function(X,O,G){Q(typeof X=="number"&&X>=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<<Y,K=G;if($-=W,$=Math.max(0,$),K){for(var J=0;J<W;J++)K.words[J]=this.words[J];K.length=W}if(W!==0)if(this.length>W)for(this.length-=W,J=0;J<this.length;J++)this.words[J]=this.words[J+W];else this.words[0]=0,this.length=1;var j=0;for(J=this.length-1;J>=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return!1;var Y=this.words[G];return!!(Y&$)},C.prototype.imaskn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>O<<O;this.words[this.length-1]&=$}return this.strip()},C.prototype.maskn=function(X){return this.clone().imaskn(X)},C.prototype.iaddn=function(X){return Q(typeof X=="number"),Q(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},C.prototype._iaddn=function(X){this.words[0]+=X;for(var O=0;O<this.length&&this.words[O]>=67108864;O++)this.words[O]-=67108864,O===this.length-1?this.words[O+1]=1:this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O<this.length&&this.words[O]<0;O++)this.words[O]+=67108864,this.words[O+1]-=1;return this.strip()},C.prototype.addn=function(X){return this.clone().iaddn(X)},C.prototype.subn=function(X){return this.clone().isubn(X)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function(X,O,G){var $=X.length+G,Y;this._expand($);var W,Z=0;for(Y=0;Y<X.length;Y++){W=(this.words[Y+G]|0)+Z;var K=(X.words[Y]|0)*O;W-=K&67108863,Z=(W>>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y<this.length-G;Y++)W=(this.words[Y+G]|0)+Z,Z=W>>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y<this.length;Y++)W=-(this.words[Y]|0)+Z,Z=W>>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j<J.length;j++)J.words[j]=0}var A=$.clone()._ishlnsubmul(Y,1,K);A.negative===0&&($=A,J&&(J.words[K]=1));for(var E=K-1;E>=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return this._expand(G+1),this.words[G]|=$,this;for(var Y=$,W=G;Y!==0&&W<this.length;W++){var Z=this.words[W]|0;Z+=Y,Y=Z>>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$<X?-1:1}return this.negative!==0?-G|0:G},C.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var O=this.ucmp(X);return this.negative!==0?-O|0:O},C.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var O=0,G=this.length-1;G>=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$<Y?O=-1:$>Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G<this.n?-1:O.ucmp(this.p);return $===0?(O.words[0]=0,O.length=1):$>0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y<X.length;Y++){var Z=X.words[Y]|0;X.words[Y-10]=(Z&G)<<4|W>>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G<X.length;G++){var $=X.words[G]|0;O+=$*977,X.words[G]=O&67108863,O=$*64+(O/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function a(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(a,c);function i(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(i,c);function G0(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(G0,c),G0.prototype.imulK=function(X){for(var O=0,G=0;G<X.length;G++){var $=(X.words[G]|0)*19+O,Y=$&67108863;$>>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<<G);$[0]=new C(1).toRed(this),$[1]=X;for(var Y=2;Y<$.length;Y++)$[Y]=this.mul($[Y-1],X);var W=$[0],Z=0,K=0,J=O.bitLength()%26;for(J===0&&(J=26),Y=O.length-1;Y>=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),T6=K0((B)=>{var k=B;function V(R,C){if(Array.isArray(R))return R.slice();if(!R)return[];var H=[];if(typeof R!="string"){for(var L=0;L<R.length;L++)H[L]=R[L]|0;return H}if(C==="hex"){R=R.replace(/[^a-z0-9]+/ig,""),R.length%2!==0&&(R="0"+R);for(var L=0;L<R.length;L+=2)H.push(parseInt(R[L]+R[L+1],16))}else for(var L=0;L<R.length;L++){var P=R.charCodeAt(L),U=P>>8,z=P&255;U?H.push(U,z):H.push(z)}return H}k.toArray=V;function N(R){return R.length===1?"0"+R:R}k.zero2=N;function Q(R){for(var C="",H=0;H<R.length;H++)C+=N(R[H].toString(16));return C}k.toHex=Q,k.encode=function(R,C){return C==="hex"?Q(R):R}}),N2=K0((B)=>{var k=B,V=q2(),N=D2(),Q=T6();k.assert=N,k.toArray=Q.toArray,k.zero2=Q.zero2,k.toHex=Q.toHex,k.encode=Q.encode;function R(U,z,T){var q=new Array(Math.max(U.bitLength(),T)+1);q.fill(0);for(var F=1<<z+1,I=U.clone(),x=0;x<q.length;x++){var w,M=I.andln(F-1);I.isOdd()?(M>(F>>1)-1?w=(F>>1)-M:w=M,I.isubn(w)):w=0,q[x]=w,I.iushrn(1)}return q}k.getNAF=R;function C(U,z){var T=[[],[]];U=U.clone(),z=z.clone();for(var q=0,F=0,I;U.cmpn(-q)>0||z.cmpn(-F)>0;){var x=U.andln(3)+q&3,w=z.andln(3)+F&3;x===3&&(x=-1),w===3&&(w=-1);var M;(x&1)===0?M=0:(I=U.andln(7)+q&7,(I===3||I===5)&&w===2?M=-x:M=x),T[0].push(M);var y;(w&1)===0?y=0:(I=z.andln(7)+F&7,(I===3||I===5)&&x===2?y=-w:y=w),T[1].push(y),2*q===M+1&&(q=1-q),2*F===y+1&&(F=1-F),U.iushrn(1),z.iushrn(1)}return T}k.getJSF=C;function H(U,z,T){var q="_"+z;U.prototype[z]=function(){return this[q]!==void 0?this[q]:this[q]=T.call(this)}}k.cachedProperty=H;function L(U){return typeof U=="string"?k.toArray(U,"hex"):U}k.parseBytes=L;function P(U){return new V(U,"hex","le")}k.intFromLE=P}),T1=K0((B,k)=>{var V=q2(),N=N2(),Q=N.getNAF,R=N.getJSF,C=N.assert;function H(P,U){this.type=P,this.p=new V(U.p,16),this.red=U.prime?V.red(U.prime):V.mont(this.p),this.zero=new V(0).toRed(this.red),this.one=new V(1).toRed(this.red),this.two=new V(2).toRed(this.red),this.n=U.n&&new V(U.n,16),this.g=U.g&&this.pointFromJSON(U.g,U.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 z=this.n&&this.p.div(this.n);!z||z.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}k.exports=H,H.prototype.point=function(){throw new Error("Not implemented")},H.prototype.validate=function(){throw new Error("Not implemented")},H.prototype._fixedNafMul=function(P,U){C(P.precomputed);var z=P._getDoubles(),T=Q(U,1,this._bitLength),q=(1<<z.step+1)-(z.step%2===0?2:1);q/=3;var F=[],I,x;for(I=0;I<T.length;I+=z.step){x=0;for(var w=I+z.step-1;w>=I;w--)x=(x<<1)+T[w];F.push(x)}for(var M=this.jpoint(null,null,null),y=this.jpoint(null,null,null),m=q;m>0;m--){for(I=0;I<F.length;I++)x=F[I],x===m?y=y.mixedAdd(z.points[I]):x===-m&&(y=y.mixedAdd(z.points[I].neg()));M=M.add(y)}return M.toP()},H.prototype._wnafMul=function(P,U){var z=4,T=P._getNAFPoints(z);z=T.wnd;for(var q=T.points,F=Q(U,z,this._bitLength),I=this.jpoint(null,null,null),x=F.length-1;x>=0;x--){for(var w=0;x>=0&&F[x]===0;x--)w++;if(x>=0&&w++,I=I.dblp(w),x<0)break;var M=F[x];C(M!==0),P.type==="affine"?M>0?I=I.mixedAdd(q[M-1>>1]):I=I.mixedAdd(q[-M-1>>1].neg()):M>0?I=I.add(q[M-1>>1]):I=I.add(q[-M-1>>1].neg())}return P.type==="affine"?I.toP():I},H.prototype._wnafMulAdd=function(P,U,z,T,q){var F=this._wnafT1,I=this._wnafT2,x=this._wnafT3,w=0,M,y,m;for(M=0;M<T;M++){m=U[M];var c=m._getNAFPoints(P);F[M]=c.wnd,I[M]=c.points}for(M=T-1;M>=1;M-=2){var h=M-1,a=M;if(F[h]!==1||F[a]!==1){x[h]=Q(z[h],F[h],this._bitLength),x[a]=Q(z[a],F[a],this._bitLength),w=Math.max(x[h].length,w),w=Math.max(x[a].length,w);continue}var i=[U[h],null,null,U[a]];U[h].y.cmp(U[a].y)===0?(i[1]=U[h].add(U[a]),i[2]=U[h].toJ().mixedAdd(U[a].neg())):U[h].y.cmp(U[a].y.redNeg())===0?(i[1]=U[h].toJ().mixedAdd(U[a]),i[2]=U[h].add(U[a].neg())):(i[1]=U[h].toJ().mixedAdd(U[a]),i[2]=U[h].toJ().mixedAdd(U[a].neg()));var G0=[-3,-1,-5,-7,0,7,5,1,3],n=R(z[h],z[a]);for(w=Math.max(n[0].length,w),x[h]=new Array(w),x[a]=new Array(w),y=0;y<w;y++){var Z0=n[0][y]|0,X=n[1][y]|0;x[h][y]=G0[(Z0+1)*3+(X+1)],x[a][y]=0,I[h]=i}}var O=this.jpoint(null,null,null),G=this._wnafT4;for(M=w;M>=0;M--){for(var $=0;M>=0;){var Y=!0;for(y=0;y<T;y++)G[y]=x[y][M]|0,G[y]!==0&&(Y=!1);if(!Y)break;$++,M--}if(M>=0&&$++,O=O.dblp($),M<0)break;for(y=0;y<T;y++){var W=G[y];W!==0&&(W>0?m=I[y][W-1>>1]:W<0&&(m=I[y][-W-1>>1].neg()),m.type==="affine"?O=O.mixedAdd(m):O=O.add(m))}}for(M=0;M<T;M++)I[M]=null;return q?O:O.toP()};function L(P,U){this.curve=P,this.type=U,this.precomputed=null}H.BasePoint=L,L.prototype.eq=function(){throw new Error("Not implemented")},L.prototype.validate=function(){return this.curve.validate(this)},H.prototype.decodePoint=function(P,U){P=N.toArray(P,U);var z=this.p.byteLength();if((P[0]===4||P[0]===6||P[0]===7)&&P.length-1===2*z){P[0]===6?C(P[P.length-1]%2===0):P[0]===7&&C(P[P.length-1]%2===1);var T=this.point(P.slice(1,1+z),P.slice(1+z,1+2*z));return T}else if((P[0]===2||P[0]===3)&&P.length-1===z)return this.pointFromX(P.slice(1,1+z),P[0]===3);throw new Error("Unknown point format")},L.prototype.encodeCompressed=function(P){return this.encode(P,!0)},L.prototype._encode=function(P){var U=this.curve.p.byteLength(),z=this.getX().toArray("be",U);return P?[this.getY().isEven()?2:3].concat(z):[4].concat(z,this.getY().toArray("be",U))},L.prototype.encode=function(P,U){return N.encode(this._encode(U),P)},L.prototype.precompute=function(P){if(this.precomputed)return this;var U={doubles:null,naf:null,beta:null};return U.naf=this._getNAFPoints(8),U.doubles=this._getDoubles(4,P),U.beta=this._getBeta(),this.precomputed=U,this},L.prototype._hasDoubles=function(P){if(!this.precomputed)return!1;var U=this.precomputed.doubles;return U?U.points.length>=Math.ceil((P.bitLength()+1)/U.step):!1},L.prototype._getDoubles=function(P,U){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var z=[this],T=this,q=0;q<U;q+=P){for(var F=0;F<P;F++)T=T.dbl();z.push(T)}return{step:P,points:z}},L.prototype._getNAFPoints=function(P){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var U=[this],z=(1<<P)-1,T=z===1?null:this.dbl(),q=1;q<z;q++)U[q]=U[q-1].add(T);return{wnd:P,points:U}},L.prototype._getBeta=function(){return null},L.prototype.dblp=function(P){for(var U=this,z=0;z<P;z++)U=U.dbl();return U}}),j3=K0((B,k)=>{var V=N2(),N=q2(),Q=c0(),R=T1(),C=V.assert;function H(U){R.call(this,"short",U),this.a=new N(U.a,16).toRed(this.red),this.b=new N(U.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(U),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Q(H,R),k.exports=H,H.prototype._getEndomorphism=function(U){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var z,T;if(U.beta)z=new N(U.beta,16).toRed(this.red);else{var q=this._getEndoRoots(this.p);z=q[0].cmp(q[1])<0?q[0]:q[1],z=z.toRed(this.red)}if(U.lambda)T=new N(U.lambda,16);else{var F=this._getEndoRoots(this.n);this.g.mul(F[0]).x.cmp(this.g.x.redMul(z))===0?T=F[0]:(T=F[1],C(this.g.mul(T).x.cmp(this.g.x.redMul(z))===0))}var I;return U.basis?I=U.basis.map(function(x){return{a:new N(x.a,16),b:new N(x.b,16)}}):I=this._getEndoBasis(T),{beta:z,lambda:T,basis:I}}},H.prototype._getEndoRoots=function(U){var z=U===this.p?this.red:N.mont(U),T=new N(2).toRed(z).redInvm(),q=T.redNeg(),F=new N(3).toRed(z).redNeg().redSqrt().redMul(T),I=q.redAdd(F).fromRed(),x=q.redSub(F).fromRed();return[I,x]},H.prototype._getEndoBasis=function(U){for(var z=this.n.ushrn(Math.floor(this.n.bitLength()/2)),T=U,q=this.n.clone(),F=new N(1),I=new N(0),x=new N(0),w=new N(1),M,y,m,c,h,a,i,G0=0,n,Z0;T.cmpn(0)!==0;){var X=q.div(T);n=q.sub(X.mul(T)),Z0=x.sub(X.mul(F));var O=w.sub(X.mul(I));if(!m&&n.cmp(z)<0)M=i.neg(),y=F,m=n.neg(),c=Z0;else if(m&&++G0===2)break;i=n,q=T,T=n,x=F,F=Z0,w=I,I=O}h=n.neg(),a=Z0;var G=m.sqr().add(c.sqr()),$=h.sqr().add(a.sqr());return $.cmp(G)>=0&&(h=M,a=y),m.negative&&(m=m.neg(),c=c.neg()),h.negative&&(h=h.neg(),a=a.neg()),[{a:m,b:c},{a:h,b:a}]},H.prototype._endoSplit=function(U){var z=this.endo.basis,T=z[0],q=z[1],F=q.b.mul(U).divRound(this.n),I=T.b.neg().mul(U).divRound(this.n),x=F.mul(T.a),w=I.mul(q.a),M=F.mul(T.b),y=I.mul(q.b),m=U.sub(x).sub(w),c=M.add(y).neg();return{k1:m,k2:c}},H.prototype.pointFromX=function(U,z){U=new N(U,16),U.red||(U=U.toRed(this.red));var T=U.redSqr().redMul(U).redIAdd(U.redMul(this.a)).redIAdd(this.b),q=T.redSqrt();if(q.redSqr().redSub(T).cmp(this.zero)!==0)throw new Error("invalid point");var F=q.fromRed().isOdd();return(z&&!F||!z&&F)&&(q=q.redNeg()),this.point(U,q)},H.prototype.validate=function(U){if(U.inf)return!0;var{x:z,y:T}=U,q=this.a.redMul(z),F=z.redSqr().redMul(z).redIAdd(q).redIAdd(this.b);return T.redSqr().redISub(F).cmpn(0)===0},H.prototype._endoWnafMulAdd=function(U,z,T){for(var q=this._endoWnafT1,F=this._endoWnafT2,I=0;I<U.length;I++){var x=this._endoSplit(z[I]),w=U[I],M=w._getBeta();x.k1.negative&&(x.k1.ineg(),w=w.neg(!0)),x.k2.negative&&(x.k2.ineg(),M=M.neg(!0)),q[I*2]=w,q[I*2+1]=M,F[I*2]=x.k1,F[I*2+1]=x.k2}for(var y=this._wnafMulAdd(1,q,F,I*2,T),m=0;m<I*2;m++)q[m]=null,F[m]=null;return y};function L(U,z,T,q){R.BasePoint.call(this,U,"affine"),z===null&&T===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new N(z,16),this.y=new N(T,16),q&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Q(L,R.BasePoint),H.prototype.point=function(U,z,T){return new L(this,U,z,T)},H.prototype.pointFromJSON=function(U,z){return L.fromJSON(this,U,z)},L.prototype._getBeta=function(){if(this.curve.endo){var U=this.precomputed;if(U&&U.beta)return U.beta;var z=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(U){var T=this.curve,q=function(F){return T.point(F.x.redMul(T.endo.beta),F.y)};U.beta=z,z.precomputed={beta:null,naf:U.naf&&{wnd:U.naf.wnd,points:U.naf.points.map(q)},doubles:U.doubles&&{step:U.doubles.step,points:U.doubles.points.map(q)}}}return z}},L.prototype.toJSON=function(){return this.precomputed?[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)}}]:[this.x,this.y]},L.fromJSON=function(U,z,T){typeof z=="string"&&(z=JSON.parse(z));var q=U.point(z[0],z[1],T);if(!z[2])return q;function F(x){return U.point(x[0],x[1],T)}var I=z[2];return q.precomputed={beta:null,doubles:I.doubles&&{step:I.doubles.step,points:[q].concat(I.doubles.points.map(F))},naf:I.naf&&{wnd:I.naf.wnd,points:[q].concat(I.naf.points.map(F))}},q},L.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},L.prototype.isInfinity=function(){return this.inf},L.prototype.add=function(U){if(this.inf)return U;if(U.inf)return this;if(this.eq(U))return this.dbl();if(this.neg().eq(U))return this.curve.point(null,null);if(this.x.cmp(U.x)===0)return this.curve.point(null,null);var z=this.y.redSub(U.y);z.cmpn(0)!==0&&(z=z.redMul(this.x.redSub(U.x).redInvm()));var T=z.redSqr().redISub(this.x).redISub(U.x),q=z.redMul(this.x.redSub(T)).redISub(this.y);return this.curve.point(T,q)},L.prototype.dbl=function(){if(this.inf)return this;var U=this.y.redAdd(this.y);if(U.cmpn(0)===0)return this.curve.point(null,null);var z=this.curve.a,T=this.x.redSqr(),q=U.redInvm(),F=T.redAdd(T).redIAdd(T).redIAdd(z).redMul(q),I=F.redSqr().redISub(this.x.redAdd(this.x)),x=F.redMul(this.x.redSub(I)).redISub(this.y);return this.curve.point(I,x)},L.prototype.getX=function(){return this.x.fromRed()},L.prototype.getY=function(){return this.y.fromRed()},L.prototype.mul=function(U){return U=new N(U,16),this.isInfinity()?this:this._hasDoubles(U)?this.curve._fixedNafMul(this,U):this.curve.endo?this.curve._endoWnafMulAdd([this],[U]):this.curve._wnafMul(this,U)},L.prototype.mulAdd=function(U,z,T){var q=[this,z],F=[U,T];return this.curve.endo?this.curve._endoWnafMulAdd(q,F):this.curve._wnafMulAdd(1,q,F,2)},L.prototype.jmulAdd=function(U,z,T){var q=[this,z],F=[U,T];return this.curve.endo?this.curve._endoWnafMulAdd(q,F,!0):this.curve._wnafMulAdd(1,q,F,2,!0)},L.prototype.eq=function(U){return this===U||this.inf===U.inf&&(this.inf||this.x.cmp(U.x)===0&&this.y.cmp(U.y)===0)},L.prototype.neg=function(U){if(this.inf)return this;var z=this.curve.point(this.x,this.y.redNeg());if(U&&this.precomputed){var T=this.precomputed,q=function(F){return F.neg()};z.precomputed={naf:T.naf&&{wnd:T.naf.wnd,points:T.naf.points.map(q)},doubles:T.doubles&&{step:T.doubles.step,points:T.doubles.points.map(q)}}}return z},L.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var U=this.curve.jpoint(this.x,this.y,this.curve.one);return U};function P(U,z,T,q){R.BasePoint.call(this,U,"jacobian"),z===null&&T===null&&q===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new N(0)):(this.x=new N(z,16),this.y=new N(T,16),this.z=new N(q,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Q(P,R.BasePoint),H.prototype.jpoint=function(U,z,T){return new P(this,U,z,T)},P.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var U=this.z.redInvm(),z=U.redSqr(),T=this.x.redMul(z),q=this.y.redMul(z).redMul(U);return this.curve.point(T,q)},P.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},P.prototype.add=function(U){if(this.isInfinity())return U;if(U.isInfinity())return this;var z=U.z.redSqr(),T=this.z.redSqr(),q=this.x.redMul(z),F=U.x.redMul(T),I=this.y.redMul(z.redMul(U.z)),x=U.y.redMul(T.redMul(this.z)),w=q.redSub(F),M=I.redSub(x);if(w.cmpn(0)===0)return M.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var y=w.redSqr(),m=y.redMul(w),c=q.redMul(y),h=M.redSqr().redIAdd(m).redISub(c).redISub(c),a=M.redMul(c.redISub(h)).redISub(I.redMul(m)),i=this.z.redMul(U.z).redMul(w);return this.curve.jpoint(h,a,i)},P.prototype.mixedAdd=function(U){if(this.isInfinity())return U.toJ();if(U.isInfinity())return this;var z=this.z.redSqr(),T=this.x,q=U.x.redMul(z),F=this.y,I=U.y.redMul(z).redMul(this.z),x=T.redSub(q),w=F.redSub(I);if(x.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var M=x.redSqr(),y=M.redMul(x),m=T.redMul(M),c=w.redSqr().redIAdd(y).redISub(m).redISub(m),h=w.redMul(m.redISub(c)).redISub(F.redMul(y)),a=this.z.redMul(x);return this.curve.jpoint(c,h,a)},P.prototype.dblp=function(U){if(U===0)return this;if(this.isInfinity())return this;if(!U)return this.dbl();var z;if(this.curve.zeroA||this.curve.threeA){var T=this;for(z=0;z<U;z++)T=T.dbl();return T}var q=this.curve.a,F=this.curve.tinv,I=this.x,x=this.y,w=this.z,M=w.redSqr().redSqr(),y=x.redAdd(x);for(z=0;z<U;z++){var m=I.redSqr(),c=y.redSqr(),h=c.redSqr(),a=m.redAdd(m).redIAdd(m).redIAdd(q.redMul(M)),i=I.redMul(c),G0=a.redSqr().redISub(i.redAdd(i)),n=i.redISub(G0),Z0=a.redMul(n);Z0=Z0.redIAdd(Z0).redISub(h);var X=y.redMul(w);z+1<U&&(M=M.redMul(h)),I=G0,w=X,y=Z0}return this.curve.jpoint(I,y.redMul(F),w)},P.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},P.prototype._zeroDbl=function(){var U,z,T;if(this.zOne){var q=this.x.redSqr(),F=this.y.redSqr(),I=F.redSqr(),x=this.x.redAdd(F).redSqr().redISub(q).redISub(I);x=x.redIAdd(x);var w=q.redAdd(q).redIAdd(q),M=w.redSqr().redISub(x).redISub(x),y=I.redIAdd(I);y=y.redIAdd(y),y=y.redIAdd(y),U=M,z=w.redMul(x.redISub(M)).redISub(y),T=this.y.redAdd(this.y)}else{var m=this.x.redSqr(),c=this.y.redSqr(),h=c.redSqr(),a=this.x.redAdd(c).redSqr().redISub(m).redISub(h);a=a.redIAdd(a);var i=m.redAdd(m).redIAdd(m),G0=i.redSqr(),n=h.redIAdd(h);n=n.redIAdd(n),n=n.redIAdd(n),U=G0.redISub(a).redISub(a),z=i.redMul(a.redISub(U)).redISub(n),T=this.y.redMul(this.z),T=T.redIAdd(T)}return this.curve.jpoint(U,z,T)},P.prototype._threeDbl=function(){var U,z,T;if(this.zOne){var q=this.x.redSqr(),F=this.y.redSqr(),I=F.redSqr(),x=this.x.redAdd(F).redSqr().redISub(q).redISub(I);x=x.redIAdd(x);var w=q.redAdd(q).redIAdd(q).redIAdd(this.curve.a),M=w.redSqr().redISub(x).redISub(x);U=M;var y=I.redIAdd(I);y=y.redIAdd(y),y=y.redIAdd(y),z=w.redMul(x.redISub(M)).redISub(y),T=this.y.redAdd(this.y)}else{var m=this.z.redSqr(),c=this.y.redSqr(),h=this.x.redMul(c),a=this.x.redSub(m).redMul(this.x.redAdd(m));a=a.redAdd(a).redIAdd(a);var i=h.redIAdd(h);i=i.redIAdd(i);var G0=i.redAdd(i);U=a.redSqr().redISub(G0),T=this.y.redAdd(this.z).redSqr().redISub(c).redISub(m);var n=c.redSqr();n=n.redIAdd(n),n=n.redIAdd(n),n=n.redIAdd(n),z=a.redMul(i.redISub(U)).redISub(n)}return this.curve.jpoint(U,z,T)},P.prototype._dbl=function(){var U=this.curve.a,z=this.x,T=this.y,q=this.z,F=q.redSqr().redSqr(),I=z.redSqr(),x=T.redSqr(),w=I.redAdd(I).redIAdd(I).redIAdd(U.redMul(F)),M=z.redAdd(z);M=M.redIAdd(M);var y=M.redMul(x),m=w.redSqr().redISub(y.redAdd(y)),c=y.redISub(m),h=x.redSqr();h=h.redIAdd(h),h=h.redIAdd(h),h=h.redIAdd(h);var a=w.redMul(c).redISub(h),i=T.redAdd(T).redMul(q);return this.curve.jpoint(m,a,i)},P.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var U=this.x.redSqr(),z=this.y.redSqr(),T=this.z.redSqr(),q=z.redSqr(),F=U.redAdd(U).redIAdd(U),I=F.redSqr(),x=this.x.redAdd(z).redSqr().redISub(U).redISub(q);x=x.redIAdd(x),x=x.redAdd(x).redIAdd(x),x=x.redISub(I);var w=x.redSqr(),M=q.redIAdd(q);M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var y=F.redIAdd(x).redSqr().redISub(I).redISub(w).redISub(M),m=z.redMul(y);m=m.redIAdd(m),m=m.redIAdd(m);var c=this.x.redMul(w).redISub(m);c=c.redIAdd(c),c=c.redIAdd(c);var h=this.y.redMul(y.redMul(M.redISub(y)).redISub(x.redMul(w)));h=h.redIAdd(h),h=h.redIAdd(h),h=h.redIAdd(h);var a=this.z.redAdd(x).redSqr().redISub(T).redISub(w);return this.curve.jpoint(c,h,a)},P.prototype.mul=function(U,z){return U=new N(U,z),this.curve._wnafMul(this,U)},P.prototype.eq=function(U){if(U.type==="affine")return this.eq(U.toJ());if(this===U)return!0;var z=this.z.redSqr(),T=U.z.redSqr();if(this.x.redMul(T).redISub(U.x.redMul(z)).cmpn(0)!==0)return!1;var q=z.redMul(this.z),F=T.redMul(U.z);return this.y.redMul(F).redISub(U.y.redMul(q)).cmpn(0)===0},P.prototype.eqXToP=function(U){var z=this.z.redSqr(),T=U.toRed(this.curve.red).redMul(z);if(this.x.cmp(T)===0)return!0;for(var q=U.clone(),F=this.curve.redN.redMul(z);;){if(q.iadd(this.curve.n),q.cmp(this.curve.p)>=0)return!1;if(T.redIAdd(F),this.x.cmp(T)===0)return!0}},P.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},P.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),W3=K0((B,k)=>{var V=q2(),N=c0(),Q=T1(),R=N2();function C(L){Q.call(this,"mont",L),this.a=new V(L.a,16).toRed(this.red),this.b=new V(L.b,16).toRed(this.red),this.i4=new V(4).toRed(this.red).redInvm(),this.two=new V(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}N(C,Q),k.exports=C,C.prototype.validate=function(L){var P=L.normalize().x,U=P.redSqr(),z=U.redMul(P).redAdd(U.redMul(this.a)).redAdd(P),T=z.redSqrt();return T.redSqr().cmp(z)===0};function H(L,P,U){Q.BasePoint.call(this,L,"projective"),P===null&&U===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new V(P,16),this.z=new V(U,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}N(H,Q.BasePoint),C.prototype.decodePoint=function(L,P){return this.point(R.toArray(L,P),1)},C.prototype.point=function(L,P){return new H(this,L,P)},C.prototype.pointFromJSON=function(L){return H.fromJSON(this,L)},H.prototype.precompute=function(){},H.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},H.fromJSON=function(L,P){return new H(L,P[0],P[1]||L.one)},H.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},H.prototype.isInfinity=function(){return this.z.cmpn(0)===0},H.prototype.dbl=function(){var L=this.x.redAdd(this.z),P=L.redSqr(),U=this.x.redSub(this.z),z=U.redSqr(),T=P.redSub(z),q=P.redMul(z),F=T.redMul(z.redAdd(this.curve.a24.redMul(T)));return this.curve.point(q,F)},H.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},H.prototype.diffAdd=function(L,P){var U=this.x.redAdd(this.z),z=this.x.redSub(this.z),T=L.x.redAdd(L.z),q=L.x.redSub(L.z),F=q.redMul(U),I=T.redMul(z),x=P.z.redMul(F.redAdd(I).redSqr()),w=P.x.redMul(F.redISub(I).redSqr());return this.curve.point(x,w)},H.prototype.mul=function(L){for(var P=L.clone(),U=this,z=this.curve.point(null,null),T=this,q=[];P.cmpn(0)!==0;P.iushrn(1))q.push(P.andln(1));for(var F=q.length-1;F>=0;F--)q[F]===0?(U=U.diffAdd(z,T),z=z.dbl()):(z=U.diffAdd(z,T),U=U.dbl());return z},H.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},H.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},H.prototype.eq=function(L){return this.getX().cmp(L.getX())===0},H.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},H.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),Z3=K0((B,k)=>{var V=N2(),N=q2(),Q=c0(),R=T1(),C=V.assert;function H(P){this.twisted=(P.a|0)!==1,this.mOneA=this.twisted&&(P.a|0)===-1,this.extended=this.mOneA,R.call(this,"edwards",P),this.a=new N(P.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new N(P.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new N(P.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),C(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(P.c|0)===1}Q(H,R),k.exports=H,H.prototype._mulA=function(P){return this.mOneA?P.redNeg():this.a.redMul(P)},H.prototype._mulC=function(P){return this.oneC?P:this.c.redMul(P)},H.prototype.jpoint=function(P,U,z,T){return this.point(P,U,z,T)},H.prototype.pointFromX=function(P,U){P=new N(P,16),P.red||(P=P.toRed(this.red));var z=P.redSqr(),T=this.c2.redSub(this.a.redMul(z)),q=this.one.redSub(this.c2.redMul(this.d).redMul(z)),F=T.redMul(q.redInvm()),I=F.redSqrt();if(I.redSqr().redSub(F).cmp(this.zero)!==0)throw new Error("invalid point");var x=I.fromRed().isOdd();return(U&&!x||!U&&x)&&(I=I.redNeg()),this.point(P,I)},H.prototype.pointFromY=function(P,U){P=new N(P,16),P.red||(P=P.toRed(this.red));var z=P.redSqr(),T=z.redSub(this.c2),q=z.redMul(this.d).redMul(this.c2).redSub(this.a),F=T.redMul(q.redInvm());if(F.cmp(this.zero)===0){if(U)throw new Error("invalid point");return this.point(this.zero,P)}var I=F.redSqrt();if(I.redSqr().redSub(F).cmp(this.zero)!==0)throw new Error("invalid point");return I.fromRed().isOdd()!==U&&(I=I.redNeg()),this.point(I,P)},H.prototype.validate=function(P){if(P.isInfinity())return!0;P.normalize();var U=P.x.redSqr(),z=P.y.redSqr(),T=U.redMul(this.a).redAdd(z),q=this.c2.redMul(this.one.redAdd(this.d.redMul(U).redMul(z)));return T.cmp(q)===0};function L(P,U,z,T,q){R.BasePoint.call(this,P,"projective"),U===null&&z===null&&T===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new N(U,16),this.y=new N(z,16),this.z=T?new N(T,16):this.curve.one,this.t=q&&new N(q,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Q(L,R.BasePoint),H.prototype.pointFromJSON=function(P){return L.fromJSON(this,P)},H.prototype.point=function(P,U,z,T){return new L(this,P,U,z,T)},L.fromJSON=function(P,U){return new L(P,U[0],U[1],U[2])},L.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},L.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},L.prototype._extDbl=function(){var P=this.x.redSqr(),U=this.y.redSqr(),z=this.z.redSqr();z=z.redIAdd(z);var T=this.curve._mulA(P),q=this.x.redAdd(this.y).redSqr().redISub(P).redISub(U),F=T.redAdd(U),I=F.redSub(z),x=T.redSub(U),w=q.redMul(I),M=F.redMul(x),y=q.redMul(x),m=I.redMul(F);return this.curve.point(w,M,m,y)},L.prototype._projDbl=function(){var P=this.x.redAdd(this.y).redSqr(),U=this.x.redSqr(),z=this.y.redSqr(),T,q,F,I,x,w;if(this.curve.twisted){I=this.curve._mulA(U);var M=I.redAdd(z);this.zOne?(T=P.redSub(U).redSub(z).redMul(M.redSub(this.curve.two)),q=M.redMul(I.redSub(z)),F=M.redSqr().redSub(M).redSub(M)):(x=this.z.redSqr(),w=M.redSub(x).redISub(x),T=P.redSub(U).redISub(z).redMul(w),q=M.redMul(I.redSub(z)),F=M.redMul(w))}else I=U.redAdd(z),x=this.curve._mulC(this.z).redSqr(),w=I.redSub(x).redSub(x),T=this.curve._mulC(P.redISub(I)).redMul(w),q=this.curve._mulC(I).redMul(U.redISub(z)),F=I.redMul(w);return this.curve.point(T,q,F)},L.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},L.prototype._extAdd=function(P){var U=this.y.redSub(this.x).redMul(P.y.redSub(P.x)),z=this.y.redAdd(this.x).redMul(P.y.redAdd(P.x)),T=this.t.redMul(this.curve.dd).redMul(P.t),q=this.z.redMul(P.z.redAdd(P.z)),F=z.redSub(U),I=q.redSub(T),x=q.redAdd(T),w=z.redAdd(U),M=F.redMul(I),y=x.redMul(w),m=F.redMul(w),c=I.redMul(x);return this.curve.point(M,y,c,m)},L.prototype._projAdd=function(P){var U=this.z.redMul(P.z),z=U.redSqr(),T=this.x.redMul(P.x),q=this.y.redMul(P.y),F=this.curve.d.redMul(T).redMul(q),I=z.redSub(F),x=z.redAdd(F),w=this.x.redAdd(this.y).redMul(P.x.redAdd(P.y)).redISub(T).redISub(q),M=U.redMul(I).redMul(w),y,m;return this.curve.twisted?(y=U.redMul(x).redMul(q.redSub(this.curve._mulA(T))),m=I.redMul(x)):(y=U.redMul(x).redMul(q.redSub(T)),m=this.curve._mulC(I).redMul(x)),this.curve.point(M,y,m)},L.prototype.add=function(P){return this.isInfinity()?P:P.isInfinity()?this:this.curve.extended?this._extAdd(P):this._projAdd(P)},L.prototype.mul=function(P){return this._hasDoubles(P)?this.curve._fixedNafMul(this,P):this.curve._wnafMul(this,P)},L.prototype.mulAdd=function(P,U,z){return this.curve._wnafMulAdd(1,[this,U],[P,z],2,!1)},L.prototype.jmulAdd=function(P,U,z){return this.curve._wnafMulAdd(1,[this,U],[P,z],2,!0)},L.prototype.normalize=function(){if(this.zOne)return this;var P=this.z.redInvm();return this.x=this.x.redMul(P),this.y=this.y.redMul(P),this.t&&(this.t=this.t.redMul(P)),this.z=this.curve.one,this.zOne=!0,this},L.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},L.prototype.getX=function(){return this.normalize(),this.x.fromRed()},L.prototype.getY=function(){return this.normalize(),this.y.fromRed()},L.prototype.eq=function(P){return this===P||this.getX().cmp(P.getX())===0&&this.getY().cmp(P.getY())===0},L.prototype.eqXToP=function(P){var U=P.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(U)===0)return!0;for(var z=P.clone(),T=this.curve.redN.redMul(this.z);;){if(z.iadd(this.curve.n),z.cmp(this.curve.p)>=0)return!1;if(U.redIAdd(T),this.x.cmp(U)===0)return!0}},L.prototype.toP=L.prototype.normalize,L.prototype.mixedAdd=L.prototype.add}),D6=K0((B)=>{var k=B;k.base=T1(),k.short=j3(),k.mont=W3(),k.edwards=Z3()}),L2=K0((B)=>{var k=D2(),V=c0();B.inherits=V;function N(O,G){return(O.charCodeAt(G)&64512)!==55296||G<0||G+1>=O.length?!1:(O.charCodeAt(G+1)&64512)===56320}function Q(O,G){if(Array.isArray(O))return O.slice();if(!O)return[];var $=[];if(typeof O=="string")if(G){if(G==="hex")for(O=O.replace(/[^a-z0-9]+/ig,""),O.length%2!==0&&(O="0"+O),W=0;W<O.length;W+=2)$.push(parseInt(O[W]+O[W+1],16))}else for(var Y=0,W=0;W<O.length;W++){var Z=O.charCodeAt(W);Z<128?$[Y++]=Z:Z<2048?($[Y++]=Z>>6|192,$[Y++]=Z&63|128):N(O,W)?(Z=65536+((Z&1023)<<10)+(O.charCodeAt(++W)&1023),$[Y++]=Z>>18|240,$[Y++]=Z>>12&63|128,$[Y++]=Z>>6&63|128,$[Y++]=Z&63|128):($[Y++]=Z>>12|224,$[Y++]=Z>>6&63|128,$[Y++]=Z&63|128)}else for(W=0;W<O.length;W++)$[W]=O[W]|0;return $}B.toArray=Q;function R(O){for(var G="",$=0;$<O.length;$++)G+=L(O[$].toString(16));return G}B.toHex=R;function C(O){var G=O>>>24|O>>>8&65280|O<<8&16711680|(O&255)<<24;return G>>>0}B.htonl=C;function H(O,G){for(var $="",Y=0;Y<O.length;Y++){var W=O[Y];G==="little"&&(W=C(W)),$+=P(W.toString(16))}return $}B.toHex32=H;function L(O){return O.length===1?"0"+O:O}B.zero2=L;function P(O){return O.length===7?"0"+O:O.length===6?"00"+O:O.length===5?"000"+O:O.length===4?"0000"+O:O.length===3?"00000"+O:O.length===2?"000000"+O:O.length===1?"0000000"+O:O}B.zero8=P;function U(O,G,$,Y){var W=$-G;k(W%4===0);for(var Z=new Array(W/4),K=0,J=G;K<Z.length;K++,J+=4){var j;Y==="big"?j=O[J]<<24|O[J+1]<<16|O[J+2]<<8|O[J+3]:j=O[J+3]<<24|O[J+2]<<16|O[J+1]<<8|O[J],Z[K]=j>>>0}return Z}B.join32=U;function z(O,G){for(var $=new Array(O.length*4),Y=0,W=0;Y<O.length;Y++,W+=4){var Z=O[Y];G==="big"?($[W]=Z>>>24,$[W+1]=Z>>>16&255,$[W+2]=Z>>>8&255,$[W+3]=Z&255):($[W+3]=Z>>>24,$[W+2]=Z>>>16&255,$[W+1]=Z>>>8&255,$[W]=Z&255)}return $}B.split32=z;function T(O,G){return O>>>G|O<<32-G}B.rotr32=T;function q(O,G){return O<<G|O>>>32-G}B.rotl32=q;function F(O,G){return O+G>>>0}B.sum32=F;function I(O,G,$){return O+G+$>>>0}B.sum32_3=I;function x(O,G,$,Y){return O+G+$+Y>>>0}B.sum32_4=x;function w(O,G,$,Y,W){return O+G+$+Y+W>>>0}B.sum32_5=w;function M(O,G,$,Y){var W=O[G],Z=O[G+1],K=Y+Z>>>0,J=(K<Y?1:0)+$+W;O[G]=J>>>0,O[G+1]=K}B.sum64=M;function y(O,G,$,Y){var W=G+Y>>>0,Z=(W<G?1:0)+O+$;return Z>>>0}B.sum64_hi=y;function m(O,G,$,Y){var W=G+Y;return W>>>0}B.sum64_lo=m;function c(O,G,$,Y,W,Z,K,J){var j=0,A=G;A=A+Y>>>0,j+=A<G?1:0,A=A+Z>>>0,j+=A<Z?1:0,A=A+J>>>0,j+=A<J?1:0;var E=O+$+W+K+j;return E>>>0}B.sum64_4_hi=c;function h(O,G,$,Y,W,Z,K,J){var j=G+Y+Z+J;return j>>>0}B.sum64_4_lo=h;function a(O,G,$,Y,W,Z,K,J,j,A){var E=0,_=G;_=_+Y>>>0,E+=_<G?1:0,_=_+Z>>>0,E+=_<Z?1:0,_=_+J>>>0,E+=_<J?1:0,_=_+A>>>0,E+=_<A?1:0;var s=O+$+W+K+j+E;return s>>>0}B.sum64_5_hi=a;function i(O,G,$,Y,W,Z,K,J,j,A){var E=G+Y+Z+J+A;return E>>>0}B.sum64_5_lo=i;function G0(O,G,$){var Y=G<<32-$|O>>>$;return Y>>>0}B.rotr64_hi=G0;function n(O,G,$){var Y=O<<32-$|G>>>$;return Y>>>0}B.rotr64_lo=n;function Z0(O,G,$){return O>>>$}B.shr64_hi=Z0;function X(O,G,$){var Y=O<<32-$|G>>>$;return Y>>>0}B.shr64_lo=X}),i2=K0((B)=>{var k=L2(),V=D2();function N(){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}B.BlockHash=N,N.prototype.update=function(Q,R){if(Q=k.toArray(Q,R),this.pending?this.pending=this.pending.concat(Q):this.pending=Q,this.pendingTotal+=Q.length,this.pending.length>=this._delta8){Q=this.pending;var C=Q.length%this._delta8;this.pending=Q.slice(Q.length-C,Q.length),this.pending.length===0&&(this.pending=null),Q=k.join32(Q,0,Q.length-C,this.endian);for(var H=0;H<Q.length;H+=this._delta32)this._update(Q,H,H+this._delta32)}return this},N.prototype.digest=function(Q){return this.update(this._pad()),V(this.pending===null),this._digest(Q)},N.prototype._pad=function(){var Q=this.pendingTotal,R=this._delta8,C=R-(Q+this.padLength)%R,H=new Array(C+this.padLength);H[0]=128;for(var L=1;L<C;L++)H[L]=0;if(Q<<=3,this.endian==="big"){for(var P=8;P<this.padLength;P++)H[L++]=0;H[L++]=0,H[L++]=0,H[L++]=0,H[L++]=0,H[L++]=Q>>>24&255,H[L++]=Q>>>16&255,H[L++]=Q>>>8&255,H[L++]=Q&255}else for(H[L++]=Q&255,H[L++]=Q>>>8&255,H[L++]=Q>>>16&255,H[L++]=Q>>>24&255,H[L++]=0,H[L++]=0,H[L++]=0,H[L++]=0,P=8;P<this.padLength;P++)H[L++]=0;return H}}),N6=K0((B)=>{var k=L2(),V=k.rotr32;function N(z,T,q,F){if(z===0)return Q(T,q,F);if(z===1||z===3)return C(T,q,F);if(z===2)return R(T,q,F)}B.ft_1=N;function Q(z,T,q){return z&T^~z&q}B.ch32=Q;function R(z,T,q){return z&T^z&q^T&q}B.maj32=R;function C(z,T,q){return z^T^q}B.p32=C;function H(z){return V(z,2)^V(z,13)^V(z,22)}B.s0_256=H;function L(z){return V(z,6)^V(z,11)^V(z,25)}B.s1_256=L;function P(z){return V(z,7)^V(z,18)^z>>>3}B.g0_256=P;function U(z){return V(z,17)^V(z,19)^z>>>10}B.g1_256=U}),Q3=K0((B,k)=>{var V=L2(),N=i2(),Q=N6(),R=V.rotl32,C=V.sum32,H=V.sum32_5,L=Q.ft_1,P=N.BlockHash,U=[1518500249,1859775393,2400959708,3395469782];function z(){if(!(this instanceof z))return new z;P.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}V.inherits(z,P),k.exports=z,z.blockSize=512,z.outSize=160,z.hmacStrength=80,z.padLength=64,z.prototype._update=function(T,q){for(var F=this.W,I=0;I<16;I++)F[I]=T[q+I];for(;I<F.length;I++)F[I]=R(F[I-3]^F[I-8]^F[I-14]^F[I-16],1);var x=this.h[0],w=this.h[1],M=this.h[2],y=this.h[3],m=this.h[4];for(I=0;I<F.length;I++){var c=~~(I/20),h=H(R(x,5),L(c,w,M,y),m,F[I],U[c]);m=y,y=M,M=R(w,30),w=x,x=h}this.h[0]=C(this.h[0],x),this.h[1]=C(this.h[1],w),this.h[2]=C(this.h[2],M),this.h[3]=C(this.h[3],y),this.h[4]=C(this.h[4],m)},z.prototype._digest=function(T){return T==="hex"?V.toHex32(this.h,"big"):V.split32(this.h,"big")}}),L6=K0((B,k)=>{var V=L2(),N=i2(),Q=N6(),R=D2(),C=V.sum32,H=V.sum32_4,L=V.sum32_5,P=Q.ch32,U=Q.maj32,z=Q.s0_256,T=Q.s1_256,q=Q.g0_256,F=Q.g1_256,I=N.BlockHash,x=[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 w(){if(!(this instanceof w))return new w;I.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=x,this.W=new Array(64)}V.inherits(w,I),k.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(M,y){for(var m=this.W,c=0;c<16;c++)m[c]=M[y+c];for(;c<m.length;c++)m[c]=H(F(m[c-2]),m[c-7],q(m[c-15]),m[c-16]);var h=this.h[0],a=this.h[1],i=this.h[2],G0=this.h[3],n=this.h[4],Z0=this.h[5],X=this.h[6],O=this.h[7];for(R(this.k.length===m.length),c=0;c<m.length;c++){var G=L(O,T(n),P(n,Z0,X),this.k[c],m[c]),$=C(z(h),U(h,a,i));O=X,X=Z0,Z0=n,n=C(G0,G),G0=i,i=a,a=h,h=C(G,$)}this.h[0]=C(this.h[0],h),this.h[1]=C(this.h[1],a),this.h[2]=C(this.h[2],i),this.h[3]=C(this.h[3],G0),this.h[4]=C(this.h[4],n),this.h[5]=C(this.h[5],Z0),this.h[6]=C(this.h[6],X),this.h[7]=C(this.h[7],O)},w.prototype._digest=function(M){return M==="hex"?V.toHex32(this.h,"big"):V.split32(this.h,"big")}}),z3=K0((B,k)=>{var V=L2(),N=L6();function Q(){if(!(this instanceof Q))return new Q;N.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}V.inherits(Q,N),k.exports=Q,Q.blockSize=512,Q.outSize=224,Q.hmacStrength=192,Q.padLength=64,Q.prototype._digest=function(R){return R==="hex"?V.toHex32(this.h.slice(0,7),"big"):V.split32(this.h.slice(0,7),"big")}}),k6=K0((B,k)=>{var V=L2(),N=i2(),Q=D2(),R=V.rotr64_hi,C=V.rotr64_lo,H=V.shr64_hi,L=V.shr64_lo,P=V.sum64,U=V.sum64_hi,z=V.sum64_lo,T=V.sum64_4_hi,q=V.sum64_4_lo,F=V.sum64_5_hi,I=V.sum64_5_lo,x=N.BlockHash,w=[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 M(){if(!(this instanceof M))return new M;x.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}V.inherits(M,x),k.exports=M,M.blockSize=1024,M.outSize=512,M.hmacStrength=192,M.padLength=128,M.prototype._prepareBlock=function($,Y){for(var W=this.W,Z=0;Z<32;Z++)W[Z]=$[Y+Z];for(;Z<W.length;Z+=2){var K=O(W[Z-4],W[Z-3]),J=G(W[Z-4],W[Z-3]),j=W[Z-14],A=W[Z-13],E=Z0(W[Z-30],W[Z-29]),_=X(W[Z-30],W[Z-29]),s=W[Z-32],r=W[Z-31];W[Z]=T(K,J,j,A,E,_,s,r),W[Z+1]=q(K,J,j,A,E,_,s,r)}},M.prototype._update=function($,Y){this._prepareBlock($,Y);var W=this.W,Z=this.h[0],K=this.h[1],J=this.h[2],j=this.h[3],A=this.h[4],E=this.h[5],_=this.h[6],s=this.h[7],r=this.h[8],O0=this.h[9],o=this.h[10],d=this.h[11],f=this.h[12],U0=this.h[13],X0=this.h[14],Y0=this.h[15];Q(this.k.length===W.length);for(var g=0;g<W.length;g+=2){var S=X0,p=Y0,e=G0(r,O0),J0=n(r,O0),t=y(r,O0,o,d,f,U0),y0=m(r,O0,o,d,f,U0),C0=this.k[g],W0=this.k[g+1],_0=W[g],P0=W[g+1],Q0=F(S,p,e,J0,t,y0,C0,W0,_0,P0),d0=I(S,p,e,J0,t,y0,C0,W0,_0,P0);S=a(Z,K),p=i(Z,K),e=c(Z,K,J,j,A,E),J0=h(Z,K,J,j,A,E);var D=U(S,p,e,J0),v=z(S,p,e,J0);X0=f,Y0=U0,f=o,U0=d,o=r,d=O0,r=U(_,s,Q0,d0),O0=z(s,s,Q0,d0),_=A,s=E,A=J,E=j,J=Z,j=K,Z=U(Q0,d0,D,v),K=z(Q0,d0,D,v)}P(this.h,0,Z,K),P(this.h,2,J,j),P(this.h,4,A,E),P(this.h,6,_,s),P(this.h,8,r,O0),P(this.h,10,o,d),P(this.h,12,f,U0),P(this.h,14,X0,Y0)},M.prototype._digest=function($){return $==="hex"?V.toHex32(this.h,"big"):V.split32(this.h,"big")};function y($,Y,W,Z,K){var J=$&W^~$&K;return J<0&&(J+=4294967296),J}function m($,Y,W,Z,K,J){var j=Y&Z^~Y&J;return j<0&&(j+=4294967296),j}function c($,Y,W,Z,K){var J=$&W^$&K^W&K;return J<0&&(J+=4294967296),J}function h($,Y,W,Z,K,J){var j=Y&Z^Y&J^Z&J;return j<0&&(j+=4294967296),j}function a($,Y){var W=R($,Y,28),Z=R(Y,$,2),K=R(Y,$,7),J=W^Z^K;return J<0&&(J+=4294967296),J}function i($,Y){var W=C($,Y,28),Z=C(Y,$,2),K=C(Y,$,7),J=W^Z^K;return J<0&&(J+=4294967296),J}function G0($,Y){var W=R($,Y,14),Z=R($,Y,18),K=R(Y,$,9),J=W^Z^K;return J<0&&(J+=4294967296),J}function n($,Y){var W=C($,Y,14),Z=C($,Y,18),K=C(Y,$,9),J=W^Z^K;return J<0&&(J+=4294967296),J}function Z0($,Y){var W=R($,Y,1),Z=R($,Y,8),K=H($,Y,7),J=W^Z^K;return J<0&&(J+=4294967296),J}function X($,Y){var W=C($,Y,1),Z=C($,Y,8),K=L($,Y,7),J=W^Z^K;return J<0&&(J+=4294967296),J}function O($,Y){var W=R($,Y,19),Z=R(Y,$,29),K=H($,Y,6),J=W^Z^K;return J<0&&(J+=4294967296),J}function G($,Y){var W=C($,Y,19),Z=C(Y,$,29),K=L($,Y,6),J=W^Z^K;return J<0&&(J+=4294967296),J}}),H3=K0((B,k)=>{var V=L2(),N=k6();function Q(){if(!(this instanceof Q))return new Q;N.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}V.inherits(Q,N),k.exports=Q,Q.blockSize=1024,Q.outSize=384,Q.hmacStrength=192,Q.padLength=128,Q.prototype._digest=function(R){return R==="hex"?V.toHex32(this.h.slice(0,12),"big"):V.split32(this.h.slice(0,12),"big")}}),V3=K0((B)=>{B.sha1=Q3(),B.sha224=z3(),B.sha256=L6(),B.sha384=H3(),B.sha512=k6()}),P3=K0((B)=>{var k=L2(),V=i2(),N=k.rotl32,Q=k.sum32,R=k.sum32_3,C=k.sum32_4,H=V.BlockHash;function L(){if(!(this instanceof L))return new L;H.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}k.inherits(L,H),B.ripemd160=L,L.blockSize=512,L.outSize=160,L.hmacStrength=192,L.padLength=64,L.prototype._update=function(x,w){for(var M=this.h[0],y=this.h[1],m=this.h[2],c=this.h[3],h=this.h[4],a=M,i=y,G0=m,n=c,Z0=h,X=0;X<80;X++){var O=Q(N(C(M,P(X,y,m,c),x[T[X]+w],U(X)),F[X]),h);M=h,h=c,c=N(m,10),m=y,y=O,O=Q(N(C(a,P(79-X,i,G0,n),x[q[X]+w],z(X)),I[X]),Z0),a=Z0,Z0=n,n=N(G0,10),G0=i,i=O}O=R(this.h[1],m,n),this.h[1]=R(this.h[2],c,Z0),this.h[2]=R(this.h[3],h,a),this.h[3]=R(this.h[4],M,i),this.h[4]=R(this.h[0],y,G0),this.h[0]=O},L.prototype._digest=function(x){return x==="hex"?k.toHex32(this.h,"little"):k.split32(this.h,"little")};function P(x,w,M,y){return x<=15?w^M^y:x<=31?w&M|~w&y:x<=47?(w|~M)^y:x<=63?w&y|M&~y:w^(M|~y)}function U(x){return x<=15?0:x<=31?1518500249:x<=47?1859775393:x<=63?2400959708:2840853838}function z(x){return x<=15?1352829926:x<=31?1548603684:x<=47?1836072691:x<=63?2053994217:0}var T=[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],q=[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],F=[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],I=[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]}),U3=K0((B,k)=>{var V=L2(),N=D2();function Q(R,C,H){if(!(this instanceof Q))return new Q(R,C,H);this.Hash=R,this.blockSize=R.blockSize/8,this.outSize=R.outSize/8,this.inner=null,this.outer=null,this._init(V.toArray(C,H))}k.exports=Q,Q.prototype._init=function(R){R.length>this.blockSize&&(R=new this.Hash().update(R).digest()),N(R.length<=this.blockSize);for(var C=R.length;C<this.blockSize;C++)R.push(0);for(C=0;C<R.length;C++)R[C]^=54;for(this.inner=new this.Hash().update(R),C=0;C<R.length;C++)R[C]^=106;this.outer=new this.Hash().update(R)},Q.prototype.update=function(R,C){return this.inner.update(R,C),this},Q.prototype.digest=function(R){return this.outer.update(this.inner.digest()),this.outer.digest(R)}}),r1=K0((B)=>{var k=B;k.utils=L2(),k.common=i2(),k.sha=V3(),k.ripemd=P3(),k.hmac=U3(),k.sha1=k.sha.sha1,k.sha256=k.sha.sha256,k.sha224=k.sha.sha224,k.sha384=k.sha.sha384,k.sha512=k.sha.sha512,k.ripemd160=k.ripemd.ripemd160}),F3=K0((B,k)=>{k.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"]]}}}),i1=K0((B)=>{var k=B,V=r1(),N=D6(),Q=N2(),R=Q.assert;function C(P){P.type==="short"?this.curve=new N.short(P):P.type==="edwards"?this.curve=new N.edwards(P):this.curve=new N.mont(P),this.g=this.curve.g,this.n=this.curve.n,this.hash=P.hash,R(this.g.validate(),"Invalid curve"),R(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}k.PresetCurve=C;function H(P,U){Object.defineProperty(k,P,{configurable:!0,enumerable:!0,get:function(){var z=new C(U);return Object.defineProperty(k,P,{configurable:!0,enumerable:!0,value:z}),z}})}H("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:V.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),H("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:V.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),H("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:V.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),H("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:V.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),H("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:V.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),H("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:V.sha256,gRed:!1,g:["9"]}),H("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:V.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var L;try{L=F3()}catch{L=void 0}H("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:V.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",L]})}),T3=K0((B,k)=>{var V=r1(),N=T6(),Q=D2();function R(C){if(!(this instanceof R))return new R(C);this.hash=C.hash,this.predResist=!!C.predResist,this.outLen=this.hash.outSize,this.minEntropy=C.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var H=N.toArray(C.entropy,C.entropyEnc||"hex"),L=N.toArray(C.nonce,C.nonceEnc||"hex"),P=N.toArray(C.pers,C.persEnc||"hex");Q(H.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(H,L,P)}k.exports=R,R.prototype._init=function(C,H,L){var P=C.concat(H).concat(L);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var U=0;U<this.V.length;U++)this.K[U]=0,this.V[U]=1;this._update(P),this._reseed=1,this.reseedInterval=281474976710656},R.prototype._hmac=function(){return new V.hmac(this.hash,this.K)},R.prototype._update=function(C){var H=this._hmac().update(this.V).update([0]);C&&(H=H.update(C)),this.K=H.digest(),this.V=this._hmac().update(this.V).digest(),C&&(this.K=this._hmac().update(this.V).update([1]).update(C).digest(),this.V=this._hmac().update(this.V).digest())},R.prototype.reseed=function(C,H,L,P){typeof H!="string"&&(P=L,L=H,H=null),C=N.toArray(C,H),L=N.toArray(L,P),Q(C.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(C.concat(L||[])),this._reseed=1},R.prototype.generate=function(C,H,L,P){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof H!="string"&&(P=L,L=H,H=null),L&&(L=N.toArray(L,P||"hex"),this._update(L));for(var U=[];U.length<C;)this.V=this._hmac().update(this.V).digest(),U=U.concat(this.V);var z=U.slice(0,C);return this._update(L),this._reseed++,N.encode(z,H)}}),D3=K0((B,k)=>{var V=q2(),N=N2(),Q=N.assert;function R(C,H){this.ec=C,this.priv=null,this.pub=null,H.priv&&this._importPrivate(H.priv,H.privEnc),H.pub&&this._importPublic(H.pub,H.pubEnc)}k.exports=R,R.fromPublic=function(C,H,L){return H instanceof R?H:new R(C,{pub:H,pubEnc:L})},R.fromPrivate=function(C,H,L){return H instanceof R?H:new R(C,{priv:H,privEnc:L})},R.prototype.validate=function(){var C=this.getPublic();return C.isInfinity()?{result:!1,reason:"Invalid public key"}:C.validate()?C.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},R.prototype.getPublic=function(C,H){return typeof C=="string"&&(H=C,C=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),H?this.pub.encode(H,C):this.pub},R.prototype.getPrivate=function(C){return C==="hex"?this.priv.toString(16,2):this.priv},R.prototype._importPrivate=function(C,H){this.priv=new V(C,H||16),this.priv=this.priv.umod(this.ec.curve.n)},R.prototype._importPublic=function(C,H){if(C.x||C.y){this.ec.curve.type==="mont"?Q(C.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Q(C.x&&C.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(C.x,C.y);return}this.pub=this.ec.curve.decodePoint(C,H)},R.prototype.derive=function(C){return C.validate()||Q(C.validate(),"public point not validated"),C.mul(this.priv).getX()},R.prototype.sign=function(C,H,L){return this.ec.sign(C,this,H,L)},R.prototype.verify=function(C,H){return this.ec.verify(C,H,this)},R.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),N3=K0((B,k)=>{var V=q2(),N=N2(),Q=N.assert;function R(U,z){if(U instanceof R)return U;this._importDER(U,z)||(Q(U.r&&U.s,"Signature without r or s"),this.r=new V(U.r,16),this.s=new V(U.s,16),U.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=U.recoveryParam)}k.exports=R;function C(){this.place=0}function H(U,z){var T=U[z.place++];if(!(T&128))return T;var q=T&15;if(q===0||q>4)return!1;for(var F=0,I=0,x=z.place;I<q;I++,x++)F<<=8,F|=U[x],F>>>=0;return F<=127?!1:(z.place=x,F)}function L(U){for(var z=0,T=U.length-1;!U[z]&&!(U[z+1]&128)&&z<T;)z++;return z===0?U:U.slice(z)}R.prototype._importDER=function(U,z){U=N.toArray(U,z);var T=new C;if(U[T.place++]!==48)return!1;var q=H(U,T);if(q===!1||q+T.place!==U.length||U[T.place++]!==2)return!1;var F=H(U,T);if(F===!1)return!1;var I=U.slice(T.place,F+T.place);if(T.place+=F,U[T.place++]!==2)return!1;var x=H(U,T);if(x===!1||U.length!==x+T.place)return!1;var w=U.slice(T.place,x+T.place);if(I[0]===0)if(I[1]&128)I=I.slice(1);else return!1;if(w[0]===0)if(w[1]&128)w=w.slice(1);else return!1;return this.r=new V(I),this.s=new V(w),this.recoveryParam=null,!0};function P(U,z){if(z<128){U.push(z);return}var T=1+(Math.log(z)/Math.LN2>>>3);for(U.push(T|128);--T;)U.push(z>>>(T<<3)&255);U.push(z)}R.prototype.toDER=function(U){var z=this.r.toArray(),T=this.s.toArray();for(z[0]&128&&(z=[0].concat(z)),T[0]&128&&(T=[0].concat(T)),z=L(z),T=L(T);!T[0]&&!(T[1]&128);)T=T.slice(1);var q=[2];P(q,z.length),q=q.concat(z),q.push(2),P(q,T.length);var F=q.concat(T),I=[48];return P(I,F.length),I=I.concat(F),N.encode(I,U)}}),L3=K0((B,k)=>{var V=q2(),N=T3(),Q=N2(),R=i1(),C=s1(),H=Q.assert,L=D3(),P=N3();function U(z){if(!(this instanceof U))return new U(z);typeof z=="string"&&(H(Object.prototype.hasOwnProperty.call(R,z),"Unknown curve "+z),z=R[z]),z instanceof R.PresetCurve&&(z={curve:z}),this.curve=z.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=z.curve.g,this.g.precompute(z.curve.n.bitLength()+1),this.hash=z.hash||z.curve.hash}k.exports=U,U.prototype.keyPair=function(z){return new L(this,z)},U.prototype.keyFromPrivate=function(z,T){return L.fromPrivate(this,z,T)},U.prototype.keyFromPublic=function(z,T){return L.fromPublic(this,z,T)},U.prototype.genKeyPair=function(z){z||(z={});for(var T=new N({hash:this.hash,pers:z.pers,persEnc:z.persEnc||"utf8",entropy:z.entropy||C(this.hash.hmacStrength),entropyEnc:z.entropy&&z.entropyEnc||"utf8",nonce:this.n.toArray()}),q=this.n.byteLength(),F=this.n.sub(new V(2));;){var I=new V(T.generate(q));if(!(I.cmp(F)>0))return I.iaddn(1),this.keyFromPrivate(I)}},U.prototype._truncateToN=function(z,T){var q=z.byteLength()*8-this.n.bitLength();return q>0&&(z=z.ushrn(q)),!T&&z.cmp(this.n)>=0?z.sub(this.n):z},U.prototype.sign=function(z,T,q,F){typeof q=="object"&&(F=q,q=null),F||(F={}),T=this.keyFromPrivate(T,q),z=this._truncateToN(new V(z,16));for(var I=this.n.byteLength(),x=T.getPrivate().toArray("be",I),w=z.toArray("be",I),M=new N({hash:this.hash,entropy:x,nonce:w,pers:F.pers,persEnc:F.persEnc||"utf8"}),y=this.n.sub(new V(1)),m=0;;m++){var c=F.k?F.k(m):new V(M.generate(this.n.byteLength()));if(c=this._truncateToN(c,!0),!(c.cmpn(1)<=0||c.cmp(y)>=0)){var h=this.g.mul(c);if(!h.isInfinity()){var a=h.getX(),i=a.umod(this.n);if(i.cmpn(0)!==0){var G0=c.invm(this.n).mul(i.mul(T.getPrivate()).iadd(z));if(G0=G0.umod(this.n),G0.cmpn(0)!==0){var n=(h.getY().isOdd()?1:0)|(a.cmp(i)!==0?2:0);return F.canonical&&G0.cmp(this.nh)>0&&(G0=this.n.sub(G0),n^=1),new P({r:i,s:G0,recoveryParam:n})}}}}}},U.prototype.verify=function(z,T,q,F){z=this._truncateToN(new V(z,16)),q=this.keyFromPublic(q,F),T=new P(T,"hex");var{r:I,s:x}=T;if(I.cmpn(1)<0||I.cmp(this.n)>=0||x.cmpn(1)<0||x.cmp(this.n)>=0)return!1;var w=x.invm(this.n),M=w.mul(z).umod(this.n),y=w.mul(I).umod(this.n),m;return this.curve._maxwellTrick?(m=this.g.jmulAdd(M,q.getPublic(),y),m.isInfinity()?!1:m.eqXToP(I)):(m=this.g.mulAdd(M,q.getPublic(),y),m.isInfinity()?!1:m.getX().umod(this.n).cmp(I)===0)},U.prototype.recoverPubKey=function(z,T,q,F){H((3&q)===q,"The recovery param is more than two bits"),T=new P(T,F);var I=this.n,x=new V(z),w=T.r,M=T.s,y=q&1,m=q>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&m)throw new Error("Unable to find sencond key candinate");m?w=this.curve.pointFromX(w.add(this.curve.n),y):w=this.curve.pointFromX(w,y);var c=T.r.invm(I),h=I.sub(x).mul(c).umod(I),a=M.mul(c).umod(I);return this.g.mulAdd(h,w,a)},U.prototype.getKeyRecoveryParam=function(z,T,q,F){if(T=new P(T,F),T.recoveryParam!==null)return T.recoveryParam;for(var I=0;I<4;I++){var x;try{x=this.recoverPubKey(z,T,I)}catch{continue}if(x.eq(q))return I}throw new Error("Unable to find valid recovery factor")}}),k3=K0((B,k)=>{var V=N2(),N=V.assert,Q=V.parseBytes,R=V.cachedProperty;function C(H,L){this.eddsa=H,this._secret=Q(L.secret),H.isPoint(L.pub)?this._pub=L.pub:this._pubBytes=Q(L.pub)}C.fromPublic=function(H,L){return L instanceof C?L:new C(H,{pub:L})},C.fromSecret=function(H,L){return L instanceof C?L:new C(H,{secret:L})},C.prototype.secret=function(){return this._secret},R(C,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),R(C,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),R(C,"privBytes",function(){var H=this.eddsa,L=this.hash(),P=H.encodingLength-1,U=L.slice(0,H.encodingLength);return U[0]&=248,U[P]&=127,U[P]|=64,U}),R(C,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),R(C,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),R(C,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),C.prototype.sign=function(H){return N(this._secret,"KeyPair can only verify"),this.eddsa.sign(H,this)},C.prototype.verify=function(H,L){return this.eddsa.verify(H,L,this)},C.prototype.getSecret=function(H){return N(this._secret,"KeyPair is public only"),V.encode(this.secret(),H)},C.prototype.getPublic=function(H){return V.encode(this.pubBytes(),H)},k.exports=C}),B3=K0((B,k)=>{var V=q2(),N=N2(),Q=N.assert,R=N.cachedProperty,C=N.parseBytes;function H(L,P){this.eddsa=L,typeof P!="object"&&(P=C(P)),Array.isArray(P)&&(P={R:P.slice(0,L.encodingLength),S:P.slice(L.encodingLength)}),Q(P.R&&P.S,"Signature without R or S"),L.isPoint(P.R)&&(this._R=P.R),P.S instanceof V&&(this._S=P.S),this._Rencoded=Array.isArray(P.R)?P.R:P.Rencoded,this._Sencoded=Array.isArray(P.S)?P.S:P.Sencoded}R(H,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),R(H,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),R(H,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),R(H,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),H.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},H.prototype.toHex=function(){return N.encode(this.toBytes(),"hex").toUpperCase()},k.exports=H}),R3=K0((B,k)=>{var V=r1(),N=i1(),Q=N2(),R=Q.assert,C=Q.parseBytes,H=k3(),L=B3();function P(U){if(R(U==="ed25519","only tested with ed25519 so far"),!(this instanceof P))return new P(U);U=N[U].curve,this.curve=U,this.g=U.g,this.g.precompute(U.n.bitLength()+1),this.pointClass=U.point().constructor,this.encodingLength=Math.ceil(U.n.bitLength()/8),this.hash=V.sha512}k.exports=P,P.prototype.sign=function(U,z){U=C(U);var T=this.keyFromSecret(z),q=this.hashInt(T.messagePrefix(),U),F=this.g.mul(q),I=this.encodePoint(F),x=this.hashInt(I,T.pubBytes(),U).mul(T.priv()),w=q.add(x).umod(this.curve.n);return this.makeSignature({R:F,S:w,Rencoded:I})},P.prototype.verify=function(U,z,T){U=C(U),z=this.makeSignature(z);var q=this.keyFromPublic(T),F=this.hashInt(z.Rencoded(),q.pubBytes(),U),I=this.g.mul(z.S()),x=z.R().add(q.pub().mul(F));return x.eq(I)},P.prototype.hashInt=function(){for(var U=this.hash(),z=0;z<arguments.length;z++)U.update(arguments[z]);return Q.intFromLE(U.digest()).umod(this.curve.n)},P.prototype.keyFromPublic=function(U){return H.fromPublic(this,U)},P.prototype.keyFromSecret=function(U){return H.fromSecret(this,U)},P.prototype.makeSignature=function(U){return U instanceof L?U:new L(this,U)},P.prototype.encodePoint=function(U){var z=U.getY().toArray("le",this.encodingLength);return z[this.encodingLength-1]|=U.getX().isOdd()?128:0,z},P.prototype.decodePoint=function(U){U=Q.parseBytes(U);var z=U.length-1,T=U.slice(0,z).concat(U[z]&-129),q=(U[z]&128)!==0,F=Q.intFromLE(T);return this.curve.pointFromY(F,q)},P.prototype.encodeInt=function(U){return U.toArray("le",this.encodingLength)},P.prototype.decodeInt=function(U){return Q.intFromLE(U)},P.prototype.isPoint=function(U){return U instanceof this.pointClass}}),t1=K0((B)=>{var k=B;k.version=K3().version,k.utils=N2(),k.rand=s1(),k.curve=D6(),k.curves=i1(),k.ec=L3(),k.eddsa=R3()}),B6=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$<X.length&&(O===16?this._parseHex(X,$,G):(this._parseBase(X,O,$),G==="le"&&this._initArray(this.toArray(),O,G)))},C.prototype._initNumber=function(X,O,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(Q(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),O,G)},C.prototype._initArray=function(X,O,G){if(Q(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y,W,Z=0;if(G==="be")for($=X.length-1,Y=0;$>=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$<X.length;$+=3)W=X[$]|X[$+1]<<8|X[$+2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y=0,W=0,Z;if(G==="be")for($=X.length-1;$>=O;$-=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$<X.length;$+=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z<W;Z++){var K=X.charCodeAt(Z)-48;Y*=$,K>=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j<K;j+=$)J=U(X,j,j+$,O),this.imuln(Y),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(Z!==0){var A=1;for(J=U(X,j,X.length,O),j=0;j<Z;j++)A*=O;this.imuln(A),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},C.prototype.copy=function(X){X.words=new Array(this.length);for(var O=0;O<this.length;O++)X.words[O]=this.words[O];X.length=this.length,X.negative=this.negative,X.red=this.red},C.prototype.clone=function(){var X=new C(null);return this.copy(X),X},C.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},C.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var z=["","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"],T=[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];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W<this.length;W++){var Z=this.words[W],K=((Z<<$|Y)&16777215).toString(16);Y=Z>>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J<Y;J++)Z[J]=0}else{for(J=0;J<Y-$;J++)Z[J]=0;for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[Y-J-1]=K}return Z},Math.clz32?C.prototype._countBits=function(X){return 32-Math.clz32(X)}:C.prototype._countBits=function(X){var O=X,G=0;return O>=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G<O.length;G++){var $=G/26|0,Y=G%26;O[G]=(X.words[$]&1<<Y)>>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;O<this.length;O++){var G=this._zeroBits(this.words[O]);if(X+=G,G!==26)break}return X},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},C.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var O=0;O<X.length;O++)this.words[O]=this.words[O]|X.words[O];return this.strip()},C.prototype.ior=function(X){return Q((this.negative|X.negative)===0),this.iuor(X)},C.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=O.length,this.strip()},C.prototype.iand=function(X){return Q((this.negative|X.negative)===0),this.iuand(X)},C.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$<G.length;$++)this.words[$]=O.words[$]^G.words[$];if(this!==O)for(;$<O.length;$++)this.words[$]=O.words[$];return this.length=O.length,this.strip()},C.prototype.ixor=function(X){return Q((this.negative|X.negative)===0),this.iuxor(X)},C.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$<O;$++)this.words[$]=~this.words[$]&67108863;return G>0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W<G.length;W++)O=(G.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;W<G.length;W++)this.words[W]=G.words[W];return this},C.prototype.add=function(X){var O;return X.negative!==0&&this.negative===0?(X.negative=0,O=this.sub(X),X.negative^=1,O):X.negative===0&&this.negative!==0?(this.negative=0,O=X.sub(this),this.negative=1,O):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z<Y.length;Z++)O=($.words[Z]|0)-(Y.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W<G.length-1;W++){var Z=Y;Y=0;for(var K=$&67108863,J=Math.min(W,O.length-1),j=Math.max(0,W-X.length+1);j<=J;j++){var A=W-j,E=X.words[A]|0,_=O.words[j]|0,s=E*_,r=s&67108863;Z=Z+(s/67108864|0)|0,r=r+K|0,K=r&67108863,Z=Z+(r>>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$<X;$++)O[$]=this.revBin($,G,X);return O},y.prototype.revBin=function(X,O,G){if(X===0||X===G-1)return X;for(var $=0,Y=0;Y<O;Y++)$|=(X&1)<<O-Y-1,X>>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z<W;Z++)$[Z]=O[X[Z]],Y[Z]=G[X[Z]]},y.prototype.transform=function(X,O,G,$,Y,W){this.permute(W,X,O,G,$,Y);for(var Z=1;Z<Y;Z<<=1)for(var K=Z<<1,J=Math.cos(2*Math.PI/K),j=Math.sin(2*Math.PI/K),A=0;A<Y;A+=K)for(var E=J,_=j,s=0;s<Z;s++){var r=G[A+s],O0=$[A+s],o=G[A+s+Z],d=$[A+s+Z],f=E*o-_*d;d=E*d+_*o,o=f,G[A+s]=r+o,$[A+s]=O0+d,G[A+s+Z]=r-o,$[A+s+Z]=O0-d,s!==K&&(f=J*E-j*_,_=J*_+j*E,E=f)}},y.prototype.guessLen13b=function(X,O){var G=Math.max(O,X)|1,$=G&1,Y=0;for(G=G/2|0;G;G=G>>>1)Y++;return 1<<Y+1+$},y.prototype.conjugate=function(X,O,G){if(!(G<=1))for(var $=0;$<G/2;$++){var Y=X[$];X[$]=X[G-$-1],X[G-$-1]=Y,Y=O[$],O[$]=-O[G-$-1],O[G-$-1]=-Y}},y.prototype.normalize13b=function(X,O){for(var G=0,$=0;$<O/2;$++){var Y=Math.round(X[2*$+1]/O)*8192+Math.round(X[2*$]/O)+G;X[$]=Y&67108863,Y<67108864?G=0:G=Y/67108864|0}return X},y.prototype.convert13b=function(X,O,G,$){for(var Y=0,W=0;W<O;W++)Y=Y+(X[W]|0),G[2*W]=Y&8191,Y=Y>>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G<X;G++)O[G]=0;return O},y.prototype.mulp=function(X,O,G){var $=2*this.guessLen13b(X.length,O.length),Y=this.makeRBT($),W=this.stub($),Z=new Array($),K=new Array($),J=new Array($),j=new Array($),A=new Array($),E=new Array($),_=G.words;_.length=$,this.convert13b(X.words,X.length,Z,$),this.convert13b(O.words,O.length,j,$),this.transform(Z,W,K,J,$,Y),this.transform(j,W,A,E,$,Y);for(var s=0;s<$;s++){var r=K[s]*A[s]-J[s]*E[s];J[s]=K[s]*E[s]+J[s]*A[s],K[s]=r}return this.conjugate(K,J,$),this.transform(K,J,_,W,$,Y),this.conjugate(_,W,$),this.normalize13b(_,$),G.negative=X.negative^O.negative,G.length=X.length+O.length,G.strip()},C.prototype.mul=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),this.mulTo(X,O)},C.prototype.mulf=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),M(this,X,O)},C.prototype.imul=function(X){return this.clone().mulTo(X,this)},C.prototype.imuln=function(X){Q(typeof X=="number"),Q(X<67108864);for(var O=0,G=0;G<this.length;G++){var $=(this.words[G]|0)*X,Y=($&67108863)+(O&67108863);O>>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$<O.length&&O[$]===0;$++,G=G.sqr());if(++$<O.length)for(var Y=G.sqr();$<O.length;$++,Y=Y.sqr())O[$]!==0&&(G=G.mul(Y));return G},C.prototype.iushln=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y<this.length;Y++){var Z=this.words[Y]&$,K=(this.words[Y]|0)-Z<<O;this.words[Y]=K|W,W=Z>>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y<G;Y++)this.words[Y]=0;this.length+=G}return this.strip()},C.prototype.ishln=function(X){return Q(this.negative===0),this.iushln(X)},C.prototype.iushrn=function(X,O,G){Q(typeof X=="number"&&X>=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<<Y,K=G;if($-=W,$=Math.max(0,$),K){for(var J=0;J<W;J++)K.words[J]=this.words[J];K.length=W}if(W!==0)if(this.length>W)for(this.length-=W,J=0;J<this.length;J++)this.words[J]=this.words[J+W];else this.words[0]=0,this.length=1;var j=0;for(J=this.length-1;J>=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return!1;var Y=this.words[G];return!!(Y&$)},C.prototype.imaskn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>O<<O;this.words[this.length-1]&=$}return this.strip()},C.prototype.maskn=function(X){return this.clone().imaskn(X)},C.prototype.iaddn=function(X){return Q(typeof X=="number"),Q(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},C.prototype._iaddn=function(X){this.words[0]+=X;for(var O=0;O<this.length&&this.words[O]>=67108864;O++)this.words[O]-=67108864,O===this.length-1?this.words[O+1]=1:this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O<this.length&&this.words[O]<0;O++)this.words[O]+=67108864,this.words[O+1]-=1;return this.strip()},C.prototype.addn=function(X){return this.clone().iaddn(X)},C.prototype.subn=function(X){return this.clone().isubn(X)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function(X,O,G){var $=X.length+G,Y;this._expand($);var W,Z=0;for(Y=0;Y<X.length;Y++){W=(this.words[Y+G]|0)+Z;var K=(X.words[Y]|0)*O;W-=K&67108863,Z=(W>>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y<this.length-G;Y++)W=(this.words[Y+G]|0)+Z,Z=W>>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y<this.length;Y++)W=-(this.words[Y]|0)+Z,Z=W>>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j<J.length;j++)J.words[j]=0}var A=$.clone()._ishlnsubmul(Y,1,K);A.negative===0&&($=A,J&&(J.words[K]=1));for(var E=K-1;E>=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return this._expand(G+1),this.words[G]|=$,this;for(var Y=$,W=G;Y!==0&&W<this.length;W++){var Z=this.words[W]|0;Z+=Y,Y=Z>>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$<X?-1:1}return this.negative!==0?-G|0:G},C.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var O=this.ucmp(X);return this.negative!==0?-O|0:O},C.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var O=0,G=this.length-1;G>=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$<Y?O=-1:$>Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G<this.n?-1:O.ucmp(this.p);return $===0?(O.words[0]=0,O.length=1):$>0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y<X.length;Y++){var Z=X.words[Y]|0;X.words[Y-10]=(Z&G)<<4|W>>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G<X.length;G++){var $=X.words[G]|0;O+=$*977,X.words[G]=O&67108863,O=$*64+(O/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function a(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(a,c);function i(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(i,c);function G0(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(G0,c),G0.prototype.imulK=function(X){for(var O=0,G=0;G<X.length;G++){var $=(X.words[G]|0)*19+O,Y=$&67108863;$>>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<<G);$[0]=new C(1).toRed(this),$[1]=X;for(var Y=2;Y<$.length;Y++)$[Y]=this.mul($[Y-1],X);var W=$[0],Z=0,K=0,J=O.bitLength()%26;for(J===0&&(J=26),Y=O.length-1;Y>=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),e1=K0((B,k)=>{var V=P2(),N=V.Buffer,Q={},R;for(R in V)!V.hasOwnProperty(R)||R==="SlowBuffer"||R==="Buffer"||(Q[R]=V[R]);var C=Q.Buffer={};for(R in N)!N.hasOwnProperty(R)||R==="allocUnsafe"||R==="allocUnsafeSlow"||(C[R]=N[R]);if(Q.Buffer.prototype=N.prototype,(!C.from||C.from===Uint8Array.from)&&(C.from=function(H,L,P){if(typeof H=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof H);if(H&&typeof H.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);return N(H,L,P)}),C.alloc||(C.alloc=function(H,L,P){if(typeof H!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof H);if(H<0||H>=2147483648)throw new RangeError('The value "'+H+'" is invalid for option "size"');var U=N(H);return!L||L.length===0?U.fill(0):typeof P=="string"?U.fill(L,P):U.fill(L),U}),!Q.kStringMaxLength)try{Q.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}Q.constants||(Q.constants={MAX_LENGTH:Q.kMaxLength},Q.kStringMaxLength&&(Q.constants.MAX_STRING_LENGTH=Q.kStringMaxLength)),k.exports=Q}),X5=K0((B)=>{var k=c0();function V(Q){this._reporterState={obj:null,path:[],options:Q||{},errors:[]}}B.Reporter=V,V.prototype.isError=function(Q){return Q instanceof N},V.prototype.save=function(){let Q=this._reporterState;return{obj:Q.obj,pathLen:Q.path.length}},V.prototype.restore=function(Q){let R=this._reporterState;R.obj=Q.obj,R.path=R.path.slice(0,Q.pathLen)},V.prototype.enterKey=function(Q){return this._reporterState.path.push(Q)},V.prototype.exitKey=function(Q){let R=this._reporterState;R.path=R.path.slice(0,Q-1)},V.prototype.leaveKey=function(Q,R,C){let H=this._reporterState;this.exitKey(Q),H.obj!==null&&(H.obj[R]=C)},V.prototype.path=function(){return this._reporterState.path.join("/")},V.prototype.enterObject=function(){let Q=this._reporterState,R=Q.obj;return Q.obj={},R},V.prototype.leaveObject=function(Q){let R=this._reporterState,C=R.obj;return R.obj=Q,C},V.prototype.error=function(Q){let R,C=this._reporterState,H=Q instanceof N;if(H?R=Q:R=new N(C.path.map(function(L){return"["+JSON.stringify(L)+"]"}).join(""),Q.message||Q,Q.stack),!C.options.partial)throw R;return H||C.errors.push(R),R},V.prototype.wrapResult=function(Q){let R=this._reporterState;return R.options.partial?{result:this.isError(Q)?null:Q,errors:R.errors}:Q};function N(Q,R){this.path=Q,this.rethrow(R)}k(N,Error),N.prototype.rethrow=function(Q){if(this.message=Q+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,N),!this.stack)try{throw new Error(this.message)}catch(R){this.stack=R.stack}return this}}),f2=K0((B)=>{var k=c0(),V=X5().Reporter,N=e1().Buffer;function Q(C,H){if(V.call(this,H),!N.isBuffer(C)){this.error("Input not Buffer");return}this.base=C,this.offset=0,this.length=C.length}k(Q,V),B.DecoderBuffer=Q,Q.isDecoderBuffer=function(C){return C instanceof Q?!0:typeof C=="object"&&N.isBuffer(C.base)&&C.constructor.name==="DecoderBuffer"&&typeof C.offset=="number"&&typeof C.length=="number"&&typeof C.save=="function"&&typeof C.restore=="function"&&typeof C.isEmpty=="function"&&typeof C.readUInt8=="function"&&typeof C.skip=="function"&&typeof C.raw=="function"},Q.prototype.save=function(){return{offset:this.offset,reporter:V.prototype.save.call(this)}},Q.prototype.restore=function(C){let H=new Q(this.base);return H.offset=C.offset,H.length=this.offset,this.offset=C.offset,V.prototype.restore.call(this,C.reporter),H},Q.prototype.isEmpty=function(){return this.offset===this.length},Q.prototype.readUInt8=function(C){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(C||"DecoderBuffer overrun")},Q.prototype.skip=function(C,H){if(!(this.offset+C<=this.length))return this.error(H||"DecoderBuffer overrun");let L=new Q(this.base);return L._reporterState=this._reporterState,L.offset=this.offset,L.length=this.offset+C,this.offset+=C,L},Q.prototype.raw=function(C){return this.base.slice(C?C.offset:this.offset,this.length)};function R(C,H){if(Array.isArray(C))this.length=0,this.value=C.map(function(L){return R.isEncoderBuffer(L)||(L=new R(L,H)),this.length+=L.length,L},this);else if(typeof C=="number"){if(!(0<=C&&C<=255))return H.error("non-byte EncoderBuffer value");this.value=C,this.length=1}else if(typeof C=="string")this.value=C,this.length=N.byteLength(C);else if(N.isBuffer(C))this.value=C,this.length=C.length;else return H.error("Unsupported type: "+typeof C)}B.EncoderBuffer=R,R.isEncoderBuffer=function(C){return C instanceof R?!0:typeof C=="object"&&C.constructor.name==="EncoderBuffer"&&typeof C.length=="number"&&typeof C.join=="function"},R.prototype.join=function(C,H){return C||(C=N.alloc(this.length)),H||(H=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(L){L.join(C,H),H+=L.length}):(typeof this.value=="number"?C[H]=this.value:typeof this.value=="string"?C.write(this.value,H):N.isBuffer(this.value)&&this.value.copy(C,H),H+=this.length)),C}}),J5=K0((B,k)=>{var V=X5().Reporter,N=f2().EncoderBuffer,Q=f2().DecoderBuffer,R=D2(),C=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],H=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(C),L=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function P(z,T,q){let F={};this._baseState=F,F.name=q,F.enc=z,F.parent=T||null,F.children=null,F.tag=null,F.args=null,F.reverseArgs=null,F.choice=null,F.optional=!1,F.any=!1,F.obj=!1,F.use=null,F.useDecoder=null,F.key=null,F.default=null,F.explicit=null,F.implicit=null,F.contains=null,F.parent||(F.children=[],this._wrap())}k.exports=P;var U=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];P.prototype.clone=function(){let z=this._baseState,T={};U.forEach(function(F){T[F]=z[F]});let q=new this.constructor(T.parent);return q._baseState=T,q},P.prototype._wrap=function(){let z=this._baseState;H.forEach(function(T){this[T]=function(){let q=new this.constructor(this);return z.children.push(q),q[T].apply(q,arguments)}},this)},P.prototype._init=function(z){let T=this._baseState;R(T.parent===null),z.call(this),T.children=T.children.filter(function(q){return q._baseState.parent===this},this),R.equal(T.children.length,1,"Root node can have only one child")},P.prototype._useArgs=function(z){let T=this._baseState,q=z.filter(function(F){return F instanceof this.constructor},this);z=z.filter(function(F){return!(F instanceof this.constructor)},this),q.length!==0&&(R(T.children===null),T.children=q,q.forEach(function(F){F._baseState.parent=this},this)),z.length!==0&&(R(T.args===null),T.args=z,T.reverseArgs=z.map(function(F){if(typeof F!="object"||F.constructor!==Object)return F;let I={};return Object.keys(F).forEach(function(x){x==(x|0)&&(x|=0);let w=F[x];I[w]=x}),I}))},L.forEach(function(z){P.prototype[z]=function(){let T=this._baseState;throw new Error(z+" not implemented for encoding: "+T.enc)}}),C.forEach(function(z){P.prototype[z]=function(){let T=this._baseState,q=Array.prototype.slice.call(arguments);return R(T.tag===null),T.tag=z,this._useArgs(q),this}}),P.prototype.use=function(z){R(z);let T=this._baseState;return R(T.use===null),T.use=z,this},P.prototype.optional=function(){let z=this._baseState;return z.optional=!0,this},P.prototype.def=function(z){let T=this._baseState;return R(T.default===null),T.default=z,T.optional=!0,this},P.prototype.explicit=function(z){let T=this._baseState;return R(T.explicit===null&&T.implicit===null),T.explicit=z,this},P.prototype.implicit=function(z){let T=this._baseState;return R(T.explicit===null&&T.implicit===null),T.implicit=z,this},P.prototype.obj=function(){let z=this._baseState,T=Array.prototype.slice.call(arguments);return z.obj=!0,T.length!==0&&this._useArgs(T),this},P.prototype.key=function(z){let T=this._baseState;return R(T.key===null),T.key=z,this},P.prototype.any=function(){let z=this._baseState;return z.any=!0,this},P.prototype.choice=function(z){let T=this._baseState;return R(T.choice===null),T.choice=z,this._useArgs(Object.keys(z).map(function(q){return z[q]})),this},P.prototype.contains=function(z){let T=this._baseState;return R(T.use===null),T.contains=z,this},P.prototype._decode=function(z,T){let q=this._baseState;if(q.parent===null)return z.wrapResult(q.children[0]._decode(z,T));let F=q.default,I=!0,x=null;if(q.key!==null&&(x=z.enterKey(q.key)),q.optional){let M=null;if(q.explicit!==null?M=q.explicit:q.implicit!==null?M=q.implicit:q.tag!==null&&(M=q.tag),M===null&&!q.any){let y=z.save();try{q.choice===null?this._decodeGeneric(q.tag,z,T):this._decodeChoice(z,T),I=!0}catch{I=!1}z.restore(y)}else if(I=this._peekTag(z,M,q.any),z.isError(I))return I}let w;if(q.obj&&I&&(w=z.enterObject()),I){if(q.explicit!==null){let y=this._decodeTag(z,q.explicit);if(z.isError(y))return y;z=y}let M=z.offset;if(q.use===null&&q.choice===null){let y;q.any&&(y=z.save());let m=this._decodeTag(z,q.implicit!==null?q.implicit:q.tag,q.any);if(z.isError(m))return m;q.any?F=z.raw(y):z=m}if(T&&T.track&&q.tag!==null&&T.track(z.path(),M,z.length,"tagged"),T&&T.track&&q.tag!==null&&T.track(z.path(),z.offset,z.length,"content"),q.any||(q.choice===null?F=this._decodeGeneric(q.tag,z,T):F=this._decodeChoice(z,T)),z.isError(F))return F;if(!q.any&&q.choice===null&&q.children!==null&&q.children.forEach(function(y){y._decode(z,T)}),q.contains&&(q.tag==="octstr"||q.tag==="bitstr")){let y=new Q(F);F=this._getUse(q.contains,z._reporterState.obj)._decode(y,T)}}return q.obj&&I&&(F=z.leaveObject(w)),q.key!==null&&(F!==null||I===!0)?z.leaveKey(x,q.key,F):x!==null&&z.exitKey(x),F},P.prototype._decodeGeneric=function(z,T,q){let F=this._baseState;return z==="seq"||z==="set"?null:z==="seqof"||z==="setof"?this._decodeList(T,z,F.args[0],q):/str$/.test(z)?this._decodeStr(T,z,q):z==="objid"&&F.args?this._decodeObjid(T,F.args[0],F.args[1],q):z==="objid"?this._decodeObjid(T,null,null,q):z==="gentime"||z==="utctime"?this._decodeTime(T,z,q):z==="null_"?this._decodeNull(T,q):z==="bool"?this._decodeBool(T,q):z==="objDesc"?this._decodeStr(T,z,q):z==="int"||z==="enum"?this._decodeInt(T,F.args&&F.args[0],q):F.use!==null?this._getUse(F.use,T._reporterState.obj)._decode(T,q):T.error("unknown tag: "+z)},P.prototype._getUse=function(z,T){let q=this._baseState;return q.useDecoder=this._use(z,T),R(q.useDecoder._baseState.parent===null),q.useDecoder=q.useDecoder._baseState.children[0],q.implicit!==q.useDecoder._baseState.implicit&&(q.useDecoder=q.useDecoder.clone(),q.useDecoder._baseState.implicit=q.implicit),q.useDecoder},P.prototype._decodeChoice=function(z,T){let q=this._baseState,F=null,I=!1;return Object.keys(q.choice).some(function(x){let w=z.save(),M=q.choice[x];try{let y=M._decode(z,T);if(z.isError(y))return!1;F={type:x,value:y},I=!0}catch{return z.restore(w),!1}return!0},this),I?F:z.error("Choice not matched")},P.prototype._createEncoderBuffer=function(z){return new N(z,this.reporter)},P.prototype._encode=function(z,T,q){let F=this._baseState;if(F.default!==null&&F.default===z)return;let I=this._encodeValue(z,T,q);if(I!==void 0&&!this._skipDefault(I,T,q))return I},P.prototype._encodeValue=function(z,T,q){let F=this._baseState;if(F.parent===null)return F.children[0]._encode(z,T||new V);let I=null;if(this.reporter=T,F.optional&&z===void 0)if(F.default!==null)z=F.default;else return;let x=null,w=!1;if(F.any)I=this._createEncoderBuffer(z);else if(F.choice)I=this._encodeChoice(z,T);else if(F.contains)x=this._getUse(F.contains,q)._encode(z,T),w=!0;else if(F.children)x=F.children.map(function(M){if(M._baseState.tag==="null_")return M._encode(null,T,z);if(M._baseState.key===null)return T.error("Child should have a key");let y=T.enterKey(M._baseState.key);if(typeof z!="object")return T.error("Child expected, but input is not object");let m=M._encode(z[M._baseState.key],T,z);return T.leaveKey(y),m},this).filter(function(M){return M}),x=this._createEncoderBuffer(x);else if(F.tag==="seqof"||F.tag==="setof"){if(!(F.args&&F.args.length===1))return T.error("Too many args for : "+F.tag);if(!Array.isArray(z))return T.error("seqof/setof, but data is not Array");let M=this.clone();M._baseState.implicit=null,x=this._createEncoderBuffer(z.map(function(y){let m=this._baseState;return this._getUse(m.args[0],z)._encode(y,T)},M))}else F.use!==null?I=this._getUse(F.use,q)._encode(z,T):(x=this._encodePrimitive(F.tag,z),w=!0);if(!F.any&&F.choice===null){let M=F.implicit!==null?F.implicit:F.tag,y=F.implicit===null?"universal":"context";M===null?F.use===null&&T.error("Tag could be omitted only for .use()"):F.use===null&&(I=this._encodeComposite(M,w,y,x))}return F.explicit!==null&&(I=this._encodeComposite(F.explicit,!1,"context",I)),I},P.prototype._encodeChoice=function(z,T){let q=this._baseState,F=q.choice[z.type];return F||R(!1,z.type+" not found in "+JSON.stringify(Object.keys(q.choice))),F._encode(z.value,T)},P.prototype._encodePrimitive=function(z,T){let q=this._baseState;if(/str$/.test(z))return this._encodeStr(T,z);if(z==="objid"&&q.args)return this._encodeObjid(T,q.reverseArgs[0],q.args[1]);if(z==="objid")return this._encodeObjid(T,null,null);if(z==="gentime"||z==="utctime")return this._encodeTime(T,z);if(z==="null_")return this._encodeNull();if(z==="int"||z==="enum")return this._encodeInt(T,q.args&&q.reverseArgs[0]);if(z==="bool")return this._encodeBool(T);if(z==="objDesc")return this._encodeStr(T,z);throw new Error("Unsupported tag: "+z)},P.prototype._isNumstr=function(z){return/^[0-9 ]*$/.test(z)},P.prototype._isPrintstr=function(z){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(z)}}),O5=K0((B)=>{function k(V){let N={};return Object.keys(V).forEach(function(Q){(Q|0)==Q&&(Q=Q|0);let R=V[Q];N[R]=Q}),N}B.tagClass={0:"universal",1:"application",2:"context",3:"private"},B.tagClassByName=k(B.tagClass),B.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"},B.tagByName=k(B.tag)}),R6=K0((B,k)=>{var V=c0(),N=e1().Buffer,Q=J5(),R=O5();function C(U){this.enc="der",this.name=U.name,this.entity=U,this.tree=new H,this.tree._init(U.body)}k.exports=C,C.prototype.encode=function(U,z){return this.tree._encode(U,z).join()};function H(U){Q.call(this,"der",U)}V(H,Q),H.prototype._encodeComposite=function(U,z,T,q){let F=P(U,z,T,this.reporter);if(q.length<128){let w=N.alloc(2);return w[0]=F,w[1]=q.length,this._createEncoderBuffer([w,q])}let I=1;for(let w=q.length;w>=256;w>>=8)I++;let x=N.alloc(2+I);x[0]=F,x[1]=128|I;for(let w=1+I,M=q.length;M>0;w--,M>>=8)x[w]=M&255;return this._createEncoderBuffer([x,q])},H.prototype._encodeStr=function(U,z){if(z==="bitstr")return this._createEncoderBuffer([U.unused|0,U.data]);if(z==="bmpstr"){let T=N.alloc(U.length*2);for(let q=0;q<U.length;q++)T.writeUInt16BE(U.charCodeAt(q),q*2);return this._createEncoderBuffer(T)}else return z==="numstr"?this._isNumstr(U)?this._createEncoderBuffer(U):this.reporter.error("Encoding of string type: numstr supports only digits and space"):z==="printstr"?this._isPrintstr(U)?this._createEncoderBuffer(U):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"):/str$/.test(z)?this._createEncoderBuffer(U):z==="objDesc"?this._createEncoderBuffer(U):this.reporter.error("Encoding of string type: "+z+" unsupported")},H.prototype._encodeObjid=function(U,z,T){if(typeof U=="string"){if(!z)return this.reporter.error("string objid given, but no values map found");if(!z.hasOwnProperty(U))return this.reporter.error("objid not found in values map");U=z[U].split(/[\s.]+/g);for(let x=0;x<U.length;x++)U[x]|=0}else if(Array.isArray(U)){U=U.slice();for(let x=0;x<U.length;x++)U[x]|=0}if(!Array.isArray(U))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(U));if(!T){if(U[1]>=40)return this.reporter.error("Second objid identifier OOB");U.splice(0,2,U[0]*40+U[1])}let q=0;for(let x=0;x<U.length;x++){let w=U[x];for(q++;w>=128;w>>=7)q++}let F=N.alloc(q),I=F.length-1;for(let x=U.length-1;x>=0;x--){let w=U[x];for(F[I--]=w&127;(w>>=7)>0;)F[I--]=128|w&127}return this._createEncoderBuffer(F)};function L(U){return U<10?"0"+U:U}H.prototype._encodeTime=function(U,z){let T,q=new Date(U);return z==="gentime"?T=[L(q.getUTCFullYear()),L(q.getUTCMonth()+1),L(q.getUTCDate()),L(q.getUTCHours()),L(q.getUTCMinutes()),L(q.getUTCSeconds()),"Z"].join(""):z==="utctime"?T=[L(q.getUTCFullYear()%100),L(q.getUTCMonth()+1),L(q.getUTCDate()),L(q.getUTCHours()),L(q.getUTCMinutes()),L(q.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+z+" time is not supported yet"),this._encodeStr(T,"octstr")},H.prototype._encodeNull=function(){return this._createEncoderBuffer("")},H.prototype._encodeInt=function(U,z){if(typeof U=="string"){if(!z)return this.reporter.error("String int or enum given, but no values map");if(!z.hasOwnProperty(U))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(U));U=z[U]}if(typeof U!="number"&&!N.isBuffer(U)){let F=U.toArray();!U.sign&&F[0]&128&&F.unshift(0),U=N.from(F)}if(N.isBuffer(U)){let F=U.length;U.length===0&&F++;let I=N.alloc(F);return U.copy(I),U.length===0&&(I[0]=0),this._createEncoderBuffer(I)}if(U<128)return this._createEncoderBuffer(U);if(U<256)return this._createEncoderBuffer([0,U]);let T=1;for(let F=U;F>=256;F>>=8)T++;let q=new Array(T);for(let F=q.length-1;F>=0;F--)q[F]=U&255,U>>=8;return q[0]&128&&q.unshift(0),this._createEncoderBuffer(N.from(q))},H.prototype._encodeBool=function(U){return this._createEncoderBuffer(U?255:0)},H.prototype._use=function(U,z){return typeof U=="function"&&(U=U(z)),U._getEncoder("der").tree},H.prototype._skipDefault=function(U,z,T){let q=this._baseState,F;if(q.default===null)return!1;let I=U.join();if(q.defaultBuffer===void 0&&(q.defaultBuffer=this._encodeValue(q.default,z,T).join()),I.length!==q.defaultBuffer.length)return!1;for(F=0;F<I.length;F++)if(I[F]!==q.defaultBuffer[F])return!1;return!0};function P(U,z,T,q){let F;if(U==="seqof"?U="seq":U==="setof"&&(U="set"),R.tagByName.hasOwnProperty(U))F=R.tagByName[U];else if(typeof U=="number"&&(U|0)===U)F=U;else return q.error("Unknown tag: "+U);return F>=31?q.error("Multi-octet tag encoding unsupported"):(z||(F|=32),F|=R.tagClassByName[T||"universal"]<<6,F)}}),q3=K0((B,k)=>{var V=c0(),N=R6();function Q(R){N.call(this,R),this.enc="pem"}V(Q,N),k.exports=Q,Q.prototype.encode=function(R,C){let H=N.prototype.encode.call(this,R).toString("base64"),L=["-----BEGIN "+C.label+"-----"];for(let P=0;P<H.length;P+=64)L.push(H.slice(P,P+64));return L.push("-----END "+C.label+"-----"),L.join(`
`)}}),q6=K0((B)=>{var k=B;k.der=R6(),k.pem=q3()}),I6=K0((B,k)=>{var V=c0(),N=B6(),Q=f2().DecoderBuffer,R=J5(),C=O5();function H(z){this.enc="der",this.name=z.name,this.entity=z,this.tree=new L,this.tree._init(z.body)}k.exports=H,H.prototype.decode=function(z,T){return Q.isDecoderBuffer(z)||(z=new Q(z,T)),this.tree._decode(z,T)};function L(z){R.call(this,"der",z)}V(L,R),L.prototype._peekTag=function(z,T,q){if(z.isEmpty())return!1;let F=z.save(),I=P(z,'Failed to peek tag: "'+T+'"');return z.isError(I)?I:(z.restore(F),I.tag===T||I.tagStr===T||I.tagStr+"of"===T||q)},L.prototype._decodeTag=function(z,T,q){let F=P(z,'Failed to decode tag of "'+T+'"');if(z.isError(F))return F;let I=U(z,F.primitive,'Failed to get length of "'+T+'"');if(z.isError(I))return I;if(!q&&F.tag!==T&&F.tagStr!==T&&F.tagStr+"of"!==T)return z.error('Failed to match tag: "'+T+'"');if(F.primitive||I!==null)return z.skip(I,'Failed to match body of: "'+T+'"');let x=z.save(),w=this._skipUntilEnd(z,'Failed to skip indefinite length body: "'+this.tag+'"');return z.isError(w)?w:(I=z.offset-x.offset,z.restore(x),z.skip(I,'Failed to match body of: "'+T+'"'))},L.prototype._skipUntilEnd=function(z,T){for(;;){let q=P(z,T);if(z.isError(q))return q;let F=U(z,q.primitive,T);if(z.isError(F))return F;let I;if(q.primitive||F!==null?I=z.skip(F):I=this._skipUntilEnd(z,T),z.isError(I))return I;if(q.tagStr==="end")break}},L.prototype._decodeList=function(z,T,q,F){let I=[];for(;!z.isEmpty();){let x=this._peekTag(z,"end");if(z.isError(x))return x;let w=q.decode(z,"der",F);if(z.isError(w)&&x)break;I.push(w)}return I},L.prototype._decodeStr=function(z,T){if(T==="bitstr"){let q=z.readUInt8();return z.isError(q)?q:{unused:q,data:z.raw()}}else if(T==="bmpstr"){let q=z.raw();if(q.length%2===1)return z.error("Decoding of string type: bmpstr length mismatch");let F="";for(let I=0;I<q.length/2;I++)F+=String.fromCharCode(q.readUInt16BE(I*2));return F}else if(T==="numstr"){let q=z.raw().toString("ascii");return this._isNumstr(q)?q:z.error("Decoding of string type: numstr unsupported characters")}else{if(T==="octstr")return z.raw();if(T==="objDesc")return z.raw();if(T==="printstr"){let q=z.raw().toString("ascii");return this._isPrintstr(q)?q:z.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(T)?z.raw().toString():z.error("Decoding of string type: "+T+" unsupported")}},L.prototype._decodeObjid=function(z,T,q){let F,I=[],x=0,w=0;for(;!z.isEmpty();)w=z.readUInt8(),x<<=7,x|=w&127,(w&128)===0&&(I.push(x),x=0);w&128&&I.push(x);let M=I[0]/40|0,y=I[0]%40;if(q?F=I:F=[M,y].concat(I.slice(1)),T){let m=T[F.join(" ")];m===void 0&&(m=T[F.join(".")]),m!==void 0&&(F=m)}return F},L.prototype._decodeTime=function(z,T){let q=z.raw().toString(),F,I,x,w,M,y;if(T==="gentime")F=q.slice(0,4)|0,I=q.slice(4,6)|0,x=q.slice(6,8)|0,w=q.slice(8,10)|0,M=q.slice(10,12)|0,y=q.slice(12,14)|0;else if(T==="utctime")F=q.slice(0,2)|0,I=q.slice(2,4)|0,x=q.slice(4,6)|0,w=q.slice(6,8)|0,M=q.slice(8,10)|0,y=q.slice(10,12)|0,F<70?F=2000+F:F=1900+F;else return z.error("Decoding "+T+" time is not supported yet");return Date.UTC(F,I-1,x,w,M,y,0)},L.prototype._decodeNull=function(){return null},L.prototype._decodeBool=function(z){let T=z.readUInt8();return z.isError(T)?T:T!==0},L.prototype._decodeInt=function(z,T){let q=z.raw(),F=new N(q);return T&&(F=T[F.toString(10)]||F),F},L.prototype._use=function(z,T){return typeof z=="function"&&(z=z(T)),z._getDecoder("der").tree};function P(z,T){let q=z.readUInt8(T);if(z.isError(q))return q;let F=C.tagClass[q>>6],I=(q&32)===0;if((q&31)===31){let w=q;for(q=0;(w&128)===128;){if(w=z.readUInt8(T),z.isError(w))return w;q<<=7,q|=w&127}}else q&=31;let x=C.tag[q];return{cls:F,primitive:I,tag:q,tagStr:x}}function U(z,T,q){let F=z.readUInt8(q);if(z.isError(F))return F;if(!T&&F===128)return null;if((F&128)===0)return F;let I=F&127;if(I>4)return z.error("length octect is too long");F=0;for(let x=0;x<I;x++){F<<=8;let w=z.readUInt8(q);if(z.isError(w))return w;F|=w}return F}}),I3=K0((B,k)=>{var V=c0(),N=e1().Buffer,Q=I6();function R(C){Q.call(this,C),this.enc="pem"}V(R,Q),k.exports=R,R.prototype.decode=function(C,H){let L=C.toString().split(/[\r\n]+/g),P=H.label.toUpperCase(),U=/^-----(BEGIN|END) ([^-]+)-----$/,z=-1,T=-1;for(let I=0;I<L.length;I++){let x=L[I].match(U);if(x!==null&&x[2]===P)if(z===-1){if(x[1]!=="BEGIN")break;z=I}else{if(x[1]!=="END")break;T=I;break}}if(z===-1||T===-1)throw new Error("PEM section not found for: "+P);let q=L.slice(z+1,T).join("");q.replace(/[^a-z0-9+/=]+/gi,"");let F=N.from(q,"base64");return Q.prototype.decode.call(this,F,H)}}),E6=K0((B)=>{var k=B;k.der=I6(),k.pem=I3()}),E3=K0((B)=>{var k=q6(),V=E6(),N=c0(),Q=B;Q.define=function(C,H){return new R(C,H)};function R(C,H){this.name=C,this.body=H,this.decoders={},this.encoders={}}R.prototype._createNamed=function(C){let H=this.name;function L(P){this._initNamed(P,H)}return N(L,C),L.prototype._initNamed=function(P,U){C.call(this,P,U)},new L(this)},R.prototype._getDecoder=function(C){return C=C||"der",this.decoders.hasOwnProperty(C)||(this.decoders[C]=this._createNamed(V[C])),this.decoders[C]},R.prototype.decode=function(C,H,L){return this._getDecoder(H).decode(C,L)},R.prototype._getEncoder=function(C){return C=C||"der",this.encoders.hasOwnProperty(C)||(this.encoders[C]=this._createNamed(k[C])),this.encoders[C]},R.prototype.encode=function(C,H,L){return this._getEncoder(H).encode(C,L)}}),x3=K0((B)=>{var k=B;k.Reporter=X5().Reporter,k.DecoderBuffer=f2().DecoderBuffer,k.EncoderBuffer=f2().EncoderBuffer,k.Node=J5()}),S3=K0((B)=>{var k=B;k._reverse=function(V){let N={};return Object.keys(V).forEach(function(Q){(Q|0)==Q&&(Q=Q|0);let R=V[Q];N[R]=Q}),N},k.der=O5()}),x6=K0((B)=>{var k=B;k.bignum=B6(),k.define=E3().define,k.base=x3(),k.constants=S3(),k.decoders=E6(),k.encoders=q6()}),v3=K0((B,k)=>{var V=x6(),N=V.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),Q=V.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),R=V.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),C=V.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(R),this.key("subjectPublicKey").bitstr())}),H=V.define("RelativeDistinguishedName",function(){this.setof(Q)}),L=V.define("RDNSequence",function(){this.seqof(H)}),P=V.define("Name",function(){this.choice({rdnSequence:this.use(L)})}),U=V.define("Validity",function(){this.seq().obj(this.key("notBefore").use(N),this.key("notAfter").use(N))}),z=V.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),T=V.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(R),this.key("issuer").use(P),this.key("validity").use(U),this.key("subject").use(P),this.key("subjectPublicKeyInfo").use(C),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(z).optional())}),q=V.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(T),this.key("signatureAlgorithm").use(R),this.key("signatureValue").bitstr())});k.exports=q}),A3=K0((B)=>{var k=x6();B.certificate=v3();var V=k.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())});B.RSAPrivateKey=V;var N=k.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});B.RSAPublicKey=N;var Q=k.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(R),this.key("subjectPublicKey").bitstr())});B.PublicKey=Q;var R=k.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())}),C=k.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(R),this.key("subjectPrivateKey").octstr())});B.PrivateKey=C;var H=k.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())});B.EncryptedPrivateKey=H;var L=k.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())});B.DSAPrivateKey=L,B.DSAparam=k.define("DSAparam",function(){this.int()});var P=k.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(U),this.key("publicKey").optional().explicit(1).bitstr())});B.ECPrivateKey=P;var U=k.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});B.signature=k.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),M3=K0((B,k)=>{k.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"}}),w3=K0((B,k)=>{var V=/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,N=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Q=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,R=F1(),C=u1(),H=h0().Buffer;k.exports=function(L,P){var U=L.toString(),z=U.match(V),T;if(z){var q="aes"+z[1],F=H.from(z[2],"hex"),I=H.from(z[3].replace(/[\r\n]/g,""),"base64"),x=R(P,F.slice(0,8),parseInt(z[1],10)).key,w=[],M=C.createDecipheriv(q,x,F);w.push(M.update(I)),w.push(M.final()),T=H.concat(w)}else{var y=U.match(Q);T=H.from(y[2].replace(/[\r\n]/g,""),"base64")}var m=U.match(N)[1];return{tag:m,data:T}}}),D1=K0((B,k)=>{var V=A3(),N=M3(),Q=w3(),R=u1(),C=O6(),H=h0().Buffer;k.exports=L;function L(U){var z;typeof U=="object"&&!H.isBuffer(U)&&(z=U.passphrase,U=U.key),typeof U=="string"&&(U=H.from(U));var T=Q(U,z),q=T.tag,F=T.data,I,x;switch(q){case"CERTIFICATE":x=V.certificate.decode(F,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(x||(x=V.PublicKey.decode(F,"der")),I=x.algorithm.algorithm.join("."),I){case"1.2.840.113549.1.1.1":return V.RSAPublicKey.decode(x.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return x.subjectPrivateKey=x.subjectPublicKey,{type:"ec",data:x};case"1.2.840.10040.4.1":return x.algorithm.params.pub_key=V.DSAparam.decode(x.subjectPublicKey.data,"der"),{type:"dsa",data:x.algorithm.params};default:throw new Error("unknown key id "+I)}case"ENCRYPTED PRIVATE KEY":F=V.EncryptedPrivateKey.decode(F,"der"),F=P(F,z);case"PRIVATE KEY":switch(x=V.PrivateKey.decode(F,"der"),I=x.algorithm.algorithm.join("."),I){case"1.2.840.113549.1.1.1":return V.RSAPrivateKey.decode(x.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:x.algorithm.curve,privateKey:V.ECPrivateKey.decode(x.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return x.algorithm.params.priv_key=V.DSAparam.decode(x.subjectPrivateKey,"der"),{type:"dsa",params:x.algorithm.params};default:throw new Error("unknown key id "+I)}case"RSA PUBLIC KEY":return V.RSAPublicKey.decode(F,"der");case"RSA PRIVATE KEY":return V.RSAPrivateKey.decode(F,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:V.DSAPrivateKey.decode(F,"der")};case"EC PRIVATE KEY":return F=V.ECPrivateKey.decode(F,"der"),{curve:F.parameters.value,privateKey:F.privateKey};default:throw new Error("unknown key type "+q)}}L.signature=V.signature;function P(U,z){var T=U.algorithm.decrypt.kde.kdeparams.salt,q=parseInt(U.algorithm.decrypt.kde.kdeparams.iters.toString(),10),F=N[U.algorithm.decrypt.cipher.algo.join(".")],I=U.algorithm.decrypt.cipher.iv,x=U.subjectPrivateKey,w=parseInt(F.split("-")[1],10)/8,M=C.pbkdf2Sync(z,T,q,w,"sha1"),y=R.createDecipheriv(F,M,I),m=[];return m.push(y.update(x)),m.push(y.final()),H.concat(m)}}),S6=K0((B,k)=>{k.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}}),y3=K0((B,k)=>{var V=h0().Buffer,N=r5(),Q=a1(),R=t1().ec,C=n1(),H=D1(),L=S6();function P(M,y,m,c,h){var a=H(y);if(a.curve){if(c!=="ecdsa"&&c!=="ecdsa/rsa")throw new Error("wrong private key type");return U(M,a)}else if(a.type==="dsa"){if(c!=="dsa")throw new Error("wrong private key type");return z(M,a,m)}else if(c!=="rsa"&&c!=="ecdsa/rsa")throw new Error("wrong private key type");M=V.concat([h,M]);for(var i=a.modulus.byteLength(),G0=[0,1];M.length+G0.length+1<i;)G0.push(255);G0.push(0);for(var n=-1;++n<M.length;)G0.push(M[n]);var Z0=Q(G0,a);return Z0}function U(M,y){var m=L[y.curve.join(".")];if(!m)throw new Error("unknown curve "+y.curve.join("."));var c=new R(m),h=c.keyFromPrivate(y.privateKey),a=h.sign(M);return V.from(a.toDER())}function z(M,y,m){for(var c=y.params.priv_key,h=y.params.p,a=y.params.q,i=y.params.g,G0=new C(0),n,Z0=F(M,a).mod(a),X=!1,O=q(c,a,M,m);X===!1;)n=x(a,O,m),G0=w(i,n,h,a),X=n.invm(a).imul(Z0.add(c.mul(G0))).mod(a),X.cmpn(0)===0&&(X=!1,G0=new C(0));return T(G0,X)}function T(M,y){M=M.toArray(),y=y.toArray(),M[0]&128&&(M=[0].concat(M)),y[0]&128&&(y=[0].concat(y));var m=M.length+y.length+4,c=[48,m,2,M.length];return c=c.concat(M,[2,y.length],y),V.from(c)}function q(M,y,m,c){if(M=V.from(M.toArray()),M.length<y.byteLength()){var h=V.alloc(y.byteLength()-M.length);M=V.concat([h,M])}var a=m.length,i=I(m,y),G0=V.alloc(a);G0.fill(1);var n=V.alloc(a);return n=N(c,n).update(G0).update(V.from([0])).update(M).update(i).digest(),G0=N(c,n).update(G0).digest(),n=N(c,n).update(G0).update(V.from([1])).update(M).update(i).digest(),G0=N(c,n).update(G0).digest(),{k:n,v:G0}}function F(M,y){var m=new C(M),c=(M.length<<3)-y.bitLength();return c>0&&m.ishrn(c),m}function I(M,y){M=F(M,y),M=M.mod(y);var m=V.from(M.toArray());if(m.length<y.byteLength()){var c=V.alloc(y.byteLength()-m.length);m=V.concat([c,m])}return m}function x(M,y,m){var c,h;do{for(c=V.alloc(0);c.length*8<M.bitLength();)y.v=N(m,y.k).update(y.v).digest(),c=V.concat([c,y.v]);h=F(c,M),y.k=N(m,y.k).update(y.v).update(V.from([0])).digest(),y.v=N(m,y.k).update(y.v).digest()}while(h.cmp(M)!==-1);return h}function w(M,y,m,c){return M.toRed(C.mont(m)).redPow(y).fromRed().mod(c)}k.exports=P,k.exports.getKey=q,k.exports.makeKey=x}),_3=K0((B,k)=>{var V=h0().Buffer,N=n1(),Q=t1().ec,R=D1(),C=S6();function H(z,T,q,F,I){var x=R(q);if(x.type==="ec"){if(F!=="ecdsa"&&F!=="ecdsa/rsa")throw new Error("wrong public key type");return L(z,T,x)}else if(x.type==="dsa"){if(F!=="dsa")throw new Error("wrong public key type");return P(z,T,x)}else if(F!=="rsa"&&F!=="ecdsa/rsa")throw new Error("wrong public key type");T=V.concat([I,T]);for(var w=x.modulus.byteLength(),M=[1],y=0;T.length+M.length+2<w;)M.push(255),y++;M.push(0);for(var m=-1;++m<T.length;)M.push(T[m]);M=V.from(M);var c=N.mont(x.modulus);z=new N(z).toRed(c),z=z.redPow(new N(x.publicExponent)),z=V.from(z.fromRed().toArray());var h=y<8?1:0;for(w=Math.min(z.length,M.length),z.length!==M.length&&(h=1),m=-1;++m<w;)h|=z[m]^M[m];return h===0}function L(z,T,q){var F=C[q.data.algorithm.curve.join(".")];if(!F)throw new Error("unknown curve "+q.data.algorithm.curve.join("."));var I=new Q(F),x=q.data.subjectPrivateKey.data;return I.verify(T,z,x)}function P(z,T,q){var F=q.data.p,I=q.data.q,x=q.data.g,w=q.data.pub_key,M=R.signature.decode(z,"der"),y=M.s,m=M.r;U(y,I),U(m,I);var c=N.mont(F),h=y.invm(I),a=x.toRed(c).redPow(new N(T).mul(h).mod(I)).fromRed().mul(w.toRed(c).redPow(m.mul(h).mod(I)).fromRed()).mod(F).mod(I);return a.cmp(m)===0}function U(z,T){if(z.cmpn(0)<=0)throw new Error("invalid sig");if(z.cmp(T)>=T)throw new Error("invalid sig")}k.exports=H}),g3=K0((B,k)=>{var V=h0().Buffer,N=a2(),Q=C3(),R=c0(),C=y3(),H=_3(),L=i5();Object.keys(L).forEach(function(q){L[q].id=V.from(L[q].id,"hex"),L[q.toLowerCase()]=L[q]});function P(q){Q.Writable.call(this);var F=L[q];if(!F)throw new Error("Unknown message digest");this._hashType=F.hash,this._hash=N(F.hash),this._tag=F.id,this._signType=F.sign}R(P,Q.Writable),P.prototype._write=function(q,F,I){this._hash.update(q),I()},P.prototype.update=function(q,F){return typeof q=="string"&&(q=V.from(q,F)),this._hash.update(q),this},P.prototype.sign=function(q,F){this.end();var I=this._hash.digest(),x=C(I,q,this._hashType,this._signType,this._tag);return F?x.toString(F):x};function U(q){Q.Writable.call(this);var F=L[q];if(!F)throw new Error("Unknown message digest");this._hash=N(F.hash),this._tag=F.id,this._signType=F.sign}R(U,Q.Writable),U.prototype._write=function(q,F,I){this._hash.update(q),I()},U.prototype.update=function(q,F){return typeof q=="string"&&(q=V.from(q,F)),this._hash.update(q),this},U.prototype.verify=function(q,F,I){typeof F=="string"&&(F=V.from(F,I)),this.end();var x=this._hash.digest();return H(F,x,q,this._signType,this._tag)};function z(q){return new P(q)}function T(q){return new U(q)}k.exports={Sign:z,Verify:T,createSign:z,createVerify:T}}),m3=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$<X.length&&(O===16?this._parseHex(X,$,G):(this._parseBase(X,O,$),G==="le"&&this._initArray(this.toArray(),O,G)))},C.prototype._initNumber=function(X,O,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(Q(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),O,G)},C.prototype._initArray=function(X,O,G){if(Q(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y,W,Z=0;if(G==="be")for($=X.length-1,Y=0;$>=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$<X.length;$+=3)W=X[$]|X[$+1]<<8|X[$+2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y=0,W=0,Z;if(G==="be")for($=X.length-1;$>=O;$-=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$<X.length;$+=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z<W;Z++){var K=X.charCodeAt(Z)-48;Y*=$,K>=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j<K;j+=$)J=U(X,j,j+$,O),this.imuln(Y),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(Z!==0){var A=1;for(J=U(X,j,X.length,O),j=0;j<Z;j++)A*=O;this.imuln(A),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},C.prototype.copy=function(X){X.words=new Array(this.length);for(var O=0;O<this.length;O++)X.words[O]=this.words[O];X.length=this.length,X.negative=this.negative,X.red=this.red},C.prototype.clone=function(){var X=new C(null);return this.copy(X),X},C.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},C.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var z=["","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"],T=[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];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W<this.length;W++){var Z=this.words[W],K=((Z<<$|Y)&16777215).toString(16);Y=Z>>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J<Y;J++)Z[J]=0}else{for(J=0;J<Y-$;J++)Z[J]=0;for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[Y-J-1]=K}return Z},Math.clz32?C.prototype._countBits=function(X){return 32-Math.clz32(X)}:C.prototype._countBits=function(X){var O=X,G=0;return O>=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G<O.length;G++){var $=G/26|0,Y=G%26;O[G]=(X.words[$]&1<<Y)>>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;O<this.length;O++){var G=this._zeroBits(this.words[O]);if(X+=G,G!==26)break}return X},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},C.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var O=0;O<X.length;O++)this.words[O]=this.words[O]|X.words[O];return this.strip()},C.prototype.ior=function(X){return Q((this.negative|X.negative)===0),this.iuor(X)},C.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=O.length,this.strip()},C.prototype.iand=function(X){return Q((this.negative|X.negative)===0),this.iuand(X)},C.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$<G.length;$++)this.words[$]=O.words[$]^G.words[$];if(this!==O)for(;$<O.length;$++)this.words[$]=O.words[$];return this.length=O.length,this.strip()},C.prototype.ixor=function(X){return Q((this.negative|X.negative)===0),this.iuxor(X)},C.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$<O;$++)this.words[$]=~this.words[$]&67108863;return G>0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W<G.length;W++)O=(G.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;W<G.length;W++)this.words[W]=G.words[W];return this},C.prototype.add=function(X){var O;return X.negative!==0&&this.negative===0?(X.negative=0,O=this.sub(X),X.negative^=1,O):X.negative===0&&this.negative!==0?(this.negative=0,O=X.sub(this),this.negative=1,O):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z<Y.length;Z++)O=($.words[Z]|0)-(Y.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W<G.length-1;W++){var Z=Y;Y=0;for(var K=$&67108863,J=Math.min(W,O.length-1),j=Math.max(0,W-X.length+1);j<=J;j++){var A=W-j,E=X.words[A]|0,_=O.words[j]|0,s=E*_,r=s&67108863;Z=Z+(s/67108864|0)|0,r=r+K|0,K=r&67108863,Z=Z+(r>>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$<X;$++)O[$]=this.revBin($,G,X);return O},y.prototype.revBin=function(X,O,G){if(X===0||X===G-1)return X;for(var $=0,Y=0;Y<O;Y++)$|=(X&1)<<O-Y-1,X>>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z<W;Z++)$[Z]=O[X[Z]],Y[Z]=G[X[Z]]},y.prototype.transform=function(X,O,G,$,Y,W){this.permute(W,X,O,G,$,Y);for(var Z=1;Z<Y;Z<<=1)for(var K=Z<<1,J=Math.cos(2*Math.PI/K),j=Math.sin(2*Math.PI/K),A=0;A<Y;A+=K)for(var E=J,_=j,s=0;s<Z;s++){var r=G[A+s],O0=$[A+s],o=G[A+s+Z],d=$[A+s+Z],f=E*o-_*d;d=E*d+_*o,o=f,G[A+s]=r+o,$[A+s]=O0+d,G[A+s+Z]=r-o,$[A+s+Z]=O0-d,s!==K&&(f=J*E-j*_,_=J*_+j*E,E=f)}},y.prototype.guessLen13b=function(X,O){var G=Math.max(O,X)|1,$=G&1,Y=0;for(G=G/2|0;G;G=G>>>1)Y++;return 1<<Y+1+$},y.prototype.conjugate=function(X,O,G){if(!(G<=1))for(var $=0;$<G/2;$++){var Y=X[$];X[$]=X[G-$-1],X[G-$-1]=Y,Y=O[$],O[$]=-O[G-$-1],O[G-$-1]=-Y}},y.prototype.normalize13b=function(X,O){for(var G=0,$=0;$<O/2;$++){var Y=Math.round(X[2*$+1]/O)*8192+Math.round(X[2*$]/O)+G;X[$]=Y&67108863,Y<67108864?G=0:G=Y/67108864|0}return X},y.prototype.convert13b=function(X,O,G,$){for(var Y=0,W=0;W<O;W++)Y=Y+(X[W]|0),G[2*W]=Y&8191,Y=Y>>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G<X;G++)O[G]=0;return O},y.prototype.mulp=function(X,O,G){var $=2*this.guessLen13b(X.length,O.length),Y=this.makeRBT($),W=this.stub($),Z=new Array($),K=new Array($),J=new Array($),j=new Array($),A=new Array($),E=new Array($),_=G.words;_.length=$,this.convert13b(X.words,X.length,Z,$),this.convert13b(O.words,O.length,j,$),this.transform(Z,W,K,J,$,Y),this.transform(j,W,A,E,$,Y);for(var s=0;s<$;s++){var r=K[s]*A[s]-J[s]*E[s];J[s]=K[s]*E[s]+J[s]*A[s],K[s]=r}return this.conjugate(K,J,$),this.transform(K,J,_,W,$,Y),this.conjugate(_,W,$),this.normalize13b(_,$),G.negative=X.negative^O.negative,G.length=X.length+O.length,G.strip()},C.prototype.mul=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),this.mulTo(X,O)},C.prototype.mulf=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),M(this,X,O)},C.prototype.imul=function(X){return this.clone().mulTo(X,this)},C.prototype.imuln=function(X){Q(typeof X=="number"),Q(X<67108864);for(var O=0,G=0;G<this.length;G++){var $=(this.words[G]|0)*X,Y=($&67108863)+(O&67108863);O>>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$<O.length&&O[$]===0;$++,G=G.sqr());if(++$<O.length)for(var Y=G.sqr();$<O.length;$++,Y=Y.sqr())O[$]!==0&&(G=G.mul(Y));return G},C.prototype.iushln=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y<this.length;Y++){var Z=this.words[Y]&$,K=(this.words[Y]|0)-Z<<O;this.words[Y]=K|W,W=Z>>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y<G;Y++)this.words[Y]=0;this.length+=G}return this.strip()},C.prototype.ishln=function(X){return Q(this.negative===0),this.iushln(X)},C.prototype.iushrn=function(X,O,G){Q(typeof X=="number"&&X>=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<<Y,K=G;if($-=W,$=Math.max(0,$),K){for(var J=0;J<W;J++)K.words[J]=this.words[J];K.length=W}if(W!==0)if(this.length>W)for(this.length-=W,J=0;J<this.length;J++)this.words[J]=this.words[J+W];else this.words[0]=0,this.length=1;var j=0;for(J=this.length-1;J>=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return!1;var Y=this.words[G];return!!(Y&$)},C.prototype.imaskn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>O<<O;this.words[this.length-1]&=$}return this.strip()},C.prototype.maskn=function(X){return this.clone().imaskn(X)},C.prototype.iaddn=function(X){return Q(typeof X=="number"),Q(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},C.prototype._iaddn=function(X){this.words[0]+=X;for(var O=0;O<this.length&&this.words[O]>=67108864;O++)this.words[O]-=67108864,O===this.length-1?this.words[O+1]=1:this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O<this.length&&this.words[O]<0;O++)this.words[O]+=67108864,this.words[O+1]-=1;return this.strip()},C.prototype.addn=function(X){return this.clone().iaddn(X)},C.prototype.subn=function(X){return this.clone().isubn(X)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function(X,O,G){var $=X.length+G,Y;this._expand($);var W,Z=0;for(Y=0;Y<X.length;Y++){W=(this.words[Y+G]|0)+Z;var K=(X.words[Y]|0)*O;W-=K&67108863,Z=(W>>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y<this.length-G;Y++)W=(this.words[Y+G]|0)+Z,Z=W>>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y<this.length;Y++)W=-(this.words[Y]|0)+Z,Z=W>>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j<J.length;j++)J.words[j]=0}var A=$.clone()._ishlnsubmul(Y,1,K);A.negative===0&&($=A,J&&(J.words[K]=1));for(var E=K-1;E>=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return this._expand(G+1),this.words[G]|=$,this;for(var Y=$,W=G;Y!==0&&W<this.length;W++){var Z=this.words[W]|0;Z+=Y,Y=Z>>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$<X?-1:1}return this.negative!==0?-G|0:G},C.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var O=this.ucmp(X);return this.negative!==0?-O|0:O},C.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var O=0,G=this.length-1;G>=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$<Y?O=-1:$>Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G<this.n?-1:O.ucmp(this.p);return $===0?(O.words[0]=0,O.length=1):$>0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y<X.length;Y++){var Z=X.words[Y]|0;X.words[Y-10]=(Z&G)<<4|W>>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G<X.length;G++){var $=X.words[G]|0;O+=$*977,X.words[G]=O&67108863,O=$*64+(O/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function a(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(a,c);function i(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(i,c);function G0(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(G0,c),G0.prototype.imulK=function(X){for(var O=0,G=0;G<X.length;G++){var $=(X.words[G]|0)*19+O,Y=$&67108863;$>>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<<G);$[0]=new C(1).toRed(this),$[1]=X;for(var Y=2;Y<$.length;Y++)$[Y]=this.mul($[Y-1],X);var W=$[0],Z=0,K=0,J=O.bitLength()%26;for(J===0&&(J=26),Y=O.length-1;Y>=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),p3=K0((B,k)=>{var V=t1(),N=m3();k.exports=function(H){return new R(H)};var Q={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}};Q.p224=Q.secp224r1,Q.p256=Q.secp256r1=Q.prime256v1,Q.p192=Q.secp192r1=Q.prime192v1,Q.p384=Q.secp384r1,Q.p521=Q.secp521r1;function R(H){this.curveType=Q[H],this.curveType||(this.curveType={name:H}),this.curve=new V.ec(this.curveType.name),this.keys=void 0}R.prototype.generateKeys=function(H,L){return this.keys=this.curve.genKeyPair(),this.getPublicKey(H,L)},R.prototype.computeSecret=function(H,L,P){L=L||"utf8",Buffer.isBuffer(H)||(H=new Buffer(H,L));var U=this.curve.keyFromPublic(H).getPublic(),z=U.mul(this.keys.getPrivate()).getX();return C(z,P,this.curveType.byteLength)},R.prototype.getPublicKey=function(H,L){var P=this.keys.getPublic(L==="compressed",!0);return L==="hybrid"&&(P[P.length-1]%2?P[0]=7:P[0]=6),C(P,H)},R.prototype.getPrivateKey=function(H){return C(this.keys.getPrivate(),H)},R.prototype.setPublicKey=function(H,L){return L=L||"utf8",Buffer.isBuffer(H)||(H=new Buffer(H,L)),this.keys._importPublic(H),this},R.prototype.setPrivateKey=function(H,L){L=L||"utf8",Buffer.isBuffer(H)||(H=new Buffer(H,L));var P=new N(H);return P=P.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(P),this};function C(H,L,P){Array.isArray(H)||(H=H.toArray());var U=new Buffer(H);if(P&&U.length<P){var z=new Buffer(P-U.length);z.fill(0),U=Buffer.concat([z,U])}return L?U.toString(L):U}}),v6=K0((B,k)=>{var V=a2(),N=h0().Buffer;k.exports=function(R,C){for(var H=N.alloc(0),L=0,P;H.length<C;)P=Q(L++),H=N.concat([H,V("sha1").update(R).update(P).digest()]);return H.slice(0,C)};function Q(R){var C=N.allocUnsafe(4);return C.writeUInt32BE(R,0),C}}),A6=K0((B,k)=>{k.exports=function(V,N){for(var Q=V.length,R=-1;++R<Q;)V[R]^=N[R];return V}}),$5=K0((B,k)=>{(function(V,N){function Q(X,O){if(!X)throw new Error(O||"Assertion failed")}function R(X,O){X.super_=O;var G=function(){};G.prototype=O.prototype,X.prototype=new G,X.prototype.constructor=X}function C(X,O,G){if(C.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((O==="le"||O==="be")&&(G=O,O=10),this._init(X||0,O||10,G||"be"))}typeof V=="object"?V.exports=C:N.BN=C,C.BN=C,C.wordSize=26;var H;try{typeof window<"u"&&typeof window.Buffer<"u"?H=window.Buffer:H=M2().Buffer}catch{}C.isBN=function(X){return X instanceof C?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===C.wordSize&&Array.isArray(X.words)},C.max=function(X,O){return X.cmp(O)>0?X:O},C.min=function(X,O){return X.cmp(O)<0?X:O},C.prototype._init=function(X,O,G){if(typeof X=="number")return this._initNumber(X,O,G);if(typeof X=="object")return this._initArray(X,O,G);O==="hex"&&(O=16),Q(O===(O|0)&&O>=2&&O<=36),X=X.toString().replace(/\s+/g,"");var $=0;X[0]==="-"&&($++,this.negative=1),$<X.length&&(O===16?this._parseHex(X,$,G):(this._parseBase(X,O,$),G==="le"&&this._initArray(this.toArray(),O,G)))},C.prototype._initNumber=function(X,O,G){X<0&&(this.negative=1,X=-X),X<67108864?(this.words=[X&67108863],this.length=1):X<4503599627370496?(this.words=[X&67108863,X/67108864&67108863],this.length=2):(Q(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),O,G)},C.prototype._initArray=function(X,O,G){if(Q(typeof X.length=="number"),X.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(X.length/3),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y,W,Z=0;if(G==="be")for($=X.length-1,Y=0;$>=0;$-=3)W=X[$]|X[$-1]<<8|X[$-2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);else if(G==="le")for($=0,Y=0;$<X.length;$+=3)W=X[$]|X[$+1]<<8|X[$+2]<<16,this.words[Y]|=W<<Z&67108863,this.words[Y+1]=W>>>26-Z&67108863,Z+=24,Z>=26&&(Z-=26,Y++);return this.strip()};function L(X,O){var G=X.charCodeAt(O);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function P(X,O,G){var $=L(X,G);return G-1>=O&&($|=L(X,G-1)<<4),$}C.prototype._parseHex=function(X,O,G){this.length=Math.ceil((X.length-O)/6),this.words=new Array(this.length);for(var $=0;$<this.length;$++)this.words[$]=0;var Y=0,W=0,Z;if(G==="be")for($=X.length-1;$>=O;$-=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8;else{var K=X.length-O;for($=K%2===0?O+1:O;$<X.length;$+=2)Z=P(X,O,$)<<Y,this.words[W]|=Z&67108863,Y>=18?(Y-=18,W+=1,this.words[W]|=Z>>>26):Y+=8}this.strip()};function U(X,O,G,$){for(var Y=0,W=Math.min(X.length,G),Z=O;Z<W;Z++){var K=X.charCodeAt(Z)-48;Y*=$,K>=49?Y+=K-49+10:K>=17?Y+=K-17+10:Y+=K}return Y}C.prototype._parseBase=function(X,O,G){this.words=[0],this.length=1;for(var $=0,Y=1;Y<=67108863;Y*=O)$++;$--,Y=Y/O|0;for(var W=X.length-G,Z=W%$,K=Math.min(W,W-Z)+G,J=0,j=G;j<K;j+=$)J=U(X,j,j+$,O),this.imuln(Y),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J);if(Z!==0){var A=1;for(J=U(X,j,X.length,O),j=0;j<Z;j++)A*=O;this.imuln(A),this.words[0]+J<67108864?this.words[0]+=J:this._iaddn(J)}this.strip()},C.prototype.copy=function(X){X.words=new Array(this.length);for(var O=0;O<this.length;O++)X.words[O]=this.words[O];X.length=this.length,X.negative=this.negative,X.red=this.red},C.prototype.clone=function(){var X=new C(null);return this.copy(X),X},C.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},C.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var z=["","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"],T=[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];C.prototype.toString=function(X,O){X=X||10,O=O|0||1;var G;if(X===16||X==="hex"){G="";for(var $=0,Y=0,W=0;W<this.length;W++){var Z=this.words[W],K=((Z<<$|Y)&16777215).toString(16);Y=Z>>>24-$&16777215,Y!==0||W!==this.length-1?G=z[6-K.length]+K+G:G=K+G,$+=2,$>=26&&($-=26,W--)}for(Y!==0&&(G=Y.toString(16)+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(X===(X|0)&&X>=2&&X<=36){var J=T[X],j=q[X];G="";var A=this.clone();for(A.negative=0;!A.isZero();){var E=A.modn(j).toString(X);A=A.idivn(j),A.isZero()?G=E+G:G=z[J-E.length]+E+G}for(this.isZero()&&(G="0"+G);G.length%O!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}Q(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var X=this.words[0];return this.length===2?X+=this.words[1]*67108864:this.length===3&&this.words[2]===1?X+=4503599627370496+this.words[1]*67108864:this.length>2&&Q(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(X,O){return Q(typeof H<"u"),this.toArrayLike(H,X,O)},C.prototype.toArray=function(X,O){return this.toArrayLike(Array,X,O)},C.prototype.toArrayLike=function(X,O,G){var $=this.byteLength(),Y=G||Math.max(1,$);Q($<=Y,"byte array longer than desired length"),Q(Y>0,"Requested array length <= 0"),this.strip();var W=O==="le",Z=new X(Y),K,J,j=this.clone();if(W){for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[J]=K;for(;J<Y;J++)Z[J]=0}else{for(J=0;J<Y-$;J++)Z[J]=0;for(J=0;!j.isZero();J++)K=j.andln(255),j.iushrn(8),Z[Y-J-1]=K}return Z},Math.clz32?C.prototype._countBits=function(X){return 32-Math.clz32(X)}:C.prototype._countBits=function(X){var O=X,G=0;return O>=4096&&(G+=13,O>>>=13),O>=64&&(G+=7,O>>>=7),O>=8&&(G+=4,O>>>=4),O>=2&&(G+=2,O>>>=2),G+O},C.prototype._zeroBits=function(X){if(X===0)return 26;var O=X,G=0;return(O&8191)===0&&(G+=13,O>>>=13),(O&127)===0&&(G+=7,O>>>=7),(O&15)===0&&(G+=4,O>>>=4),(O&3)===0&&(G+=2,O>>>=2),(O&1)===0&&G++,G},C.prototype.bitLength=function(){var X=this.words[this.length-1],O=this._countBits(X);return(this.length-1)*26+O};function F(X){for(var O=new Array(X.bitLength()),G=0;G<O.length;G++){var $=G/26|0,Y=G%26;O[G]=(X.words[$]&1<<Y)>>>Y}return O}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,O=0;O<this.length;O++){var G=this._zeroBits(this.words[O]);if(X+=G,G!==26)break}return X},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},C.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var O=0;O<X.length;O++)this.words[O]=this.words[O]|X.words[O];return this.strip()},C.prototype.ior=function(X){return Q((this.negative|X.negative)===0),this.iuor(X)},C.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},C.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},C.prototype.iuand=function(X){var O;this.length>X.length?O=X:O=this;for(var G=0;G<O.length;G++)this.words[G]=this.words[G]&X.words[G];return this.length=O.length,this.strip()},C.prototype.iand=function(X){return Q((this.negative|X.negative)===0),this.iuand(X)},C.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},C.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},C.prototype.iuxor=function(X){var O,G;this.length>X.length?(O=this,G=X):(O=X,G=this);for(var $=0;$<G.length;$++)this.words[$]=O.words[$]^G.words[$];if(this!==O)for(;$<O.length;$++)this.words[$]=O.words[$];return this.length=O.length,this.strip()},C.prototype.ixor=function(X){return Q((this.negative|X.negative)===0),this.iuxor(X)},C.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},C.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},C.prototype.inotn=function(X){Q(typeof X=="number"&&X>=0);var O=Math.ceil(X/26)|0,G=X%26;this._expand(O),G>0&&O--;for(var $=0;$<O;$++)this.words[$]=~this.words[$]&67108863;return G>0&&(this.words[$]=~this.words[$]&67108863>>26-G),this.strip()},C.prototype.notn=function(X){return this.clone().inotn(X)},C.prototype.setn=function(X,O){Q(typeof X=="number"&&X>=0);var G=X/26|0,$=X%26;return this._expand(G+1),O?this.words[G]=this.words[G]|1<<$:this.words[G]=this.words[G]&~(1<<$),this.strip()},C.prototype.iadd=function(X){var O;if(this.negative!==0&&X.negative===0)return this.negative=0,O=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,O=this.isub(X),X.negative=1,O._normSign();var G,$;this.length>X.length?(G=this,$=X):(G=X,$=this);for(var Y=0,W=0;W<$.length;W++)O=(G.words[W]|0)+($.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;for(;Y!==0&&W<G.length;W++)O=(G.words[W]|0)+Y,this.words[W]=O&67108863,Y=O>>>26;if(this.length=G.length,Y!==0)this.words[this.length]=Y,this.length++;else if(G!==this)for(;W<G.length;W++)this.words[W]=G.words[W];return this},C.prototype.add=function(X){var O;return X.negative!==0&&this.negative===0?(X.negative=0,O=this.sub(X),X.negative^=1,O):X.negative===0&&this.negative!==0?(this.negative=0,O=X.sub(this),this.negative=1,O):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},C.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var O=this.iadd(X);return X.negative=1,O._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var G=this.cmp(X);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Y;G>0?($=this,Y=X):($=X,Y=this);for(var W=0,Z=0;Z<Y.length;Z++)O=($.words[Z]|0)-(Y.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;for(;W!==0&&Z<$.length;Z++)O=($.words[Z]|0)+W,W=O>>26,this.words[Z]=O&67108863;if(W===0&&Z<$.length&&$!==this)for(;Z<$.length;Z++)this.words[Z]=$.words[Z];return this.length=Math.max(this.length,Z),$!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(X){return this.clone().isub(X)};function I(X,O,G){G.negative=O.negative^X.negative;var $=X.length+O.length|0;G.length=$,$=$-1|0;var Y=X.words[0]|0,W=O.words[0]|0,Z=Y*W,K=Z&67108863,J=Z/67108864|0;G.words[0]=K;for(var j=1;j<$;j++){for(var A=J>>>26,E=J&67108863,_=Math.min(j,O.length-1),s=Math.max(0,j-X.length+1);s<=_;s++){var r=j-s|0;Y=X.words[r]|0,W=O.words[s]|0,Z=Y*W+E,A+=Z/67108864|0,E=Z&67108863}G.words[j]=E|0,J=A|0}return J!==0?G.words[j]=J|0:G.length--,G.strip()}var x=function(X,O,G){var $=X.words,Y=O.words,W=G.words,Z=0,K,J,j,A=$[0]|0,E=A&8191,_=A>>>13,s=$[1]|0,r=s&8191,O0=s>>>13,o=$[2]|0,d=o&8191,f=o>>>13,U0=$[3]|0,X0=U0&8191,Y0=U0>>>13,g=$[4]|0,S=g&8191,p=g>>>13,e=$[5]|0,J0=e&8191,t=e>>>13,y0=$[6]|0,C0=y0&8191,W0=y0>>>13,_0=$[7]|0,P0=_0&8191,Q0=_0>>>13,d0=$[8]|0,D=d0&8191,v=d0>>>13,b=$[9]|0,l=b&8191,u=b>>>13,F0=Y[0]|0,$0=F0&8191,z0=F0>>>13,b0=Y[1]|0,V0=b0&8191,H0=b0>>>13,g0=Y[2]|0,N0=g0&8191,L0=g0>>>13,K2=Y[3]|0,D0=K2&8191,T0=K2>>>13,l0=Y[4]|0,k0=l0&8191,B0=l0>>>13,j2=Y[5]|0,R0=j2&8191,q0=j2>>>13,W2=Y[6]|0,I0=W2&8191,E0=W2>>>13,Z2=Y[7]|0,x0=Z2&8191,S0=Z2>>>13,Q2=Y[8]|0,v0=Q2&8191,A0=Q2>>>13,z2=Y[9]|0,M0=z2&8191,w0=z2>>>13;G.negative=X.negative^O.negative,G.length=19,K=Math.imul(E,$0),J=Math.imul(E,z0),J=J+Math.imul(_,$0)|0,j=Math.imul(_,z0);var C2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(C2>>>26)|0,C2&=67108863,K=Math.imul(r,$0),J=Math.imul(r,z0),J=J+Math.imul(O0,$0)|0,j=Math.imul(O0,z0),K=K+Math.imul(E,V0)|0,J=J+Math.imul(E,H0)|0,J=J+Math.imul(_,V0)|0,j=j+Math.imul(_,H0)|0;var m0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(m0>>>26)|0,m0&=67108863,K=Math.imul(d,$0),J=Math.imul(d,z0),J=J+Math.imul(f,$0)|0,j=Math.imul(f,z0),K=K+Math.imul(r,V0)|0,J=J+Math.imul(r,H0)|0,J=J+Math.imul(O0,V0)|0,j=j+Math.imul(O0,H0)|0,K=K+Math.imul(E,N0)|0,J=J+Math.imul(E,L0)|0,J=J+Math.imul(_,N0)|0,j=j+Math.imul(_,L0)|0;var p0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(X0,$0),J=Math.imul(X0,z0),J=J+Math.imul(Y0,$0)|0,j=Math.imul(Y0,z0),K=K+Math.imul(d,V0)|0,J=J+Math.imul(d,H0)|0,J=J+Math.imul(f,V0)|0,j=j+Math.imul(f,H0)|0,K=K+Math.imul(r,N0)|0,J=J+Math.imul(r,L0)|0,J=J+Math.imul(O0,N0)|0,j=j+Math.imul(O0,L0)|0,K=K+Math.imul(E,D0)|0,J=J+Math.imul(E,T0)|0,J=J+Math.imul(_,D0)|0,j=j+Math.imul(_,T0)|0;var o0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(o0>>>26)|0,o0&=67108863,K=Math.imul(S,$0),J=Math.imul(S,z0),J=J+Math.imul(p,$0)|0,j=Math.imul(p,z0),K=K+Math.imul(X0,V0)|0,J=J+Math.imul(X0,H0)|0,J=J+Math.imul(Y0,V0)|0,j=j+Math.imul(Y0,H0)|0,K=K+Math.imul(d,N0)|0,J=J+Math.imul(d,L0)|0,J=J+Math.imul(f,N0)|0,j=j+Math.imul(f,L0)|0,K=K+Math.imul(r,D0)|0,J=J+Math.imul(r,T0)|0,J=J+Math.imul(O0,D0)|0,j=j+Math.imul(O0,T0)|0,K=K+Math.imul(E,k0)|0,J=J+Math.imul(E,B0)|0,J=J+Math.imul(_,k0)|0,j=j+Math.imul(_,B0)|0;var u0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(u0>>>26)|0,u0&=67108863,K=Math.imul(J0,$0),J=Math.imul(J0,z0),J=J+Math.imul(t,$0)|0,j=Math.imul(t,z0),K=K+Math.imul(S,V0)|0,J=J+Math.imul(S,H0)|0,J=J+Math.imul(p,V0)|0,j=j+Math.imul(p,H0)|0,K=K+Math.imul(X0,N0)|0,J=J+Math.imul(X0,L0)|0,J=J+Math.imul(Y0,N0)|0,j=j+Math.imul(Y0,L0)|0,K=K+Math.imul(d,D0)|0,J=J+Math.imul(d,T0)|0,J=J+Math.imul(f,D0)|0,j=j+Math.imul(f,T0)|0,K=K+Math.imul(r,k0)|0,J=J+Math.imul(r,B0)|0,J=J+Math.imul(O0,k0)|0,j=j+Math.imul(O0,B0)|0,K=K+Math.imul(E,R0)|0,J=J+Math.imul(E,q0)|0,J=J+Math.imul(_,R0)|0,j=j+Math.imul(_,q0)|0;var s0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul(C0,$0),J=Math.imul(C0,z0),J=J+Math.imul(W0,$0)|0,j=Math.imul(W0,z0),K=K+Math.imul(J0,V0)|0,J=J+Math.imul(J0,H0)|0,J=J+Math.imul(t,V0)|0,j=j+Math.imul(t,H0)|0,K=K+Math.imul(S,N0)|0,J=J+Math.imul(S,L0)|0,J=J+Math.imul(p,N0)|0,j=j+Math.imul(p,L0)|0,K=K+Math.imul(X0,D0)|0,J=J+Math.imul(X0,T0)|0,J=J+Math.imul(Y0,D0)|0,j=j+Math.imul(Y0,T0)|0,K=K+Math.imul(d,k0)|0,J=J+Math.imul(d,B0)|0,J=J+Math.imul(f,k0)|0,j=j+Math.imul(f,B0)|0,K=K+Math.imul(r,R0)|0,J=J+Math.imul(r,q0)|0,J=J+Math.imul(O0,R0)|0,j=j+Math.imul(O0,q0)|0,K=K+Math.imul(E,I0)|0,J=J+Math.imul(E,E0)|0,J=J+Math.imul(_,I0)|0,j=j+Math.imul(_,E0)|0;var f0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(f0>>>26)|0,f0&=67108863,K=Math.imul(P0,$0),J=Math.imul(P0,z0),J=J+Math.imul(Q0,$0)|0,j=Math.imul(Q0,z0),K=K+Math.imul(C0,V0)|0,J=J+Math.imul(C0,H0)|0,J=J+Math.imul(W0,V0)|0,j=j+Math.imul(W0,H0)|0,K=K+Math.imul(J0,N0)|0,J=J+Math.imul(J0,L0)|0,J=J+Math.imul(t,N0)|0,j=j+Math.imul(t,L0)|0,K=K+Math.imul(S,D0)|0,J=J+Math.imul(S,T0)|0,J=J+Math.imul(p,D0)|0,j=j+Math.imul(p,T0)|0,K=K+Math.imul(X0,k0)|0,J=J+Math.imul(X0,B0)|0,J=J+Math.imul(Y0,k0)|0,j=j+Math.imul(Y0,B0)|0,K=K+Math.imul(d,R0)|0,J=J+Math.imul(d,q0)|0,J=J+Math.imul(f,R0)|0,j=j+Math.imul(f,q0)|0,K=K+Math.imul(r,I0)|0,J=J+Math.imul(r,E0)|0,J=J+Math.imul(O0,I0)|0,j=j+Math.imul(O0,E0)|0,K=K+Math.imul(E,x0)|0,J=J+Math.imul(E,S0)|0,J=J+Math.imul(_,x0)|0,j=j+Math.imul(_,S0)|0;var n0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(D,$0),J=Math.imul(D,z0),J=J+Math.imul(v,$0)|0,j=Math.imul(v,z0),K=K+Math.imul(P0,V0)|0,J=J+Math.imul(P0,H0)|0,J=J+Math.imul(Q0,V0)|0,j=j+Math.imul(Q0,H0)|0,K=K+Math.imul(C0,N0)|0,J=J+Math.imul(C0,L0)|0,J=J+Math.imul(W0,N0)|0,j=j+Math.imul(W0,L0)|0,K=K+Math.imul(J0,D0)|0,J=J+Math.imul(J0,T0)|0,J=J+Math.imul(t,D0)|0,j=j+Math.imul(t,T0)|0,K=K+Math.imul(S,k0)|0,J=J+Math.imul(S,B0)|0,J=J+Math.imul(p,k0)|0,j=j+Math.imul(p,B0)|0,K=K+Math.imul(X0,R0)|0,J=J+Math.imul(X0,q0)|0,J=J+Math.imul(Y0,R0)|0,j=j+Math.imul(Y0,q0)|0,K=K+Math.imul(d,I0)|0,J=J+Math.imul(d,E0)|0,J=J+Math.imul(f,I0)|0,j=j+Math.imul(f,E0)|0,K=K+Math.imul(r,x0)|0,J=J+Math.imul(r,S0)|0,J=J+Math.imul(O0,x0)|0,j=j+Math.imul(O0,S0)|0,K=K+Math.imul(E,v0)|0,J=J+Math.imul(E,A0)|0,J=J+Math.imul(_,v0)|0,j=j+Math.imul(_,A0)|0;var a0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(a0>>>26)|0,a0&=67108863,K=Math.imul(l,$0),J=Math.imul(l,z0),J=J+Math.imul(u,$0)|0,j=Math.imul(u,z0),K=K+Math.imul(D,V0)|0,J=J+Math.imul(D,H0)|0,J=J+Math.imul(v,V0)|0,j=j+Math.imul(v,H0)|0,K=K+Math.imul(P0,N0)|0,J=J+Math.imul(P0,L0)|0,J=J+Math.imul(Q0,N0)|0,j=j+Math.imul(Q0,L0)|0,K=K+Math.imul(C0,D0)|0,J=J+Math.imul(C0,T0)|0,J=J+Math.imul(W0,D0)|0,j=j+Math.imul(W0,T0)|0,K=K+Math.imul(J0,k0)|0,J=J+Math.imul(J0,B0)|0,J=J+Math.imul(t,k0)|0,j=j+Math.imul(t,B0)|0,K=K+Math.imul(S,R0)|0,J=J+Math.imul(S,q0)|0,J=J+Math.imul(p,R0)|0,j=j+Math.imul(p,q0)|0,K=K+Math.imul(X0,I0)|0,J=J+Math.imul(X0,E0)|0,J=J+Math.imul(Y0,I0)|0,j=j+Math.imul(Y0,E0)|0,K=K+Math.imul(d,x0)|0,J=J+Math.imul(d,S0)|0,J=J+Math.imul(f,x0)|0,j=j+Math.imul(f,S0)|0,K=K+Math.imul(r,v0)|0,J=J+Math.imul(r,A0)|0,J=J+Math.imul(O0,v0)|0,j=j+Math.imul(O0,A0)|0,K=K+Math.imul(E,M0)|0,J=J+Math.imul(E,w0)|0,J=J+Math.imul(_,M0)|0,j=j+Math.imul(_,w0)|0;var r0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(l,V0),J=Math.imul(l,H0),J=J+Math.imul(u,V0)|0,j=Math.imul(u,H0),K=K+Math.imul(D,N0)|0,J=J+Math.imul(D,L0)|0,J=J+Math.imul(v,N0)|0,j=j+Math.imul(v,L0)|0,K=K+Math.imul(P0,D0)|0,J=J+Math.imul(P0,T0)|0,J=J+Math.imul(Q0,D0)|0,j=j+Math.imul(Q0,T0)|0,K=K+Math.imul(C0,k0)|0,J=J+Math.imul(C0,B0)|0,J=J+Math.imul(W0,k0)|0,j=j+Math.imul(W0,B0)|0,K=K+Math.imul(J0,R0)|0,J=J+Math.imul(J0,q0)|0,J=J+Math.imul(t,R0)|0,j=j+Math.imul(t,q0)|0,K=K+Math.imul(S,I0)|0,J=J+Math.imul(S,E0)|0,J=J+Math.imul(p,I0)|0,j=j+Math.imul(p,E0)|0,K=K+Math.imul(X0,x0)|0,J=J+Math.imul(X0,S0)|0,J=J+Math.imul(Y0,x0)|0,j=j+Math.imul(Y0,S0)|0,K=K+Math.imul(d,v0)|0,J=J+Math.imul(d,A0)|0,J=J+Math.imul(f,v0)|0,j=j+Math.imul(f,A0)|0,K=K+Math.imul(r,M0)|0,J=J+Math.imul(r,w0)|0,J=J+Math.imul(O0,M0)|0,j=j+Math.imul(O0,w0)|0;var i0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(l,N0),J=Math.imul(l,L0),J=J+Math.imul(u,N0)|0,j=Math.imul(u,L0),K=K+Math.imul(D,D0)|0,J=J+Math.imul(D,T0)|0,J=J+Math.imul(v,D0)|0,j=j+Math.imul(v,T0)|0,K=K+Math.imul(P0,k0)|0,J=J+Math.imul(P0,B0)|0,J=J+Math.imul(Q0,k0)|0,j=j+Math.imul(Q0,B0)|0,K=K+Math.imul(C0,R0)|0,J=J+Math.imul(C0,q0)|0,J=J+Math.imul(W0,R0)|0,j=j+Math.imul(W0,q0)|0,K=K+Math.imul(J0,I0)|0,J=J+Math.imul(J0,E0)|0,J=J+Math.imul(t,I0)|0,j=j+Math.imul(t,E0)|0,K=K+Math.imul(S,x0)|0,J=J+Math.imul(S,S0)|0,J=J+Math.imul(p,x0)|0,j=j+Math.imul(p,S0)|0,K=K+Math.imul(X0,v0)|0,J=J+Math.imul(X0,A0)|0,J=J+Math.imul(Y0,v0)|0,j=j+Math.imul(Y0,A0)|0,K=K+Math.imul(d,M0)|0,J=J+Math.imul(d,w0)|0,J=J+Math.imul(f,M0)|0,j=j+Math.imul(f,w0)|0;var t0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(l,D0),J=Math.imul(l,T0),J=J+Math.imul(u,D0)|0,j=Math.imul(u,T0),K=K+Math.imul(D,k0)|0,J=J+Math.imul(D,B0)|0,J=J+Math.imul(v,k0)|0,j=j+Math.imul(v,B0)|0,K=K+Math.imul(P0,R0)|0,J=J+Math.imul(P0,q0)|0,J=J+Math.imul(Q0,R0)|0,j=j+Math.imul(Q0,q0)|0,K=K+Math.imul(C0,I0)|0,J=J+Math.imul(C0,E0)|0,J=J+Math.imul(W0,I0)|0,j=j+Math.imul(W0,E0)|0,K=K+Math.imul(J0,x0)|0,J=J+Math.imul(J0,S0)|0,J=J+Math.imul(t,x0)|0,j=j+Math.imul(t,S0)|0,K=K+Math.imul(S,v0)|0,J=J+Math.imul(S,A0)|0,J=J+Math.imul(p,v0)|0,j=j+Math.imul(p,A0)|0,K=K+Math.imul(X0,M0)|0,J=J+Math.imul(X0,w0)|0,J=J+Math.imul(Y0,M0)|0,j=j+Math.imul(Y0,w0)|0;var e0=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(l,k0),J=Math.imul(l,B0),J=J+Math.imul(u,k0)|0,j=Math.imul(u,B0),K=K+Math.imul(D,R0)|0,J=J+Math.imul(D,q0)|0,J=J+Math.imul(v,R0)|0,j=j+Math.imul(v,q0)|0,K=K+Math.imul(P0,I0)|0,J=J+Math.imul(P0,E0)|0,J=J+Math.imul(Q0,I0)|0,j=j+Math.imul(Q0,E0)|0,K=K+Math.imul(C0,x0)|0,J=J+Math.imul(C0,S0)|0,J=J+Math.imul(W0,x0)|0,j=j+Math.imul(W0,S0)|0,K=K+Math.imul(J0,v0)|0,J=J+Math.imul(J0,A0)|0,J=J+Math.imul(t,v0)|0,j=j+Math.imul(t,A0)|0,K=K+Math.imul(S,M0)|0,J=J+Math.imul(S,w0)|0,J=J+Math.imul(p,M0)|0,j=j+Math.imul(p,w0)|0;var X2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(X2>>>26)|0,X2&=67108863,K=Math.imul(l,R0),J=Math.imul(l,q0),J=J+Math.imul(u,R0)|0,j=Math.imul(u,q0),K=K+Math.imul(D,I0)|0,J=J+Math.imul(D,E0)|0,J=J+Math.imul(v,I0)|0,j=j+Math.imul(v,E0)|0,K=K+Math.imul(P0,x0)|0,J=J+Math.imul(P0,S0)|0,J=J+Math.imul(Q0,x0)|0,j=j+Math.imul(Q0,S0)|0,K=K+Math.imul(C0,v0)|0,J=J+Math.imul(C0,A0)|0,J=J+Math.imul(W0,v0)|0,j=j+Math.imul(W0,A0)|0,K=K+Math.imul(J0,M0)|0,J=J+Math.imul(J0,w0)|0,J=J+Math.imul(t,M0)|0,j=j+Math.imul(t,w0)|0;var J2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(J2>>>26)|0,J2&=67108863,K=Math.imul(l,I0),J=Math.imul(l,E0),J=J+Math.imul(u,I0)|0,j=Math.imul(u,E0),K=K+Math.imul(D,x0)|0,J=J+Math.imul(D,S0)|0,J=J+Math.imul(v,x0)|0,j=j+Math.imul(v,S0)|0,K=K+Math.imul(P0,v0)|0,J=J+Math.imul(P0,A0)|0,J=J+Math.imul(Q0,v0)|0,j=j+Math.imul(Q0,A0)|0,K=K+Math.imul(C0,M0)|0,J=J+Math.imul(C0,w0)|0,J=J+Math.imul(W0,M0)|0,j=j+Math.imul(W0,w0)|0;var O2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(O2>>>26)|0,O2&=67108863,K=Math.imul(l,x0),J=Math.imul(l,S0),J=J+Math.imul(u,x0)|0,j=Math.imul(u,S0),K=K+Math.imul(D,v0)|0,J=J+Math.imul(D,A0)|0,J=J+Math.imul(v,v0)|0,j=j+Math.imul(v,A0)|0,K=K+Math.imul(P0,M0)|0,J=J+Math.imul(P0,w0)|0,J=J+Math.imul(Q0,M0)|0,j=j+Math.imul(Q0,w0)|0;var $2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+($2>>>26)|0,$2&=67108863,K=Math.imul(l,v0),J=Math.imul(l,A0),J=J+Math.imul(u,v0)|0,j=Math.imul(u,A0),K=K+Math.imul(D,M0)|0,J=J+Math.imul(D,w0)|0,J=J+Math.imul(v,M0)|0,j=j+Math.imul(v,w0)|0;var G2=(Z+K|0)+((J&8191)<<13)|0;Z=(j+(J>>>13)|0)+(G2>>>26)|0,G2&=67108863,K=Math.imul(l,M0),J=Math.imul(l,w0),J=J+Math.imul(u,M0)|0,j=Math.imul(u,w0);var Y2=(Z+K|0)+((J&8191)<<13)|0;return Z=(j+(J>>>13)|0)+(Y2>>>26)|0,Y2&=67108863,W[0]=C2,W[1]=m0,W[2]=p0,W[3]=o0,W[4]=u0,W[5]=s0,W[6]=f0,W[7]=n0,W[8]=a0,W[9]=r0,W[10]=i0,W[11]=t0,W[12]=e0,W[13]=X2,W[14]=J2,W[15]=O2,W[16]=$2,W[17]=G2,W[18]=Y2,Z!==0&&(W[19]=Z,G.length++),G};Math.imul||(x=I);function w(X,O,G){G.negative=O.negative^X.negative,G.length=X.length+O.length;for(var $=0,Y=0,W=0;W<G.length-1;W++){var Z=Y;Y=0;for(var K=$&67108863,J=Math.min(W,O.length-1),j=Math.max(0,W-X.length+1);j<=J;j++){var A=W-j,E=X.words[A]|0,_=O.words[j]|0,s=E*_,r=s&67108863;Z=Z+(s/67108864|0)|0,r=r+K|0,K=r&67108863,Z=Z+(r>>>26)|0,Y+=Z>>>26,Z&=67108863}G.words[W]=K,$=Z,Z=Y}return $!==0?G.words[W]=$:G.length--,G.strip()}function M(X,O,G){var $=new y;return $.mulp(X,O,G)}C.prototype.mulTo=function(X,O){var G,$=this.length+X.length;return this.length===10&&X.length===10?G=x(this,X,O):$<63?G=I(this,X,O):$<1024?G=w(this,X,O):G=M(this,X,O),G};function y(X,O){this.x=X,this.y=O}y.prototype.makeRBT=function(X){for(var O=new Array(X),G=C.prototype._countBits(X)-1,$=0;$<X;$++)O[$]=this.revBin($,G,X);return O},y.prototype.revBin=function(X,O,G){if(X===0||X===G-1)return X;for(var $=0,Y=0;Y<O;Y++)$|=(X&1)<<O-Y-1,X>>=1;return $},y.prototype.permute=function(X,O,G,$,Y,W){for(var Z=0;Z<W;Z++)$[Z]=O[X[Z]],Y[Z]=G[X[Z]]},y.prototype.transform=function(X,O,G,$,Y,W){this.permute(W,X,O,G,$,Y);for(var Z=1;Z<Y;Z<<=1)for(var K=Z<<1,J=Math.cos(2*Math.PI/K),j=Math.sin(2*Math.PI/K),A=0;A<Y;A+=K)for(var E=J,_=j,s=0;s<Z;s++){var r=G[A+s],O0=$[A+s],o=G[A+s+Z],d=$[A+s+Z],f=E*o-_*d;d=E*d+_*o,o=f,G[A+s]=r+o,$[A+s]=O0+d,G[A+s+Z]=r-o,$[A+s+Z]=O0-d,s!==K&&(f=J*E-j*_,_=J*_+j*E,E=f)}},y.prototype.guessLen13b=function(X,O){var G=Math.max(O,X)|1,$=G&1,Y=0;for(G=G/2|0;G;G=G>>>1)Y++;return 1<<Y+1+$},y.prototype.conjugate=function(X,O,G){if(!(G<=1))for(var $=0;$<G/2;$++){var Y=X[$];X[$]=X[G-$-1],X[G-$-1]=Y,Y=O[$],O[$]=-O[G-$-1],O[G-$-1]=-Y}},y.prototype.normalize13b=function(X,O){for(var G=0,$=0;$<O/2;$++){var Y=Math.round(X[2*$+1]/O)*8192+Math.round(X[2*$]/O)+G;X[$]=Y&67108863,Y<67108864?G=0:G=Y/67108864|0}return X},y.prototype.convert13b=function(X,O,G,$){for(var Y=0,W=0;W<O;W++)Y=Y+(X[W]|0),G[2*W]=Y&8191,Y=Y>>>13,G[2*W+1]=Y&8191,Y=Y>>>13;for(W=2*O;W<$;++W)G[W]=0;Q(Y===0),Q((Y&-8192)===0)},y.prototype.stub=function(X){for(var O=new Array(X),G=0;G<X;G++)O[G]=0;return O},y.prototype.mulp=function(X,O,G){var $=2*this.guessLen13b(X.length,O.length),Y=this.makeRBT($),W=this.stub($),Z=new Array($),K=new Array($),J=new Array($),j=new Array($),A=new Array($),E=new Array($),_=G.words;_.length=$,this.convert13b(X.words,X.length,Z,$),this.convert13b(O.words,O.length,j,$),this.transform(Z,W,K,J,$,Y),this.transform(j,W,A,E,$,Y);for(var s=0;s<$;s++){var r=K[s]*A[s]-J[s]*E[s];J[s]=K[s]*E[s]+J[s]*A[s],K[s]=r}return this.conjugate(K,J,$),this.transform(K,J,_,W,$,Y),this.conjugate(_,W,$),this.normalize13b(_,$),G.negative=X.negative^O.negative,G.length=X.length+O.length,G.strip()},C.prototype.mul=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),this.mulTo(X,O)},C.prototype.mulf=function(X){var O=new C(null);return O.words=new Array(this.length+X.length),M(this,X,O)},C.prototype.imul=function(X){return this.clone().mulTo(X,this)},C.prototype.imuln=function(X){Q(typeof X=="number"),Q(X<67108864);for(var O=0,G=0;G<this.length;G++){var $=(this.words[G]|0)*X,Y=($&67108863)+(O&67108863);O>>=26,O+=$/67108864|0,O+=Y>>>26,this.words[G]=Y&67108863}return O!==0&&(this.words[G]=O,this.length++),this},C.prototype.muln=function(X){return this.clone().imuln(X)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(X){var O=F(X);if(O.length===0)return new C(1);for(var G=this,$=0;$<O.length&&O[$]===0;$++,G=G.sqr());if(++$<O.length)for(var Y=G.sqr();$<O.length;$++,Y=Y.sqr())O[$]!==0&&(G=G.mul(Y));return G},C.prototype.iushln=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=67108863>>>26-O<<26-O,Y;if(O!==0){var W=0;for(Y=0;Y<this.length;Y++){var Z=this.words[Y]&$,K=(this.words[Y]|0)-Z<<O;this.words[Y]=K|W,W=Z>>>26-O}W&&(this.words[Y]=W,this.length++)}if(G!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+G]=this.words[Y];for(Y=0;Y<G;Y++)this.words[Y]=0;this.length+=G}return this.strip()},C.prototype.ishln=function(X){return Q(this.negative===0),this.iushln(X)},C.prototype.iushrn=function(X,O,G){Q(typeof X=="number"&&X>=0);var $;O?$=(O-O%26)/26:$=0;var Y=X%26,W=Math.min((X-Y)/26,this.length),Z=67108863^67108863>>>Y<<Y,K=G;if($-=W,$=Math.max(0,$),K){for(var J=0;J<W;J++)K.words[J]=this.words[J];K.length=W}if(W!==0)if(this.length>W)for(this.length-=W,J=0;J<this.length;J++)this.words[J]=this.words[J+W];else this.words[0]=0,this.length=1;var j=0;for(J=this.length-1;J>=0&&(j!==0||J>=$);J--){var A=this.words[J]|0;this.words[J]=j<<26-Y|A>>>Y,j=A&Z}return K&&j!==0&&(K.words[K.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(X,O,G){return Q(this.negative===0),this.iushrn(X,O,G)},C.prototype.shln=function(X){return this.clone().ishln(X)},C.prototype.ushln=function(X){return this.clone().iushln(X)},C.prototype.shrn=function(X){return this.clone().ishrn(X)},C.prototype.ushrn=function(X){return this.clone().iushrn(X)},C.prototype.testn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return!1;var Y=this.words[G];return!!(Y&$)},C.prototype.imaskn=function(X){Q(typeof X=="number"&&X>=0);var O=X%26,G=(X-O)/26;if(Q(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(O!==0&&G++,this.length=Math.min(G,this.length),O!==0){var $=67108863^67108863>>>O<<O;this.words[this.length-1]&=$}return this.strip()},C.prototype.maskn=function(X){return this.clone().imaskn(X)},C.prototype.iaddn=function(X){return Q(typeof X=="number"),Q(X<67108864),X<0?this.isubn(-X):this.negative!==0?this.length===1&&(this.words[0]|0)<X?(this.words[0]=X-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(X),this.negative=1,this):this._iaddn(X)},C.prototype._iaddn=function(X){this.words[0]+=X;for(var O=0;O<this.length&&this.words[O]>=67108864;O++)this.words[O]-=67108864,O===this.length-1?this.words[O+1]=1:this.words[O+1]++;return this.length=Math.max(this.length,O+1),this},C.prototype.isubn=function(X){if(Q(typeof X=="number"),Q(X<67108864),X<0)return this.iaddn(-X);if(this.negative!==0)return this.negative=0,this.iaddn(X),this.negative=1,this;if(this.words[0]-=X,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var O=0;O<this.length&&this.words[O]<0;O++)this.words[O]+=67108864,this.words[O+1]-=1;return this.strip()},C.prototype.addn=function(X){return this.clone().iaddn(X)},C.prototype.subn=function(X){return this.clone().isubn(X)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function(X,O,G){var $=X.length+G,Y;this._expand($);var W,Z=0;for(Y=0;Y<X.length;Y++){W=(this.words[Y+G]|0)+Z;var K=(X.words[Y]|0)*O;W-=K&67108863,Z=(W>>26)-(K/67108864|0),this.words[Y+G]=W&67108863}for(;Y<this.length-G;Y++)W=(this.words[Y+G]|0)+Z,Z=W>>26,this.words[Y+G]=W&67108863;if(Z===0)return this.strip();for(Q(Z===-1),Z=0,Y=0;Y<this.length;Y++)W=-(this.words[Y]|0)+Z,Z=W>>26,this.words[Y]=W&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(X,O){var G=this.length-X.length,$=this.clone(),Y=X,W=Y.words[Y.length-1]|0,Z=this._countBits(W);G=26-Z,G!==0&&(Y=Y.ushln(G),$.iushln(G),W=Y.words[Y.length-1]|0);var K=$.length-Y.length,J;if(O!=="mod"){J=new C(null),J.length=K+1,J.words=new Array(J.length);for(var j=0;j<J.length;j++)J.words[j]=0}var A=$.clone()._ishlnsubmul(Y,1,K);A.negative===0&&($=A,J&&(J.words[K]=1));for(var E=K-1;E>=0;E--){var _=($.words[Y.length+E]|0)*67108864+($.words[Y.length+E-1]|0);for(_=Math.min(_/W|0,67108863),$._ishlnsubmul(Y,_,E);$.negative!==0;)_--,$.negative=0,$._ishlnsubmul(Y,1,E),$.isZero()||($.negative^=1);J&&(J.words[E]=_)}return J&&J.strip(),$.strip(),O!=="div"&&G!==0&&$.iushrn(G),{div:J||null,mod:$}},C.prototype.divmod=function(X,O,G){if(Q(!X.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var $,Y,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,O),O!=="mod"&&($=W.div.neg()),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.iadd(X)),{div:$,mod:Y}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),O),O!=="mod"&&($=W.div.neg()),{div:$,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),O),O!=="div"&&(Y=W.mod.neg(),G&&Y.negative!==0&&Y.isub(X)),{div:W.div,mod:Y}):X.length>this.length||this.cmp(X)<0?{div:new C(0),mod:this}:X.length===1?O==="div"?{div:this.divn(X.words[0]),mod:null}:O==="mod"?{div:null,mod:new C(this.modn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new C(this.modn(X.words[0]))}:this._wordDiv(X,O)},C.prototype.div=function(X){return this.divmod(X,"div",!1).div},C.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},C.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},C.prototype.divRound=function(X){var O=this.divmod(X);if(O.mod.isZero())return O.div;var G=O.div.negative!==0?O.mod.isub(X):O.mod,$=X.ushrn(1),Y=X.andln(1),W=G.cmp($);return W<0||Y===1&&W===0?O.div:O.div.negative!==0?O.div.isubn(1):O.div.iaddn(1)},C.prototype.modn=function(X){Q(X<=67108863);for(var O=67108864%X,G=0,$=this.length-1;$>=0;$--)G=(O*G+(this.words[$]|0))%X;return G},C.prototype.idivn=function(X){Q(X<=67108863);for(var O=0,G=this.length-1;G>=0;G--){var $=(this.words[G]|0)+O*67108864;this.words[G]=$/X|0,O=$%X}return this.strip()},C.prototype.divn=function(X){return this.clone().idivn(X)},C.prototype.egcd=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=new C(0),Z=new C(1),K=0;O.isEven()&&G.isEven();)O.iushrn(1),G.iushrn(1),++K;for(var J=G.clone(),j=O.clone();!O.isZero();){for(var A=0,E=1;(O.words[0]&E)===0&&A<26;++A,E<<=1);if(A>0)for(O.iushrn(A);A-- >0;)($.isOdd()||Y.isOdd())&&($.iadd(J),Y.isub(j)),$.iushrn(1),Y.iushrn(1);for(var _=0,s=1;(G.words[0]&s)===0&&_<26;++_,s<<=1);if(_>0)for(G.iushrn(_);_-- >0;)(W.isOdd()||Z.isOdd())&&(W.iadd(J),Z.isub(j)),W.iushrn(1),Z.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(W),Y.isub(Z)):(G.isub(O),W.isub($),Z.isub(Y))}return{a:W,b:Z,gcd:G.iushln(K)}},C.prototype._invmp=function(X){Q(X.negative===0),Q(!X.isZero());var O=this,G=X.clone();O.negative!==0?O=O.umod(X):O=O.clone();for(var $=new C(1),Y=new C(0),W=G.clone();O.cmpn(1)>0&&G.cmpn(1)>0;){for(var Z=0,K=1;(O.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(O.iushrn(Z);Z-- >0;)$.isOdd()&&$.iadd(W),$.iushrn(1);for(var J=0,j=1;(G.words[0]&j)===0&&J<26;++J,j<<=1);if(J>0)for(G.iushrn(J);J-- >0;)Y.isOdd()&&Y.iadd(W),Y.iushrn(1);O.cmp(G)>=0?(O.isub(G),$.isub(Y)):(G.isub(O),Y.isub($))}var A;return O.cmpn(1)===0?A=$:A=Y,A.cmpn(0)<0&&A.iadd(X),A},C.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var O=this.clone(),G=X.clone();O.negative=0,G.negative=0;for(var $=0;O.isEven()&&G.isEven();$++)O.iushrn(1),G.iushrn(1);do{for(;O.isEven();)O.iushrn(1);for(;G.isEven();)G.iushrn(1);var Y=O.cmp(G);if(Y<0){var W=O;O=G,G=W}else if(Y===0||G.cmpn(1)===0)break;O.isub(G)}while(!0);return G.iushln($)},C.prototype.invm=function(X){return this.egcd(X).a.umod(X)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(X){return this.words[0]&X},C.prototype.bincn=function(X){Q(typeof X=="number");var O=X%26,G=(X-O)/26,$=1<<O;if(this.length<=G)return this._expand(G+1),this.words[G]|=$,this;for(var Y=$,W=G;Y!==0&&W<this.length;W++){var Z=this.words[W]|0;Z+=Y,Y=Z>>>26,Z&=67108863,this.words[W]=Z}return Y!==0&&(this.words[W]=Y,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(X){var O=X<0;if(this.negative!==0&&!O)return-1;if(this.negative===0&&O)return 1;this.strip();var G;if(this.length>1)G=1;else{O&&(X=-X),Q(X<=67108863,"Number is too big");var $=this.words[0]|0;G=$===X?0:$<X?-1:1}return this.negative!==0?-G|0:G},C.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var O=this.ucmp(X);return this.negative!==0?-O|0:O},C.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var O=0,G=this.length-1;G>=0;G--){var $=this.words[G]|0,Y=X.words[G]|0;if($!==Y){$<Y?O=-1:$>Y&&(O=1);break}}return O},C.prototype.gtn=function(X){return this.cmpn(X)===1},C.prototype.gt=function(X){return this.cmp(X)===1},C.prototype.gten=function(X){return this.cmpn(X)>=0},C.prototype.gte=function(X){return this.cmp(X)>=0},C.prototype.ltn=function(X){return this.cmpn(X)===-1},C.prototype.lt=function(X){return this.cmp(X)===-1},C.prototype.lten=function(X){return this.cmpn(X)<=0},C.prototype.lte=function(X){return this.cmp(X)<=0},C.prototype.eqn=function(X){return this.cmpn(X)===0},C.prototype.eq=function(X){return this.cmp(X)===0},C.red=function(X){return new n(X)},C.prototype.toRed=function(X){return Q(!this.red,"Already a number in reduction context"),Q(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},C.prototype.fromRed=function(){return Q(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(X){return this.red=X,this},C.prototype.forceRed=function(X){return Q(!this.red,"Already a number in reduction context"),this._forceRed(X)},C.prototype.redAdd=function(X){return Q(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},C.prototype.redIAdd=function(X){return Q(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},C.prototype.redSub=function(X){return Q(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},C.prototype.redISub=function(X){return Q(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},C.prototype.redShl=function(X){return Q(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},C.prototype.redMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},C.prototype.redIMul=function(X){return Q(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},C.prototype.redSqr=function(){return Q(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return Q(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return Q(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return Q(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return Q(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(X){return Q(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var m={k256:null,p224:null,p192:null,p25519:null};function c(X,O){this.name=X,this.p=new C(O,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}c.prototype._tmp=function(){var X=new C(null);return X.words=new Array(Math.ceil(this.n/13)),X},c.prototype.ireduce=function(X){var O=X,G;do this.split(O,this.tmp),O=this.imulK(O),O=O.iadd(this.tmp),G=O.bitLength();while(G>this.n);var $=G<this.n?-1:O.ucmp(this.p);return $===0?(O.words[0]=0,O.length=1):$>0?O.isub(this.p):O.strip!==void 0?O.strip():O._strip(),O},c.prototype.split=function(X,O){X.iushrn(this.n,0,O)},c.prototype.imulK=function(X){return X.imul(this.k)};function h(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}R(h,c),h.prototype.split=function(X,O){for(var G=4194303,$=Math.min(X.length,9),Y=0;Y<$;Y++)O.words[Y]=X.words[Y];if(O.length=$,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(O.words[O.length++]=W&G,Y=10;Y<X.length;Y++){var Z=X.words[Y]|0;X.words[Y-10]=(Z&G)<<4|W>>>22,W=Z}W>>>=22,X.words[Y-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},h.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var O=0,G=0;G<X.length;G++){var $=X.words[G]|0;O+=$*977,X.words[G]=O&67108863,O=$*64+(O/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function a(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}R(a,c);function i(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}R(i,c);function G0(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}R(G0,c),G0.prototype.imulK=function(X){for(var O=0,G=0;G<X.length;G++){var $=(X.words[G]|0)*19+O,Y=$&67108863;$>>>=26,X.words[G]=Y,O=$}return O!==0&&(X.words[X.length++]=O),X},C._prime=function(X){if(m[X])return m[X];var O;if(X==="k256")O=new h;else if(X==="p224")O=new a;else if(X==="p192")O=new i;else if(X==="p25519")O=new G0;else throw new Error("Unknown prime "+X);return m[X]=O,O};function n(X){if(typeof X=="string"){var O=C._prime(X);this.m=O.p,this.prime=O}else Q(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}n.prototype._verify1=function(X){Q(X.negative===0,"red works only with positives"),Q(X.red,"red works only with red numbers")},n.prototype._verify2=function(X,O){Q((X.negative|O.negative)===0,"red works only with positives"),Q(X.red&&X.red===O.red,"red works only with red numbers")},n.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):X.umod(this.m)._forceRed(this)},n.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},n.prototype.add=function(X,O){this._verify2(X,O);var G=X.add(O);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},n.prototype.iadd=function(X,O){this._verify2(X,O);var G=X.iadd(O);return G.cmp(this.m)>=0&&G.isub(this.m),G},n.prototype.sub=function(X,O){this._verify2(X,O);var G=X.sub(O);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},n.prototype.isub=function(X,O){this._verify2(X,O);var G=X.isub(O);return G.cmpn(0)<0&&G.iadd(this.m),G},n.prototype.shl=function(X,O){return this._verify1(X),this.imod(X.ushln(O))},n.prototype.imul=function(X,O){return this._verify2(X,O),this.imod(X.imul(O))},n.prototype.mul=function(X,O){return this._verify2(X,O),this.imod(X.mul(O))},n.prototype.isqr=function(X){return this.imul(X,X.clone())},n.prototype.sqr=function(X){return this.mul(X,X)},n.prototype.sqrt=function(X){if(X.isZero())return X.clone();var O=this.m.andln(3);if(Q(O%2===1),O===3){var G=this.m.add(new C(1)).iushrn(2);return this.pow(X,G)}for(var $=this.m.subn(1),Y=0;!$.isZero()&&$.andln(1)===0;)Y++,$.iushrn(1);Q(!$.isZero());var W=new C(1).toRed(this),Z=W.redNeg(),K=this.m.subn(1).iushrn(1),J=this.m.bitLength();for(J=new C(2*J*J).toRed(this);this.pow(J,K).cmp(Z)!==0;)J.redIAdd(Z);for(var j=this.pow(J,$),A=this.pow(X,$.addn(1).iushrn(1)),E=this.pow(X,$),_=Y;E.cmp(W)!==0;){for(var s=E,r=0;s.cmp(W)!==0;r++)s=s.redSqr();Q(r<_);var O0=this.pow(j,new C(1).iushln(_-r-1));A=A.redMul(O0),j=O0.redSqr(),E=E.redMul(j),_=r}return A},n.prototype.invm=function(X){var O=X._invmp(this.m);return O.negative!==0?(O.negative=0,this.imod(O).redNeg()):this.imod(O)},n.prototype.pow=function(X,O){if(O.isZero())return new C(1).toRed(this);if(O.cmpn(1)===0)return X.clone();var G=4,$=new Array(1<<G);$[0]=new C(1).toRed(this),$[1]=X;for(var Y=2;Y<$.length;Y++)$[Y]=this.mul($[Y-1],X);var W=$[0],Z=0,K=0,J=O.bitLength()%26;for(J===0&&(J=26),Y=O.length-1;Y>=0;Y--){for(var j=O.words[Y],A=J-1;A>=0;A--){var E=j>>A&1;if(W!==$[0]&&(W=this.sqr(W)),E===0&&Z===0){K=0;continue}Z<<=1,Z|=E,K++,!(K!==G&&(Y!==0||A!==0))&&(W=this.mul(W,$[Z]),K=0,Z=0)}J=26}return W},n.prototype.convertTo=function(X){var O=X.umod(this.m);return O===X?O.clone():O},n.prototype.convertFrom=function(X){var O=X.clone();return O.red=null,O},C.mont=function(X){return new Z0(X)};function Z0(X){n.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}R(Z0,n),Z0.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},Z0.prototype.convertFrom=function(X){var O=this.imod(X.mul(this.rinv));return O.red=null,O},Z0.prototype.imul=function(X,O){if(X.isZero()||O.isZero())return X.words[0]=0,X.length=1,X;var G=X.imul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.mul=function(X,O){if(X.isZero()||O.isZero())return new C(0)._forceRed(this);var G=X.mul(O),$=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=G.isub($).iushrn(this.shift),W=Y;return Y.cmp(this.m)>=0?W=Y.isub(this.m):Y.cmpn(0)<0&&(W=Y.iadd(this.m)),W._forceRed(this)},Z0.prototype.invm=function(X){var O=this.imod(X._invmp(this.m).mul(this.r2));return O._forceRed(this)}})(typeof k>"u"||k,B)}),M6=K0((B,k)=>{var V=$5(),N=h0().Buffer;function Q(R,C){return N.from(R.toRed(V.mont(C.modulus)).redPow(new V(C.publicExponent)).fromRed().toArray())}k.exports=Q}),c3=K0((B,k)=>{var V=D1(),N=g2(),Q=a2(),R=v6(),C=A6(),H=$5(),L=M6(),P=a1(),U=h0().Buffer;k.exports=function(F,I,x){var w;F.padding?w=F.padding:x?w=1:w=4;var M=V(F),y;if(w===4)y=z(M,I);else if(w===1)y=T(M,I,x);else if(w===3){if(y=new H(I),y.cmp(M.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return x?P(y,M):L(y,M)};function z(F,I){var x=F.modulus.byteLength(),w=I.length,M=Q("sha1").update(U.alloc(0)).digest(),y=M.length,m=2*y;if(w>x-m-2)throw new Error("message too long");var c=U.alloc(x-w-m-2),h=x-y-1,a=N(y),i=C(U.concat([M,c,U.alloc(1,1),I],h),R(a,h)),G0=C(a,R(i,y));return new H(U.concat([U.alloc(1),G0,i],x))}function T(F,I,x){var w=I.length,M=F.modulus.byteLength();if(w>M-11)throw new Error("message too long");var y;return x?y=U.alloc(M-w-3,255):y=q(M-w-3),new H(U.concat([U.from([0,x?1:2]),y,U.alloc(1),I],M))}function q(F){for(var I=U.allocUnsafe(F),x=0,w=N(F*2),M=0,y;x<F;)M===w.length&&(w=N(F*2),M=0),y=w[M++],y&&(I[x++]=y);return I}}),b3=K0((B,k)=>{var V=D1(),N=v6(),Q=A6(),R=$5(),C=a1(),H=a2(),L=M6(),P=h0().Buffer;k.exports=function(q,F,I){var x;q.padding?x=q.padding:I?x=1:x=4;var w=V(q),M=w.modulus.byteLength();if(F.length>M||new R(F).cmp(w.modulus)>=0)throw new Error("decryption error");var y;I?y=L(new R(F),w):y=C(F,w);var m=P.alloc(M-y.length);if(y=P.concat([m,y],M),x===4)return U(w,y);if(x===1)return z(w,y,I);if(x===3)return y;throw new Error("unknown padding")};function U(q,F){var I=q.modulus.byteLength(),x=H("sha1").update(P.alloc(0)).digest(),w=x.length;if(F[0]!==0)throw new Error("decryption error");var M=F.slice(1,w+1),y=F.slice(w+1),m=Q(M,N(y,w)),c=Q(y,N(m,I-w-1));if(T(x,c.slice(0,w)))throw new Error("decryption error");for(var h=w;c[h]===0;)h++;if(c[h++]!==1)throw new Error("decryption error");return c.slice(h)}function z(q,F,I){for(var x=F.slice(0,2),w=2,M=0;F[w++]!==0;)if(w>=F.length){M++;break}var y=F.slice(2,w-1);if((x.toString("hex")!=="0002"&&!I||x.toString("hex")!=="0001"&&I)&&M++,y.length<8&&M++,M)throw new Error("decryption error");return F.slice(w)}function T(q,F){q=P.from(q),F=P.from(F);var I=0,x=q.length;q.length!==F.length&&(I++,x=Math.min(q.length,F.length));for(var w=-1;++w<x;)I+=q[w]^F[w];return I}}),d3=K0((B)=>{B.publicEncrypt=c3(),B.privateDecrypt=b3(),B.privateEncrypt=function(k,V){return B.publicEncrypt(k,V,!0)},B.publicDecrypt=function(k,V){return B.privateDecrypt(k,V,!0)}}),h3=K0((B)=>{function k(){throw new Error(`secure random number generation not supported by this browser
use chrome, FireFox or Internet Explorer 11`)}var V=h0(),N=g2(),Q=V.Buffer,R=V.kMaxLength,C=global.crypto||global.msCrypto,H=Math.pow(2,32)-1;function L(q,F){if(typeof q!="number"||q!==q)throw new TypeError("offset must be a number");if(q>H||q<0)throw new TypeError("offset must be a uint32");if(q>R||q>F)throw new RangeError("offset out of range")}function P(q,F,I){if(typeof q!="number"||q!==q)throw new TypeError("size must be a number");if(q>H||q<0)throw new TypeError("size must be a uint32");if(q+F>I||q>R)throw new RangeError("buffer too small")}C&&C.getRandomValues?(B.randomFill=U,B.randomFillSync=T):(B.randomFill=k,B.randomFillSync=k);function U(q,F,I,x){if(!Q.isBuffer(q)&&!(q instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof F=="function")x=F,F=0,I=q.length;else if(typeof I=="function")x=I,I=q.length-F;else if(typeof x!="function")throw new TypeError('"cb" argument must be a function');return L(F,q.length),P(I,F,q.length),z(q,F,I,x)}function z(q,F,I,x){var w=q.buffer,M=new Uint8Array(w,F,I);if(C.getRandomValues(M),x){process.nextTick(function(){x(null,q)});return}return q;var y}function T(q,F,I){if(typeof F>"u"&&(F=0),!Q.isBuffer(q)&&!(q instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return L(F,q.length),I===void 0&&(I=q.length-F),P(I,F,q.length),z(q,F,I)}}),w6=K0((B)=>{B.randomBytes=B.rng=B.pseudoRandomBytes=B.prng=g2(),B.createHash=B.Hash=a2(),B.createHmac=B.Hmac=r5();var k=w8(),V=Object.keys(k),N=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(V);B.getHashes=function(){return N};var Q=O6();B.pbkdf2=Q.pbkdf2,B.pbkdf2Sync=Q.pbkdf2Sync;var R=a8();B.Cipher=R.Cipher,B.createCipher=R.createCipher,B.Cipheriv=R.Cipheriv,B.createCipheriv=R.createCipheriv,B.Decipher=R.Decipher,B.createDecipher=R.createDecipher,B.Decipheriv=R.Decipheriv,B.createDecipheriv=R.createDecipheriv,B.getCiphers=R.getCiphers,B.listCiphers=R.listCiphers;var C=X3();B.DiffieHellmanGroup=C.DiffieHellmanGroup,B.createDiffieHellmanGroup=C.createDiffieHellmanGroup,B.getDiffieHellman=C.getDiffieHellman,B.createDiffieHellman=C.createDiffieHellman,B.DiffieHellman=C.DiffieHellman;var H=g3();B.createSign=H.createSign,B.Sign=H.Sign,B.createVerify=H.createVerify,B.Verify=H.Verify,B.createECDH=p3();var L=d3();B.publicEncrypt=L.publicEncrypt,B.privateEncrypt=L.privateEncrypt,B.publicDecrypt=L.publicDecrypt,B.privateDecrypt=L.privateDecrypt;var P=h3();B.randomFill=P.randomFill,B.randomFillSync=P.randomFillSync,B.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
`))},B.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}}),y6={};z1(y6,{DEFAULT_ENCODING:()=>_2,default:()=>_6,getCurves:()=>C5,getRandomValues:()=>G5,randomUUID:()=>Y5,scrypt:()=>L1,scryptSync:()=>N1,timingSafeEqual:()=>n2,webcrypto:()=>K5});A1(y6,E2(w6()));l3=E2(w6()),o3=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"],n2="timingSafeEqual"in crypto?(B,k)=>{let{byteLength:V}=B,{byteLength:N}=k;if(typeof V!="number"||typeof N!="number")throw new TypeError("Input must be an array buffer view");if(V!==N)throw new RangeError("Input buffers must have the same length");return crypto.timingSafeEqual(B,k)}:void 0,N1="scryptSync"in crypto?(B,k,V,N)=>{let Q=crypto.scryptSync(B,k,V,N);return _2!=="buffer"?new Buffer(Q).toString(_2):new Buffer(Q)}:void 0,L1="scryptSync"in crypto?function(B,k,V,N,Q){if(typeof N=="function"&&(Q=N,N=void 0),typeof Q!="function"){var R=new TypeError("callback must be a function");throw R.code="ERR_INVALID_CALLBACK",R}try{let C=crypto.scryptSync(B,k,V,N);process.nextTick(Q,null,_2!=="buffer"?new Buffer(C).toString(_2):new Buffer(C))}catch(C){throw C}}:void 0;n2&&(Object.defineProperty(n2,"name",{value:"::bunternal::"}),Object.defineProperty(L1,"name",{value:"::bunternal::"}),Object.defineProperty(N1,"name",{value:"::bunternal::"}));K5=crypto,_6={...l3,getRandomValues:G5,randomUUID:Y5,timingSafeEqual:n2,scryptSync:N1,scrypt:L1,webcrypto:K5,getCurves:C5};/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */});var d6=K8((Z4,d2)=>{function p6(B,k,V){if(k.length!==4)throw new j0.exception.invalid("invalid aes block size");var N=B.b[V],Q=k[0]^N[0],R=k[V?3:1]^N[1],C=k[2]^N[2];k=k[V?1:3]^N[3];var H,L,P,U=N.length/4-2,z,T=4,q=[0,0,0,0];H=B.s[V],B=H[0];var F=H[1],I=H[2],x=H[3],w=H[4];for(z=0;z<U;z++)H=B[Q>>>24]^F[R>>16&255]^I[C>>8&255]^x[k&255]^N[T],L=B[R>>>24]^F[C>>16&255]^I[k>>8&255]^x[Q&255]^N[T+1],P=B[C>>>24]^F[k>>16&255]^I[Q>>8&255]^x[R&255]^N[T+2],k=B[k>>>24]^F[Q>>16&255]^I[R>>8&255]^x[C&255]^N[T+3],T+=4,Q=H,R=L,C=P;for(z=0;4>z;z++)q[V?3&-z:z]=w[Q>>>24]<<24^w[R>>16&255]<<16^w[C>>8&255]<<8^w[k&255]^N[T++],H=Q,Q=R,R=C,C=k,k=H;return q}function j5(B,k){var V,N,Q,R=B.F,C=B.b,H=R[0],L=R[1],P=R[2],U=R[3],z=R[4],T=R[5],q=R[6],F=R[7];for(V=0;64>V;V++)16>V?N=k[V]:(N=k[V+1&15],Q=k[V+14&15],N=k[V&15]=(N>>>7^N>>>18^N>>>3^N<<25^N<<14)+(Q>>>17^Q>>>19^Q>>>10^Q<<15^Q<<13)+k[V&15]+k[V+9&15]|0),N=N+F+(z>>>6^z>>>11^z>>>25^z<<26^z<<21^z<<7)+(q^z&(T^q))+C[V],F=q,q=T,T=z,z=U+N|0,U=P,P=L,L=H,H=N+(L&P^U&(L^P))+(L>>>2^L>>>13^L>>>22^L<<30^L<<19^L<<10)|0;R[0]=R[0]+H|0,R[1]=R[1]+L|0,R[2]=R[2]+P|0,R[3]=R[3]+U|0,R[4]=R[4]+z|0,R[5]=R[5]+T|0,R[6]=R[6]+q|0,R[7]=R[7]+F|0}function c6(B,k){var V,N=j0.random.K[B],Q=[];for(V in N)N.hasOwnProperty(V)&&Q.push(N[V]);for(V=0;V<Q.length;V++)Q[V](k)}function t2(B,k){typeof window!=="undefined"&&window.performance&&typeof window.performance.now==="function"?B.addEntropy(window.performance.now(),k,"loadtime"):B.addEntropy((new Date()).valueOf(),k,"loadtime")}function b6(B){B.b=W5(B).concat(W5(B)),B.L=new j0.cipher.aes(B.b)}function W5(B){for(var k=0;4>k&&(B.h[k]=B.h[k]+1|0,!B.h[k]);k++);return B.L.encrypt(B.h)}function e2(B,k){return function(){k.apply(B,arguments)}}var j0={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(B){this.toString=function(){return"CORRUPT: "+this.message},this.message=B},invalid:function(B){this.toString=function(){return"INVALID: "+this.message},this.message=B},bug:function(B){this.toString=function(){return"BUG: "+this.message},this.message=B},notReady:function(B){this.toString=function(){return"NOT READY: "+this.message},this.message=B}}};j0.cipher.aes=function(B){this.s[0][0][0]||this.O();var k,V,N,Q,R=this.s[0][4],C=this.s[1];k=B.length;var H=1;if(k!==4&&k!==6&&k!==8)throw new j0.exception.invalid("invalid aes key size");this.b=[N=B.slice(0),Q=[]];for(B=k;B<4*k+28;B++){if(V=N[B-1],B%k===0||k===8&&B%k===4)V=R[V>>>24]<<24^R[V>>16&255]<<16^R[V>>8&255]<<8^R[V&255],B%k===0&&(V=V<<8^V>>>24^H<<24,H=H<<1^283*(H>>7));N[B]=N[B-k]^V}for(k=0;B;k++,B--)V=N[k&3?B:B-4],Q[k]=4>=B||4>k?V:C[0][R[V>>>24]]^C[1][R[V>>16&255]]^C[2][R[V>>8&255]]^C[3][R[V&255]]};j0.cipher.aes.prototype={encrypt:function(B){return p6(this,B,0)},decrypt:function(B){return p6(this,B,1)},s:[[[],[],[],[],[]],[[],[],[],[],[]]],O:function(){var B=this.s[0],k=this.s[1],V=B[4],N=k[4],Q,R,C,H=[],L=[],P,U,z,T;for(Q=0;256>Q;Q++)L[(H[Q]=Q<<1^283*(Q>>7))^Q]=Q;for(R=C=0;!V[R];R^=P||1,C=L[C]||1)for(z=C^C<<1^C<<2^C<<3^C<<4,z=z>>8^z&255^99,V[R]=z,N[z]=R,U=H[Q=H[P=H[R]]],T=16843009*U^65537*Q^257*P^16843008*R,U=257*H[z]^16843008*z,Q=0;4>Q;Q++)B[Q][R]=U=U<<24^U>>>8,k[Q][z]=T=T<<24^T>>>8;for(Q=0;5>Q;Q++)B[Q]=B[Q].slice(0),k[Q]=k[Q].slice(0)}};j0.bitArray={bitSlice:function(B,k,V){return B=j0.bitArray.$(B.slice(k/32),32-(k&31)).slice(1),V===void 0?B:j0.bitArray.clamp(B,V-k)},extract:function(B,k,V){var N=Math.floor(-k-V&31);return((k+V-1^k)&-32?B[k/32|0]<<32-N^B[k/32+1|0]>>>N:B[k/32|0]>>>N)&(1<<V)-1},concat:function(B,k){if(B.length===0||k.length===0)return B.concat(k);var V=B[B.length-1],N=j0.bitArray.getPartial(V);return N===32?B.concat(k):j0.bitArray.$(k,N,V|0,B.slice(0,B.length-1))},bitLength:function(B){var k=B.length;return k===0?0:32*(k-1)+j0.bitArray.getPartial(B[k-1])},clamp:function(B,k){if(32*B.length<k)return B;B=B.slice(0,Math.ceil(k/32));var V=B.length;return k=k&31,0<V&&k&&(B[V-1]=j0.bitArray.partial(k,B[V-1]&2147483648>>k-1,1)),B},partial:function(B,k,V){return B===32?k:(V?k|0:k<<32-B)+1099511627776*B},getPartial:function(B){return Math.round(B/1099511627776)||32},equal:function(B,k){if(j0.bitArray.bitLength(B)!==j0.bitArray.bitLength(k))return!1;var V=0,N;for(N=0;N<B.length;N++)V|=B[N]^k[N];return V===0},$:function(B,k,V,N){var Q=0;for(N===void 0&&(N=[]);32<=k;k-=32)N.push(V),V=0;if(k===0)return N.concat(B);for(Q=0;Q<B.length;Q++)N.push(V|B[Q]>>>k),V=B[Q]<<32-k;return Q=B.length?B[B.length-1]:0,B=j0.bitArray.getPartial(Q),N.push(j0.bitArray.partial(k+B&31,32<k+B?V:N.pop(),1)),N},i:function(B,k){return[B[0]^k[0],B[1]^k[1],B[2]^k[2],B[3]^k[3]]},byteswapM:function(B){var k,V;for(k=0;k<B.length;++k)V=B[k],B[k]=V>>>24|V>>>8&65280|(V&65280)<<8|V<<24;return B}};j0.codec.utf8String={fromBits:function(B){var k="",V=j0.bitArray.bitLength(B),N,Q;for(N=0;N<V/8;N++)(N&3)===0&&(Q=B[N/4]),k+=String.fromCharCode(Q>>>8>>>8>>>8),Q<<=8;return decodeURIComponent(escape(k))},toBits:function(B){B=unescape(encodeURIComponent(B));var k=[],V,N=0;for(V=0;V<B.length;V++)N=N<<8|B.charCodeAt(V),(V&3)===3&&(k.push(N),N=0);return V&3&&k.push(j0.bitArray.partial(8*(V&3),N)),k}};j0.codec.hex={fromBits:function(B){var k="",V;for(V=0;V<B.length;V++)k+=((B[V]|0)+263882790666240).toString(16).substr(4);return k.substr(0,j0.bitArray.bitLength(B)/4)},toBits:function(B){var k,V=[],N;B=B.replace(/\s|0x/g,""),N=B.length,B=B+"00000000";for(k=0;k<B.length;k+=8)V.push(parseInt(B.substr(k,8),16)^0);return j0.bitArray.clamp(V,4*N)}};j0.codec.base32={B:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",X:"0123456789ABCDEFGHIJKLMNOPQRSTUV",BITS:32,BASE:5,REMAINING:27,fromBits:function(B,k,V){var N=j0.codec.base32.BASE,Q=j0.codec.base32.REMAINING,R="",C=0,H=j0.codec.base32.B,L=0,P=j0.bitArray.bitLength(B);V&&(H=j0.codec.base32.X);for(V=0;R.length*N<P;)R+=H.charAt((L^B[V]>>>C)>>>Q),C<N?(L=B[V]<<N-C,C+=Q,V++):(L<<=N,C-=N);for(;R.length&7&&!k;)R+="=";return R},toBits:function(B,k){B=B.replace(/\s|=/g,"").toUpperCase();var V=j0.codec.base32.BITS,N=j0.codec.base32.BASE,Q=j0.codec.base32.REMAINING,R=[],C,H=0,L=j0.codec.base32.B,P=0,U,z="base32";k&&(L=j0.codec.base32.X,z="base32hex");for(C=0;C<B.length;C++){if(U=L.indexOf(B.charAt(C)),0>U){if(!k)try{return j0.codec.base32hex.toBits(B)}catch(T){}throw new j0.exception.invalid("this isn't "+z+"!")}H>Q?(H-=Q,R.push(P^U>>>H),P=U<<V-H):(H+=N,P^=U<<V-H)}return H&56&&R.push(j0.bitArray.partial(H&56,P,1)),R}};j0.codec.base32hex={fromBits:function(B,k){return j0.codec.base32.fromBits(B,k,1)},toBits:function(B){return j0.codec.base32.toBits(B,1)}};j0.codec.base64={B:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(B,k,V){var N="",Q=0,R=j0.codec.base64.B,C=0,H=j0.bitArray.bitLength(B);V&&(R=R.substr(0,62)+"-_");for(V=0;6*N.length<H;)N+=R.charAt((C^B[V]>>>Q)>>>26),6>Q?(C=B[V]<<6-Q,Q+=26,V++):(C<<=6,Q-=6);for(;N.length&3&&!k;)N+="=";return N},toBits:function(B,k){B=B.replace(/\s|=/g,"");var V=[],N,Q=0,R=j0.codec.base64.B,C=0,H;k&&(R=R.substr(0,62)+"-_");for(N=0;N<B.length;N++){if(H=R.indexOf(B.charAt(N)),0>H)throw new j0.exception.invalid("this isn't base64!");26<Q?(Q-=26,V.push(C^H>>>Q),C=H<<32-Q):(Q+=6,C^=H<<32-Q)}return Q&56&&V.push(j0.bitArray.partial(Q&56,C,1)),V}};j0.codec.base64url={fromBits:function(B){return j0.codec.base64.fromBits(B,1,1)},toBits:function(B){return j0.codec.base64.toBits(B,1)}};j0.hash.sha256=function(B){this.b[0]||this.O(),B?(this.F=B.F.slice(0),this.A=B.A.slice(0),this.l=B.l):this.reset()};j0.hash.sha256.hash=function(B){return new j0.hash.sha256().update(B).finalize()};j0.hash.sha256.prototype={blockSize:512,reset:function(){return this.F=this.Y.slice(0),this.A=[],this.l=0,this},update:function(B){typeof B==="string"&&(B=j0.codec.utf8String.toBits(B));var k,V=this.A=j0.bitArray.concat(this.A,B);if(k=this.l,B=this.l=k+j0.bitArray.bitLength(B),9007199254740991<B)throw new j0.exception.invalid("Cannot hash more than 2^53 - 1 bits");if(typeof Uint32Array!=="undefined"){var N=new Uint32Array(V),Q=0;for(k=512+k-(512+k&511);k<=B;k+=512)j5(this,N.subarray(16*Q,16*(Q+1))),Q+=1;V.splice(0,16*Q)}else for(k=512+k-(512+k&511);k<=B;k+=512)j5(this,V.splice(0,16));return this},finalize:function(){var B,V=this.A,k=this.F,V=j0.bitArray.concat(V,[j0.bitArray.partial(1,1)]);for(B=V.length+2;B&15;B++)V.push(0);V.push(Math.floor(this.l/4294967296));for(V.push(this.l|0);V.length;)j5(this,V.splice(0,16));return this.reset(),k},Y:[],b:[],O:function(){function B(R){return 4294967296*(R-Math.floor(R))|0}for(var k=0,V=2,N,Q;64>k;V++){Q=!0;for(N=2;N*N<=V;N++)if(V%N===0){Q=!1;break}Q&&(8>k&&(this.Y[k]=B(Math.pow(V,0.5))),this.b[k]=B(Math.pow(V,0.3333333333333333)),k++)}}};j0.mode.ccm={name:"ccm",G:[],listenProgress:function(B){j0.mode.ccm.G.push(B)},unListenProgress:function(B){B=j0.mode.ccm.G.indexOf(B),-1<B&&j0.mode.ccm.G.splice(B,1)},fa:function(B){var k=j0.mode.ccm.G.slice(),V;for(V=0;V<k.length;V+=1)k[V](B)},encrypt:function(B,k,V,N,Q){var R,C=k.slice(0),H=j0.bitArray,L=H.bitLength(V)/8,P=H.bitLength(C)/8;if(Q=Q||64,N=N||[],7>L)throw new j0.exception.invalid("ccm: iv must be at least 7 bytes");for(R=2;4>R&&P>>>8*R;R++);return R<15-L&&(R=15-L),V=H.clamp(V,8*(15-R)),k=j0.mode.ccm.V(B,k,V,N,Q,R),C=j0.mode.ccm.C(B,C,V,k,Q,R),H.concat(C.data,C.tag)},decrypt:function(B,k,V,N,Q){Q=Q||64,N=N||[];var R=j0.bitArray,C=R.bitLength(V)/8,P=R.bitLength(k),H=R.clamp(k,P-Q),L=R.bitSlice(k,P-Q),P=(P-Q)/8;if(7>C)throw new j0.exception.invalid("ccm: iv must be at least 7 bytes");for(k=2;4>k&&P>>>8*k;k++);if(k<15-C&&(k=15-C),V=R.clamp(V,8*(15-k)),H=j0.mode.ccm.C(B,H,V,L,Q,k),B=j0.mode.ccm.V(B,H.data,V,N,Q,k),!R.equal(H.tag,B))throw new j0.exception.corrupt("ccm: tag doesn't match");return H.data},na:function(B,k,V,N,Q,R){var C=[],H=j0.bitArray,L=H.i;if(N=[H.partial(8,(k.length?64:0)|N-2<<2|R-1)],N=H.concat(N,V),N[3]|=Q,N=B.encrypt(N),k.length)for(V=H.bitLength(k)/8,65279>=V?C=[H.partial(16,V)]:4294967295>=V&&(C=H.concat([H.partial(16,65534)],[V])),C=H.concat(C,k),k=0;k<C.length;k+=4)N=B.encrypt(L(N,C.slice(k,k+4).concat([0,0,0])));return N},V:function(B,k,V,N,Q,R){var C=j0.bitArray,H=C.i;if(Q/=8,Q%2||4>Q||16<Q)throw new j0.exception.invalid("ccm: invalid tag length");if(4294967295<N.length||4294967295<k.length)throw new j0.exception.bug("ccm: can't deal with 4GiB or more data");V=j0.mode.ccm.na(B,N,V,Q,C.bitLength(k)/8,R);for(N=0;N<k.length;N+=4)V=B.encrypt(H(V,k.slice(N,N+4).concat([0,0,0])));return C.clamp(V,8*Q)},C:function(B,k,V,N,Q,R){var C,H=j0.bitArray;C=H.i;var L=k.length,P=H.bitLength(k),U=L/50,z=U;if(V=H.concat([H.partial(8,R-1)],V).concat([0,0,0]).slice(0,4),N=H.bitSlice(C(N,B.encrypt(V)),0,Q),!L)return{tag:N,data:[]};for(C=0;C<L;C+=4)C>U&&(j0.mode.ccm.fa(C/L),U+=z),V[3]++,Q=B.encrypt(V),k[C]^=Q[0],k[C+1]^=Q[1],k[C+2]^=Q[2],k[C+3]^=Q[3];return{tag:N,data:H.clamp(k,P)}}};j0.mode.ocb2={name:"ocb2",encrypt:function(B,k,V,N,Q,R){if(j0.bitArray.bitLength(V)!==128)throw new j0.exception.invalid("ocb iv must be 128 bits");var C,H=j0.mode.ocb2.S,L=j0.bitArray,P=L.i,U=[0,0,0,0];V=H(B.encrypt(V));var z,T=[];N=N||[],Q=Q||64;for(C=0;C+4<k.length;C+=4)z=k.slice(C,C+4),U=P(U,z),T=T.concat(P(V,B.encrypt(P(V,z)))),V=H(V);return z=k.slice(C),k=L.bitLength(z),C=B.encrypt(P(V,[0,0,0,k])),z=L.clamp(P(z.concat([0,0,0]),C),k),U=P(U,P(z.concat([0,0,0]),C)),U=B.encrypt(P(U,P(V,H(V)))),N.length&&(U=P(U,R?N:j0.mode.ocb2.pmac(B,N))),T.concat(L.concat(z,L.clamp(U,Q)))},decrypt:function(B,k,V,N,Q,R){if(j0.bitArray.bitLength(V)!==128)throw new j0.exception.invalid("ocb iv must be 128 bits");Q=Q||64;var C=j0.mode.ocb2.S,H=j0.bitArray,L=H.i,P=[0,0,0,0],U=C(B.encrypt(V)),z,T,q=j0.bitArray.bitLength(k)-Q,F=[];N=N||[];for(V=0;V+4<q/32;V+=4)z=L(U,B.decrypt(L(U,k.slice(V,V+4)))),P=L(P,z),F=F.concat(z),U=C(U);if(T=q-32*V,z=B.encrypt(L(U,[0,0,0,T])),z=L(z,H.clamp(k.slice(V),T).concat([0,0,0])),P=L(P,z),P=B.encrypt(L(P,L(U,C(U)))),N.length&&(P=L(P,R?N:j0.mode.ocb2.pmac(B,N))),!H.equal(H.clamp(P,Q),H.bitSlice(k,q)))throw new j0.exception.corrupt("ocb: tag doesn't match");return F.concat(H.clamp(z,T))},pmac:function(B,k){var V,N=j0.mode.ocb2.S,Q=j0.bitArray,R=Q.i,C=[0,0,0,0],H=B.encrypt([0,0,0,0]),H=R(H,N(N(H)));for(V=0;V+4<k.length;V+=4)H=N(H),C=R(C,B.encrypt(R(H,k.slice(V,V+4))));return V=k.slice(V),128>Q.bitLength(V)&&(H=R(H,N(H)),V=Q.concat(V,[-2147483648,0,0,0])),C=R(C,V),B.encrypt(R(N(R(H,N(H))),C))},S:function(B){return[B[0]<<1^B[1]>>>31,B[1]<<1^B[2]>>>31,B[2]<<1^B[3]>>>31,B[3]<<1^135*(B[0]>>>31)]}};j0.mode.gcm={name:"gcm",encrypt:function(B,k,V,N,Q){var R=k.slice(0);return k=j0.bitArray,N=N||[],B=j0.mode.gcm.C(!0,B,R,N,V,Q||128),k.concat(B.data,B.tag)},decrypt:function(B,k,V,N,Q){var R=k.slice(0),C=j0.bitArray,H=C.bitLength(R);if(Q=Q||128,N=N||[],Q<=H?(k=C.bitSlice(R,H-Q),R=C.bitSlice(R,0,H-Q)):(k=R,R=[]),B=j0.mode.gcm.C(!1,B,R,N,V,Q),!C.equal(B.tag,k))throw new j0.exception.corrupt("gcm: tag doesn't match");return B.data},ka:function(B,k){var V,N,Q,R,C,H=j0.bitArray.i;Q=[0,0,0,0],R=k.slice(0);for(V=0;128>V;V++){(N=(B[Math.floor(V/32)]&1<<31-V%32)!==0)&&(Q=H(Q,R)),C=(R[3]&1)!==0;for(N=3;0<N;N--)R[N]=R[N]>>>1|(R[N-1]&1)<<31;R[0]>>>=1,C&&(R[0]^=-520093696)}return Q},j:function(B,k,V){var N,Q=V.length;k=k.slice(0);for(N=0;N<Q;N+=4)k[0]^=4294967295&V[N],k[1]^=4294967295&V[N+1],k[2]^=4294967295&V[N+2],k[3]^=4294967295&V[N+3],k=j0.mode.gcm.ka(k,B);return k},C:function(B,k,V,N,Q,R){var C,H,L,P,U,z,T,q,F=j0.bitArray;z=V.length,T=F.bitLength(V),q=F.bitLength(N),H=F.bitLength(Q),C=k.encrypt([0,0,0,0]),H===96?(Q=Q.slice(0),Q=F.concat(Q,[1])):(Q=j0.mode.gcm.j(C,[0,0,0,0],Q),Q=j0.mode.gcm.j(C,Q,[0,0,Math.floor(H/4294967296),H&4294967295])),H=j0.mode.gcm.j(C,[0,0,0,0],N),U=Q.slice(0),N=H.slice(0),B||(N=j0.mode.gcm.j(C,H,V));for(P=0;P<z;P+=4)U[3]++,L=k.encrypt(U),V[P]^=L[0],V[P+1]^=L[1],V[P+2]^=L[2],V[P+3]^=L[3];return V=F.clamp(V,T),B&&(N=j0.mode.gcm.j(C,H,V)),B=[Math.floor(q/4294967296),q&4294967295,Math.floor(T/4294967296),T&4294967295],N=j0.mode.gcm.j(C,N,B),L=k.encrypt(Q),N[0]^=L[0],N[1]^=L[1],N[2]^=L[2],N[3]^=L[3],{tag:F.bitSlice(N,0,R),data:V}}};j0.misc.hmac=function(B,k){this.W=k=k||j0.hash.sha256;var V=[[],[]],N,Q=k.prototype.blockSize/32;this.w=[new k,new k],B.length>Q&&(B=k.hash(B));for(N=0;N<Q;N++)V[0][N]=B[N]^909522486,V[1][N]=B[N]^1549556828;this.w[0].update(V[0]),this.w[1].update(V[1]),this.R=new k(this.w[0])};j0.misc.hmac.prototype.encrypt=j0.misc.hmac.prototype.mac=function(B){if(this.aa)throw new j0.exception.invalid("encrypt on already updated hmac called!");return this.update(B),this.digest(B)};j0.misc.hmac.prototype.reset=function(){this.R=new this.W(this.w[0]),this.aa=!1};j0.misc.hmac.prototype.update=function(B){this.aa=!0,this.R.update(B)};j0.misc.hmac.prototype.digest=function(){var B=this.R.finalize(),B=new this.W(this.w[1]).update(B).finalize();return this.reset(),B};j0.misc.pbkdf2=function(B,k,V,N,Q){if(V=V||1e4,0>N||0>V)throw new j0.exception.invalid("invalid params to pbkdf2");typeof B==="string"&&(B=j0.codec.utf8String.toBits(B)),typeof k==="string"&&(k=j0.codec.utf8String.toBits(k)),Q=Q||j0.misc.hmac,B=new Q(B);var R,C,H,L,P=[],U=j0.bitArray;for(L=1;32*P.length<(N||1);L++){Q=R=B.encrypt(U.concat(k,[L]));for(C=1;C<V;C++)for(R=B.encrypt(R),H=0;H<R.length;H++)Q[H]^=R[H];P=P.concat(Q)}return N&&(P=U.clamp(P,N)),P};j0.prng=function(B){this.c=[new j0.hash.sha256],this.m=[0],this.P=0,this.H={},this.N=0,this.U={},this.Z=this.f=this.o=this.ha=0,this.b=[0,0,0,0,0,0,0,0],this.h=[0,0,0,0],this.L=void 0,this.M=B,this.D=!1,this.K={progress:{},seeded:{}},this.u=this.ga=0,this.I=1,this.J=2,this.ca=65536,this.T=[0,48,64,96,128,192,256,384,512,768,1024],this.da=30000,this.ba=80};j0.prng.prototype={randomWords:function(B,k){var V=[],N;N=this.isReady(k);var Q;if(N===this.u)throw new j0.exception.notReady("generator isn't seeded");if(N&this.J){N=!(N&this.I),Q=[];var R=0,C;this.Z=Q[0]=(new Date()).valueOf()+this.da;for(C=0;16>C;C++)Q.push(4294967296*Math.random()|0);for(C=0;C<this.c.length&&(Q=Q.concat(this.c[C].finalize()),R+=this.m[C],this.m[C]=0,N||!(this.P&1<<C));C++);this.P>=1<<this.c.length&&(this.c.push(new j0.hash.sha256),this.m.push(0)),this.f-=R,R>this.o&&(this.o=R),this.P++,this.b=j0.hash.sha256.hash(this.b.concat(Q)),this.L=new j0.cipher.aes(this.b);for(N=0;4>N&&(this.h[N]=this.h[N]+1|0,!this.h[N]);N++);}for(N=0;N<B;N+=4)(N+1)%this.ca===0&&b6(this),Q=W5(this),V.push(Q[0],Q[1],Q[2],Q[3]);return b6(this),V.slice(0,B)},setDefaultParanoia:function(B,k){if(B===0&&k!=="Setting paranoia=0 will ruin your security; use it only for testing")throw new j0.exception.invalid("Setting paranoia=0 will ruin your security; use it only for testing");this.M=B},addEntropy:function(B,k,V){V=V||"user";var N,Q,R=(new Date()).valueOf(),C=this.H[V],H=this.isReady(),L=0;switch(N=this.U[V],N===void 0&&(N=this.U[V]=this.ha++),C===void 0&&(C=this.H[V]=0),this.H[V]=(this.H[V]+1)%this.c.length,typeof B){case"number":k===void 0&&(k=1),this.c[C].update([N,this.N++,1,k,R,1,B|0]);break;case"object":if(V=Object.prototype.toString.call(B),V==="[object Uint32Array]"){Q=[];for(V=0;V<B.length;V++)Q.push(B[V]);B=Q}else for(V!=="[object Array]"&&(L=1),V=0;V<B.length&&!L;V++)typeof B[V]!=="number"&&(L=1);if(!L){if(k===void 0)for(V=k=0;V<B.length;V++)for(Q=B[V];0<Q;)k++,Q=Q>>>1;this.c[C].update([N,this.N++,2,k,R,B.length].concat(B))}break;case"string":k===void 0&&(k=B.length),this.c[C].update([N,this.N++,3,k,R,B.length]),this.c[C].update(B);break;default:L=1}if(L)throw new j0.exception.bug("random: addEntropy only supports number, array of numbers or string");this.m[C]+=k,this.f+=k,H===this.u&&(this.isReady()!==this.u&&c6("seeded",Math.max(this.o,this.f)),c6("progress",this.getProgress()))},isReady:function(B){return B=this.T[B!==void 0?B:this.M],this.o&&this.o>=B?this.m[0]>this.ba&&(new Date()).valueOf()>this.Z?this.J|this.I:this.I:this.f>=B?this.J|this.u:this.u},getProgress:function(B){return B=this.T[B?B:this.M],this.o>=B?1:this.f>B?1:this.f/B},startCollectors:function(){if(!this.D){if(this.a={loadTimeCollector:e2(this,this.ma),mouseCollector:e2(this,this.oa),keyboardCollector:e2(this,this.la),accelerometerCollector:e2(this,this.ea),touchCollector:e2(this,this.qa)},window.addEventListener)window.addEventListener("load",this.a.loadTimeCollector,!1),window.addEventListener("mousemove",this.a.mouseCollector,!1),window.addEventListener("keypress",this.a.keyboardCollector,!1),window.addEventListener("devicemotion",this.a.accelerometerCollector,!1),window.addEventListener("touchmove",this.a.touchCollector,!1);else if(document.attachEvent)document.attachEvent("onload",this.a.loadTimeCollector),document.attachEvent("onmousemove",this.a.mouseCollector),document.attachEvent("keypress",this.a.keyboardCollector);else throw new j0.exception.bug("can't attach event");this.D=!0}},stopCollectors:function(){this.D&&(window.removeEventListener?(window.removeEventListener("load",this.a.loadTimeCollector,!1),window.removeEventListener("mousemove",this.a.mouseCollector,!1),window.removeEventListener("keypress",this.a.keyboardCollector,!1),window.removeEventListener("devicemotion",this.a.accelerometerCollector,!1),window.removeEventListener("touchmove",this.a.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this.a.loadTimeCollector),document.detachEvent("onmousemove",this.a.mouseCollector),document.detachEvent("keypress",this.a.keyboardCollector)),this.D=!1)},addEventListener:function(B,k){this.K[B][this.ga++]=k},removeEventListener:function(B,k){var V,N,Q=this.K[B],R=[];for(N in Q)Q.hasOwnProperty(N)&&Q[N]===k&&R.push(N);for(V=0;V<R.length;V++)N=R[V],delete Q[N]},la:function(){t2(this,1)},oa:function(B){var k,V;try{k=B.x||B.clientX||B.offsetX||0,V=B.y||B.clientY||B.offsetY||0}catch(N){V=k=0}k!=0&&V!=0&&this.addEntropy([k,V],2,"mouse"),t2(this,0)},qa:function(B){B=B.touches[0]||B.changedTouches[0],this.addEntropy([B.pageX||B.clientX,B.pageY||B.clientY],1,"touch"),t2(this,0)},ma:function(){t2(this,2)},ea:function(B){if(B=B.accelerationIncludingGravity.x||B.accelerationIncludingGravity.y||B.accelerationIncludingGravity.z,window.orientation){var k=window.orientation;typeof k==="number"&&this.addEntropy(k,1,"accelerometer")}B&&this.addEntropy(B,2,"accelerometer"),t2(this,0)}};j0.random=new j0.prng(6);X:try{if(B1=typeof d2!=="undefined"&&Z4){try{R1=(m6(),C8(g6))}catch(B){R1=null}B1=k1=R1}if(B1&&k1.randomBytes)X1=k1.randomBytes(128),X1=new Uint32Array(new Uint8Array(X1).buffer),j0.random.addEntropy(X1,1024,"crypto['randomBytes']");else if(typeof window!=="undefined"&&typeof Uint32Array!=="undefined"){if(J1=new Uint32Array(32),window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(J1);else if(window.msCrypto&&window.msCrypto.getRandomValues)window.msCrypto.getRandomValues(J1);else break X;j0.random.addEntropy(J1,1024,"crypto['getRandomValues']")}}catch(B){typeof window!=="undefined"&&window.console&&(console.log("There was an error collecting entropy from the browser:"),console.log(B))}var X1,k1,J1,B1,R1;j0.json={defaults:{v:1,iter:1e4,ks:128,ts:64,mode:"ccm",adata:"",cipher:"aes"},ja:function(B,k,V,N){V=V||{},N=N||{};var Q=j0.json,R=Q.g({iv:j0.random.randomWords(4,0)},Q.defaults),C;if(Q.g(R,V),V=R.adata,typeof R.salt==="string"&&(R.salt=j0.codec.base64.toBits(R.salt)),typeof R.iv==="string"&&(R.iv=j0.codec.base64.toBits(R.iv)),!j0.mode[R.mode]||!j0.cipher[R.cipher]||typeof B==="string"&&100>=R.iter||R.ts!==64&&R.ts!==96&&R.ts!==128||R.ks!==128&&R.ks!==192&&R.ks!==256||2>R.iv.length||4<R.iv.length)throw new j0.exception.invalid("json encrypt: invalid parameters");return typeof B==="string"?(C=j0.misc.cachedPbkdf2(B,R),B=C.key.slice(0,R.ks/32),R.salt=C.salt):j0.ecc&&B instanceof j0.ecc.elGamal.publicKey&&(C=B.kem(),R.kemtag=C.tag,B=C.key.slice(0,R.ks/32)),typeof k==="string"&&(k=j0.codec.utf8String.toBits(k)),typeof V==="string"&&(R.adata=V=j0.codec.utf8String.toBits(V)),C=new j0.cipher[R.cipher](B),Q.g(N,R),N.key=B,R.ct=R.mode==="ccm"&&j0.arrayBuffer&&j0.arrayBuffer.ccm&&k instanceof ArrayBuffer?j0.arrayBuffer.ccm.encrypt(C,k,R.iv,V,R.ts):j0.mode[R.mode].encrypt(C,k,R.iv,V,R.ts),R},encrypt:function(B,k,V,N){var Q=j0.json,R=Q.ja.apply(Q,arguments);return Q.encode(R)},ia:function(B,k,V,N){V=V||{},N=N||{};var Q=j0.json;k=Q.g(Q.g(Q.g({},Q.defaults),k),V,!0);var R,C;if(R=k.adata,typeof k.salt==="string"&&(k.salt=j0.codec.base64.toBits(k.salt)),typeof k.iv==="string"&&(k.iv=j0.codec.base64.toBits(k.iv)),!j0.mode[k.mode]||!j0.cipher[k.cipher]||typeof B==="string"&&100>=k.iter||k.ts!==64&&k.ts!==96&&k.ts!==128||k.ks!==128&&k.ks!==192&&k.ks!==256||!k.iv||2>k.iv.length||4<k.iv.length)throw new j0.exception.invalid("json decrypt: invalid parameters");return typeof B==="string"?(C=j0.misc.cachedPbkdf2(B,k),B=C.key.slice(0,k.ks/32),k.salt=C.salt):j0.ecc&&B instanceof j0.ecc.elGamal.secretKey&&(B=B.unkem(j0.codec.base64.toBits(k.kemtag)).slice(0,k.ks/32)),typeof R==="string"&&(R=j0.codec.utf8String.toBits(R)),C=new j0.cipher[k.cipher](B),R=k.mode==="ccm"&&j0.arrayBuffer&&j0.arrayBuffer.ccm&&k.ct instanceof ArrayBuffer?j0.arrayBuffer.ccm.decrypt(C,k.ct,k.iv,k.tag,R,k.ts):j0.mode[k.mode].decrypt(C,k.ct,k.iv,R,k.ts),Q.g(N,k),N.key=B,V.raw===1?R:j0.codec.utf8String.fromBits(R)},decrypt:function(B,k,V,N){var Q=j0.json;return Q.ia(B,Q.decode(k),V,N)},encode:function(B){var k,V="{",N="";for(k in B)if(B.hasOwnProperty(k)){if(!k.match(/^[a-z0-9]+$/i))throw new j0.exception.invalid("json encode: invalid property name");switch(V+=N+'"'+k+'":',N=",",typeof B[k]){case"number":case"boolean":V+=B[k];break;case"string":V+='"'+escape(B[k])+'"';break;case"object":V+='"'+j0.codec.base64.fromBits(B[k],0)+'"';break;default:throw new j0.exception.bug("json encode: unsupported type")}}return V+"}"},decode:function(B){if(B=B.replace(/\s/g,""),!B.match(/^\{.*\}$/))throw new j0.exception.invalid("json decode: this isn't json!");B=B.replace(/^\{|\}$/g,"").split(/,/);var k={},V,N;for(V=0;V<B.length;V++){if(!(N=B[V].match(/^\s*(?:(["']?)([a-z][a-z0-9]*)\1)\s*:\s*(?:(-?\d+)|"([a-z0-9+\/%*_.@=\-]*)"|(true|false))$/i)))throw new j0.exception.invalid("json decode: this isn't json!");N[3]!=null?k[N[2]]=parseInt(N[3],10):N[4]!=null?k[N[2]]=N[2].match(/^(ct|adata|salt|iv)$/)?j0.codec.base64.toBits(N[4]):unescape(N[4]):N[5]!=null&&(k[N[2]]=N[5]==="true")}return k},g:function(B,k,V){if(B===void 0&&(B={}),k===void 0)return B;for(var N in k)if(k.hasOwnProperty(N)){if(V&&B[N]!==void 0&&B[N]!==k[N])throw new j0.exception.invalid("required parameter overridden");B[N]=k[N]}return B},sa:function(B,k){var V={},N;for(N in B)B.hasOwnProperty(N)&&B[N]!==k[N]&&(V[N]=B[N]);return V},ra:function(B,k){var V={},N;for(N=0;N<k.length;N++)B[k[N]]!==void 0&&(V[k[N]]=B[k[N]]);return V}};j0.encrypt=j0.json.encrypt;j0.decrypt=j0.json.decrypt;j0.misc.pa={};j0.misc.cachedPbkdf2=function(B,k){var V=j0.misc.pa,N;return k=k||{},N=k.iter||1000,V=V[B]=V[B]||{},N=V[N]=V[N]||{firstSalt:k.salt&&k.salt.length?k.salt.slice(0):j0.random.randomWords(2,0)},V=k.salt===void 0?N.firstSalt:k.salt,N[V]=N[V]||j0.misc.pbkdf2(B,V,k.iter),{key:N[V].slice(0),salt:V.slice(0)}};typeof d2!=="undefined"&&Z4&&(d2.exports=j0);typeof define==="function"&&define([],function(){return j0})});var P5={};j1(P5,{generateKey:()=>f3,encrypt:()=>H5,decrypt:()=>z5});var u2;((V)=>{V[V.Sjcl=0]="Sjcl";V[V.WebCrypto=1]="WebCrypto"})(u2||={});var Y1=Y8(d6(),1);class O1{constructor(B,k){if(!B||B.length!=64)throw Error("Charset must contain 64 characters");this._charset=B,this._noPadding=!!k,this._valid=new RegExp("^["+this._charset.replace("-","\\-")+"]+={0,2}$")}Encode(B){const k=B.byteLength;if(!k)return"";const V=new Uint8Array(B);let N="";for(let Q=0;Q<k;Q+=3)N+=this._charset[V[Q]>>2]+this._charset[(V[Q]&3)<<4|V[Q+1]>>4]+this._charset[(V[Q+1]&15)<<2|V[Q+2]>>6]+this._charset[V[Q+2]&63];if(k%3==2){if(N=N.substring(0,N.length-1),!this._noPadding)N+="="}else if(k%3==1){if(N=N.substring(0,N.length-2),!this._noPadding)N+="=="}return N}Decode(B){if(B=(B||"").replace(/[\s]/g,""),!B)return new ArrayBuffer(0);if(!this._valid.test(B))throw Error("Invalid base64 input sequence");let k=Math.floor(B.length*0.75);if(B[B.length-2]=="=")k-=2;else if(B[B.length-1]=="=")k--;const V=new Uint8Array(k);let N,Q,R,C,H=0,L=0;while(H<B.length*0.75)N=this._charset.indexOf(B.charAt(L++)),Q=this._charset.indexOf(B.charAt(L++)),R=this._charset.indexOf(B.charAt(L++)),C=this._charset.indexOf(B.charAt(L++)),V[H++]=N<<2|Q>>4,V[H++]=(Q&15)<<4|R>>2,V[H++]=(R&3)<<6|C;return V.buffer}}function $1(B){return h6.Encode(B)}function G1(B){return h6.Decode(B)}var h6=new O1("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");function Z5(B){return l6.Encode(B)}function Q5(B){return l6.Decode(B)}var l6=new O1("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",!0);var o6=async(B,k)=>{const V=typeof k==="string"?k:k.data;return G1(Y1.default.decrypt(B,V))},u6=async(B,k)=>{const V=Y1.default.encrypt(B,$1(k));return{algo:0,data:V,iv:JSON.parse(V).iv}},s6=async()=>{return Y1.default.codec.base64.fromBits(Y1.default.random.randomWords(8,10))};var f6=async(B,k)=>{return await crypto.subtle.decrypt({name:"AES-GCM",iv:k.iv},await a6(B),G1(k.data))},n6=async(B,k)=>{const V=crypto.getRandomValues(new Uint8Array(12)),N=await crypto.subtle.encrypt({name:"AES-GCM",iv:V},await a6(B),k);return{algo:1,data:$1(N),iv:V}},a6=async(B)=>{return crypto.subtle.importKey("raw",Q5(B),{name:"AES-GCM"},!1,["encrypt","decrypt"])},r6=async()=>{const B=await crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"]);return Z5(await crypto.subtle.exportKey("raw",B))};var z5=async(B,k)=>{return!k.algo||V5(k.algo)?o6(B,k):f6(B,k)},H5=async(B,k,V=1)=>{let N;if(V5(V))N=u6(B,k);else{if(typeof k==="string")k=(new TextEncoder()).encode(k).buffer;N=n6(B,k)}return N},f3=async(B=1)=>{return V5(B)?s6():r6()},V5=(B)=>{return B===0};var k5={};j1(k5,{waitForSocketConnection:()=>U5,uploadPart:()=>D5,spawn:()=>l2,sockets:()=>F2,isSpawned:()=>F5,endDownload:()=>L5,downloadPart:()=>q1,downloadFirstPart:()=>N5,cancelFileUpload:()=>T5});var h2=async(B,k)=>{try{if(typeof Bun!=="undefined")await Bun.sleep(k),B();else await new Promise((V)=>{setTimeout(V,k)})}catch(V){console.error(V)}};var F2={},i6=5,U5=async(B,k=()=>{},V=100)=>{try{const N=B.toString();if(F2[N]&&F2[N].readyState===WebSocket.OPEN)await k();else if(--V)console.info("Waiting for websocket connection..."),await h2(async()=>{await U5(B,k,V)},50);else throw new Error("Unable to connect to WebSocket: Max waiting attempts reach")}catch(N){console.error(N)}},l2=async(B,k=()=>{return!1},V=0)=>{const N=B.toString();if(!F5(B)){if(console.info(`Spawning WebSocket ${N}`),!F2[N]||F2[N].readyState!==WebSocket.CONNECTING)F2[N]=new WebSocket(B),F2[N].onopen=()=>{console.info(`Websocket ${N} has been open`)},F2[N].onclose=()=>{console.info(`Websocket ${N} has been closed`)},F2[N].onerror=async()=>{if(++V,V<=i6)console.error(`An error happened while trying to connect to WebSocket ${N}. Trying again. ${V} / ${i6}`),await l2(B,k,V);else throw new Error(`Unable to connect to WebSocket ${N}.`)};await U5(B)}F2[N].onmessage=(Q)=>{k(Q)}},F5=(B)=>{const k=B.toString();return F2[k]!==void 0&&F2[k].readyState===WebSocket.OPEN},T5=async(B,k,V,N)=>{C1(B,`${JSON.stringify({id:k,mod_token:V,cancel:!0,i:N})}XXXXMOJOXXuseless`)},D5=async(B,k,V)=>{C1(B,`${JSON.stringify(k)}XXMOJOXX${JSON.stringify(V)}`)},q1=async(B,k,V)=>{console.info(`Downloading part ${k+1}`);let N;if(V)N={part:k,file_pwd:V};else N={part:k};await C1(B,JSON.stringify(N))},N5=async(B,k)=>{await q1(B,0,k)},L5=async(B,k)=>{let V;if(k)V={ended:!0,file_pwd:k};else V={ended:!0};C1(B,JSON.stringify(V))},C1=async(B,k)=>{if(!F5(B))await l2(B,()=>{C1(B,k)});else F2[B.toString()].send(k)};var J8={};j1(J8,{waitUntilFileIsUploaded:()=>X4,waitUntilFileIsDownloaded:()=>J4,uploadedFiles:()=>B5,uploadFile:()=>r3,sliceFile:()=>e6,queuedFiles:()=>V2,isFileUploaded:()=>X8,isFileQueued:()=>K1,downloadedFiles:()=>R5,downloadFile:()=>a3,cancelUpload:()=>i3});var n3=750000,V2={},B5={},R5={},e6=(B,k=n3)=>{const V=Math.ceil(B.size/k),N=[];for(let Q=0;Q<V;Q++){const R=Q*k,C=Math.min(R+k,B.size);N.push(B.slice(R,C,B.type))}return N},t6=async(B,k,V,N,Q,R,C,H,L,P,U,z)=>{console.info(`Uploading part ${N+1} / ${Q}`);const T=await H5(P,await V.arrayBuffer()),q={total:Q,part:N,size:k.size,name:k.name.split("/").pop(),type:k.type,delay:R,del_at_first_view:C,zipped:H,id:U,i:z,file_pwd:L};await D5(B,q,T)},a3=async(B,k,V,N)=>{const Q=q5(B,"/download"+`/${V}`);console.info(`Downloading file from ${Q.toString()}`);const R=[];await l2(Q,async(C)=>{const H=C.data.split("XXMOJOXX"),L=JSON.parse(H?.shift()),P=JSON.parse(H.shift());if(!L?.msg){if(P.iv)P.iv=new Uint8Array(Object.values(P.iv));const U=await z5(k,P);if(R[L.part]=typeof U==="string"?(new TextEncoder()).encode(U).buffer:U,++L.part===L.total)await L5(Q,N),R5[k]=new Blob(R,{type:L.type});else await q1(Q,L.part,N)}else console.error(`error: ${L.msg}`)}),await N5(Q,N)},r3=async(B,k,V,N,Q,R,C)=>{V2[C]={};const H=q5(B,"/upload"),L=e6(k);await l2(H,async(P)=>{let U=JSON.parse(P.data);if(U.success){if(K1(C)){let z=++U.j;if(V2[C].serverId=U.short,V2[C].deleteToken=U.token,V2[C].fileNumber=U.i,z<L.length)await t6(H,k,L[z],z,L.length,V,N,Q,R,C,U.short,U.i);else B5[C]={serverId:V2[C].serverId,deleteToken:V2[C].deleteToken,downloadUrl:t3(B,C,V2[C].serverId)},delete V2[C]}}else throw delete V2[C],new Error(`Upload failed. Server returned an error: ${U}`)}),await t6(H,k,L[0],0,L.length,V,N,Q,R,C,null,0)},i3=async(B,k)=>{if(K1(k)){while(!e3(k))await h2(()=>{},100);await T5(q5(B,"/upload"),V2[k].serverId,V2[k].deleteToken,V2[k].fileNumber),delete V2[k]}else console.info(`Upload with file id "${k}" not queued, nothing to cancel.`)},q5=(B,k)=>{const V=new URL(B);return V.protocol="ws",V.pathname=k,V},t3=(B,k,V)=>{return`${B.origin}/r/${V}#${k}`},e3=(B)=>{return K1(B)&&V2[B].serverId!==void 0&&V2[B].deleteToken!==void 0&&V2[B].fileNumber!==void 0},X4=async(B)=>{while(K1(B)&&!X8(B))await h2(()=>{},100)},J4=async(B)=>{while(R5[B]===void 0)await h2(()=>{},100)},X8=(B)=>{return B5[B]!==void 0},K1=(B)=>{return V2[B]!==void 0};export{k5 as ws,P5 as lufiCrypto,J8 as api,u2 as CryptoAlgorithm};