genosdb 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gdb.min.js +6 -6
- package/dist/gdb.min.js.gz +0 -0
- package/dist/index.js +6 -6
- package/dist/index.js.gz +0 -0
- package/package.json +1 -1
package/dist/gdb.min.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var s2=Object.defineProperty;var t2=(Y,q)=>{for(var F in q)s2(Y,F,{get:q[F],enumerable:!0,configurable:!0,set:(O)=>q[F]=()=>O})};function B9(Y){const q=Y.length;let F=0,O=0;while(O<q){let Z=Y.charCodeAt(O++);if((Z&4294967168)===0){F++;continue}else if((Z&4294965248)===0)F+=2;else{if(Z>=55296&&Z<=56319){if(O<q){const N=Y.charCodeAt(O);if((N&64512)===56320)++O,Z=((Z&1023)<<10)+(N&1023)+65536}}if((Z&4294901760)===0)F+=3;else F+=4}}return F}function e2(Y,q,F){const O=Y.length;let Z=F,N=0;while(N<O){let V=Y.charCodeAt(N++);if((V&4294967168)===0){q[Z++]=V;continue}else if((V&4294965248)===0)q[Z++]=V>>6&31|192;else{if(V>=55296&&V<=56319){if(N<O){const C=Y.charCodeAt(N);if((C&64512)===56320)++N,V=((V&1023)<<10)+(C&1023)+65536}}if((V&4294901760)===0)q[Z++]=V>>12&15|224,q[Z++]=V>>6&63|128;else q[Z++]=V>>18&7|240,q[Z++]=V>>12&63|128,q[Z++]=V>>6&63|128}q[Z++]=V&63|128}}function GQ(Y,q,F){QQ.encodeInto(Y,q.subarray(F))}function R9(Y,q,F){if(Y.length>WQ)GQ(Y,q,F);else e2(Y,q,F)}function n7(Y,q,F){let O=q;const Z=O+F,N=[];let V="";while(O<Z){const C=Y[O++];if((C&128)===0)N.push(C);else if((C&224)===192){const B=Y[O++]&63;N.push((C&31)<<6|B)}else if((C&240)===224){const B=Y[O++]&63,D=Y[O++]&63;N.push((C&31)<<12|B<<6|D)}else if((C&248)===240){const B=Y[O++]&63,D=Y[O++]&63,L=Y[O++]&63;let H=(C&7)<<18|B<<12|D<<6|L;if(H>65535)H-=65536,N.push(H>>>10&1023|55296),H=56320|H&1023;N.push(H)}else N.push(C);if(N.length>=XQ)V+=String.fromCharCode(...N),N.length=0}if(N.length>0)V+=String.fromCharCode(...N);return V}function JQ(Y,q,F){const O=Y.subarray(q,q+F);return YQ.decode(O)}function I9(Y,q,F){if(F>VQ)return JQ(Y,q,F);else return n7(Y,q,F)}var QQ=new TextEncoder,WQ=50,XQ=4096,YQ=new TextDecoder,VQ=200;class b8{constructor(Y,q){this.type=Y,this.data=q}}class I6 extends Error{constructor(Y){super(Y);const q=Object.create(I6.prototype);Object.setPrototypeOf(this,q),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:I6.name})}}function T9(Y,q,F){const O=F/4294967296,Z=F;Y.setUint32(q,O),Y.setUint32(q+4,Z)}function r1(Y,q,F){const O=Math.floor(F/4294967296),Z=F;Y.setUint32(q,O),Y.setUint32(q+4,Z)}function i1(Y,q){const F=Y.getInt32(q),O=Y.getUint32(q+4);return F*4294967296+O}function M9(Y,q){const F=Y.getUint32(q),O=Y.getUint32(q+4);return F*4294967296+O}var h8=4294967295;function zQ({sec:Y,nsec:q}){if(Y>=0&&q>=0&&Y<=KQ)if(q===0&&Y<=FQ){const F=new Uint8Array(4);return new DataView(F.buffer).setUint32(0,Y),F}else{const F=Y/4294967296,O=Y&4294967295,Z=new Uint8Array(8),N=new DataView(Z.buffer);return N.setUint32(0,q<<2|F&3),N.setUint32(4,O),Z}else{const F=new Uint8Array(12),O=new DataView(F.buffer);return O.setUint32(0,q),r1(O,4,Y),F}}function ZQ(Y){const q=Y.getTime(),F=Math.floor(q/1000),O=(q-F*1000)*1e6,Z=Math.floor(O/1e9);return{sec:F+Z,nsec:O-Z*1e9}}function $Q(Y){if(Y instanceof Date){const q=ZQ(Y);return zQ(q)}else return null}function qQ(Y){const q=new DataView(Y.buffer,Y.byteOffset,Y.byteLength);switch(Y.byteLength){case 4:return{sec:q.getUint32(0),nsec:0};case 8:{const F=q.getUint32(0),O=q.getUint32(4),Z=(F&3)*4294967296+O,N=F>>>2;return{sec:Z,nsec:N}}case 12:{const F=i1(q,4),O=q.getUint32(0);return{sec:F,nsec:O}}default:throw new I6(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${Y.length}`)}}function jQ(Y){const q=qQ(Y);return new Date(q.sec*1000+q.nsec/1e6)}var UQ=-1,FQ=4294967295,KQ=17179869183,A9={type:UQ,encode:$Q,decode:jQ};class L8{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(A9)}register({type:Y,encode:q,decode:F}){if(Y>=0)this.encoders[Y]=q,this.decoders[Y]=F;else{const O=-1-Y;this.builtInEncoders[O]=q,this.builtInDecoders[O]=F}}tryToEncode(Y,q){for(let F=0;F<this.builtInEncoders.length;F++){const O=this.builtInEncoders[F];if(O!=null){const Z=O(Y,q);if(Z!=null){const N=-1-F;return new b8(N,Z)}}}for(let F=0;F<this.encoders.length;F++){const O=this.encoders[F];if(O!=null){const Z=O(Y,q);if(Z!=null)return new b8(F,Z)}}if(Y instanceof b8)return Y;return null}decode(Y,q,F){const O=q<0?this.builtInDecoders[-1-q]:this.decoders[q];if(O)return O(Y,q,F);else return new b8(q,Y)}}L8.defaultCodec=new L8;var HQ=function(Y){return Y instanceof ArrayBuffer||typeof SharedArrayBuffer!=="undefined"&&Y instanceof SharedArrayBuffer};function K1(Y){if(Y instanceof Uint8Array)return Y;else if(ArrayBuffer.isView(Y))return new Uint8Array(Y.buffer,Y.byteOffset,Y.byteLength);else if(HQ(Y))return new Uint8Array(Y);else return Uint8Array.from(Y)}var CQ=100,OQ=2048;class s1{constructor(Y){this.entered=!1,this.extensionCodec=Y?.extensionCodec??L8.defaultCodec,this.context=Y?.context,this.useBigInt64=Y?.useBigInt64??!1,this.maxDepth=Y?.maxDepth??CQ,this.initialBufferSize=Y?.initialBufferSize??OQ,this.sortKeys=Y?.sortKeys??!1,this.forceFloat32=Y?.forceFloat32??!1,this.ignoreUndefined=Y?.ignoreUndefined??!1,this.forceIntegerToFloat=Y?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new s1({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(Y){if(this.entered)return this.clone().encodeSharedRef(Y);try{return this.entered=!0,this.reinitializeState(),this.doEncode(Y,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(Y){if(this.entered)return this.clone().encode(Y);try{return this.entered=!0,this.reinitializeState(),this.doEncode(Y,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(Y,q){if(q>this.maxDepth)throw new Error(`Too deep objects in depth ${q}`);if(Y==null)this.encodeNil();else if(typeof Y==="boolean")this.encodeBoolean(Y);else if(typeof Y==="number")if(!this.forceIntegerToFloat)this.encodeNumber(Y);else this.encodeNumberAsFloat(Y);else if(typeof Y==="string")this.encodeString(Y);else if(this.useBigInt64&&typeof Y==="bigint")this.encodeBigInt64(Y);else this.encodeObject(Y,q)}ensureBufferSizeToWrite(Y){const q=this.pos+Y;if(this.view.byteLength<q)this.resizeBuffer(q*2)}resizeBuffer(Y){const q=new ArrayBuffer(Y),F=new Uint8Array(q),O=new DataView(q);F.set(this.bytes),this.view=O,this.bytes=F}encodeNil(){this.writeU8(192)}encodeBoolean(Y){if(Y===!1)this.writeU8(194);else this.writeU8(195)}encodeNumber(Y){if(!this.forceIntegerToFloat&&Number.isSafeInteger(Y))if(Y>=0)if(Y<128)this.writeU8(Y);else if(Y<256)this.writeU8(204),this.writeU8(Y);else if(Y<65536)this.writeU8(205),this.writeU16(Y);else if(Y<4294967296)this.writeU8(206),this.writeU32(Y);else if(!this.useBigInt64)this.writeU8(207),this.writeU64(Y);else this.encodeNumberAsFloat(Y);else if(Y>=-32)this.writeU8(224|Y+32);else if(Y>=-128)this.writeU8(208),this.writeI8(Y);else if(Y>=-32768)this.writeU8(209),this.writeI16(Y);else if(Y>=-2147483648)this.writeU8(210),this.writeI32(Y);else if(!this.useBigInt64)this.writeU8(211),this.writeI64(Y);else this.encodeNumberAsFloat(Y);else this.encodeNumberAsFloat(Y)}encodeNumberAsFloat(Y){if(this.forceFloat32)this.writeU8(202),this.writeF32(Y);else this.writeU8(203),this.writeF64(Y)}encodeBigInt64(Y){if(Y>=BigInt(0))this.writeU8(207),this.writeBigUint64(Y);else this.writeU8(211),this.writeBigInt64(Y)}writeStringHeader(Y){if(Y<32)this.writeU8(160+Y);else if(Y<256)this.writeU8(217),this.writeU8(Y);else if(Y<65536)this.writeU8(218),this.writeU16(Y);else if(Y<4294967296)this.writeU8(219),this.writeU32(Y);else throw new Error(`Too long string: ${Y} bytes in UTF-8`)}encodeString(Y){const F=B9(Y);this.ensureBufferSizeToWrite(5+F),this.writeStringHeader(F),R9(Y,this.bytes,this.pos),this.pos+=F}encodeObject(Y,q){const F=this.extensionCodec.tryToEncode(Y,this.context);if(F!=null)this.encodeExtension(F);else if(Array.isArray(Y))this.encodeArray(Y,q);else if(ArrayBuffer.isView(Y))this.encodeBinary(Y);else if(typeof Y==="object")this.encodeMap(Y,q);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(Y)}`)}encodeBinary(Y){const q=Y.byteLength;if(q<256)this.writeU8(196),this.writeU8(q);else if(q<65536)this.writeU8(197),this.writeU16(q);else if(q<4294967296)this.writeU8(198),this.writeU32(q);else throw new Error(`Too large binary: ${q}`);const F=K1(Y);this.writeU8a(F)}encodeArray(Y,q){const F=Y.length;if(F<16)this.writeU8(144+F);else if(F<65536)this.writeU8(220),this.writeU16(F);else if(F<4294967296)this.writeU8(221),this.writeU32(F);else throw new Error(`Too large array: ${F}`);for(let O of Y)this.doEncode(O,q+1)}countWithoutUndefined(Y,q){let F=0;for(let O of q)if(Y[O]!==void 0)F++;return F}encodeMap(Y,q){const F=Object.keys(Y);if(this.sortKeys)F.sort();const O=this.ignoreUndefined?this.countWithoutUndefined(Y,F):F.length;if(O<16)this.writeU8(128+O);else if(O<65536)this.writeU8(222),this.writeU16(O);else if(O<4294967296)this.writeU8(223),this.writeU32(O);else throw new Error(`Too large map object: ${O}`);for(let Z of F){const N=Y[Z];if(!(this.ignoreUndefined&&N===void 0))this.encodeString(Z),this.doEncode(N,q+1)}}encodeExtension(Y){if(typeof Y.data==="function"){const F=Y.data(this.pos+6),O=F.length;if(O>=4294967296)throw new Error(`Too large extension object: ${O}`);this.writeU8(201),this.writeU32(O),this.writeI8(Y.type),this.writeU8a(F);return}const q=Y.data.length;if(q===1)this.writeU8(212);else if(q===2)this.writeU8(213);else if(q===4)this.writeU8(214);else if(q===8)this.writeU8(215);else if(q===16)this.writeU8(216);else if(q<256)this.writeU8(199),this.writeU8(q);else if(q<65536)this.writeU8(200),this.writeU16(q);else if(q<4294967296)this.writeU8(201),this.writeU32(q);else throw new Error(`Too large extension object: ${q}`);this.writeI8(Y.type),this.writeU8a(Y.data)}writeU8(Y){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,Y),this.pos++}writeU8a(Y){const q=Y.length;this.ensureBufferSizeToWrite(q),this.bytes.set(Y,this.pos),this.pos+=q}writeI8(Y){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,Y),this.pos++}writeU16(Y){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,Y),this.pos+=2}writeI16(Y){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,Y),this.pos+=2}writeU32(Y){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,Y),this.pos+=4}writeI32(Y){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,Y),this.pos+=4}writeF32(Y){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,Y),this.pos+=4}writeF64(Y){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,Y),this.pos+=8}writeU64(Y){this.ensureBufferSizeToWrite(8),T9(this.view,this.pos,Y),this.pos+=8}writeI64(Y){this.ensureBufferSizeToWrite(8),r1(this.view,this.pos,Y),this.pos+=8}writeBigUint64(Y){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,Y),this.pos+=8}writeBigInt64(Y){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,Y),this.pos+=8}}function J8(Y,q){return new s1(q).encodeSharedRef(Y)}function t1(Y){return`${Y<0?"-":""}0x${Math.abs(Y).toString(16).padStart(2,"0")}`}var DQ=16,LQ=16;class r7{constructor(Y=DQ,q=LQ){this.hit=0,this.miss=0,this.maxKeyLength=Y,this.maxLengthPerKey=q,this.caches=[];for(let F=0;F<this.maxKeyLength;F++)this.caches.push([])}canBeCached(Y){return Y>0&&Y<=this.maxKeyLength}find(Y,q,F){const O=this.caches[F-1];Q:for(let Z of O){const N=Z.bytes;for(let V=0;V<F;V++)if(N[V]!==Y[q+V])continue Q;return Z.str}return null}store(Y,q){const F=this.caches[Y.length-1],O={bytes:Y,str:q};if(F.length>=this.maxLengthPerKey)F[Math.random()*F.length|0]=O;else F.push(O)}decode(Y,q,F){const O=this.find(Y,q,F);if(O!=null)return this.hit++,O;this.miss++;const Z=n7(Y,q,F),N=Uint8Array.prototype.slice.call(Y,q,q+F);return this.store(N,Z),Z}}var i7="array",Z1="map_key",x9="map_value",NQ=(Y)=>{if(typeof Y==="string"||typeof Y==="number")return Y;throw new I6("The type of key must be string or number but "+typeof Y)};class S9{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(Y){const q=this.getUninitializedStateFromPool();q.type=i7,q.position=0,q.size=Y,q.array=new Array(Y)}pushMapState(Y){const q=this.getUninitializedStateFromPool();q.type=Z1,q.readCount=0,q.size=Y,q.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const Y={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(Y)}return this.stack[this.stackHeadPosition]}release(Y){if(this.stack[this.stackHeadPosition]!==Y)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(Y.type===i7){const F=Y;F.size=0,F.array=void 0,F.position=0,F.type=void 0}if(Y.type===Z1||Y.type===x9){const F=Y;F.size=0,F.map=void 0,F.readCount=0,F.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}var z1=-1,s7=new DataView(new ArrayBuffer(0)),PQ=new Uint8Array(s7.buffer);try{s7.getInt8(0)}catch(Y){if(!(Y instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var v9=new RangeError("Insufficient data"),kQ=new r7;class e1{constructor(Y){this.totalPos=0,this.pos=0,this.view=s7,this.bytes=PQ,this.headByte=z1,this.stack=new S9,this.entered=!1,this.extensionCodec=Y?.extensionCodec??L8.defaultCodec,this.context=Y?.context,this.useBigInt64=Y?.useBigInt64??!1,this.rawStrings=Y?.rawStrings??!1,this.maxStrLength=Y?.maxStrLength??h8,this.maxBinLength=Y?.maxBinLength??h8,this.maxArrayLength=Y?.maxArrayLength??h8,this.maxMapLength=Y?.maxMapLength??h8,this.maxExtLength=Y?.maxExtLength??h8,this.keyDecoder=Y?.keyDecoder!==void 0?Y.keyDecoder:kQ,this.mapKeyConverter=Y?.mapKeyConverter??NQ}clone(){return new e1({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=z1,this.stack.reset()}setBuffer(Y){const q=K1(Y);this.bytes=q,this.view=new DataView(q.buffer,q.byteOffset,q.byteLength),this.pos=0}appendBuffer(Y){if(this.headByte===z1&&!this.hasRemaining(1))this.setBuffer(Y);else{const q=this.bytes.subarray(this.pos),F=K1(Y),O=new Uint8Array(q.length+F.length);O.set(q),O.set(F,q.length),this.setBuffer(O)}}hasRemaining(Y){return this.view.byteLength-this.pos>=Y}createExtraByteError(Y){const{view:q,pos:F}=this;return new RangeError(`Extra ${q.byteLength-F} of ${q.byteLength} byte(s) found at buffer[${Y}]`)}decode(Y){if(this.entered)return this.clone().decode(Y);try{this.entered=!0,this.reinitializeState(),this.setBuffer(Y);const q=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return q}finally{this.entered=!1}}*decodeMulti(Y){if(this.entered){yield*this.clone().decodeMulti(Y);return}try{this.entered=!0,this.reinitializeState(),this.setBuffer(Y);while(this.hasRemaining(1))yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(Y){if(this.entered)return this.clone().decodeAsync(Y);try{this.entered=!0;let q=!1,F;for await(let V of Y){if(q)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(V);try{F=this.doDecodeSync(),q=!0}catch(C){if(!(C instanceof RangeError))throw C}this.totalPos+=this.pos}if(q){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return F}const{headByte:O,pos:Z,totalPos:N}=this;throw new RangeError(`Insufficient data in parsing ${t1(O)} at ${N} (${Z} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(Y){return this.decodeMultiAsync(Y,!0)}decodeStream(Y){return this.decodeMultiAsync(Y,!1)}async*decodeMultiAsync(Y,q){if(this.entered){yield*this.clone().decodeMultiAsync(Y,q);return}try{this.entered=!0;let F=q,O=-1;for await(let Z of Y){if(q&&O===0)throw this.createExtraByteError(this.totalPos);if(this.appendBuffer(Z),F)O=this.readArraySize(),F=!1,this.complete();try{while(!0)if(yield this.doDecodeSync(),--O===0)break}catch(N){if(!(N instanceof RangeError))throw N}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){Q:while(!0){const Y=this.readHeadByte();let q;if(Y>=224)q=Y-256;else if(Y<192)if(Y<128)q=Y;else if(Y<144){const O=Y-128;if(O!==0){this.pushMapState(O),this.complete();continue Q}else q={}}else if(Y<160){const O=Y-144;if(O!==0){this.pushArrayState(O),this.complete();continue Q}else q=[]}else{const O=Y-160;q=this.decodeString(O,0)}else if(Y===192)q=null;else if(Y===194)q=!1;else if(Y===195)q=!0;else if(Y===202)q=this.readF32();else if(Y===203)q=this.readF64();else if(Y===204)q=this.readU8();else if(Y===205)q=this.readU16();else if(Y===206)q=this.readU32();else if(Y===207)if(this.useBigInt64)q=this.readU64AsBigInt();else q=this.readU64();else if(Y===208)q=this.readI8();else if(Y===209)q=this.readI16();else if(Y===210)q=this.readI32();else if(Y===211)if(this.useBigInt64)q=this.readI64AsBigInt();else q=this.readI64();else if(Y===217){const O=this.lookU8();q=this.decodeString(O,1)}else if(Y===218){const O=this.lookU16();q=this.decodeString(O,2)}else if(Y===219){const O=this.lookU32();q=this.decodeString(O,4)}else if(Y===220){const O=this.readU16();if(O!==0){this.pushArrayState(O),this.complete();continue Q}else q=[]}else if(Y===221){const O=this.readU32();if(O!==0){this.pushArrayState(O),this.complete();continue Q}else q=[]}else if(Y===222){const O=this.readU16();if(O!==0){this.pushMapState(O),this.complete();continue Q}else q={}}else if(Y===223){const O=this.readU32();if(O!==0){this.pushMapState(O),this.complete();continue Q}else q={}}else if(Y===196){const O=this.lookU8();q=this.decodeBinary(O,1)}else if(Y===197){const O=this.lookU16();q=this.decodeBinary(O,2)}else if(Y===198){const O=this.lookU32();q=this.decodeBinary(O,4)}else if(Y===212)q=this.decodeExtension(1,0);else if(Y===213)q=this.decodeExtension(2,0);else if(Y===214)q=this.decodeExtension(4,0);else if(Y===215)q=this.decodeExtension(8,0);else if(Y===216)q=this.decodeExtension(16,0);else if(Y===199){const O=this.lookU8();q=this.decodeExtension(O,1)}else if(Y===200){const O=this.lookU16();q=this.decodeExtension(O,2)}else if(Y===201){const O=this.lookU32();q=this.decodeExtension(O,4)}else throw new I6(`Unrecognized type byte: ${t1(Y)}`);this.complete();const F=this.stack;while(F.length>0){const O=F.top();if(O.type===i7)if(O.array[O.position]=q,O.position++,O.position===O.size)q=O.array,F.release(O);else continue Q;else if(O.type===Z1){if(q==="__proto__")throw new I6("The key __proto__ is not allowed");O.key=this.mapKeyConverter(q),O.type=x9;continue Q}else if(O.map[O.key]=q,O.readCount++,O.readCount===O.size)q=O.map,F.release(O);else{O.key=null,O.type=Z1;continue Q}}return q}}readHeadByte(){if(this.headByte===z1)this.headByte=this.readU8();return this.headByte}complete(){this.headByte=z1}readArraySize(){const Y=this.readHeadByte();switch(Y){case 220:return this.readU16();case 221:return this.readU32();default:if(Y<160)return Y-144;else throw new I6(`Unrecognized array type byte: ${t1(Y)}`)}}pushMapState(Y){if(Y>this.maxMapLength)throw new I6(`Max length exceeded: map length (${Y}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(Y)}pushArrayState(Y){if(Y>this.maxArrayLength)throw new I6(`Max length exceeded: array length (${Y}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(Y)}decodeString(Y,q){if(!this.rawStrings||this.stateIsMapKey())return this.decodeUtf8String(Y,q);return this.decodeBinary(Y,q)}decodeUtf8String(Y,q){if(Y>this.maxStrLength)throw new I6(`Max length exceeded: UTF-8 byte length (${Y}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+q+Y)throw v9;const F=this.pos+q;let O;if(this.stateIsMapKey()&&this.keyDecoder?.canBeCached(Y))O=this.keyDecoder.decode(this.bytes,F,Y);else O=I9(this.bytes,F,Y);return this.pos+=q+Y,O}stateIsMapKey(){if(this.stack.length>0)return this.stack.top().type===Z1;return!1}decodeBinary(Y,q){if(Y>this.maxBinLength)throw new I6(`Max length exceeded: bin length (${Y}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(Y+q))throw v9;const F=this.pos+q,O=this.bytes.subarray(F,F+Y);return this.pos+=q+Y,O}decodeExtension(Y,q){if(Y>this.maxExtLength)throw new I6(`Max length exceeded: ext length (${Y}) > maxExtLength (${this.maxExtLength})`);const F=this.view.getInt8(this.pos+q),O=this.decodeBinary(Y,q+1);return this.extensionCodec.decode(O,F,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const Y=this.view.getUint8(this.pos);return this.pos++,Y}readI8(){const Y=this.view.getInt8(this.pos);return this.pos++,Y}readU16(){const Y=this.view.getUint16(this.pos);return this.pos+=2,Y}readI16(){const Y=this.view.getInt16(this.pos);return this.pos+=2,Y}readU32(){const Y=this.view.getUint32(this.pos);return this.pos+=4,Y}readI32(){const Y=this.view.getInt32(this.pos);return this.pos+=4,Y}readU64(){const Y=M9(this.view,this.pos);return this.pos+=8,Y}readI64(){const Y=i1(this.view,this.pos);return this.pos+=8,Y}readU64AsBigInt(){const Y=this.view.getBigUint64(this.pos);return this.pos+=8,Y}readI64AsBigInt(){const Y=this.view.getBigInt64(this.pos);return this.pos+=8,Y}readF32(){const Y=this.view.getFloat32(this.pos);return this.pos+=4,Y}readF64(){const Y=this.view.getFloat64(this.pos);return this.pos+=8,Y}}function Q7(Y,q){return new e1(q).decode(Y)}var o8=function(Y){let q=Y.length;while(--q>=0)Y[q]=0},e7=function(Y,q,F,O,Z){this.static_tree=Y,this.extra_bits=q,this.extra_base=F,this.elems=O,this.max_length=Z,this.has_stree=Y&&Y.length},Q5=function(Y,q){this.dyn_tree=Y,this.max_code=0,this.stat_desc=q},l6=function(Y,q,F,O,Z){this.good_length=Y,this.max_lazy=q,this.nice_length=F,this.max_chain=O,this.func=Z},RW=function(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=z7,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HW*2),this.dyn_dtree=new Uint16Array((2*qW+1)*2),this.bl_tree=new Uint16Array((2*jW+1)*2),U8(this.dyn_ltree),U8(this.dyn_dtree),U8(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(CW+1),this.heap=new Uint16Array(2*H5+1),U8(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*H5+1),U8(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0},oW=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},A1=function(Y){this.options=Z7.assign({level:tW,method:QG,chunkSize:16384,windowBits:15,memLevel:8,strategy:eW},Y||{});let q=this.options;if(q.raw&&q.windowBits>0)q.windowBits=-q.windowBits;else if(q.gzip&&q.windowBits>0&&q.windowBits<16)q.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m4,this.strm.avail_out=0;let F=C1.deflateInit2(this.strm,q.level,q.method,q.windowBits,q.memLevel,q.strategy);if(F!==F7)throw new Error(B8[F]);if(q.header)C1.deflateSetHeader(this.strm,q.header);if(q.dictionary){let O;if(typeof q.dictionary==="string")O=R1.string2buf(q.dictionary);else if(p4.call(q.dictionary)==="[object ArrayBuffer]")O=new Uint8Array(q.dictionary);else O=q.dictionary;if(F=C1.deflateSetDictionary(this.strm,O),F!==F7)throw new Error(B8[F]);this._dict_set=!0}},T5=function(Y,q){const F=new A1(q);if(F.push(Y,!0),F.err)throw F.msg||B8[F.err];return F.result},WG=function(Y,q){return q=q||{},q.raw=!0,T5(Y,q)},GG=function(Y,q){return q=q||{},q.gzip=!0,T5(Y,q)},IG=function(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},lG=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},v1=function(Y){this.options=Z7.assign({chunkSize:65536,windowBits:15,to:""},Y||{});const q=this.options;if(q.raw&&q.windowBits>=0&&q.windowBits<16){if(q.windowBits=-q.windowBits,q.windowBits===0)q.windowBits=-15}if(q.windowBits>=0&&q.windowBits<16&&!(Y&&Y.windowBits))q.windowBits+=32;if(q.windowBits>15&&q.windowBits<48){if((q.windowBits&15)===0)q.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m4,this.strm.avail_out=0;let F=t6.inflateInit2(this.strm,q.windowBits);if(F!==I1)throw new Error(B8[F]);if(this.header=new uG,t6.inflateGetHeader(this.strm,this.header),q.dictionary){if(typeof q.dictionary==="string")q.dictionary=R1.string2buf(q.dictionary);else if(i4.call(q.dictionary)==="[object ArrayBuffer]")q.dictionary=new Uint8Array(q.dictionary);if(q.raw){if(F=t6.inflateSetDictionary(this.strm,q.dictionary),F!==I1)throw new Error(B8[F])}}},M5=function(Y,q){const F=new v1(q);if(F.push(Y),F.err)throw F.msg||B8[F.err];return F.result},nG=function(Y,q){return q=q||{},q.raw=!0,M5(Y,q)};/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */var BQ=0,C4=1,RQ=2,IQ=3,TQ=258,P5=29,T1=256,D1=T1+1+P5,u8=30,k5=19,O4=2*D1+1,N8=15,t7=16,MQ=7,B5=256,D4=16,L4=17,N4=18,$5=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),J7=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),AQ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),P4=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vQ=512,s6=new Array((D1+2)*2);o8(s6);var H1=new Array(u8*2);o8(H1);var L1=new Array(vQ);o8(L1);var N1=new Array(TQ-IQ+1);o8(N1);var R5=new Array(P5);o8(R5);var U7=new Array(u8);o8(U7);var k4,B4,R4,I4=(Y)=>{return Y<256?L1[Y]:L1[256+(Y>>>7)]},P1=(Y,q)=>{Y.pending_buf[Y.pending++]=q&255,Y.pending_buf[Y.pending++]=q>>>8&255},M6=(Y,q,F)=>{if(Y.bi_valid>t7-F)Y.bi_buf|=q<<Y.bi_valid&65535,P1(Y,Y.bi_buf),Y.bi_buf=q>>t7-Y.bi_valid,Y.bi_valid+=F-t7;else Y.bi_buf|=q<<Y.bi_valid&65535,Y.bi_valid+=F},u6=(Y,q,F)=>{M6(Y,F[q*2],F[q*2+1])},T4=(Y,q)=>{let F=0;do F|=Y&1,Y>>>=1,F<<=1;while(--q>0);return F>>>1},xQ=(Y)=>{if(Y.bi_valid===16)P1(Y,Y.bi_buf),Y.bi_buf=0,Y.bi_valid=0;else if(Y.bi_valid>=8)Y.pending_buf[Y.pending++]=Y.bi_buf&255,Y.bi_buf>>=8,Y.bi_valid-=8},SQ=(Y,q)=>{const{dyn_tree:F,max_code:O}=q,Z=q.stat_desc.static_tree,N=q.stat_desc.has_stree,V=q.stat_desc.extra_bits,C=q.stat_desc.extra_base,B=q.stat_desc.max_length;let D,L,H,P,R,k,v=0;for(P=0;P<=N8;P++)Y.bl_count[P]=0;F[Y.heap[Y.heap_max]*2+1]=0;for(D=Y.heap_max+1;D<O4;D++){if(L=Y.heap[D],P=F[F[L*2+1]*2+1]+1,P>B)P=B,v++;if(F[L*2+1]=P,L>O)continue;if(Y.bl_count[P]++,R=0,L>=C)R=V[L-C];if(k=F[L*2],Y.opt_len+=k*(P+R),N)Y.static_len+=k*(Z[L*2+1]+R)}if(v===0)return;do{P=B-1;while(Y.bl_count[P]===0)P--;Y.bl_count[P]--,Y.bl_count[P+1]+=2,Y.bl_count[B]--,v-=2}while(v>0);for(P=B;P!==0;P--){L=Y.bl_count[P];while(L!==0){if(H=Y.heap[--D],H>O)continue;if(F[H*2+1]!==P)Y.opt_len+=(P-F[H*2+1])*F[H*2],F[H*2+1]=P;L--}}},M4=(Y,q,F)=>{const O=new Array(N8+1);let Z=0,N,V;for(N=1;N<=N8;N++)Z=Z+F[N-1]<<1,O[N]=Z;for(V=0;V<=q;V++){let C=Y[V*2+1];if(C===0)continue;Y[V*2]=T4(O[C]++,C)}},EQ=()=>{let Y,q,F,O,Z;const N=new Array(N8+1);F=0;for(O=0;O<P5-1;O++){R5[O]=F;for(Y=0;Y<1<<$5[O];Y++)N1[F++]=O}N1[F-1]=O,Z=0;for(O=0;O<16;O++){U7[O]=Z;for(Y=0;Y<1<<J7[O];Y++)L1[Z++]=O}Z>>=7;for(;O<u8;O++){U7[O]=Z<<7;for(Y=0;Y<1<<J7[O]-7;Y++)L1[256+Z++]=O}for(q=0;q<=N8;q++)N[q]=0;Y=0;while(Y<=143)s6[Y*2+1]=8,Y++,N[8]++;while(Y<=255)s6[Y*2+1]=9,Y++,N[9]++;while(Y<=279)s6[Y*2+1]=7,Y++,N[7]++;while(Y<=287)s6[Y*2+1]=8,Y++,N[8]++;M4(s6,D1+1,N);for(Y=0;Y<u8;Y++)H1[Y*2+1]=5,H1[Y*2]=T4(Y,5);k4=new e7(s6,$5,T1+1,D1,N8),B4=new e7(H1,J7,0,u8,N8),R4=new e7(new Array(0),AQ,0,k5,MQ)},A4=(Y)=>{let q;for(q=0;q<D1;q++)Y.dyn_ltree[q*2]=0;for(q=0;q<u8;q++)Y.dyn_dtree[q*2]=0;for(q=0;q<k5;q++)Y.bl_tree[q*2]=0;Y.dyn_ltree[B5*2]=1,Y.opt_len=Y.static_len=0,Y.sym_next=Y.matches=0},v4=(Y)=>{if(Y.bi_valid>8)P1(Y,Y.bi_buf);else if(Y.bi_valid>0)Y.pending_buf[Y.pending++]=Y.bi_buf;Y.bi_buf=0,Y.bi_valid=0},E9=(Y,q,F,O)=>{const Z=q*2,N=F*2;return Y[Z]<Y[N]||Y[Z]===Y[N]&&O[q]<=O[F]},W5=(Y,q,F)=>{const O=Y.heap[F];let Z=F<<1;while(Z<=Y.heap_len){if(Z<Y.heap_len&&E9(q,Y.heap[Z+1],Y.heap[Z],Y.depth))Z++;if(E9(q,O,Y.heap[Z],Y.depth))break;Y.heap[F]=Y.heap[Z],F=Z,Z<<=1}Y.heap[F]=O},w9=(Y,q,F)=>{let O,Z,N=0,V,C;if(Y.sym_next!==0)do if(O=Y.pending_buf[Y.sym_buf+N++]&255,O+=(Y.pending_buf[Y.sym_buf+N++]&255)<<8,Z=Y.pending_buf[Y.sym_buf+N++],O===0)u6(Y,Z,q);else{if(V=N1[Z],u6(Y,V+T1+1,q),C=$5[V],C!==0)Z-=R5[V],M6(Y,Z,C);if(O--,V=I4(O),u6(Y,V,F),C=J7[V],C!==0)O-=U7[V],M6(Y,O,C)}while(N<Y.sym_next);u6(Y,B5,q)},q5=(Y,q)=>{const F=q.dyn_tree,O=q.stat_desc.static_tree,Z=q.stat_desc.has_stree,N=q.stat_desc.elems;let V,C,B=-1,D;Y.heap_len=0,Y.heap_max=O4;for(V=0;V<N;V++)if(F[V*2]!==0)Y.heap[++Y.heap_len]=B=V,Y.depth[V]=0;else F[V*2+1]=0;while(Y.heap_len<2)if(D=Y.heap[++Y.heap_len]=B<2?++B:0,F[D*2]=1,Y.depth[D]=0,Y.opt_len--,Z)Y.static_len-=O[D*2+1];q.max_code=B;for(V=Y.heap_len>>1;V>=1;V--)W5(Y,F,V);D=N;do V=Y.heap[1],Y.heap[1]=Y.heap[Y.heap_len--],W5(Y,F,1),C=Y.heap[1],Y.heap[--Y.heap_max]=V,Y.heap[--Y.heap_max]=C,F[D*2]=F[V*2]+F[C*2],Y.depth[D]=(Y.depth[V]>=Y.depth[C]?Y.depth[V]:Y.depth[C])+1,F[V*2+1]=F[C*2+1]=D,Y.heap[1]=D++,W5(Y,F,1);while(Y.heap_len>=2);Y.heap[--Y.heap_max]=Y.heap[1],SQ(Y,q),M4(F,B,Y.bl_count)},g9=(Y,q,F)=>{let O,Z=-1,N,V=q[1],C=0,B=7,D=4;if(V===0)B=138,D=3;q[(F+1)*2+1]=65535;for(O=0;O<=F;O++){if(N=V,V=q[(O+1)*2+1],++C<B&&N===V)continue;else if(C<D)Y.bl_tree[N*2]+=C;else if(N!==0){if(N!==Z)Y.bl_tree[N*2]++;Y.bl_tree[D4*2]++}else if(C<=10)Y.bl_tree[L4*2]++;else Y.bl_tree[N4*2]++;if(C=0,Z=N,V===0)B=138,D=3;else if(N===V)B=6,D=3;else B=7,D=4}},y9=(Y,q,F)=>{let O,Z=-1,N,V=q[1],C=0,B=7,D=4;if(V===0)B=138,D=3;for(O=0;O<=F;O++){if(N=V,V=q[(O+1)*2+1],++C<B&&N===V)continue;else if(C<D)do u6(Y,N,Y.bl_tree);while(--C!==0);else if(N!==0){if(N!==Z)u6(Y,N,Y.bl_tree),C--;u6(Y,D4,Y.bl_tree),M6(Y,C-3,2)}else if(C<=10)u6(Y,L4,Y.bl_tree),M6(Y,C-3,3);else u6(Y,N4,Y.bl_tree),M6(Y,C-11,7);if(C=0,Z=N,V===0)B=138,D=3;else if(N===V)B=6,D=3;else B=7,D=4}},wQ=(Y)=>{let q;g9(Y,Y.dyn_ltree,Y.l_desc.max_code),g9(Y,Y.dyn_dtree,Y.d_desc.max_code),q5(Y,Y.bl_desc);for(q=k5-1;q>=3;q--)if(Y.bl_tree[P4[q]*2+1]!==0)break;return Y.opt_len+=3*(q+1)+5+5+4,q},gQ=(Y,q,F,O)=>{let Z;M6(Y,q-257,5),M6(Y,F-1,5),M6(Y,O-4,4);for(Z=0;Z<O;Z++)M6(Y,Y.bl_tree[P4[Z]*2+1],3);y9(Y,Y.dyn_ltree,q-1),y9(Y,Y.dyn_dtree,F-1)},yQ=(Y)=>{let q=4093624447,F;for(F=0;F<=31;F++,q>>>=1)if(q&1&&Y.dyn_ltree[F*2]!==0)return 0;if(Y.dyn_ltree[18]!==0||Y.dyn_ltree[20]!==0||Y.dyn_ltree[26]!==0)return 1;for(F=32;F<T1;F++)if(Y.dyn_ltree[F*2]!==0)return 1;return 0},_9=!1,_Q=(Y)=>{if(!_9)EQ(),_9=!0;Y.l_desc=new Q5(Y.dyn_ltree,k4),Y.d_desc=new Q5(Y.dyn_dtree,B4),Y.bl_desc=new Q5(Y.bl_tree,R4),Y.bi_buf=0,Y.bi_valid=0,A4(Y)},x4=(Y,q,F,O)=>{if(M6(Y,(BQ<<1)+(O?1:0),3),v4(Y),P1(Y,F),P1(Y,~F),F)Y.pending_buf.set(Y.window.subarray(q,q+F),Y.pending);Y.pending+=F},mQ=(Y)=>{M6(Y,C4<<1,3),u6(Y,B5,s6),xQ(Y)},pQ=(Y,q,F,O)=>{let Z,N,V=0;if(Y.level>0){if(Y.strm.data_type===2)Y.strm.data_type=yQ(Y);if(q5(Y,Y.l_desc),q5(Y,Y.d_desc),V=wQ(Y),Z=Y.opt_len+3+7>>>3,N=Y.static_len+3+7>>>3,N<=Z)Z=N}else Z=N=F+5;if(F+4<=Z&&q!==-1)x4(Y,q,F,O);else if(Y.strategy===4||N===Z)M6(Y,(C4<<1)+(O?1:0),3),w9(Y,s6,H1);else M6(Y,(RQ<<1)+(O?1:0),3),gQ(Y,Y.l_desc.max_code+1,Y.d_desc.max_code+1,V+1),w9(Y,Y.dyn_ltree,Y.dyn_dtree);if(A4(Y),O)v4(Y)},bQ=(Y,q,F)=>{if(Y.pending_buf[Y.sym_buf+Y.sym_next++]=q,Y.pending_buf[Y.sym_buf+Y.sym_next++]=q>>8,Y.pending_buf[Y.sym_buf+Y.sym_next++]=F,q===0)Y.dyn_ltree[F*2]++;else Y.matches++,q--,Y.dyn_ltree[(N1[F]+T1+1)*2]++,Y.dyn_dtree[I4(q)*2]++;return Y.sym_next===Y.sym_end},hQ=_Q,cQ=x4,lQ=pQ,uQ=bQ,dQ=mQ,fQ={_tr_init:hQ,_tr_stored_block:cQ,_tr_flush_block:lQ,_tr_tally:uQ,_tr_align:dQ},oQ=(Y,q,F,O)=>{let Z=Y&65535|0,N=Y>>>16&65535|0,V=0;while(F!==0){V=F>2000?2000:F,F-=V;do Z=Z+q[O++]|0,N=N+Z|0;while(--V);Z%=65521,N%=65521}return Z|N<<16|0},k1=oQ,aQ=()=>{let Y,q=[];for(var F=0;F<256;F++){Y=F;for(var O=0;O<8;O++)Y=Y&1?3988292384^Y>>>1:Y>>>1;q[F]=Y}return q},nQ=new Uint32Array(aQ()),rQ=(Y,q,F,O)=>{const Z=nQ,N=O+F;Y^=-1;for(let V=O;V<N;V++)Y=Y>>>8^Z[(Y^q[V])&255];return Y^-1},k6=rQ,B8={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},T8={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:iQ,_tr_stored_block:j5,_tr_flush_block:sQ,_tr_tally:K8,_tr_align:tQ}=fQ,{Z_NO_FLUSH:z8,Z_PARTIAL_FLUSH:eQ,Z_FULL_FLUSH:QW,Z_FINISH:E6,Z_BLOCK:m9,Z_OK:B6,Z_STREAM_END:p9,Z_STREAM_ERROR:d6,Z_DATA_ERROR:WW,Z_BUF_ERROR:G5,Z_DEFAULT_COMPRESSION:GW,Z_FILTERED:XW,Z_HUFFMAN_ONLY:W7,Z_RLE:YW,Z_FIXED:VW,Z_DEFAULT_STRATEGY:JW,Z_UNKNOWN:UW,Z_DEFLATED:z7}=T8,FW=9,KW=15,zW=8,ZW=29,$W=256,H5=$W+1+ZW,qW=30,jW=19,HW=2*H5+1,CW=15,u0=3,F8=258,f6=F8+u0+1,OW=32,d8=42,I5=57,C5=69,O5=73,D5=91,L5=103,P8=113,q1=666,T6=1,a8=2,R8=3,n8=4,DW=3,k8=(Y,q)=>{return Y.msg=B8[q],q},b9=(Y)=>{return Y*2-(Y>4?9:0)},U8=(Y)=>{let q=Y.length;while(--q>=0)Y[q]=0},LW=(Y)=>{let q,F,O,Z=Y.w_size;q=Y.hash_size,O=q;do F=Y.head[--O],Y.head[O]=F>=Z?F-Z:0;while(--q);q=Z,O=q;do F=Y.prev[--O],Y.prev[O]=F>=Z?F-Z:0;while(--q)},NW=(Y,q,F)=>(q<<Y.hash_shift^F)&Y.hash_mask,Z8=NW,v6=(Y)=>{const q=Y.state;let F=q.pending;if(F>Y.avail_out)F=Y.avail_out;if(F===0)return;if(Y.output.set(q.pending_buf.subarray(q.pending_out,q.pending_out+F),Y.next_out),Y.next_out+=F,q.pending_out+=F,Y.total_out+=F,Y.avail_out-=F,q.pending-=F,q.pending===0)q.pending_out=0},x6=(Y,q)=>{sQ(Y,Y.block_start>=0?Y.block_start:-1,Y.strstart-Y.block_start,q),Y.block_start=Y.strstart,v6(Y.strm)},f0=(Y,q)=>{Y.pending_buf[Y.pending++]=q},$1=(Y,q)=>{Y.pending_buf[Y.pending++]=q>>>8&255,Y.pending_buf[Y.pending++]=q&255},N5=(Y,q,F,O)=>{let Z=Y.avail_in;if(Z>O)Z=O;if(Z===0)return 0;if(Y.avail_in-=Z,q.set(Y.input.subarray(Y.next_in,Y.next_in+Z),F),Y.state.wrap===1)Y.adler=k1(Y.adler,q,Z,F);else if(Y.state.wrap===2)Y.adler=k6(Y.adler,q,Z,F);return Y.next_in+=Z,Y.total_in+=Z,Z},S4=(Y,q)=>{let{max_chain_length:F,strstart:O}=Y,Z,N,V=Y.prev_length,C=Y.nice_match;const B=Y.strstart>Y.w_size-f6?Y.strstart-(Y.w_size-f6):0,D=Y.window,L=Y.w_mask,H=Y.prev,P=Y.strstart+F8;let R=D[O+V-1],k=D[O+V];if(Y.prev_length>=Y.good_match)F>>=2;if(C>Y.lookahead)C=Y.lookahead;do{if(Z=q,D[Z+V]!==k||D[Z+V-1]!==R||D[Z]!==D[O]||D[++Z]!==D[O+1])continue;O+=2,Z++;do;while(D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&O<P);if(N=F8-(P-O),O=P-F8,N>V){if(Y.match_start=q,V=N,N>=C)break;R=D[O+V-1],k=D[O+V]}}while((q=H[q&L])>B&&--F!==0);if(V<=Y.lookahead)return V;return Y.lookahead},f8=(Y)=>{const q=Y.w_size;let F,O,Z;do{if(O=Y.window_size-Y.lookahead-Y.strstart,Y.strstart>=q+(q-f6)){if(Y.window.set(Y.window.subarray(q,q+q-O),0),Y.match_start-=q,Y.strstart-=q,Y.block_start-=q,Y.insert>Y.strstart)Y.insert=Y.strstart;LW(Y),O+=q}if(Y.strm.avail_in===0)break;if(F=N5(Y.strm,Y.window,Y.strstart+Y.lookahead,O),Y.lookahead+=F,Y.lookahead+Y.insert>=u0){Z=Y.strstart-Y.insert,Y.ins_h=Y.window[Z],Y.ins_h=Z8(Y,Y.ins_h,Y.window[Z+1]);while(Y.insert)if(Y.ins_h=Z8(Y,Y.ins_h,Y.window[Z+u0-1]),Y.prev[Z&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Z,Z++,Y.insert--,Y.lookahead+Y.insert<u0)break}}while(Y.lookahead<f6&&Y.strm.avail_in!==0)},E4=(Y,q)=>{let F=Y.pending_buf_size-5>Y.w_size?Y.w_size:Y.pending_buf_size-5,O,Z,N,V=0,C=Y.strm.avail_in;do{if(O=65535,N=Y.bi_valid+42>>3,Y.strm.avail_out<N)break;if(N=Y.strm.avail_out-N,Z=Y.strstart-Y.block_start,O>Z+Y.strm.avail_in)O=Z+Y.strm.avail_in;if(O>N)O=N;if(O<F&&(O===0&&q!==E6||q===z8||O!==Z+Y.strm.avail_in))break;if(V=q===E6&&O===Z+Y.strm.avail_in?1:0,j5(Y,0,0,V),Y.pending_buf[Y.pending-4]=O,Y.pending_buf[Y.pending-3]=O>>8,Y.pending_buf[Y.pending-2]=~O,Y.pending_buf[Y.pending-1]=~O>>8,v6(Y.strm),Z){if(Z>O)Z=O;Y.strm.output.set(Y.window.subarray(Y.block_start,Y.block_start+Z),Y.strm.next_out),Y.strm.next_out+=Z,Y.strm.avail_out-=Z,Y.strm.total_out+=Z,Y.block_start+=Z,O-=Z}if(O)N5(Y.strm,Y.strm.output,Y.strm.next_out,O),Y.strm.next_out+=O,Y.strm.avail_out-=O,Y.strm.total_out+=O}while(V===0);if(C-=Y.strm.avail_in,C){if(C>=Y.w_size)Y.matches=2,Y.window.set(Y.strm.input.subarray(Y.strm.next_in-Y.w_size,Y.strm.next_in),0),Y.strstart=Y.w_size,Y.insert=Y.strstart;else{if(Y.window_size-Y.strstart<=C){if(Y.strstart-=Y.w_size,Y.window.set(Y.window.subarray(Y.w_size,Y.w_size+Y.strstart),0),Y.matches<2)Y.matches++;if(Y.insert>Y.strstart)Y.insert=Y.strstart}Y.window.set(Y.strm.input.subarray(Y.strm.next_in-C,Y.strm.next_in),Y.strstart),Y.strstart+=C,Y.insert+=C>Y.w_size-Y.insert?Y.w_size-Y.insert:C}Y.block_start=Y.strstart}if(Y.high_water<Y.strstart)Y.high_water=Y.strstart;if(V)return n8;if(q!==z8&&q!==E6&&Y.strm.avail_in===0&&Y.strstart===Y.block_start)return a8;if(N=Y.window_size-Y.strstart,Y.strm.avail_in>N&&Y.block_start>=Y.w_size){if(Y.block_start-=Y.w_size,Y.strstart-=Y.w_size,Y.window.set(Y.window.subarray(Y.w_size,Y.w_size+Y.strstart),0),Y.matches<2)Y.matches++;if(N+=Y.w_size,Y.insert>Y.strstart)Y.insert=Y.strstart}if(N>Y.strm.avail_in)N=Y.strm.avail_in;if(N)N5(Y.strm,Y.window,Y.strstart,N),Y.strstart+=N,Y.insert+=N>Y.w_size-Y.insert?Y.w_size-Y.insert:N;if(Y.high_water<Y.strstart)Y.high_water=Y.strstart;if(N=Y.bi_valid+42>>3,N=Y.pending_buf_size-N>65535?65535:Y.pending_buf_size-N,F=N>Y.w_size?Y.w_size:N,Z=Y.strstart-Y.block_start,Z>=F||(Z||q===E6)&&q!==z8&&Y.strm.avail_in===0&&Z<=N)O=Z>N?N:Z,V=q===E6&&Y.strm.avail_in===0&&O===Z?1:0,j5(Y,Y.block_start,O,V),Y.block_start+=O,v6(Y.strm);return V?R8:T6},X5=(Y,q)=>{let F,O;for(;;){if(Y.lookahead<f6){if(f8(Y),Y.lookahead<f6&&q===z8)return T6;if(Y.lookahead===0)break}if(F=0,Y.lookahead>=u0)Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+u0-1]),F=Y.prev[Y.strstart&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Y.strstart;if(F!==0&&Y.strstart-F<=Y.w_size-f6)Y.match_length=S4(Y,F);if(Y.match_length>=u0)if(O=K8(Y,Y.strstart-Y.match_start,Y.match_length-u0),Y.lookahead-=Y.match_length,Y.match_length<=Y.max_lazy_match&&Y.lookahead>=u0){Y.match_length--;do Y.strstart++,Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+u0-1]),F=Y.prev[Y.strstart&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Y.strstart;while(--Y.match_length!==0);Y.strstart++}else Y.strstart+=Y.match_length,Y.match_length=0,Y.ins_h=Y.window[Y.strstart],Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+1]);else O=K8(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++;if(O){if(x6(Y,!1),Y.strm.avail_out===0)return T6}}if(Y.insert=Y.strstart<u0-1?Y.strstart:u0-1,q===E6){if(x6(Y,!0),Y.strm.avail_out===0)return R8;return n8}if(Y.sym_next){if(x6(Y,!1),Y.strm.avail_out===0)return T6}return a8},c8=(Y,q)=>{let F,O,Z;for(;;){if(Y.lookahead<f6){if(f8(Y),Y.lookahead<f6&&q===z8)return T6;if(Y.lookahead===0)break}if(F=0,Y.lookahead>=u0)Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+u0-1]),F=Y.prev[Y.strstart&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Y.strstart;if(Y.prev_length=Y.match_length,Y.prev_match=Y.match_start,Y.match_length=u0-1,F!==0&&Y.prev_length<Y.max_lazy_match&&Y.strstart-F<=Y.w_size-f6){if(Y.match_length=S4(Y,F),Y.match_length<=5&&(Y.strategy===XW||Y.match_length===u0&&Y.strstart-Y.match_start>4096))Y.match_length=u0-1}if(Y.prev_length>=u0&&Y.match_length<=Y.prev_length){Z=Y.strstart+Y.lookahead-u0,O=K8(Y,Y.strstart-1-Y.prev_match,Y.prev_length-u0),Y.lookahead-=Y.prev_length-1,Y.prev_length-=2;do if(++Y.strstart<=Z)Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+u0-1]),F=Y.prev[Y.strstart&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Y.strstart;while(--Y.prev_length!==0);if(Y.match_available=0,Y.match_length=u0-1,Y.strstart++,O){if(x6(Y,!1),Y.strm.avail_out===0)return T6}}else if(Y.match_available){if(O=K8(Y,0,Y.window[Y.strstart-1]),O)x6(Y,!1);if(Y.strstart++,Y.lookahead--,Y.strm.avail_out===0)return T6}else Y.match_available=1,Y.strstart++,Y.lookahead--}if(Y.match_available)O=K8(Y,0,Y.window[Y.strstart-1]),Y.match_available=0;if(Y.insert=Y.strstart<u0-1?Y.strstart:u0-1,q===E6){if(x6(Y,!0),Y.strm.avail_out===0)return R8;return n8}if(Y.sym_next){if(x6(Y,!1),Y.strm.avail_out===0)return T6}return a8},PW=(Y,q)=>{let F,O,Z,N;const V=Y.window;for(;;){if(Y.lookahead<=F8){if(f8(Y),Y.lookahead<=F8&&q===z8)return T6;if(Y.lookahead===0)break}if(Y.match_length=0,Y.lookahead>=u0&&Y.strstart>0){if(Z=Y.strstart-1,O=V[Z],O===V[++Z]&&O===V[++Z]&&O===V[++Z]){N=Y.strstart+F8;do;while(O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&Z<N);if(Y.match_length=F8-(N-Z),Y.match_length>Y.lookahead)Y.match_length=Y.lookahead}}if(Y.match_length>=u0)F=K8(Y,1,Y.match_length-u0),Y.lookahead-=Y.match_length,Y.strstart+=Y.match_length,Y.match_length=0;else F=K8(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++;if(F){if(x6(Y,!1),Y.strm.avail_out===0)return T6}}if(Y.insert=0,q===E6){if(x6(Y,!0),Y.strm.avail_out===0)return R8;return n8}if(Y.sym_next){if(x6(Y,!1),Y.strm.avail_out===0)return T6}return a8},kW=(Y,q)=>{let F;for(;;){if(Y.lookahead===0){if(f8(Y),Y.lookahead===0){if(q===z8)return T6;break}}if(Y.match_length=0,F=K8(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++,F){if(x6(Y,!1),Y.strm.avail_out===0)return T6}}if(Y.insert=0,q===E6){if(x6(Y,!0),Y.strm.avail_out===0)return R8;return n8}if(Y.sym_next){if(x6(Y,!1),Y.strm.avail_out===0)return T6}return a8},j1=[new l6(0,0,0,0,E4),new l6(4,4,8,4,X5),new l6(4,5,16,8,X5),new l6(4,6,32,32,X5),new l6(4,4,16,16,c8),new l6(8,16,32,32,c8),new l6(8,16,128,128,c8),new l6(8,32,128,256,c8),new l6(32,128,258,1024,c8),new l6(32,258,258,4096,c8)],BW=(Y)=>{Y.window_size=2*Y.w_size,U8(Y.head),Y.max_lazy_match=j1[Y.level].max_lazy,Y.good_match=j1[Y.level].good_length,Y.nice_match=j1[Y.level].nice_length,Y.max_chain_length=j1[Y.level].max_chain,Y.strstart=0,Y.block_start=0,Y.lookahead=0,Y.insert=0,Y.match_length=Y.prev_length=u0-1,Y.match_available=0,Y.ins_h=0},M1=(Y)=>{if(!Y)return 1;const q=Y.state;if(!q||q.strm!==Y||q.status!==d8&&q.status!==I5&&q.status!==C5&&q.status!==O5&&q.status!==D5&&q.status!==L5&&q.status!==P8&&q.status!==q1)return 1;return 0},w4=(Y)=>{if(M1(Y))return k8(Y,d6);Y.total_in=Y.total_out=0,Y.data_type=UW;const q=Y.state;if(q.pending=0,q.pending_out=0,q.wrap<0)q.wrap=-q.wrap;return q.status=q.wrap===2?I5:q.wrap?d8:P8,Y.adler=q.wrap===2?0:1,q.last_flush=-2,iQ(q),B6},g4=(Y)=>{const q=w4(Y);if(q===B6)BW(Y.state);return q},IW=(Y,q)=>{if(M1(Y)||Y.state.wrap!==2)return d6;return Y.state.gzhead=q,B6},y4=(Y,q,F,O,Z,N)=>{if(!Y)return d6;let V=1;if(q===GW)q=6;if(O<0)V=0,O=-O;else if(O>15)V=2,O-=16;if(Z<1||Z>FW||F!==z7||O<8||O>15||q<0||q>9||N<0||N>VW||O===8&&V!==1)return k8(Y,d6);if(O===8)O=9;const C=new RW;return Y.state=C,C.strm=Y,C.status=d8,C.wrap=V,C.gzhead=null,C.w_bits=O,C.w_size=1<<C.w_bits,C.w_mask=C.w_size-1,C.hash_bits=Z+7,C.hash_size=1<<C.hash_bits,C.hash_mask=C.hash_size-1,C.hash_shift=~~((C.hash_bits+u0-1)/u0),C.window=new Uint8Array(C.w_size*2),C.head=new Uint16Array(C.hash_size),C.prev=new Uint16Array(C.w_size),C.lit_bufsize=1<<Z+6,C.pending_buf_size=C.lit_bufsize*4,C.pending_buf=new Uint8Array(C.pending_buf_size),C.sym_buf=C.lit_bufsize,C.sym_end=(C.lit_bufsize-1)*3,C.level=q,C.strategy=N,C.method=F,g4(Y)},TW=(Y,q)=>{return y4(Y,q,z7,KW,zW,JW)},MW=(Y,q)=>{if(M1(Y)||q>m9||q<0)return Y?k8(Y,d6):d6;const F=Y.state;if(!Y.output||Y.avail_in!==0&&!Y.input||F.status===q1&&q!==E6)return k8(Y,Y.avail_out===0?G5:d6);const O=F.last_flush;if(F.last_flush=q,F.pending!==0){if(v6(Y),Y.avail_out===0)return F.last_flush=-1,B6}else if(Y.avail_in===0&&b9(q)<=b9(O)&&q!==E6)return k8(Y,G5);if(F.status===q1&&Y.avail_in!==0)return k8(Y,G5);if(F.status===d8&&F.wrap===0)F.status=P8;if(F.status===d8){let Z=z7+(F.w_bits-8<<4)<<8,N=-1;if(F.strategy>=W7||F.level<2)N=0;else if(F.level<6)N=1;else if(F.level===6)N=2;else N=3;if(Z|=N<<6,F.strstart!==0)Z|=OW;if(Z+=31-Z%31,$1(F,Z),F.strstart!==0)$1(F,Y.adler>>>16),$1(F,Y.adler&65535);if(Y.adler=1,F.status=P8,v6(Y),F.pending!==0)return F.last_flush=-1,B6}if(F.status===I5)if(Y.adler=0,f0(F,31),f0(F,139),f0(F,8),!F.gzhead){if(f0(F,0),f0(F,0),f0(F,0),f0(F,0),f0(F,0),f0(F,F.level===9?2:F.strategy>=W7||F.level<2?4:0),f0(F,DW),F.status=P8,v6(Y),F.pending!==0)return F.last_flush=-1,B6}else{if(f0(F,(F.gzhead.text?1:0)+(F.gzhead.hcrc?2:0)+(!F.gzhead.extra?0:4)+(!F.gzhead.name?0:8)+(!F.gzhead.comment?0:16)),f0(F,F.gzhead.time&255),f0(F,F.gzhead.time>>8&255),f0(F,F.gzhead.time>>16&255),f0(F,F.gzhead.time>>24&255),f0(F,F.level===9?2:F.strategy>=W7||F.level<2?4:0),f0(F,F.gzhead.os&255),F.gzhead.extra&&F.gzhead.extra.length)f0(F,F.gzhead.extra.length&255),f0(F,F.gzhead.extra.length>>8&255);if(F.gzhead.hcrc)Y.adler=k6(Y.adler,F.pending_buf,F.pending,0);F.gzindex=0,F.status=C5}if(F.status===C5){if(F.gzhead.extra){let Z=F.pending,N=(F.gzhead.extra.length&65535)-F.gzindex;while(F.pending+N>F.pending_buf_size){let C=F.pending_buf_size-F.pending;if(F.pending_buf.set(F.gzhead.extra.subarray(F.gzindex,F.gzindex+C),F.pending),F.pending=F.pending_buf_size,F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);if(F.gzindex+=C,v6(Y),F.pending!==0)return F.last_flush=-1,B6;Z=0,N-=C}let V=new Uint8Array(F.gzhead.extra);if(F.pending_buf.set(V.subarray(F.gzindex,F.gzindex+N),F.pending),F.pending+=N,F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);F.gzindex=0}F.status=O5}if(F.status===O5){if(F.gzhead.name){let Z=F.pending,N;do{if(F.pending===F.pending_buf_size){if(F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);if(v6(Y),F.pending!==0)return F.last_flush=-1,B6;Z=0}if(F.gzindex<F.gzhead.name.length)N=F.gzhead.name.charCodeAt(F.gzindex++)&255;else N=0;f0(F,N)}while(N!==0);if(F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);F.gzindex=0}F.status=D5}if(F.status===D5){if(F.gzhead.comment){let Z=F.pending,N;do{if(F.pending===F.pending_buf_size){if(F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);if(v6(Y),F.pending!==0)return F.last_flush=-1,B6;Z=0}if(F.gzindex<F.gzhead.comment.length)N=F.gzhead.comment.charCodeAt(F.gzindex++)&255;else N=0;f0(F,N)}while(N!==0);if(F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z)}F.status=L5}if(F.status===L5){if(F.gzhead.hcrc){if(F.pending+2>F.pending_buf_size){if(v6(Y),F.pending!==0)return F.last_flush=-1,B6}f0(F,Y.adler&255),f0(F,Y.adler>>8&255),Y.adler=0}if(F.status=P8,v6(Y),F.pending!==0)return F.last_flush=-1,B6}if(Y.avail_in!==0||F.lookahead!==0||q!==z8&&F.status!==q1){let Z=F.level===0?E4(F,q):F.strategy===W7?kW(F,q):F.strategy===YW?PW(F,q):j1[F.level].func(F,q);if(Z===R8||Z===n8)F.status=q1;if(Z===T6||Z===R8){if(Y.avail_out===0)F.last_flush=-1;return B6}if(Z===a8){if(q===eQ)tQ(F);else if(q!==m9){if(j5(F,0,0,!1),q===QW){if(U8(F.head),F.lookahead===0)F.strstart=0,F.block_start=0,F.insert=0}}if(v6(Y),Y.avail_out===0)return F.last_flush=-1,B6}}if(q!==E6)return B6;if(F.wrap<=0)return p9;if(F.wrap===2)f0(F,Y.adler&255),f0(F,Y.adler>>8&255),f0(F,Y.adler>>16&255),f0(F,Y.adler>>24&255),f0(F,Y.total_in&255),f0(F,Y.total_in>>8&255),f0(F,Y.total_in>>16&255),f0(F,Y.total_in>>24&255);else $1(F,Y.adler>>>16),$1(F,Y.adler&65535);if(v6(Y),F.wrap>0)F.wrap=-F.wrap;return F.pending!==0?B6:p9},AW=(Y)=>{if(M1(Y))return d6;const q=Y.state.status;return Y.state=null,q===P8?k8(Y,WW):B6},vW=(Y,q)=>{let F=q.length;if(M1(Y))return d6;const O=Y.state,Z=O.wrap;if(Z===2||Z===1&&O.status!==d8||O.lookahead)return d6;if(Z===1)Y.adler=k1(Y.adler,q,F,0);if(O.wrap=0,F>=O.w_size){if(Z===0)U8(O.head),O.strstart=0,O.block_start=0,O.insert=0;let B=new Uint8Array(O.w_size);B.set(q.subarray(F-O.w_size,F),0),q=B,F=O.w_size}const{avail_in:N,next_in:V,input:C}=Y;Y.avail_in=F,Y.next_in=0,Y.input=q,f8(O);while(O.lookahead>=u0){let B=O.strstart,D=O.lookahead-(u0-1);do O.ins_h=Z8(O,O.ins_h,O.window[B+u0-1]),O.prev[B&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=B,B++;while(--D);O.strstart=B,O.lookahead=u0-1,f8(O)}return O.strstart+=O.lookahead,O.block_start=O.strstart,O.insert=O.lookahead,O.lookahead=0,O.match_length=O.prev_length=u0-1,O.match_available=0,Y.next_in=V,Y.input=C,Y.avail_in=N,O.wrap=Z,B6},xW=TW,SW=y4,EW=g4,wW=w4,gW=IW,yW=MW,_W=AW,mW=vW,pW="pako deflate (from Nodeca project)",C1={deflateInit:xW,deflateInit2:SW,deflateReset:EW,deflateResetKeep:wW,deflateSetHeader:gW,deflate:yW,deflateEnd:_W,deflateSetDictionary:mW,deflateInfo:pW},bW=(Y,q)=>{return Object.prototype.hasOwnProperty.call(Y,q)},hW=function(Y){const q=Array.prototype.slice.call(arguments,1);while(q.length){const F=q.shift();if(!F)continue;if(typeof F!=="object")throw new TypeError(F+"must be non-object");for(let O in F)if(bW(F,O))Y[O]=F[O]}return Y},cW=(Y)=>{let q=0;for(let O=0,Z=Y.length;O<Z;O++)q+=Y[O].length;const F=new Uint8Array(q);for(let O=0,Z=0,N=Y.length;O<N;O++){let V=Y[O];F.set(V,Z),Z+=V.length}return F},Z7={assign:hW,flattenChunks:cW},_4=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Y){_4=!1}var B1=new Uint8Array(256);for(let Y=0;Y<256;Y++)B1[Y]=Y>=252?6:Y>=248?5:Y>=240?4:Y>=224?3:Y>=192?2:1;B1[254]=B1[254]=1;var lW=(Y)=>{if(typeof TextEncoder==="function"&&TextEncoder.prototype.encode)return(new TextEncoder()).encode(Y);let q,F,O,Z,N,V=Y.length,C=0;for(Z=0;Z<V;Z++){if(F=Y.charCodeAt(Z),(F&64512)===55296&&Z+1<V){if(O=Y.charCodeAt(Z+1),(O&64512)===56320)F=65536+(F-55296<<10)+(O-56320),Z++}C+=F<128?1:F<2048?2:F<65536?3:4}q=new Uint8Array(C);for(N=0,Z=0;N<C;Z++){if(F=Y.charCodeAt(Z),(F&64512)===55296&&Z+1<V){if(O=Y.charCodeAt(Z+1),(O&64512)===56320)F=65536+(F-55296<<10)+(O-56320),Z++}if(F<128)q[N++]=F;else if(F<2048)q[N++]=192|F>>>6,q[N++]=128|F&63;else if(F<65536)q[N++]=224|F>>>12,q[N++]=128|F>>>6&63,q[N++]=128|F&63;else q[N++]=240|F>>>18,q[N++]=128|F>>>12&63,q[N++]=128|F>>>6&63,q[N++]=128|F&63}return q},uW=(Y,q)=>{if(q<65534){if(Y.subarray&&_4)return String.fromCharCode.apply(null,Y.length===q?Y:Y.subarray(0,q))}let F="";for(let O=0;O<q;O++)F+=String.fromCharCode(Y[O]);return F},dW=(Y,q)=>{const F=q||Y.length;if(typeof TextDecoder==="function"&&TextDecoder.prototype.decode)return(new TextDecoder()).decode(Y.subarray(0,q));let O,Z;const N=new Array(F*2);for(Z=0,O=0;O<F;){let V=Y[O++];if(V<128){N[Z++]=V;continue}let C=B1[V];if(C>4){N[Z++]=65533,O+=C-1;continue}V&=C===2?31:C===3?15:7;while(C>1&&O<F)V=V<<6|Y[O++]&63,C--;if(C>1){N[Z++]=65533;continue}if(V<65536)N[Z++]=V;else V-=65536,N[Z++]=55296|V>>10&1023,N[Z++]=56320|V&1023}return uW(N,Z)},fW=(Y,q)=>{if(q=q||Y.length,q>Y.length)q=Y.length;let F=q-1;while(F>=0&&(Y[F]&192)===128)F--;if(F<0)return q;if(F===0)return q;return F+B1[Y[F]]>q?F:q},R1={string2buf:lW,buf2string:dW,utf8border:fW},m4=oW,p4=Object.prototype.toString,{Z_NO_FLUSH:aW,Z_SYNC_FLUSH:nW,Z_FULL_FLUSH:rW,Z_FINISH:iW,Z_OK:F7,Z_STREAM_END:sW,Z_DEFAULT_COMPRESSION:tW,Z_DEFAULT_STRATEGY:eW,Z_DEFLATED:QG}=T8;A1.prototype.push=function(Y,q){const F=this.strm,O=this.options.chunkSize;let Z,N;if(this.ended)return!1;if(q===~~q)N=q;else N=q===!0?iW:aW;if(typeof Y==="string")F.input=R1.string2buf(Y);else if(p4.call(Y)==="[object ArrayBuffer]")F.input=new Uint8Array(Y);else F.input=Y;F.next_in=0,F.avail_in=F.input.length;for(;;){if(F.avail_out===0)F.output=new Uint8Array(O),F.next_out=0,F.avail_out=O;if((N===nW||N===rW)&&F.avail_out<=6){this.onData(F.output.subarray(0,F.next_out)),F.avail_out=0;continue}if(Z=C1.deflate(F,N),Z===sW){if(F.next_out>0)this.onData(F.output.subarray(0,F.next_out));return Z=C1.deflateEnd(this.strm),this.onEnd(Z),this.ended=!0,Z===F7}if(F.avail_out===0){this.onData(F.output);continue}if(N>0&&F.next_out>0){this.onData(F.output.subarray(0,F.next_out)),F.avail_out=0;continue}if(F.avail_in===0)break}return!0};A1.prototype.onData=function(Y){this.chunks.push(Y)};A1.prototype.onEnd=function(Y){if(Y===F7)this.result=Z7.flattenChunks(this.chunks);this.chunks=[],this.err=Y,this.msg=this.strm.msg};var XG=A1,YG=T5,VG=WG,JG=GG,UG=T8,FG={Deflate:XG,deflate:YG,deflateRaw:VG,gzip:JG,constants:UG},G7=16209,KG=16191,zG=function Y(q,F){let O,Z,N,V,C,B,D,L,H,P,R,k,v,M,w,x,g,_,p,m,f,s,Q0,d;const K0=q.state;O=q.next_in,Q0=q.input,Z=O+(q.avail_in-5),N=q.next_out,d=q.output,V=N-(F-q.avail_out),C=N+(q.avail_out-257),B=K0.dmax,D=K0.wsize,L=K0.whave,H=K0.wnext,P=K0.window,R=K0.hold,k=K0.bits,v=K0.lencode,M=K0.distcode,w=(1<<K0.lenbits)-1,x=(1<<K0.distbits)-1;Q:do{if(k<15)R+=Q0[O++]<<k,k+=8,R+=Q0[O++]<<k,k+=8;g=v[R&w];W:for(;;){if(_=g>>>24,R>>>=_,k-=_,_=g>>>16&255,_===0)d[N++]=g&65535;else if(_&16){if(p=g&65535,_&=15,_){if(k<_)R+=Q0[O++]<<k,k+=8;p+=R&(1<<_)-1,R>>>=_,k-=_}if(k<15)R+=Q0[O++]<<k,k+=8,R+=Q0[O++]<<k,k+=8;g=M[R&x];G:for(;;){if(_=g>>>24,R>>>=_,k-=_,_=g>>>16&255,_&16){if(m=g&65535,_&=15,k<_){if(R+=Q0[O++]<<k,k+=8,k<_)R+=Q0[O++]<<k,k+=8}if(m+=R&(1<<_)-1,m>B){q.msg="invalid distance too far back",K0.mode=G7;break Q}if(R>>>=_,k-=_,_=N-V,m>_){if(_=m-_,_>L){if(K0.sane){q.msg="invalid distance too far back",K0.mode=G7;break Q}}if(f=0,s=P,H===0){if(f+=D-_,_<p){p-=_;do d[N++]=P[f++];while(--_);f=N-m,s=d}}else if(H<_){if(f+=D+H-_,_-=H,_<p){p-=_;do d[N++]=P[f++];while(--_);if(f=0,H<p){_=H,p-=_;do d[N++]=P[f++];while(--_);f=N-m,s=d}}}else if(f+=H-_,_<p){p-=_;do d[N++]=P[f++];while(--_);f=N-m,s=d}while(p>2)d[N++]=s[f++],d[N++]=s[f++],d[N++]=s[f++],p-=3;if(p){if(d[N++]=s[f++],p>1)d[N++]=s[f++]}}else{f=N-m;do d[N++]=d[f++],d[N++]=d[f++],d[N++]=d[f++],p-=3;while(p>2);if(p){if(d[N++]=d[f++],p>1)d[N++]=d[f++]}}}else if((_&64)===0){g=M[(g&65535)+(R&(1<<_)-1)];continue G}else{q.msg="invalid distance code",K0.mode=G7;break Q}break}}else if((_&64)===0){g=v[(g&65535)+(R&(1<<_)-1)];continue W}else if(_&32){K0.mode=KG;break Q}else{q.msg="invalid literal/length code",K0.mode=G7;break Q}break}}while(O<Z&&N<C);p=k>>3,O-=p,k-=p<<3,R&=(1<<k)-1,q.next_in=O,q.next_out=N,q.avail_in=O<Z?5+(Z-O):5-(O-Z),q.avail_out=N<C?257+(C-N):257-(N-C),K0.hold=R,K0.bits=k;return},l8=15,h9=852,c9=592,l9=0,Y5=1,u9=2,ZG=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),$G=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),qG=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),jG=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),HG=(Y,q,F,O,Z,N,V,C)=>{const B=C.bits;let D=0,L=0,H=0,P=0,R=0,k=0,v=0,M=0,w=0,x=0,g,_,p,m,f,s=null,Q0;const d=new Uint16Array(l8+1),K0=new Uint16Array(l8+1);let Q=null,G,J,X;for(D=0;D<=l8;D++)d[D]=0;for(L=0;L<O;L++)d[q[F+L]]++;R=B;for(P=l8;P>=1;P--)if(d[P]!==0)break;if(R>P)R=P;if(P===0)return Z[N++]=1<<24|64<<16|0,Z[N++]=1<<24|64<<16|0,C.bits=1,0;for(H=1;H<P;H++)if(d[H]!==0)break;if(R<H)R=H;M=1;for(D=1;D<=l8;D++)if(M<<=1,M-=d[D],M<0)return-1;if(M>0&&(Y===l9||P!==1))return-1;K0[1]=0;for(D=1;D<l8;D++)K0[D+1]=K0[D]+d[D];for(L=0;L<O;L++)if(q[F+L]!==0)V[K0[q[F+L]]++]=L;if(Y===l9)s=Q=V,Q0=20;else if(Y===Y5)s=ZG,Q=$G,Q0=257;else s=qG,Q=jG,Q0=0;if(x=0,L=0,D=H,f=N,k=R,v=0,p=-1,w=1<<R,m=w-1,Y===Y5&&w>h9||Y===u9&&w>c9)return 1;for(;;){if(G=D-v,V[L]+1<Q0)J=0,X=V[L];else if(V[L]>=Q0)J=Q[V[L]-Q0],X=s[V[L]-Q0];else J=96,X=0;g=1<<D-v,_=1<<k,H=_;do _-=g,Z[f+(x>>v)+_]=G<<24|J<<16|X|0;while(_!==0);g=1<<D-1;while(x&g)g>>=1;if(g!==0)x&=g-1,x+=g;else x=0;if(L++,--d[D]===0){if(D===P)break;D=q[F+V[L]]}if(D>R&&(x&m)!==p){if(v===0)v=R;f+=H,k=D-v,M=1<<k;while(k+v<P){if(M-=d[k+v],M<=0)break;k++,M<<=1}if(w+=1<<k,Y===Y5&&w>h9||Y===u9&&w>c9)return 1;p=x&m,Z[p]=R<<24|k<<16|f-N|0}}if(x!==0)Z[f+x]=D-v<<24|64<<16|0;return C.bits=R,0},O1=HG,CG=0,b4=1,h4=2,{Z_FINISH:d9,Z_BLOCK:OG,Z_TREES:X7,Z_OK:I8,Z_STREAM_END:DG,Z_NEED_DICT:LG,Z_STREAM_ERROR:w6,Z_DATA_ERROR:c4,Z_MEM_ERROR:l4,Z_BUF_ERROR:NG,Z_DEFLATED:f9}=T8,$7=16180,o9=16181,a9=16182,n9=16183,r9=16184,i9=16185,s9=16186,t9=16187,e9=16188,Q4=16189,K7=16190,i6=16191,V5=16192,W4=16193,J5=16194,G4=16195,X4=16196,Y4=16197,V4=16198,Y7=16199,V7=16200,J4=16201,U4=16202,F4=16203,K4=16204,z4=16205,U5=16206,Z4=16207,$4=16208,q6=16209,u4=16210,d4=16211,PG=852,kG=592,BG=15,RG=BG,q4=(Y)=>{return(Y>>>24&255)+(Y>>>8&65280)+((Y&65280)<<8)+((Y&255)<<24)},M8=(Y)=>{if(!Y)return 1;const q=Y.state;if(!q||q.strm!==Y||q.mode<$7||q.mode>d4)return 1;return 0},f4=(Y)=>{if(M8(Y))return w6;const q=Y.state;if(Y.total_in=Y.total_out=q.total=0,Y.msg="",q.wrap)Y.adler=q.wrap&1;return q.mode=$7,q.last=0,q.havedict=0,q.flags=-1,q.dmax=32768,q.head=null,q.hold=0,q.bits=0,q.lencode=q.lendyn=new Int32Array(PG),q.distcode=q.distdyn=new Int32Array(kG),q.sane=1,q.back=-1,I8},o4=(Y)=>{if(M8(Y))return w6;const q=Y.state;return q.wsize=0,q.whave=0,q.wnext=0,f4(Y)},a4=(Y,q)=>{let F;if(M8(Y))return w6;const O=Y.state;if(q<0)F=0,q=-q;else if(F=(q>>4)+5,q<48)q&=15;if(q&&(q<8||q>15))return w6;if(O.window!==null&&O.wbits!==q)O.window=null;return O.wrap=F,O.wbits=q,o4(Y)},n4=(Y,q)=>{if(!Y)return w6;const F=new IG;Y.state=F,F.strm=Y,F.window=null,F.mode=$7;const O=a4(Y,q);if(O!==I8)Y.state=null;return O},TG=(Y)=>{return n4(Y,RG)},j4=!0,F5,K5,MG=(Y)=>{if(j4){F5=new Int32Array(512),K5=new Int32Array(32);let q=0;while(q<144)Y.lens[q++]=8;while(q<256)Y.lens[q++]=9;while(q<280)Y.lens[q++]=7;while(q<288)Y.lens[q++]=8;O1(b4,Y.lens,0,288,F5,0,Y.work,{bits:9}),q=0;while(q<32)Y.lens[q++]=5;O1(h4,Y.lens,0,32,K5,0,Y.work,{bits:5}),j4=!1}Y.lencode=F5,Y.lenbits=9,Y.distcode=K5,Y.distbits=5},r4=(Y,q,F,O)=>{let Z;const N=Y.state;if(N.window===null)N.wsize=1<<N.wbits,N.wnext=0,N.whave=0,N.window=new Uint8Array(N.wsize);if(O>=N.wsize)N.window.set(q.subarray(F-N.wsize,F),0),N.wnext=0,N.whave=N.wsize;else{if(Z=N.wsize-N.wnext,Z>O)Z=O;if(N.window.set(q.subarray(F-O,F-O+Z),N.wnext),O-=Z,O)N.window.set(q.subarray(F-O,F),0),N.wnext=O,N.whave=N.wsize;else{if(N.wnext+=Z,N.wnext===N.wsize)N.wnext=0;if(N.whave<N.wsize)N.whave+=Z}}return 0},AG=(Y,q)=>{let F,O,Z,N,V,C,B,D,L,H,P,R,k,v,M=0,w,x,g,_,p,m,f,s;const Q0=new Uint8Array(4);let d,K0;const Q=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(M8(Y)||!Y.output||!Y.input&&Y.avail_in!==0)return w6;if(F=Y.state,F.mode===i6)F.mode=V5;V=Y.next_out,Z=Y.output,B=Y.avail_out,N=Y.next_in,O=Y.input,C=Y.avail_in,D=F.hold,L=F.bits,H=C,P=B,s=I8;Q:for(;;)switch(F.mode){case $7:if(F.wrap===0){F.mode=V5;break}while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.wrap&2&&D===35615){if(F.wbits===0)F.wbits=15;F.check=0,Q0[0]=D&255,Q0[1]=D>>>8&255,F.check=k6(F.check,Q0,2,0),D=0,L=0,F.mode=o9;break}if(F.head)F.head.done=!1;if(!(F.wrap&1)||(((D&255)<<8)+(D>>8))%31){Y.msg="incorrect header check",F.mode=q6;break}if((D&15)!==f9){Y.msg="unknown compression method",F.mode=q6;break}if(D>>>=4,L-=4,f=(D&15)+8,F.wbits===0)F.wbits=f;if(f>15||f>F.wbits){Y.msg="invalid window size",F.mode=q6;break}F.dmax=1<<F.wbits,F.flags=0,Y.adler=F.check=1,F.mode=D&512?Q4:i6,D=0,L=0;break;case o9:while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.flags=D,(F.flags&255)!==f9){Y.msg="unknown compression method",F.mode=q6;break}if(F.flags&57344){Y.msg="unknown header flags set",F.mode=q6;break}if(F.head)F.head.text=D>>8&1;if(F.flags&512&&F.wrap&4)Q0[0]=D&255,Q0[1]=D>>>8&255,F.check=k6(F.check,Q0,2,0);D=0,L=0,F.mode=a9;case a9:while(L<32){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.head)F.head.time=D;if(F.flags&512&&F.wrap&4)Q0[0]=D&255,Q0[1]=D>>>8&255,Q0[2]=D>>>16&255,Q0[3]=D>>>24&255,F.check=k6(F.check,Q0,4,0);D=0,L=0,F.mode=n9;case n9:while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.head)F.head.xflags=D&255,F.head.os=D>>8;if(F.flags&512&&F.wrap&4)Q0[0]=D&255,Q0[1]=D>>>8&255,F.check=k6(F.check,Q0,2,0);D=0,L=0,F.mode=r9;case r9:if(F.flags&1024){while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.length=D,F.head)F.head.extra_len=D;if(F.flags&512&&F.wrap&4)Q0[0]=D&255,Q0[1]=D>>>8&255,F.check=k6(F.check,Q0,2,0);D=0,L=0}else if(F.head)F.head.extra=null;F.mode=i9;case i9:if(F.flags&1024){if(R=F.length,R>C)R=C;if(R){if(F.head){if(f=F.head.extra_len-F.length,!F.head.extra)F.head.extra=new Uint8Array(F.head.extra_len);F.head.extra.set(O.subarray(N,N+R),f)}if(F.flags&512&&F.wrap&4)F.check=k6(F.check,O,R,N);C-=R,N+=R,F.length-=R}if(F.length)break Q}F.length=0,F.mode=s9;case s9:if(F.flags&2048){if(C===0)break Q;R=0;do if(f=O[N+R++],F.head&&f&&F.length<65536)F.head.name+=String.fromCharCode(f);while(f&&R<C);if(F.flags&512&&F.wrap&4)F.check=k6(F.check,O,R,N);if(C-=R,N+=R,f)break Q}else if(F.head)F.head.name=null;F.length=0,F.mode=t9;case t9:if(F.flags&4096){if(C===0)break Q;R=0;do if(f=O[N+R++],F.head&&f&&F.length<65536)F.head.comment+=String.fromCharCode(f);while(f&&R<C);if(F.flags&512&&F.wrap&4)F.check=k6(F.check,O,R,N);if(C-=R,N+=R,f)break Q}else if(F.head)F.head.comment=null;F.mode=e9;case e9:if(F.flags&512){while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.wrap&4&&D!==(F.check&65535)){Y.msg="header crc mismatch",F.mode=q6;break}D=0,L=0}if(F.head)F.head.hcrc=F.flags>>9&1,F.head.done=!0;Y.adler=F.check=0,F.mode=i6;break;case Q4:while(L<32){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}Y.adler=F.check=q4(D),D=0,L=0,F.mode=K7;case K7:if(F.havedict===0)return Y.next_out=V,Y.avail_out=B,Y.next_in=N,Y.avail_in=C,F.hold=D,F.bits=L,LG;Y.adler=F.check=1,F.mode=i6;case i6:if(q===OG||q===X7)break Q;case V5:if(F.last){D>>>=L&7,L-=L&7,F.mode=U5;break}while(L<3){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}switch(F.last=D&1,D>>>=1,L-=1,D&3){case 0:F.mode=W4;break;case 1:if(MG(F),F.mode=Y7,q===X7){D>>>=2,L-=2;break Q}break;case 2:F.mode=X4;break;case 3:Y.msg="invalid block type",F.mode=q6}D>>>=2,L-=2;break;case W4:D>>>=L&7,L-=L&7;while(L<32){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if((D&65535)!==(D>>>16^65535)){Y.msg="invalid stored block lengths",F.mode=q6;break}if(F.length=D&65535,D=0,L=0,F.mode=J5,q===X7)break Q;case J5:F.mode=G4;case G4:if(R=F.length,R){if(R>C)R=C;if(R>B)R=B;if(R===0)break Q;Z.set(O.subarray(N,N+R),V),C-=R,N+=R,B-=R,V+=R,F.length-=R;break}F.mode=i6;break;case X4:while(L<14){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.nlen=(D&31)+257,D>>>=5,L-=5,F.ndist=(D&31)+1,D>>>=5,L-=5,F.ncode=(D&15)+4,D>>>=4,L-=4,F.nlen>286||F.ndist>30){Y.msg="too many length or distance symbols",F.mode=q6;break}F.have=0,F.mode=Y4;case Y4:while(F.have<F.ncode){while(L<3){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}F.lens[Q[F.have++]]=D&7,D>>>=3,L-=3}while(F.have<19)F.lens[Q[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,d={bits:F.lenbits},s=O1(CG,F.lens,0,19,F.lencode,0,F.work,d),F.lenbits=d.bits,s){Y.msg="invalid code lengths set",F.mode=q6;break}F.have=0,F.mode=V4;case V4:while(F.have<F.nlen+F.ndist){for(;;){if(M=F.lencode[D&(1<<F.lenbits)-1],w=M>>>24,x=M>>>16&255,g=M&65535,w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(g<16)D>>>=w,L-=w,F.lens[F.have++]=g;else{if(g===16){K0=w+2;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(D>>>=w,L-=w,F.have===0){Y.msg="invalid bit length repeat",F.mode=q6;break}f=F.lens[F.have-1],R=3+(D&3),D>>>=2,L-=2}else if(g===17){K0=w+3;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}D>>>=w,L-=w,f=0,R=3+(D&7),D>>>=3,L-=3}else{K0=w+7;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}D>>>=w,L-=w,f=0,R=11+(D&127),D>>>=7,L-=7}if(F.have+R>F.nlen+F.ndist){Y.msg="invalid bit length repeat",F.mode=q6;break}while(R--)F.lens[F.have++]=f}}if(F.mode===q6)break;if(F.lens[256]===0){Y.msg="invalid code -- missing end-of-block",F.mode=q6;break}if(F.lenbits=9,d={bits:F.lenbits},s=O1(b4,F.lens,0,F.nlen,F.lencode,0,F.work,d),F.lenbits=d.bits,s){Y.msg="invalid literal/lengths set",F.mode=q6;break}if(F.distbits=6,F.distcode=F.distdyn,d={bits:F.distbits},s=O1(h4,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,d),F.distbits=d.bits,s){Y.msg="invalid distances set",F.mode=q6;break}if(F.mode=Y7,q===X7)break Q;case Y7:F.mode=V7;case V7:if(C>=6&&B>=258){if(Y.next_out=V,Y.avail_out=B,Y.next_in=N,Y.avail_in=C,F.hold=D,F.bits=L,zG(Y,P),V=Y.next_out,Z=Y.output,B=Y.avail_out,N=Y.next_in,O=Y.input,C=Y.avail_in,D=F.hold,L=F.bits,F.mode===i6)F.back=-1;break}F.back=0;for(;;){if(M=F.lencode[D&(1<<F.lenbits)-1],w=M>>>24,x=M>>>16&255,g=M&65535,w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(x&&(x&240)===0){_=w,p=x,m=g;for(;;){if(M=F.lencode[m+((D&(1<<_+p)-1)>>_)],w=M>>>24,x=M>>>16&255,g=M&65535,_+w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}D>>>=_,L-=_,F.back+=_}if(D>>>=w,L-=w,F.back+=w,F.length=g,x===0){F.mode=z4;break}if(x&32){F.back=-1,F.mode=i6;break}if(x&64){Y.msg="invalid literal/length code",F.mode=q6;break}F.extra=x&15,F.mode=J4;case J4:if(F.extra){K0=F.extra;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}F.length+=D&(1<<F.extra)-1,D>>>=F.extra,L-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=U4;case U4:for(;;){if(M=F.distcode[D&(1<<F.distbits)-1],w=M>>>24,x=M>>>16&255,g=M&65535,w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if((x&240)===0){_=w,p=x,m=g;for(;;){if(M=F.distcode[m+((D&(1<<_+p)-1)>>_)],w=M>>>24,x=M>>>16&255,g=M&65535,_+w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}D>>>=_,L-=_,F.back+=_}if(D>>>=w,L-=w,F.back+=w,x&64){Y.msg="invalid distance code",F.mode=q6;break}F.offset=g,F.extra=x&15,F.mode=F4;case F4:if(F.extra){K0=F.extra;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}F.offset+=D&(1<<F.extra)-1,D>>>=F.extra,L-=F.extra,F.back+=F.extra}if(F.offset>F.dmax){Y.msg="invalid distance too far back",F.mode=q6;break}F.mode=K4;case K4:if(B===0)break Q;if(R=P-B,F.offset>R){if(R=F.offset-R,R>F.whave){if(F.sane){Y.msg="invalid distance too far back",F.mode=q6;break}}if(R>F.wnext)R-=F.wnext,k=F.wsize-R;else k=F.wnext-R;if(R>F.length)R=F.length;v=F.window}else v=Z,k=V-F.offset,R=F.length;if(R>B)R=B;B-=R,F.length-=R;do Z[V++]=v[k++];while(--R);if(F.length===0)F.mode=V7;break;case z4:if(B===0)break Q;Z[V++]=F.length,B--,F.mode=V7;break;case U5:if(F.wrap){while(L<32){if(C===0)break Q;C--,D|=O[N++]<<L,L+=8}if(P-=B,Y.total_out+=P,F.total+=P,F.wrap&4&&P)Y.adler=F.check=F.flags?k6(F.check,Z,P,V-P):k1(F.check,Z,P,V-P);if(P=B,F.wrap&4&&(F.flags?D:q4(D))!==F.check){Y.msg="incorrect data check",F.mode=q6;break}D=0,L=0}F.mode=Z4;case Z4:if(F.wrap&&F.flags){while(L<32){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.wrap&4&&D!==(F.total&4294967295)){Y.msg="incorrect length check",F.mode=q6;break}D=0,L=0}F.mode=$4;case $4:s=DG;break Q;case q6:s=c4;break Q;case u4:return l4;case d4:default:return w6}if(Y.next_out=V,Y.avail_out=B,Y.next_in=N,Y.avail_in=C,F.hold=D,F.bits=L,F.wsize||P!==Y.avail_out&&F.mode<q6&&(F.mode<U5||q!==d9)){if(r4(Y,Y.output,Y.next_out,P-Y.avail_out));}if(H-=Y.avail_in,P-=Y.avail_out,Y.total_in+=H,Y.total_out+=P,F.total+=P,F.wrap&4&&P)Y.adler=F.check=F.flags?k6(F.check,Z,P,Y.next_out-P):k1(F.check,Z,P,Y.next_out-P);if(Y.data_type=F.bits+(F.last?64:0)+(F.mode===i6?128:0)+(F.mode===Y7||F.mode===J5?256:0),(H===0&&P===0||q===d9)&&s===I8)s=NG;return s},vG=(Y)=>{if(M8(Y))return w6;let q=Y.state;if(q.window)q.window=null;return Y.state=null,I8},xG=(Y,q)=>{if(M8(Y))return w6;const F=Y.state;if((F.wrap&2)===0)return w6;return F.head=q,q.done=!1,I8},SG=(Y,q)=>{const F=q.length;let O,Z,N;if(M8(Y))return w6;if(O=Y.state,O.wrap!==0&&O.mode!==K7)return w6;if(O.mode===K7){if(Z=1,Z=k1(Z,q,F,0),Z!==O.check)return c4}if(N=r4(Y,q,F,F),N)return O.mode=u4,l4;return O.havedict=1,I8},EG=o4,wG=a4,gG=f4,yG=TG,_G=n4,mG=AG,pG=vG,bG=xG,hG=SG,cG="pako inflate (from Nodeca project)",t6={inflateReset:EG,inflateReset2:wG,inflateResetKeep:gG,inflateInit:yG,inflateInit2:_G,inflate:mG,inflateEnd:pG,inflateGetHeader:bG,inflateSetDictionary:hG,inflateInfo:cG},uG=lG,i4=Object.prototype.toString,{Z_NO_FLUSH:dG,Z_FINISH:fG,Z_OK:I1,Z_STREAM_END:z5,Z_NEED_DICT:Z5,Z_STREAM_ERROR:oG,Z_DATA_ERROR:H4,Z_MEM_ERROR:aG}=T8;v1.prototype.push=function(Y,q){const F=this.strm,O=this.options.chunkSize,Z=this.options.dictionary;let N,V,C;if(this.ended)return!1;if(q===~~q)V=q;else V=q===!0?fG:dG;if(i4.call(Y)==="[object ArrayBuffer]")F.input=new Uint8Array(Y);else F.input=Y;F.next_in=0,F.avail_in=F.input.length;for(;;){if(F.avail_out===0)F.output=new Uint8Array(O),F.next_out=0,F.avail_out=O;if(N=t6.inflate(F,V),N===Z5&&Z){if(N=t6.inflateSetDictionary(F,Z),N===I1)N=t6.inflate(F,V);else if(N===H4)N=Z5}while(F.avail_in>0&&N===z5&&F.state.wrap>0&&Y[F.next_in]!==0)t6.inflateReset(F),N=t6.inflate(F,V);switch(N){case oG:case H4:case Z5:case aG:return this.onEnd(N),this.ended=!0,!1}if(C=F.avail_out,F.next_out){if(F.avail_out===0||N===z5)if(this.options.to==="string"){let B=R1.utf8border(F.output,F.next_out),D=F.next_out-B,L=R1.buf2string(F.output,B);if(F.next_out=D,F.avail_out=O-D,D)F.output.set(F.output.subarray(B,B+D),0);this.onData(L)}else this.onData(F.output.length===F.next_out?F.output:F.output.subarray(0,F.next_out))}if(N===I1&&C===0)continue;if(N===z5)return N=t6.inflateEnd(this.strm),this.onEnd(N),this.ended=!0,!0;if(F.avail_in===0)break}return!0};v1.prototype.onData=function(Y){this.chunks.push(Y)};v1.prototype.onEnd=function(Y){if(Y===I1)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=Z7.flattenChunks(this.chunks);this.chunks=[],this.err=Y,this.msg=this.strm.msg};var rG=v1,iG=M5,sG=nG,tG=M5,eG=T8,QX={Inflate:rG,inflate:iG,inflateRaw:sG,ungzip:tG,constants:eG},{Deflate:WX,deflate:GX,deflateRaw:XX,gzip:YX}=FG,{Inflate:VX,inflate:JX,inflateRaw:UX,ungzip:FX}=QX,KX=WX,zX=GX,ZX=XX,$X=YX,qX=VX,jX=JX,HX=UX,CX=FX,OX=T8,A8={Deflate:KX,deflate:zX,deflateRaw:ZX,gzip:$X,Inflate:qX,inflate:jX,inflateRaw:HX,ungzip:CX,constants:OX};var J9={};t2(J9,{webcrypto:()=>{{return V9}},timingSafeEqual:()=>{{return E1}},scryptSync:()=>{{return I7}},scrypt:()=>{{return T7}},randomUUID:()=>{{return X9}},getRandomValues:()=>{{return G9}},getCurves:()=>{{return Y9}},default:()=>{{return V2}},DEFAULT_ENCODING:()=>{{return s8}}});var Y9=function(){return sY},DX=Object.create,H7=Object.defineProperty,LX=Object.getOwnPropertyDescriptor,NX=Object.getOwnPropertyNames,PX=Object.getPrototypeOf,kX=Object.prototype.hasOwnProperty,v5=(Y,q)=>()=>(Y&&(q=Y(Y=0)),q),Z0=(Y,q)=>()=>(q||Y((q={exports:{}}).exports,q),q.exports),C7=(Y,q)=>{for(var F in q)H7(Y,F,{get:q[F],enumerable:!0})},q7=(Y,q,F,O)=>{if(q&&typeof q=="object"||typeof q=="function")for(let Z of NX(q))!kX.call(Y,Z)&&Z!==F&&H7(Y,Z,{get:()=>q[Z],enumerable:!(O=LX(q,Z))||O.enumerable});return Y},x5=(Y,q,F)=>(q7(Y,q,"default"),F&&q7(F,q,"default")),v8=(Y,q,F)=>(F=Y!=null?DX(PX(Y)):{},q7(q||!Y||!Y.__esModule?H7(F,"default",{value:Y,enumerable:!0}):F,Y)),g6=(Y)=>q7(H7({},"__esModule",{value:!0}),Y),BX=Z0((Y)=>{Y.byteLength=B,Y.toByteArray=L,Y.fromByteArray=R;var q=[],F=[],O=typeof Uint8Array<"u"?Uint8Array:Array,Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(N=0,V=Z.length;N<V;++N)q[N]=Z[N],F[Z.charCodeAt(N)]=N;var N,V;F["-".charCodeAt(0)]=62,F["_".charCodeAt(0)]=63;function C(k){var v=k.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var M=k.indexOf("=");M===-1&&(M=v);var w=M===v?0:4-M%4;return[M,w]}function B(k){var v=C(k),M=v[0],w=v[1];return(M+w)*3/4-w}function D(k,v,M){return(v+M)*3/4-M}function L(k){var v,M=C(k),w=M[0],x=M[1],g=new O(D(k,w,x)),_=0,p=x>0?w-4:w,m;for(m=0;m<p;m+=4)v=F[k.charCodeAt(m)]<<18|F[k.charCodeAt(m+1)]<<12|F[k.charCodeAt(m+2)]<<6|F[k.charCodeAt(m+3)],g[_++]=v>>16&255,g[_++]=v>>8&255,g[_++]=v&255;return x===2&&(v=F[k.charCodeAt(m)]<<2|F[k.charCodeAt(m+1)]>>4,g[_++]=v&255),x===1&&(v=F[k.charCodeAt(m)]<<10|F[k.charCodeAt(m+1)]<<4|F[k.charCodeAt(m+2)]>>2,g[_++]=v>>8&255,g[_++]=v&255),g}function H(k){return q[k>>18&63]+q[k>>12&63]+q[k>>6&63]+q[k&63]}function P(k,v,M){for(var w,x=[],g=v;g<M;g+=3)w=(k[g]<<16&16711680)+(k[g+1]<<8&65280)+(k[g+2]&255),x.push(H(w));return x.join("")}function R(k){for(var v,M=k.length,w=M%3,x=[],g=16383,_=0,p=M-w;_<p;_+=g)x.push(P(k,_,_+g>p?p:_+g));return w===1?(v=k[M-1],x.push(q[v>>2]+q[v<<4&63]+"==")):w===2&&(v=(k[M-2]<<8)+k[M-1],x.push(q[v>>10]+q[v>>4&63]+q[v<<2&63]+"=")),x.join("")}}),RX=Z0((Y)=>{Y.read=function(q,F,O,Z,N){var V,C,B=N*8-Z-1,D=(1<<B)-1,L=D>>1,H=-7,P=O?N-1:0,R=O?-1:1,k=q[F+P];for(P+=R,V=k&(1<<-H)-1,k>>=-H,H+=B;H>0;V=V*256+q[F+P],P+=R,H-=8);for(C=V&(1<<-H)-1,V>>=-H,H+=Z;H>0;C=C*256+q[F+P],P+=R,H-=8);if(V===0)V=1-L;else{if(V===D)return C?NaN:(k?-1:1)*Infinity;C=C+Math.pow(2,Z),V=V-L}return(k?-1:1)*C*Math.pow(2,V-Z)},Y.write=function(q,F,O,Z,N,V){var C,B,D,L=V*8-N-1,H=(1<<L)-1,P=H>>1,R=N===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=Z?0:V-1,v=Z?1:-1,M=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===Infinity?(B=isNaN(F)?1:0,C=H):(C=Math.floor(Math.log(F)/Math.LN2),F*(D=Math.pow(2,-C))<1&&(C--,D*=2),C+P>=1?F+=R/D:F+=R*Math.pow(2,1-P),F*D>=2&&(C++,D/=2),C+P>=H?(B=0,C=H):C+P>=1?(B=(F*D-1)*Math.pow(2,N),C=C+P):(B=F*Math.pow(2,P-1)*Math.pow(2,N),C=0));N>=8;q[O+k]=B&255,k+=v,B/=256,N-=8);for(C=C<<N|B,L+=N;L>0;q[O+k]=C&255,k+=v,C/=256,L-=8);q[O+k-v]|=M*128}}),R6=Z0((Y)=>{var q=BX(),F=RX(),O=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Y.Buffer=C,Y.SlowBuffer=x,Y.INSPECT_MAX_BYTES=50;var Z=2147483647;Y.kMaxLength=Z,C.TYPED_ARRAY_SUPPORT=N(),!C.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 N(){try{let I=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(I,S),I.foo()===42}catch{return!1}}Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}}),Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function V(I){if(I>Z)throw new RangeError('The value "'+I+'" is invalid for option "size"');let S=new Uint8Array(I);return Object.setPrototypeOf(S,C.prototype),S}function C(I,S,c){if(typeof I=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return H(I)}return B(I,S,c)}C.poolSize=8192;function B(I,S,c){if(typeof I=="string")return P(I,S);if(ArrayBuffer.isView(I))return k(I);if(I==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I);if(X0(I,ArrayBuffer)||I&&X0(I.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(X0(I,SharedArrayBuffer)||I&&X0(I.buffer,SharedArrayBuffer)))return v(I,S,c);if(typeof I=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=I.valueOf&&I.valueOf();if(o!=null&&o!==I)return C.from(o,S,c);let i=M(I);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof I[Symbol.toPrimitive]=="function")return C.from(I[Symbol.toPrimitive]("string"),S,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I)}C.from=function(I,S,c){return B(I,S,c)},Object.setPrototypeOf(C.prototype,Uint8Array.prototype),Object.setPrototypeOf(C,Uint8Array);function D(I){if(typeof I!="number")throw new TypeError('"size" argument must be of type number');if(I<0)throw new RangeError('The value "'+I+'" is invalid for option "size"')}function L(I,S,c){return D(I),I<=0?V(I):S!==void 0?typeof c=="string"?V(I).fill(S,c):V(I).fill(S):V(I)}C.alloc=function(I,S,c){return L(I,S,c)};function H(I){return D(I),V(I<0?0:w(I)|0)}C.allocUnsafe=function(I){return H(I)},C.allocUnsafeSlow=function(I){return H(I)};function P(I,S){if((typeof S!="string"||S==="")&&(S="utf8"),!C.isEncoding(S))throw new TypeError("Unknown encoding: "+S);let c=g(I,S)|0,o=V(c),i=o.write(I,S);return i!==c&&(o=o.slice(0,i)),o}function R(I){let S=I.length<0?0:w(I.length)|0,c=V(S);for(let o=0;o<S;o+=1)c[o]=I[o]&255;return c}function k(I){if(X0(I,Uint8Array)){let S=new Uint8Array(I);return v(S.buffer,S.byteOffset,S.byteLength)}return R(I)}function v(I,S,c){if(S<0||I.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(I.byteLength<S+(c||0))throw new RangeError('"length" is outside of buffer bounds');let o;return S===void 0&&c===void 0?o=new Uint8Array(I):c===void 0?o=new Uint8Array(I,S):o=new Uint8Array(I,S,c),Object.setPrototypeOf(o,C.prototype),o}function M(I){if(C.isBuffer(I)){let S=w(I.length)|0,c=V(S);return c.length===0||I.copy(c,0,0,S),c}if(I.length!==void 0)return typeof I.length!="number"||g0(I.length)?V(0):R(I);if(I.type==="Buffer"&&Array.isArray(I.data))return R(I.data)}function w(I){if(I>=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return I|0}function x(I){return+I!=I&&(I=0),C.alloc(+I)}C.isBuffer=function(I){return I!=null&&I._isBuffer===!0&&I!==C.prototype},C.compare=function(I,S){if(X0(I,Uint8Array)&&(I=C.from(I,I.offset,I.byteLength)),X0(S,Uint8Array)&&(S=C.from(S,S.offset,S.byteLength)),!C.isBuffer(I)||!C.isBuffer(S))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(I===S)return 0;let c=I.length,o=S.length;for(let i=0,O0=Math.min(c,o);i<O0;++i)if(I[i]!==S[i]){c=I[i],o=S[i];break}return c<o?-1:o<c?1:0},C.isEncoding=function(I){switch(String(I).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}},C.concat=function(I,S){if(!Array.isArray(I))throw new TypeError('"list" argument must be an Array of Buffers');if(I.length===0)return C.alloc(0);let c;if(S===void 0)for(S=0,c=0;c<I.length;++c)S+=I[c].length;let o=C.allocUnsafe(S),i=0;for(c=0;c<I.length;++c){let O0=I[c];if(X0(O0,Uint8Array))i+O0.length>o.length?(C.isBuffer(O0)||(O0=C.from(O0)),O0.copy(o,i)):Uint8Array.prototype.set.call(o,O0,i);else if(C.isBuffer(O0))O0.copy(o,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=O0.length}return o};function g(I,S){if(C.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||X0(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof I);let c=I.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&c===0)return 0;let i=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return e(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return J0(I).length;default:if(i)return o?-1:e(I).length;S=(""+S).toLowerCase(),i=!0}}C.byteLength=g;function _(I,S,c){let o=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,S>>>=0,c<=S))return"";for(I||(I="utf8");;)switch(I){case"hex":return K(this,S,c);case"utf8":case"utf-8":return J(this,S,c);case"ascii":return $(this,S,c);case"latin1":case"binary":return j(this,S,c);case"base64":return G(this,S,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,S,c);default:if(o)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),o=!0}}C.prototype._isBuffer=!0;function p(I,S,c){let o=I[S];I[S]=I[c],I[c]=o}C.prototype.swap16=function(){let I=this.length;if(I%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let S=0;S<I;S+=2)p(this,S,S+1);return this},C.prototype.swap32=function(){let I=this.length;if(I%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let S=0;S<I;S+=4)p(this,S,S+3),p(this,S+1,S+2);return this},C.prototype.swap64=function(){let I=this.length;if(I%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let S=0;S<I;S+=8)p(this,S,S+7),p(this,S+1,S+6),p(this,S+2,S+5),p(this,S+3,S+4);return this},C.prototype.toString=function(){let I=this.length;return I===0?"":arguments.length===0?J(this,0,I):_.apply(this,arguments)},C.prototype.toLocaleString=C.prototype.toString,C.prototype.equals=function(I){if(!C.isBuffer(I))throw new TypeError("Argument must be a Buffer");return this===I?!0:C.compare(this,I)===0},C.prototype.inspect=function(){let I="",S=Y.INSPECT_MAX_BYTES;return I=this.toString("hex",0,S).replace(/(.{2})/g,"$1 ").trim(),this.length>S&&(I+=" ... "),"<Buffer "+I+">"},O&&(C.prototype[O]=C.prototype.inspect),C.prototype.compare=function(I,S,c,o,i){if(X0(I,Uint8Array)&&(I=C.from(I,I.offset,I.byteLength)),!C.isBuffer(I))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof I);if(S===void 0&&(S=0),c===void 0&&(c=I?I.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),S<0||c>I.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&S>=c)return 0;if(o>=i)return-1;if(S>=c)return 1;if(S>>>=0,c>>>=0,o>>>=0,i>>>=0,this===I)return 0;let O0=i-o,U0=c-S,j0=Math.min(O0,U0),c0=this.slice(o,i),C0=I.slice(S,c);for(let H0=0;H0<j0;++H0)if(c0[H0]!==C0[H0]){O0=c0[H0],U0=C0[H0];break}return O0<U0?-1:U0<O0?1:0};function m(I,S,c,o,i){if(I.length===0)return-1;if(typeof c=="string"?(o=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,g0(c)&&(c=i?0:I.length-1),c<0&&(c=I.length+c),c>=I.length){if(i)return-1;c=I.length-1}else if(c<0)if(i)c=0;else return-1;if(typeof S=="string"&&(S=C.from(S,o)),C.isBuffer(S))return S.length===0?-1:f(I,S,c,o,i);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(I,S,c):Uint8Array.prototype.lastIndexOf.call(I,S,c):f(I,[S],c,o,i);throw new TypeError("val must be string, number or Buffer")}function f(I,S,c,o,i){let O0=1,U0=I.length,j0=S.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(I.length<2||S.length<2)return-1;O0=2,U0/=2,j0/=2,c/=2}function c0(H0,m0){return O0===1?H0[m0]:H0.readUInt16BE(m0*O0)}let C0;if(i){let H0=-1;for(C0=c;C0<U0;C0++)if(c0(I,C0)===c0(S,H0===-1?0:C0-H0)){if(H0===-1&&(H0=C0),C0-H0+1===j0)return H0*O0}else H0!==-1&&(C0-=C0-H0),H0=-1}else for(c+j0>U0&&(c=U0-j0),C0=c;C0>=0;C0--){let H0=!0;for(let m0=0;m0<j0;m0++)if(c0(I,C0+m0)!==c0(S,m0)){H0=!1;break}if(H0)return C0}return-1}C.prototype.includes=function(I,S,c){return this.indexOf(I,S,c)!==-1},C.prototype.indexOf=function(I,S,c){return m(this,I,S,c,!0)},C.prototype.lastIndexOf=function(I,S,c){return m(this,I,S,c,!1)};function s(I,S,c,o){c=Number(c)||0;let i=I.length-c;o?(o=Number(o),o>i&&(o=i)):o=i;let O0=S.length;o>O0/2&&(o=O0/2);let U0;for(U0=0;U0<o;++U0){let j0=parseInt(S.substr(U0*2,2),16);if(g0(j0))return U0;I[c+U0]=j0}return U0}function Q0(I,S,c,o){return Y0(e(S,I.length-c),I,c,o)}function d(I,S,c,o){return Y0(V0(S),I,c,o)}function K0(I,S,c,o){return Y0(J0(S),I,c,o)}function Q(I,S,c,o){return Y0(W0(S,I.length-c),I,c,o)}C.prototype.write=function(I,S,c,o){if(S===void 0)o="utf8",c=this.length,S=0;else if(c===void 0&&typeof S=="string")o=S,c=this.length,S=0;else if(isFinite(S))S=S>>>0,isFinite(c)?(c=c>>>0,o===void 0&&(o="utf8")):(o=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-S;if((c===void 0||c>i)&&(c=i),I.length>0&&(c<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let O0=!1;for(;;)switch(o){case"hex":return s(this,I,S,c);case"utf8":case"utf-8":return Q0(this,I,S,c);case"ascii":case"latin1":case"binary":return d(this,I,S,c);case"base64":return K0(this,I,S,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,I,S,c);default:if(O0)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),O0=!0}},C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(I,S,c){return S===0&&c===I.length?q.fromByteArray(I):q.fromByteArray(I.slice(S,c))}function J(I,S,c){c=Math.min(I.length,c);let o=[],i=S;for(;i<c;){let O0=I[i],U0=null,j0=O0>239?4:O0>223?3:O0>191?2:1;if(i+j0<=c){let c0,C0,H0,m0;switch(j0){case 1:O0<128&&(U0=O0);break;case 2:c0=I[i+1],(c0&192)===128&&(m0=(O0&31)<<6|c0&63,m0>127&&(U0=m0));break;case 3:c0=I[i+1],C0=I[i+2],(c0&192)===128&&(C0&192)===128&&(m0=(O0&15)<<12|(c0&63)<<6|C0&63,m0>2047&&(m0<55296||m0>57343)&&(U0=m0));break;case 4:c0=I[i+1],C0=I[i+2],H0=I[i+3],(c0&192)===128&&(C0&192)===128&&(H0&192)===128&&(m0=(O0&15)<<18|(c0&63)<<12|(C0&63)<<6|H0&63,m0>65535&&m0<1114112&&(U0=m0))}}U0===null?(U0=65533,j0=1):U0>65535&&(U0-=65536,o.push(U0>>>10&1023|55296),U0=56320|U0&1023),o.push(U0),i+=j0}return U(o)}var X=4096;function U(I){let S=I.length;if(S<=X)return String.fromCharCode.apply(String,I);let c="",o=0;for(;o<S;)c+=String.fromCharCode.apply(String,I.slice(o,o+=X));return c}function $(I,S,c){let o="";c=Math.min(I.length,c);for(let i=S;i<c;++i)o+=String.fromCharCode(I[i]&127);return o}function j(I,S,c){let o="";c=Math.min(I.length,c);for(let i=S;i<c;++i)o+=String.fromCharCode(I[i]);return o}function K(I,S,c){let o=I.length;(!S||S<0)&&(S=0),(!c||c<0||c>o)&&(c=o);let i="";for(let O0=S;O0<c;++O0)i+=$0[I[O0]];return i}function W(I,S,c){let o=I.slice(S,c),i="";for(let O0=0;O0<o.length-1;O0+=2)i+=String.fromCharCode(o[O0]+o[O0+1]*256);return i}C.prototype.slice=function(I,S){let c=this.length;I=~~I,S=S===void 0?c:~~S,I<0?(I+=c,I<0&&(I=0)):I>c&&(I=c),S<0?(S+=c,S<0&&(S=0)):S>c&&(S=c),S<I&&(S=I);let o=this.subarray(I,S);return Object.setPrototypeOf(o,C.prototype),o};function z(I,S,c){if(I%1!==0||I<0)throw new RangeError("offset is not uint");if(I+S>c)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(I,S,c){I=I>>>0,S=S>>>0,c||z(I,S,this.length);let o=this[I],i=1,O0=0;for(;++O0<S&&(i*=256);)o+=this[I+O0]*i;return o},C.prototype.readUintBE=C.prototype.readUIntBE=function(I,S,c){I=I>>>0,S=S>>>0,c||z(I,S,this.length);let o=this[I+--S],i=1;for(;S>0&&(i*=256);)o+=this[I+--S]*i;return o},C.prototype.readUint8=C.prototype.readUInt8=function(I,S){return I=I>>>0,S||z(I,1,this.length),this[I]},C.prototype.readUint16LE=C.prototype.readUInt16LE=function(I,S){return I=I>>>0,S||z(I,2,this.length),this[I]|this[I+1]<<8},C.prototype.readUint16BE=C.prototype.readUInt16BE=function(I,S){return I=I>>>0,S||z(I,2,this.length),this[I]<<8|this[I+1]},C.prototype.readUint32LE=C.prototype.readUInt32LE=function(I,S){return I=I>>>0,S||z(I,4,this.length),(this[I]|this[I+1]<<8|this[I+2]<<16)+this[I+3]*16777216},C.prototype.readUint32BE=C.prototype.readUInt32BE=function(I,S){return I=I>>>0,S||z(I,4,this.length),this[I]*16777216+(this[I+1]<<16|this[I+2]<<8|this[I+3])},C.prototype.readBigUInt64LE=z0(function(I){I=I>>>0,F0(I,"offset");let S=this[I],c=this[I+7];(S===void 0||c===void 0)&&b(I,this.length-8);let o=S+this[++I]*256+this[++I]*65536+this[++I]*16777216,i=this[++I]+this[++I]*256+this[++I]*65536+c*16777216;return BigInt(o)+(BigInt(i)<<BigInt(32))}),C.prototype.readBigUInt64BE=z0(function(I){I=I>>>0,F0(I,"offset");let S=this[I],c=this[I+7];(S===void 0||c===void 0)&&b(I,this.length-8);let o=S*16777216+this[++I]*65536+this[++I]*256+this[++I],i=this[++I]*16777216+this[++I]*65536+this[++I]*256+c;return(BigInt(o)<<BigInt(32))+BigInt(i)}),C.prototype.readIntLE=function(I,S,c){I=I>>>0,S=S>>>0,c||z(I,S,this.length);let o=this[I],i=1,O0=0;for(;++O0<S&&(i*=256);)o+=this[I+O0]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*S)),o},C.prototype.readIntBE=function(I,S,c){I=I>>>0,S=S>>>0,c||z(I,S,this.length);let o=S,i=1,O0=this[I+--o];for(;o>0&&(i*=256);)O0+=this[I+--o]*i;return i*=128,O0>=i&&(O0-=Math.pow(2,8*S)),O0},C.prototype.readInt8=function(I,S){return I=I>>>0,S||z(I,1,this.length),this[I]&128?(255-this[I]+1)*-1:this[I]},C.prototype.readInt16LE=function(I,S){I=I>>>0,S||z(I,2,this.length);let c=this[I]|this[I+1]<<8;return c&32768?c|4294901760:c},C.prototype.readInt16BE=function(I,S){I=I>>>0,S||z(I,2,this.length);let c=this[I+1]|this[I]<<8;return c&32768?c|4294901760:c},C.prototype.readInt32LE=function(I,S){return I=I>>>0,S||z(I,4,this.length),this[I]|this[I+1]<<8|this[I+2]<<16|this[I+3]<<24},C.prototype.readInt32BE=function(I,S){return I=I>>>0,S||z(I,4,this.length),this[I]<<24|this[I+1]<<16|this[I+2]<<8|this[I+3]},C.prototype.readBigInt64LE=z0(function(I){I=I>>>0,F0(I,"offset");let S=this[I],c=this[I+7];(S===void 0||c===void 0)&&b(I,this.length-8);let o=this[I+4]+this[I+5]*256+this[I+6]*65536+(c<<24);return(BigInt(o)<<BigInt(32))+BigInt(S+this[++I]*256+this[++I]*65536+this[++I]*16777216)}),C.prototype.readBigInt64BE=z0(function(I){I=I>>>0,F0(I,"offset");let S=this[I],c=this[I+7];(S===void 0||c===void 0)&&b(I,this.length-8);let o=(S<<24)+this[++I]*65536+this[++I]*256+this[++I];return(BigInt(o)<<BigInt(32))+BigInt(this[++I]*16777216+this[++I]*65536+this[++I]*256+c)}),C.prototype.readFloatLE=function(I,S){return I=I>>>0,S||z(I,4,this.length),F.read(this,I,!0,23,4)},C.prototype.readFloatBE=function(I,S){return I=I>>>0,S||z(I,4,this.length),F.read(this,I,!1,23,4)},C.prototype.readDoubleLE=function(I,S){return I=I>>>0,S||z(I,8,this.length),F.read(this,I,!0,52,8)},C.prototype.readDoubleBE=function(I,S){return I=I>>>0,S||z(I,8,this.length),F.read(this,I,!1,52,8)};function A(I,S,c,o,i,O0){if(!C.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>i||S<O0)throw new RangeError('"value" argument is out of bounds');if(c+o>I.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(I,S,c,o){if(I=+I,S=S>>>0,c=c>>>0,!o){let U0=Math.pow(2,8*c)-1;A(this,I,S,c,U0,0)}let i=1,O0=0;for(this[S]=I&255;++O0<c&&(i*=256);)this[S+O0]=I/i&255;return S+c},C.prototype.writeUintBE=C.prototype.writeUIntBE=function(I,S,c,o){if(I=+I,S=S>>>0,c=c>>>0,!o){let U0=Math.pow(2,8*c)-1;A(this,I,S,c,U0,0)}let i=c-1,O0=1;for(this[S+i]=I&255;--i>=0&&(O0*=256);)this[S+i]=I/O0&255;return S+c},C.prototype.writeUint8=C.prototype.writeUInt8=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,1,255,0),this[S]=I&255,S+1},C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,2,65535,0),this[S]=I&255,this[S+1]=I>>>8,S+2},C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,2,65535,0),this[S]=I>>>8,this[S+1]=I&255,S+2},C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,4,4294967295,0),this[S+3]=I>>>24,this[S+2]=I>>>16,this[S+1]=I>>>8,this[S]=I&255,S+4},C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,4,4294967295,0),this[S]=I>>>24,this[S+1]=I>>>16,this[S+2]=I>>>8,this[S+3]=I&255,S+4};function T(I,S,c,o,i){G0(S,o,i,I,c,7);let O0=Number(S&BigInt(4294967295));I[c++]=O0,O0=O0>>8,I[c++]=O0,O0=O0>>8,I[c++]=O0,O0=O0>>8,I[c++]=O0;let U0=Number(S>>BigInt(32)&BigInt(4294967295));return I[c++]=U0,U0=U0>>8,I[c++]=U0,U0=U0>>8,I[c++]=U0,U0=U0>>8,I[c++]=U0,c}function y(I,S,c,o,i){G0(S,o,i,I,c,7);let O0=Number(S&BigInt(4294967295));I[c+7]=O0,O0=O0>>8,I[c+6]=O0,O0=O0>>8,I[c+5]=O0,O0=O0>>8,I[c+4]=O0;let U0=Number(S>>BigInt(32)&BigInt(4294967295));return I[c+3]=U0,U0=U0>>8,I[c+2]=U0,U0=U0>>8,I[c+1]=U0,U0=U0>>8,I[c]=U0,c+8}C.prototype.writeBigUInt64LE=z0(function(I,S=0){return T(this,I,S,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeBigUInt64BE=z0(function(I,S=0){return y(this,I,S,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeIntLE=function(I,S,c,o){if(I=+I,S=S>>>0,!o){let j0=Math.pow(2,8*c-1);A(this,I,S,c,j0-1,-j0)}let i=0,O0=1,U0=0;for(this[S]=I&255;++i<c&&(O0*=256);)I<0&&U0===0&&this[S+i-1]!==0&&(U0=1),this[S+i]=(I/O0>>0)-U0&255;return S+c},C.prototype.writeIntBE=function(I,S,c,o){if(I=+I,S=S>>>0,!o){let j0=Math.pow(2,8*c-1);A(this,I,S,c,j0-1,-j0)}let i=c-1,O0=1,U0=0;for(this[S+i]=I&255;--i>=0&&(O0*=256);)I<0&&U0===0&&this[S+i+1]!==0&&(U0=1),this[S+i]=(I/O0>>0)-U0&255;return S+c},C.prototype.writeInt8=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,1,127,-128),I<0&&(I=255+I+1),this[S]=I&255,S+1},C.prototype.writeInt16LE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,2,32767,-32768),this[S]=I&255,this[S+1]=I>>>8,S+2},C.prototype.writeInt16BE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,2,32767,-32768),this[S]=I>>>8,this[S+1]=I&255,S+2},C.prototype.writeInt32LE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,4,2147483647,-2147483648),this[S]=I&255,this[S+1]=I>>>8,this[S+2]=I>>>16,this[S+3]=I>>>24,S+4},C.prototype.writeInt32BE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,4,2147483647,-2147483648),I<0&&(I=4294967295+I+1),this[S]=I>>>24,this[S+1]=I>>>16,this[S+2]=I>>>8,this[S+3]=I&255,S+4},C.prototype.writeBigInt64LE=z0(function(I,S=0){return T(this,I,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),C.prototype.writeBigInt64BE=z0(function(I,S=0){return y(this,I,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function r(I,S,c,o,i,O0){if(c+o>I.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function a(I,S,c,o,i){return S=+S,c=c>>>0,i||r(I,S,c,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),F.write(I,S,c,o,23,4),c+4}C.prototype.writeFloatLE=function(I,S,c){return a(this,I,S,!0,c)},C.prototype.writeFloatBE=function(I,S,c){return a(this,I,S,!1,c)};function t(I,S,c,o,i){return S=+S,c=c>>>0,i||r(I,S,c,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),F.write(I,S,c,o,52,8),c+8}C.prototype.writeDoubleLE=function(I,S,c){return t(this,I,S,!0,c)},C.prototype.writeDoubleBE=function(I,S,c){return t(this,I,S,!1,c)},C.prototype.copy=function(I,S,c,o){if(!C.isBuffer(I))throw new TypeError("argument should be a Buffer");if(c||(c=0),!o&&o!==0&&(o=this.length),S>=I.length&&(S=I.length),S||(S=0),o>0&&o<c&&(o=c),o===c||I.length===0||this.length===0)return 0;if(S<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),I.length-S<o-c&&(o=I.length-S+c);let i=o-c;return this===I&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(S,c,o):Uint8Array.prototype.set.call(I,this.subarray(c,o),S),i},C.prototype.fill=function(I,S,c,o){if(typeof I=="string"){if(typeof S=="string"?(o=S,S=0,c=this.length):typeof c=="string"&&(o=c,c=this.length),o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!C.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(I.length===1){let O0=I.charCodeAt(0);(o==="utf8"&&O0<128||o==="latin1")&&(I=O0)}}else typeof I=="number"?I=I&255:typeof I=="boolean"&&(I=Number(I));if(S<0||this.length<S||this.length<c)throw new RangeError("Out of range index");if(c<=S)return this;S=S>>>0,c=c===void 0?this.length:c>>>0,I||(I=0);let i;if(typeof I=="number")for(i=S;i<c;++i)this[i]=I;else{let O0=C.isBuffer(I)?I:C.from(I,o),U0=O0.length;if(U0===0)throw new TypeError('The value "'+I+'" is invalid for argument "value"');for(i=0;i<c-S;++i)this[i+S]=O0[i%U0]}return this};var l={};function h(I,S,c){l[I]=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:S.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${I}]`,this.stack,delete this.name}get code(){return I}set code(o){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:o,writable:!0})}toString(){return`${this.name} [${I}]: ${this.message}`}}}h("ERR_BUFFER_OUT_OF_BOUNDS",function(I){return I?`${I} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),h("ERR_INVALID_ARG_TYPE",function(I,S){return`The "${I}" argument must be of type number. Received type ${typeof S}`},TypeError),h("ERR_OUT_OF_RANGE",function(I,S,c){let o=`The value of "${I}" is out of range.`,i=c;return Number.isInteger(c)&&Math.abs(c)>4294967296?i=n(String(c)):typeof c=="bigint"&&(i=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(i=n(i)),i+="n"),o+=` It must be ${S}. Received ${i}`,o},RangeError);function n(I){let S="",c=I.length,o=I[0]==="-"?1:0;for(;c>=o+4;c-=3)S=`_${I.slice(c-3,c)}${S}`;return`${I.slice(0,c)}${S}`}function q0(I,S,c){F0(S,"offset"),(I[S]===void 0||I[S+c]===void 0)&&b(S,I.length-(c+1))}function G0(I,S,c,o,i,O0){if(I>c||I<S){let U0=typeof S=="bigint"?"n":"",j0;throw O0>3?S===0||S===BigInt(0)?j0=`>= 0${U0} and < 2${U0} ** ${(O0+1)*8}${U0}`:j0=`>= -(2${U0} ** ${(O0+1)*8-1}${U0}) and < 2 ** ${(O0+1)*8-1}${U0}`:j0=`>= ${S}${U0} and <= ${c}${U0}`,new l.ERR_OUT_OF_RANGE("value",j0,I)}q0(o,i,O0)}function F0(I,S){if(typeof I!="number")throw new l.ERR_INVALID_ARG_TYPE(S,"number",I)}function b(I,S,c){throw Math.floor(I)!==I?(F0(I,c),new l.ERR_OUT_OF_RANGE(c||"offset","an integer",I)):S<0?new l.ERR_BUFFER_OUT_OF_BOUNDS:new l.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${S}`,I)}var E=/[^+/0-9A-Za-z-_]/g;function u(I){if(I=I.split("=")[0],I=I.trim().replace(E,""),I.length<2)return"";for(;I.length%4!==0;)I=I+"=";return I}function e(I,S){S=S||Infinity;let c,o=I.length,i=null,O0=[];for(let U0=0;U0<o;++U0){if(c=I.charCodeAt(U0),c>55295&&c<57344){if(!i){if(c>56319){(S-=3)>-1&&O0.push(239,191,189);continue}else if(U0+1===o){(S-=3)>-1&&O0.push(239,191,189);continue}i=c;continue}if(c<56320){(S-=3)>-1&&O0.push(239,191,189),i=c;continue}c=(i-55296<<10|c-56320)+65536}else i&&(S-=3)>-1&&O0.push(239,191,189);if(i=null,c<128){if((S-=1)<0)break;O0.push(c)}else if(c<2048){if((S-=2)<0)break;O0.push(c>>6|192,c&63|128)}else if(c<65536){if((S-=3)<0)break;O0.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((S-=4)<0)break;O0.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return O0}function V0(I){let S=[];for(let c=0;c<I.length;++c)S.push(I.charCodeAt(c)&255);return S}function W0(I,S){let c,o,i,O0=[];for(let U0=0;U0<I.length&&!((S-=2)<0);++U0)c=I.charCodeAt(U0),o=c>>8,i=c%256,O0.push(i),O0.push(o);return O0}function J0(I){return q.toByteArray(u(I))}function Y0(I,S,c,o){let i;for(i=0;i<o&&!(i+c>=S.length||i>=I.length);++i)S[i+c]=I[i];return i}function X0(I,S){return I instanceof S||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===S.name}function g0(I){return I!==I}var $0=function(){let I="0123456789abcdef",S=new Array(256);for(let c=0;c<16;++c){let o=c*16;for(let i=0;i<16;++i)S[o+i]=I[c]+I[i]}return S}();function z0(I){return typeof BigInt>"u"?_0:I}function _0(){throw new Error("BigInt not supported")}}),l0=Z0((Y,q)=>{var F=R6(),O=F.Buffer;function Z(V,C){for(var B in V)C[B]=V[B]}O.from&&O.alloc&&O.allocUnsafe&&O.allocUnsafeSlow?q.exports=F:(Z(F,Y),Y.Buffer=N);function N(V,C,B){return O(V,C,B)}N.prototype=Object.create(O.prototype),Z(O,N),N.from=function(V,C,B){if(typeof V=="number")throw new TypeError("Argument must not be a number");return O(V,C,B)},N.alloc=function(V,C,B){if(typeof V!="number")throw new TypeError("Argument must be a number");var D=O(V);return C!==void 0?typeof B=="string"?D.fill(C,B):D.fill(C):D.fill(0),D},N.allocUnsafe=function(V){if(typeof V!="number")throw new TypeError("Argument must be a number");return O(V)},N.allocUnsafeSlow=function(V){if(typeof V!="number")throw new TypeError("Argument must be a number");return F.SlowBuffer(V)}}),t8=Z0((Y,q)=>{var F=65536,O=4294967295;function Z(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
-
Use Chrome, Firefox or Internet Explorer 11`)}var N=l0().Buffer,V=window.crypto||window.msCrypto;V&&V.getRandomValues?q.exports=C:q.exports=Z;function C(B,D){if(B>O)throw new RangeError("requested too many random bytes");var L=N.allocUnsafe(B);if(B>0)if(B>F)for(var H=0;H<B;H+=F)V.getRandomValues(L.slice(H,H+F));else V.getRandomValues(L);return typeof D=="function"?process.nextTick(function(){D(null,L)}):L}}),h0=Z0((Y,q)=>{typeof Object.create=="function"?q.exports=function(F,O){O&&(F.super_=O,F.prototype=Object.create(O.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(F,O){if(O){F.super_=O;var Z=function(){};Z.prototype=O.prototype,F.prototype=new Z,F.prototype.constructor=F}}}),x8=Z0((Y,q)=>{var F=typeof Reflect=="object"?Reflect:null,O=F&&typeof F.apply=="function"?F.apply:function(m,f,s){return Function.prototype.apply.call(m,f,s)},Z;F&&typeof F.ownKeys=="function"?Z=F.ownKeys:Object.getOwnPropertySymbols?Z=function(m){return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m))}:Z=function(m){return Object.getOwnPropertyNames(m)};function N(m){console&&console.warn&&console.warn(m)}var V=Number.isNaN||function(m){return m!==m};function C(){C.init.call(this)}q.exports=C,q.exports.once=g,C.EventEmitter=C,C.prototype._events=void 0,C.prototype._eventsCount=0,C.prototype._maxListeners=void 0;var B=10;function D(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}Object.defineProperty(C,"defaultMaxListeners",{enumerable:!0,get:function(){return B},set:function(m){if(typeof m!="number"||m<0||V(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");B=m}}),C.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},C.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||V(m))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+m+".");return this._maxListeners=m,this};function L(m){return m._maxListeners===void 0?C.defaultMaxListeners:m._maxListeners}C.prototype.getMaxListeners=function(){return L(this)},C.prototype.emit=function(m){for(var f=[],s=1;s<arguments.length;s++)f.push(arguments[s]);var Q0=m==="error",d=this._events;if(d!==void 0)Q0=Q0&&d.error===void 0;else if(!Q0)return!1;if(Q0){var K0;if(f.length>0&&(K0=f[0]),K0 instanceof Error)throw K0;var Q=new Error("Unhandled error."+(K0?" ("+K0.message+")":""));throw Q.context=K0,Q}var G=d[m];if(G===void 0)return!1;if(typeof G=="function")O(G,this,f);else for(var J=G.length,X=M(G,J),s=0;s<J;++s)O(X[s],this,f);return!0};function H(m,f,s,Q0){var d,K0,Q;if(D(s),K0=m._events,K0===void 0?(K0=m._events=Object.create(null),m._eventsCount=0):(K0.newListener!==void 0&&(m.emit("newListener",f,s.listener?s.listener:s),K0=m._events),Q=K0[f]),Q===void 0)Q=K0[f]=s,++m._eventsCount;else if(typeof Q=="function"?Q=K0[f]=Q0?[s,Q]:[Q,s]:Q0?Q.unshift(s):Q.push(s),d=L(m),d>0&&Q.length>d&&!Q.warned){Q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+Q.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=m,G.type=f,G.count=Q.length,N(G)}return m}C.prototype.addListener=function(m,f){return H(this,m,f,!1)},C.prototype.on=C.prototype.addListener,C.prototype.prependListener=function(m,f){return H(this,m,f,!0)};function P(){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 R(m,f,s){var Q0={fired:!1,wrapFn:void 0,target:m,type:f,listener:s},d=P.bind(Q0);return d.listener=s,Q0.wrapFn=d,d}C.prototype.once=function(m,f){return D(f),this.on(m,R(this,m,f)),this},C.prototype.prependOnceListener=function(m,f){return D(f),this.prependListener(m,R(this,m,f)),this},C.prototype.removeListener=function(m,f){var s,Q0,d,K0,Q;if(D(f),Q0=this._events,Q0===void 0)return this;if(s=Q0[m],s===void 0)return this;if(s===f||s.listener===f)--this._eventsCount===0?this._events=Object.create(null):(delete Q0[m],Q0.removeListener&&this.emit("removeListener",m,s.listener||f));else if(typeof s!="function"){for(d=-1,K0=s.length-1;K0>=0;K0--)if(s[K0]===f||s[K0].listener===f){Q=s[K0].listener,d=K0;break}if(d<0)return this;d===0?s.shift():w(s,d),s.length===1&&(Q0[m]=s[0]),Q0.removeListener!==void 0&&this.emit("removeListener",m,Q||f)}return this},C.prototype.off=C.prototype.removeListener,C.prototype.removeAllListeners=function(m){var f,s,Q0;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[m]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[m]),this;if(arguments.length===0){var d=Object.keys(s),K0;for(Q0=0;Q0<d.length;++Q0)K0=d[Q0],K0!=="removeListener"&&this.removeAllListeners(K0);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(f=s[m],typeof f=="function")this.removeListener(m,f);else if(f!==void 0)for(Q0=f.length-1;Q0>=0;Q0--)this.removeListener(m,f[Q0]);return this};function k(m,f,s){var Q0=m._events;if(Q0===void 0)return[];var d=Q0[f];return d===void 0?[]:typeof d=="function"?s?[d.listener||d]:[d]:s?x(d):M(d,d.length)}C.prototype.listeners=function(m){return k(this,m,!0)},C.prototype.rawListeners=function(m){return k(this,m,!1)},C.listenerCount=function(m,f){return typeof m.listenerCount=="function"?m.listenerCount(f):v.call(m,f)},C.prototype.listenerCount=v;function v(m){var f=this._events;if(f!==void 0){var s=f[m];if(typeof s=="function")return 1;if(s!==void 0)return s.length}return 0}C.prototype.eventNames=function(){return this._eventsCount>0?Z(this._events):[]};function M(m,f){for(var s=new Array(f),Q0=0;Q0<f;++Q0)s[Q0]=m[Q0];return s}function w(m,f){for(;f+1<m.length;f++)m[f]=m[f+1];m.pop()}function x(m){for(var f=new Array(m.length),s=0;s<f.length;++s)f[s]=m[s].listener||m[s];return f}function g(m,f){return new Promise(function(s,Q0){function d(Q){m.removeListener(f,K0),Q0(Q)}function K0(){typeof m.removeListener=="function"&&m.removeListener("error",d),s([].slice.call(arguments))}p(m,f,K0,{once:!0}),f!=="error"&&_(m,d,{once:!0})})}function _(m,f,s){typeof m.on=="function"&&p(m,"error",f,s)}function p(m,f,s,Q0){if(typeof m.on=="function")Q0.once?m.once(f,s):m.on(f,s);else if(typeof m.addEventListener=="function")m.addEventListener(f,function d(K0){Q0.once&&m.removeEventListener(f,d),s(K0)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof m)}}),Q3=Z0((Y,q)=>{q.exports=x8().EventEmitter}),O7=Z0(()=>{}),IX=Z0((Y,q)=>{function F(M,w){var x=Object.keys(M);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(M);w&&(g=g.filter(function(_){return Object.getOwnPropertyDescriptor(M,_).enumerable})),x.push.apply(x,g)}return x}function O(M){for(var w=1;w<arguments.length;w++){var x=arguments[w]!=null?arguments[w]:{};w%2?F(Object(x),!0).forEach(function(g){Z(M,g,x[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(x)):F(Object(x)).forEach(function(g){Object.defineProperty(M,g,Object.getOwnPropertyDescriptor(x,g))})}return M}function Z(M,w,x){return w=B(w),(w in M)?Object.defineProperty(M,w,{value:x,enumerable:!0,configurable:!0,writable:!0}):M[w]=x,M}function N(M,w){if(!(M instanceof w))throw new TypeError("Cannot call a class as a function")}function V(M,w){for(var x=0;x<w.length;x++){var g=w[x];g.enumerable=g.enumerable||!1,g.configurable=!0,("value"in g)&&(g.writable=!0),Object.defineProperty(M,B(g.key),g)}}function C(M,w,x){return w&&V(M.prototype,w),x&&V(M,x),Object.defineProperty(M,"prototype",{writable:!1}),M}function B(M){var w=D(M,"string");return typeof w=="symbol"?w:String(w)}function D(M,w){if(typeof M!="object"||M===null)return M;var x=M[Symbol.toPrimitive];if(x!==void 0){var g=x.call(M,w||"default");if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(M)}var L=R6(),H=L.Buffer,P=O7(),R=P.inspect,k=R&&R.custom||"inspect";function v(M,w,x){H.prototype.copy.call(M,w,x)}q.exports=function(){function M(){N(this,M),this.head=null,this.tail=null,this.length=0}return C(M,[{key:"push",value:function(w){var x={data:w,next:null};this.length>0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(w){var x={data:w,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(w){if(this.length===0)return"";for(var x=this.head,g=""+x.data;x=x.next;)g+=w+x.data;return g}},{key:"concat",value:function(w){if(this.length===0)return H.alloc(0);for(var x=H.allocUnsafe(w>>>0),g=this.head,_=0;g;)v(g.data,x,_),_+=g.data.length,g=g.next;return x}},{key:"consume",value:function(w,x){var g;return w<this.head.data.length?(g=this.head.data.slice(0,w),this.head.data=this.head.data.slice(w)):w===this.head.data.length?g=this.shift():g=x?this._getString(w):this._getBuffer(w),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(w){var x=this.head,g=1,_=x.data;for(w-=_.length;x=x.next;){var p=x.data,m=w>p.length?p.length:w;if(m===p.length?_+=p:_+=p.slice(0,w),w-=m,w===0){m===p.length?(++g,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=p.slice(m));break}++g}return this.length-=g,_}},{key:"_getBuffer",value:function(w){var x=H.allocUnsafe(w),g=this.head,_=1;for(g.data.copy(x),w-=g.data.length;g=g.next;){var p=g.data,m=w>p.length?p.length:w;if(p.copy(x,x.length-w,0,m),w-=m,w===0){m===p.length?(++_,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=p.slice(m));break}++_}return this.length-=_,x}},{key:k,value:function(w,x){return R(this,O(O({},x),{},{depth:0,customInspect:!1}))}}]),M}()}),W3=Z0((Y,q)=>{function F(B,D){var L=this,H=this._readableState&&this._readableState.destroyed,P=this._writableState&&this._writableState.destroyed;return H||P?(D?D(B):B&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(V,this,B)):process.nextTick(V,this,B)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(B||null,function(R){!D&&R?L._writableState?L._writableState.errorEmitted?process.nextTick(Z,L):(L._writableState.errorEmitted=!0,process.nextTick(O,L,R)):process.nextTick(O,L,R):D?(process.nextTick(Z,L),D(R)):process.nextTick(Z,L)}),this)}function O(B,D){V(B,D),Z(B)}function Z(B){B._writableState&&!B._writableState.emitClose||B._readableState&&!B._readableState.emitClose||B.emit("close")}function N(){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 V(B,D){B.emit("error",D)}function C(B,D){var{_readableState:L,_writableState:H}=B;L&&L.autoDestroy||H&&H.autoDestroy?B.destroy(D):B.emit("error",D)}q.exports={destroy:F,undestroy:N,errorOrDestroy:C}}),e8=Z0((Y,q)=>{function F(D,L){D.prototype=Object.create(L.prototype),D.prototype.constructor=D,D.__proto__=L}var O={};function Z(D,L,H){H||(H=Error);function P(k,v,M){return typeof L=="string"?L:L(k,v,M)}var R=function(k){F(v,k);function v(M,w,x){return k.call(this,P(M,w,x))||this}return v}(H);R.prototype.name=H.name,R.prototype.code=D,O[D]=R}function N(D,L){if(Array.isArray(D)){var H=D.length;return D=D.map(function(P){return String(P)}),H>2?"one of ".concat(L," ").concat(D.slice(0,H-1).join(", "),", or ")+D[H-1]:H===2?"one of ".concat(L," ").concat(D[0]," or ").concat(D[1]):"of ".concat(L," ").concat(D[0])}else return"of ".concat(L," ").concat(String(D))}function V(D,L,H){return D.substr(!H||H<0?0:+H,L.length)===L}function C(D,L,H){return(H===void 0||H>D.length)&&(H=D.length),D.substring(H-L.length,H)===L}function B(D,L,H){return typeof H!="number"&&(H=0),H+L.length>D.length?!1:D.indexOf(L,H)!==-1}Z("ERR_INVALID_OPT_VALUE",function(D,L){return'The value "'+L+'" is invalid for option "'+D+'"'},TypeError),Z("ERR_INVALID_ARG_TYPE",function(D,L,H){var P;typeof L=="string"&&V(L,"not ")?(P="must not be",L=L.replace(/^not /,"")):P="must be";var R;if(C(D," argument"))R="The ".concat(D," ").concat(P," ").concat(N(L,"type"));else{var k=B(D,".")?"property":"argument";R='The "'.concat(D,'" ').concat(k," ").concat(P," ").concat(N(L,"type"))}return R+=". Received type ".concat(typeof H),R},TypeError),Z("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Z("ERR_METHOD_NOT_IMPLEMENTED",function(D){return"The "+D+" method is not implemented"}),Z("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Z("ERR_STREAM_DESTROYED",function(D){return"Cannot call "+D+" after a stream was destroyed"}),Z("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Z("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Z("ERR_STREAM_WRITE_AFTER_END","write after end"),Z("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Z("ERR_UNKNOWN_ENCODING",function(D){return"Unknown encoding: "+D},TypeError),Z("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),q.exports.codes=O}),G3=Z0((Y,q)=>{var F=e8().codes.ERR_INVALID_OPT_VALUE;function O(N,V,C){return N.highWaterMark!=null?N.highWaterMark:V?N[C]:null}function Z(N,V,C,B){var D=O(V,B,C);if(D!=null){if(!(isFinite(D)&&Math.floor(D)===D)||D<0){var L=B?C:"highWaterMark";throw new F(L,D)}return Math.floor(D)}return N.objectMode?16:16384}q.exports={getHighWaterMark:Z}}),X3=Z0((Y,q)=>{q.exports=F;function F(Z,N){if(O("noDeprecation"))return Z;var V=!1;function C(){if(!V){if(O("throwDeprecation"))throw new Error(N);O("traceDeprecation")?console.trace(N):console.warn(N),V=!0}return Z.apply(this,arguments)}return C}function O(Z){try{if(!window.localStorage)return!1}catch{return!1}var N=window.localStorage[Z];return N==null?!1:String(N).toLowerCase()==="true"}}),Y3=Z0((Y,q)=>{q.exports=d;function F(l){var h=this;this.next=null,this.entry=null,this.finish=function(){t(h,l)}}var O;d.WritableState=s;var Z={deprecate:X3()},N=Q3(),V=R6().Buffer,C=(typeof window<"u"?window:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B(l){return V.from(l)}function D(l){return V.isBuffer(l)||l instanceof C}var L=W3(),H=G3(),P=H.getHighWaterMark,R=e8().codes,k=R.ERR_INVALID_ARG_TYPE,v=R.ERR_METHOD_NOT_IMPLEMENTED,M=R.ERR_MULTIPLE_CALLBACK,w=R.ERR_STREAM_CANNOT_PIPE,x=R.ERR_STREAM_DESTROYED,g=R.ERR_STREAM_NULL_VALUES,_=R.ERR_STREAM_WRITE_AFTER_END,p=R.ERR_UNKNOWN_ENCODING,m=L.errorOrDestroy;h0()(d,N);function f(){}function s(l,h,n){O=O||r8(),l=l||{},typeof n!="boolean"&&(n=h instanceof O),this.objectMode=!!l.objectMode,n&&(this.objectMode=this.objectMode||!!l.writableObjectMode),this.highWaterMark=P(this,l,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q0=l.decodeStrings===!1;this.decodeStrings=!q0,this.defaultEncoding=l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G0){j(h,G0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=l.emitClose!==!1,this.autoDestroy=!!l.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new F(this)}s.prototype.getBuffer=function(){for(var l=this.bufferedRequest,h=[];l;)h.push(l),l=l.next;return h},function(){try{Object.defineProperty(s.prototype,"buffer",{get:Z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Q0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Q0=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(l){return Q0.call(this,l)?!0:this!==d?!1:l&&l._writableState instanceof s}})):Q0=function(l){return l instanceof this};function d(l){O=O||r8();var h=this instanceof O;if(!h&&!Q0.call(d,this))return new d(l);this._writableState=new s(l,this,h),this.writable=!0,l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final)),N.call(this)}d.prototype.pipe=function(){m(this,new w)};function K0(l,h){var n=new _;m(l,n),process.nextTick(h,n)}function Q(l,h,n,q0){var G0;return n===null?G0=new g:typeof n!="string"&&!h.objectMode&&(G0=new k("chunk",["string","Buffer"],n)),G0?(m(l,G0),process.nextTick(q0,G0),!1):!0}d.prototype.write=function(l,h,n){var q0=this._writableState,G0=!1,F0=!q0.objectMode&&D(l);return F0&&!V.isBuffer(l)&&(l=B(l)),typeof h=="function"&&(n=h,h=null),F0?h="buffer":h||(h=q0.defaultEncoding),typeof n!="function"&&(n=f),q0.ending?K0(this,n):(F0||Q(this,q0,l,n))&&(q0.pendingcb++,G0=J(this,q0,F0,l,h,n)),G0},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var l=this._writableState;l.corked&&(l.corked--,!l.writing&&!l.corked&&!l.bufferProcessing&&l.bufferedRequest&&z(this,l))},d.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new p(l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(l,h,n){return!l.objectMode&&l.decodeStrings!==!1&&typeof h=="string"&&(h=V.from(h,n)),h}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J(l,h,n,q0,G0,F0){if(!n){var b=G(h,q0,G0);q0!==b&&(n=!0,G0="buffer",q0=b)}var E=h.objectMode?1:q0.length;h.length+=E;var u=h.length<h.highWaterMark;if(u||(h.needDrain=!0),h.writing||h.corked){var e=h.lastBufferedRequest;h.lastBufferedRequest={chunk:q0,encoding:G0,isBuf:n,callback:F0,next:null},e?e.next=h.lastBufferedRequest:h.bufferedRequest=h.lastBufferedRequest,h.bufferedRequestCount+=1}else X(l,h,!1,E,q0,G0,F0);return u}function X(l,h,n,q0,G0,F0,b){h.writelen=q0,h.writecb=b,h.writing=!0,h.sync=!0,h.destroyed?h.onwrite(new x("write")):n?l._writev(G0,h.onwrite):l._write(G0,F0,h.onwrite),h.sync=!1}function U(l,h,n,q0,G0){--h.pendingcb,n?(process.nextTick(G0,q0),process.nextTick(r,l,h),l._writableState.errorEmitted=!0,m(l,q0)):(G0(q0),l._writableState.errorEmitted=!0,m(l,q0),r(l,h))}function $(l){l.writing=!1,l.writecb=null,l.length-=l.writelen,l.writelen=0}function j(l,h){var n=l._writableState,q0=n.sync,G0=n.writecb;if(typeof G0!="function")throw new M;if($(n),h)U(l,n,q0,h,G0);else{var F0=A(n)||l.destroyed;!F0&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&z(l,n),q0?process.nextTick(K,l,n,F0,G0):K(l,n,F0,G0)}}function K(l,h,n,q0){n||W(l,h),h.pendingcb--,q0(),r(l,h)}function W(l,h){h.length===0&&h.needDrain&&(h.needDrain=!1,l.emit("drain"))}function z(l,h){h.bufferProcessing=!0;var n=h.bufferedRequest;if(l._writev&&n&&n.next){var q0=h.bufferedRequestCount,G0=new Array(q0),F0=h.corkedRequestsFree;F0.entry=n;for(var b=0,E=!0;n;)G0[b]=n,n.isBuf||(E=!1),n=n.next,b+=1;G0.allBuffers=E,X(l,h,!0,h.length,G0,"",F0.finish),h.pendingcb++,h.lastBufferedRequest=null,F0.next?(h.corkedRequestsFree=F0.next,F0.next=null):h.corkedRequestsFree=new F(h),h.bufferedRequestCount=0}else{for(;n;){var{chunk:u,encoding:e,callback:V0}=n,W0=h.objectMode?1:u.length;if(X(l,h,!1,W0,u,e,V0),n=n.next,h.bufferedRequestCount--,h.writing)break}n===null&&(h.lastBufferedRequest=null)}h.bufferedRequest=n,h.bufferProcessing=!1}d.prototype._write=function(l,h,n){n(new v("_write()"))},d.prototype._writev=null,d.prototype.end=function(l,h,n){var q0=this._writableState;return typeof l=="function"?(n=l,l=null,h=null):typeof h=="function"&&(n=h,h=null),l!=null&&this.write(l,h),q0.corked&&(q0.corked=1,this.uncork()),q0.ending||a(this,q0,n),this},Object.defineProperty(d.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A(l){return l.ending&&l.length===0&&l.bufferedRequest===null&&!l.finished&&!l.writing}function T(l,h){l._final(function(n){h.pendingcb--,n&&m(l,n),h.prefinished=!0,l.emit("prefinish"),r(l,h)})}function y(l,h){!h.prefinished&&!h.finalCalled&&(typeof l._final=="function"&&!h.destroyed?(h.pendingcb++,h.finalCalled=!0,process.nextTick(T,l,h)):(h.prefinished=!0,l.emit("prefinish")))}function r(l,h){var n=A(h);if(n&&(y(l,h),h.pendingcb===0&&(h.finished=!0,l.emit("finish"),h.autoDestroy))){var q0=l._readableState;(!q0||q0.autoDestroy&&q0.endEmitted)&&l.destroy()}return n}function a(l,h,n){h.ending=!0,r(l,h),n&&(h.finished?process.nextTick(n):l.once("finish",n)),h.ended=!0,l.writable=!1}function t(l,h,n){var q0=l.entry;for(l.entry=null;q0;){var G0=q0.callback;h.pendingcb--,G0(n),q0=q0.next}h.corkedRequestsFree.next=l}Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(l){!this._writableState||(this._writableState.destroyed=l)}}),d.prototype.destroy=L.destroy,d.prototype._undestroy=L.undestroy,d.prototype._destroy=function(l,h){h(l)}}),r8=Z0((Y,q)=>{var F=Object.keys||function(H){var P=[];for(var R in H)P.push(R);return P};q.exports=B;var O=V3(),Z=Y3();h0()(B,O);for(N=F(Z.prototype),C=0;C<N.length;C++)V=N[C],B.prototype[V]||(B.prototype[V]=Z.prototype[V]);var N,V,C;function B(H){if(!(this instanceof B))return new B(H);O.call(this,H),Z.call(this,H),this.allowHalfOpen=!0,H&&(H.readable===!1&&(this.readable=!1),H.writable===!1&&(this.writable=!1),H.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",D)))}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function D(){this._writableState.ended||process.nextTick(L,this)}function L(H){H.end()}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(H){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=H,this._writableState.destroyed=H)}})}),S5=Z0((Y)=>{var q=l0().Buffer,F=q.isEncoding||function(x){switch(x=""+x,x&&x.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 O(x){if(!x)return"utf8";for(var g;;)switch(x){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 x;default:if(g)return;x=(""+x).toLowerCase(),g=!0}}function Z(x){var g=O(x);if(typeof g!="string"&&(q.isEncoding===F||!F(x)))throw new Error("Unknown encoding: "+x);return g||x}Y.StringDecoder=N;function N(x){this.encoding=Z(x);var g;switch(this.encoding){case"utf16le":this.text=P,this.end=R,g=4;break;case"utf8":this.fillLast=D,g=4;break;case"base64":this.text=k,this.end=v,g=3;break;default:this.write=M,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=q.allocUnsafe(g)}N.prototype.write=function(x){if(x.length===0)return"";var g,_;if(this.lastNeed){if(g=this.fillLast(x),g===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<x.length?g?g+this.text(x,_):this.text(x,_):g||""},N.prototype.end=H,N.prototype.text=L,N.prototype.fillLast=function(x){if(this.lastNeed<=x.length)return x.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);x.copy(this.lastChar,this.lastTotal-this.lastNeed,0,x.length),this.lastNeed-=x.length};function V(x){return x<=127?0:x>>5===6?2:x>>4===14?3:x>>3===30?4:x>>6===2?-1:-2}function C(x,g,_){var p=g.length-1;if(p<_)return 0;var m=V(g[p]);return m>=0?(m>0&&(x.lastNeed=m-1),m):--p<_||m===-2?0:(m=V(g[p]),m>=0?(m>0&&(x.lastNeed=m-2),m):--p<_||m===-2?0:(m=V(g[p]),m>=0?(m>0&&(m===2?m=0:x.lastNeed=m-3),m):0))}function B(x,g,_){if((g[0]&192)!==128)return x.lastNeed=0,"\uFFFD";if(x.lastNeed>1&&g.length>1){if((g[1]&192)!==128)return x.lastNeed=1,"\uFFFD";if(x.lastNeed>2&&g.length>2&&(g[2]&192)!==128)return x.lastNeed=2,"\uFFFD"}}function D(x){var g=this.lastTotal-this.lastNeed,_=B(this,x,g);if(_!==void 0)return _;if(this.lastNeed<=x.length)return x.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);x.copy(this.lastChar,g,0,x.length),this.lastNeed-=x.length}function L(x,g){var _=C(this,x,g);if(!this.lastNeed)return x.toString("utf8",g);this.lastTotal=_;var p=x.length-(_-this.lastNeed);return x.copy(this.lastChar,0,p),x.toString("utf8",g,p)}function H(x){var g=x&&x.length?this.write(x):"";return this.lastNeed?g+"\uFFFD":g}function P(x,g){if((x.length-g)%2===0){var _=x.toString("utf16le",g);if(_){var p=_.charCodeAt(_.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=x[x.length-1],x.toString("utf16le",g,x.length-1)}function R(x){var g=x&&x.length?this.write(x):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,_)}return g}function k(x,g){var _=(x.length-g)%3;return _===0?x.toString("base64",g):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=x[x.length-1]:(this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1]),x.toString("base64",g,x.length-_))}function v(x){var g=x&&x.length?this.write(x):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function M(x){return x.toString(this.encoding)}function w(x){return x&&x.length?this.write(x):""}}),x1={};C7(x1,{StringDecoder:()=>A5.StringDecoder,default:()=>A5.StringDecoder});var A5,j7=v5(()=>{A5=v8(S5())}),E5=Z0((Y,q)=>{var F=e8().codes.ERR_STREAM_PREMATURE_CLOSE;function O(C){var B=!1;return function(){if(!B){B=!0;for(var D=arguments.length,L=new Array(D),H=0;H<D;H++)L[H]=arguments[H];C.apply(this,L)}}}function Z(){}function N(C){return C.setHeader&&typeof C.abort=="function"}function V(C,B,D){if(typeof B=="function")return V(C,null,B);B||(B={}),D=O(D||Z);var L=B.readable||B.readable!==!1&&C.readable,H=B.writable||B.writable!==!1&&C.writable,P=function(){C.writable||k()},R=C._writableState&&C._writableState.finished,k=function(){H=!1,R=!0,L||D.call(C)},v=C._readableState&&C._readableState.endEmitted,M=function(){L=!1,v=!0,H||D.call(C)},w=function(_){D.call(C,_)},x=function(){var _;if(L&&!v)return(!C._readableState||!C._readableState.ended)&&(_=new F),D.call(C,_);if(H&&!R)return(!C._writableState||!C._writableState.ended)&&(_=new F),D.call(C,_)},g=function(){C.req.on("finish",k)};return N(C)?(C.on("complete",k),C.on("abort",x),C.req?g():C.on("request",g)):H&&!C._writableState&&(C.on("end",P),C.on("close",P)),C.on("end",M),C.on("finish",k),B.error!==!1&&C.on("error",w),C.on("close",x),function(){C.removeListener("complete",k),C.removeListener("abort",x),C.removeListener("request",g),C.req&&C.req.removeListener("finish",k),C.removeListener("end",P),C.removeListener("close",P),C.removeListener("finish",k),C.removeListener("end",M),C.removeListener("error",w),C.removeListener("close",x)}}q.exports=V}),TX=Z0((Y,q)=>{var F;function O(p,m,f){return m=Z(m),(m in p)?Object.defineProperty(p,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):p[m]=f,p}function Z(p){var m=N(p,"string");return typeof m=="symbol"?m:String(m)}function N(p,m){if(typeof p!="object"||p===null)return p;var f=p[Symbol.toPrimitive];if(f!==void 0){var s=f.call(p,m||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var V=E5(),C=Symbol("lastResolve"),B=Symbol("lastReject"),D=Symbol("error"),L=Symbol("ended"),H=Symbol("lastPromise"),P=Symbol("handlePromise"),R=Symbol("stream");function k(p,m){return{value:p,done:m}}function v(p){var m=p[C];if(m!==null){var f=p[R].read();f!==null&&(p[H]=null,p[C]=null,p[B]=null,m(k(f,!1)))}}function M(p){process.nextTick(v,p)}function w(p,m){return function(f,s){p.then(function(){if(m[L]){f(k(void 0,!0));return}m[P](f,s)},s)}}var x=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((F={get stream(){return this[R]},next:function(){var p=this,m=this[D];if(m!==null)return Promise.reject(m);if(this[L])return Promise.resolve(k(void 0,!0));if(this[R].destroyed)return new Promise(function(d,K0){process.nextTick(function(){p[D]?K0(p[D]):d(k(void 0,!0))})});var f=this[H],s;if(f)s=new Promise(w(f,this));else{var Q0=this[R].read();if(Q0!==null)return Promise.resolve(k(Q0,!1));s=new Promise(this[P])}return this[H]=s,s}},O(F,Symbol.asyncIterator,function(){return this}),O(F,"return",function(){var p=this;return new Promise(function(m,f){p[R].destroy(null,function(s){if(s){f(s);return}m(k(void 0,!0))})})}),F),x),_=function(p){var m,f=Object.create(g,(m={},O(m,R,{value:p,writable:!0}),O(m,C,{value:null,writable:!0}),O(m,B,{value:null,writable:!0}),O(m,D,{value:null,writable:!0}),O(m,L,{value:p._readableState.endEmitted,writable:!0}),O(m,P,{value:function(s,Q0){var d=f[R].read();d?(f[H]=null,f[C]=null,f[B]=null,s(k(d,!1))):(f[C]=s,f[B]=Q0)},writable:!0}),m));return f[H]=null,V(p,function(s){if(s&&s.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q0=f[B];Q0!==null&&(f[H]=null,f[C]=null,f[B]=null,Q0(s)),f[D]=s;return}var d=f[C];d!==null&&(f[H]=null,f[C]=null,f[B]=null,d(k(void 0,!0))),f[L]=!0}),p.on("readable",M.bind(null,f)),f};q.exports=_}),MX=Z0((Y,q)=>{q.exports=function(){throw new Error("Readable.from is not available in the browser")}}),V3=Z0((Y,q)=>{q.exports=Q;var F;Q.ReadableState=K0;var O=x8().EventEmitter,Z=function(b,E){return b.listeners(E).length},N=Q3(),V=R6().Buffer,C=(typeof window<"u"?window:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B(b){return V.from(b)}function D(b){return V.isBuffer(b)||b instanceof C}var L=O7(),H;L&&L.debuglog?H=L.debuglog("stream"):H=function(){};var P=IX(),R=W3(),k=G3(),v=k.getHighWaterMark,M=e8().codes,w=M.ERR_INVALID_ARG_TYPE,x=M.ERR_STREAM_PUSH_AFTER_EOF,g=M.ERR_METHOD_NOT_IMPLEMENTED,_=M.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,p,m,f;h0()(Q,N);var s=R.errorOrDestroy,Q0=["error","close","destroy","pause","resume"];function d(b,E,u){if(typeof b.prependListener=="function")return b.prependListener(E,u);!b._events||!b._events[E]?b.on(E,u):Array.isArray(b._events[E])?b._events[E].unshift(u):b._events[E]=[u,b._events[E]]}function K0(b,E,u){F=F||r8(),b=b||{},typeof u!="boolean"&&(u=E instanceof F),this.objectMode=!!b.objectMode,u&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.highWaterMark=v(this,b,"readableHighWaterMark",u),this.buffer=new P,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=b.emitClose!==!1,this.autoDestroy=!!b.autoDestroy,this.destroyed=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(p||(p=(j7(),g6(x1)).StringDecoder),this.decoder=new p(b.encoding),this.encoding=b.encoding)}function Q(b){if(F=F||r8(),!(this instanceof Q))return new Q(b);var E=this instanceof F;this._readableState=new K0(b,this,E),this.readable=!0,b&&(typeof b.read=="function"&&(this._read=b.read),typeof b.destroy=="function"&&(this._destroy=b.destroy)),N.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(b){!this._readableState||(this._readableState.destroyed=b)}}),Q.prototype.destroy=R.destroy,Q.prototype._undestroy=R.undestroy,Q.prototype._destroy=function(b,E){E(b)},Q.prototype.push=function(b,E){var u=this._readableState,e;return u.objectMode?e=!0:typeof b=="string"&&(E=E||u.defaultEncoding,E!==u.encoding&&(b=V.from(b,E),E=""),e=!0),G(this,b,E,!1,e)},Q.prototype.unshift=function(b){return G(this,b,null,!0,!1)};function G(b,E,u,e,V0){H("readableAddChunk",E);var W0=b._readableState;if(E===null)W0.reading=!1,K(b,W0);else{var J0;if(V0||(J0=X(W0,E)),J0)s(b,J0);else if(W0.objectMode||E&&E.length>0)if(typeof E!="string"&&!W0.objectMode&&Object.getPrototypeOf(E)!==V.prototype&&(E=B(E)),e)W0.endEmitted?s(b,new _):J(b,W0,E,!0);else if(W0.ended)s(b,new x);else{if(W0.destroyed)return!1;W0.reading=!1,W0.decoder&&!u?(E=W0.decoder.write(E),W0.objectMode||E.length!==0?J(b,W0,E,!1):A(b,W0)):J(b,W0,E,!1)}else e||(W0.reading=!1,A(b,W0))}return!W0.ended&&(W0.length<W0.highWaterMark||W0.length===0)}function J(b,E,u,e){E.flowing&&E.length===0&&!E.sync?(E.awaitDrain=0,b.emit("data",u)):(E.length+=E.objectMode?1:u.length,e?E.buffer.unshift(u):E.buffer.push(u),E.needReadable&&W(b)),A(b,E)}function X(b,E){var u;return!D(E)&&typeof E!="string"&&E!==void 0&&!b.objectMode&&(u=new w("chunk",["string","Buffer","Uint8Array"],E)),u}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(b){p||(p=(j7(),g6(x1)).StringDecoder);var E=new p(b);this._readableState.decoder=E,this._readableState.encoding=this._readableState.decoder.encoding;for(var u=this._readableState.buffer.head,e="";u!==null;)e+=E.write(u.data),u=u.next;return this._readableState.buffer.clear(),e!==""&&this._readableState.buffer.push(e),this._readableState.length=e.length,this};var U=1073741824;function $(b){return b>=U?b=U:(b--,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,b|=b>>>16,b++),b}function j(b,E){return b<=0||E.length===0&&E.ended?0:E.objectMode?1:b!==b?E.flowing&&E.length?E.buffer.head.data.length:E.length:(b>E.highWaterMark&&(E.highWaterMark=$(b)),b<=E.length?b:E.ended?E.length:(E.needReadable=!0,0))}Q.prototype.read=function(b){H("read",b),b=parseInt(b,10);var E=this._readableState,u=b;if(b!==0&&(E.emittedReadable=!1),b===0&&E.needReadable&&((E.highWaterMark!==0?E.length>=E.highWaterMark:E.length>0)||E.ended))return H("read: emitReadable",E.length,E.ended),E.length===0&&E.ended?q0(this):W(this),null;if(b=j(b,E),b===0&&E.ended)return E.length===0&&q0(this),null;var e=E.needReadable;H("need readable",e),(E.length===0||E.length-b<E.highWaterMark)&&(e=!0,H("length less than watermark",e)),E.ended||E.reading?(e=!1,H("reading or ended",e)):e&&(H("do read"),E.reading=!0,E.sync=!0,E.length===0&&(E.needReadable=!0),this._read(E.highWaterMark),E.sync=!1,E.reading||(b=j(u,E)));var V0;return b>0?V0=n(b,E):V0=null,V0===null?(E.needReadable=E.length<=E.highWaterMark,b=0):(E.length-=b,E.awaitDrain=0),E.length===0&&(E.ended||(E.needReadable=!0),u!==b&&E.ended&&q0(this)),V0!==null&&this.emit("data",V0),V0};function K(b,E){if(H("onEofChunk"),!E.ended){if(E.decoder){var u=E.decoder.end();u&&u.length&&(E.buffer.push(u),E.length+=E.objectMode?1:u.length)}E.ended=!0,E.sync?W(b):(E.needReadable=!1,E.emittedReadable||(E.emittedReadable=!0,z(b)))}}function W(b){var E=b._readableState;H("emitReadable",E.needReadable,E.emittedReadable),E.needReadable=!1,E.emittedReadable||(H("emitReadable",E.flowing),E.emittedReadable=!0,process.nextTick(z,b))}function z(b){var E=b._readableState;H("emitReadable_",E.destroyed,E.length,E.ended),!E.destroyed&&(E.length||E.ended)&&(b.emit("readable"),E.emittedReadable=!1),E.needReadable=!E.flowing&&!E.ended&&E.length<=E.highWaterMark,h(b)}function A(b,E){E.readingMore||(E.readingMore=!0,process.nextTick(T,b,E))}function T(b,E){for(;!E.reading&&!E.ended&&(E.length<E.highWaterMark||E.flowing&&E.length===0);){var u=E.length;if(H("maybeReadMore read 0"),b.read(0),u===E.length)break}E.readingMore=!1}Q.prototype._read=function(b){s(this,new g("_read()"))},Q.prototype.pipe=function(b,E){var u=this,e=this._readableState;switch(e.pipesCount){case 0:e.pipes=b;break;case 1:e.pipes=[e.pipes,b];break;default:e.pipes.push(b);break}e.pipesCount+=1,H("pipe count=%d opts=%j",e.pipesCount,E);var V0=(!E||E.end!==!1)&&b!==process.stdout&&b!==process.stderr,W0=V0?Y0:c;e.endEmitted?process.nextTick(W0):u.once("end",W0),b.on("unpipe",J0);function J0(o,i){H("onunpipe"),o===u&&i&&i.hasUnpiped===!1&&(i.hasUnpiped=!0,$0())}function Y0(){H("onend"),b.end()}var X0=y(u);b.on("drain",X0);var g0=!1;function $0(){H("cleanup"),b.removeListener("close",I),b.removeListener("finish",S),b.removeListener("drain",X0),b.removeListener("error",_0),b.removeListener("unpipe",J0),u.removeListener("end",Y0),u.removeListener("end",c),u.removeListener("data",z0),g0=!0,e.awaitDrain&&(!b._writableState||b._writableState.needDrain)&&X0()}u.on("data",z0);function z0(o){H("ondata");var i=b.write(o);H("dest.write",i),i===!1&&((e.pipesCount===1&&e.pipes===b||e.pipesCount>1&&F0(e.pipes,b)!==-1)&&!g0&&(H("false write response, pause",e.awaitDrain),e.awaitDrain++),u.pause())}function _0(o){H("onerror",o),c(),b.removeListener("error",_0),Z(b,"error")===0&&s(b,o)}d(b,"error",_0);function I(){b.removeListener("finish",S),c()}b.once("close",I);function S(){H("onfinish"),b.removeListener("close",I),c()}b.once("finish",S);function c(){H("unpipe"),u.unpipe(b)}return b.emit("pipe",u),e.flowing||(H("pipe resume"),u.resume()),b};function y(b){return function(){var E=b._readableState;H("pipeOnDrain",E.awaitDrain),E.awaitDrain&&E.awaitDrain--,E.awaitDrain===0&&Z(b,"data")&&(E.flowing=!0,h(b))}}Q.prototype.unpipe=function(b){var E=this._readableState,u={hasUnpiped:!1};if(E.pipesCount===0)return this;if(E.pipesCount===1)return b&&b!==E.pipes?this:(b||(b=E.pipes),E.pipes=null,E.pipesCount=0,E.flowing=!1,b&&b.emit("unpipe",this,u),this);if(!b){var{pipes:e,pipesCount:V0}=E;E.pipes=null,E.pipesCount=0,E.flowing=!1;for(var W0=0;W0<V0;W0++)e[W0].emit("unpipe",this,{hasUnpiped:!1});return this}var J0=F0(E.pipes,b);return J0===-1?this:(E.pipes.splice(J0,1),E.pipesCount-=1,E.pipesCount===1&&(E.pipes=E.pipes[0]),b.emit("unpipe",this,u),this)},Q.prototype.on=function(b,E){var u=N.prototype.on.call(this,b,E),e=this._readableState;return b==="data"?(e.readableListening=this.listenerCount("readable")>0,e.flowing!==!1&&this.resume()):b==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,H("on readable",e.length,e.reading),e.length?W(this):e.reading||process.nextTick(a,this)),u},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(b,E){var u=N.prototype.removeListener.call(this,b,E);return b==="readable"&&process.nextTick(r,this),u},Q.prototype.removeAllListeners=function(b){var E=N.prototype.removeAllListeners.apply(this,arguments);return(b==="readable"||b===void 0)&&process.nextTick(r,this),E};function r(b){var E=b._readableState;E.readableListening=b.listenerCount("readable")>0,E.resumeScheduled&&!E.paused?E.flowing=!0:b.listenerCount("data")>0&&b.resume()}function a(b){H("readable nexttick read 0"),b.read(0)}Q.prototype.resume=function(){var b=this._readableState;return b.flowing||(H("resume"),b.flowing=!b.readableListening,t(this,b)),b.paused=!1,this};function t(b,E){E.resumeScheduled||(E.resumeScheduled=!0,process.nextTick(l,b,E))}function l(b,E){H("resume",E.reading),E.reading||b.read(0),E.resumeScheduled=!1,b.emit("resume"),h(b),E.flowing&&!E.reading&&b.read(0)}Q.prototype.pause=function(){return H("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(H("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function h(b){var E=b._readableState;for(H("flow",E.flowing);E.flowing&&b.read()!==null;);}Q.prototype.wrap=function(b){var E=this,u=this._readableState,e=!1;b.on("end",function(){if(H("wrapped end"),u.decoder&&!u.ended){var J0=u.decoder.end();J0&&J0.length&&E.push(J0)}E.push(null)}),b.on("data",function(J0){if(H("wrapped data"),u.decoder&&(J0=u.decoder.write(J0)),!(u.objectMode&&J0==null)&&!(!u.objectMode&&(!J0||!J0.length))){var Y0=E.push(J0);Y0||(e=!0,b.pause())}});for(var V0 in b)this[V0]===void 0&&typeof b[V0]=="function"&&(this[V0]=function(J0){return function(){return b[J0].apply(b,arguments)}}(V0));for(var W0=0;W0<Q0.length;W0++)b.on(Q0[W0],this.emit.bind(this,Q0[W0]));return this._read=function(J0){H("wrapped _read",J0),e&&(e=!1,b.resume())},this},typeof Symbol=="function"&&(Q.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=TX()),m(this)}),Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(b){this._readableState&&(this._readableState.flowing=b)}}),Q._fromList=n,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function n(b,E){if(E.length===0)return null;var u;return E.objectMode?u=E.buffer.shift():!b||b>=E.length?(E.decoder?u=E.buffer.join(""):E.buffer.length===1?u=E.buffer.first():u=E.buffer.concat(E.length),E.buffer.clear()):u=E.buffer.consume(b,E.decoder),u}function q0(b){var E=b._readableState;H("endReadable",E.endEmitted),E.endEmitted||(E.ended=!0,process.nextTick(G0,E,b))}function G0(b,E){if(H("endReadableNT",b.endEmitted,b.length),!b.endEmitted&&b.length===0&&(b.endEmitted=!0,E.readable=!1,E.emit("end"),b.autoDestroy)){var u=E._writableState;(!u||u.autoDestroy&&u.finished)&&E.destroy()}}typeof Symbol=="function"&&(Q.from=function(b,E){return f===void 0&&(f=MX()),f(Q,b,E)});function F0(b,E){for(var u=0,e=b.length;u<e;u++)if(b[u]===E)return u;return-1}}),J3=Z0((Y,q)=>{q.exports=D;var F=e8().codes,O=F.ERR_METHOD_NOT_IMPLEMENTED,Z=F.ERR_MULTIPLE_CALLBACK,N=F.ERR_TRANSFORM_ALREADY_TRANSFORMING,V=F.ERR_TRANSFORM_WITH_LENGTH_0,C=r8();h0()(D,C);function B(P,R){var k=this._transformState;k.transforming=!1;var v=k.writecb;if(v===null)return this.emit("error",new Z);k.writechunk=null,k.writecb=null,R!=null&&this.push(R),v(P);var M=this._readableState;M.reading=!1,(M.needReadable||M.length<M.highWaterMark)&&this._read(M.highWaterMark)}function D(P){if(!(this instanceof D))return new D(P);C.call(this,P),this._transformState={afterTransform:B.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,P&&(typeof P.transform=="function"&&(this._transform=P.transform),typeof P.flush=="function"&&(this._flush=P.flush)),this.on("prefinish",L)}function L(){var P=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(R,k){H(P,R,k)}):H(this,null,null)}D.prototype.push=function(P,R){return this._transformState.needTransform=!1,C.prototype.push.call(this,P,R)},D.prototype._transform=function(P,R,k){k(new O("_transform()"))},D.prototype._write=function(P,R,k){var v=this._transformState;if(v.writecb=k,v.writechunk=P,v.writeencoding=R,!v.transforming){var M=this._readableState;(v.needTransform||M.needReadable||M.length<M.highWaterMark)&&this._read(M.highWaterMark)}},D.prototype._read=function(P){var R=this._transformState;R.writechunk!==null&&!R.transforming?(R.transforming=!0,this._transform(R.writechunk,R.writeencoding,R.afterTransform)):R.needTransform=!0},D.prototype._destroy=function(P,R){C.prototype._destroy.call(this,P,function(k){R(k)})};function H(P,R,k){if(R)return P.emit("error",R);if(k!=null&&P.push(k),P._writableState.length)throw new V;if(P._transformState.transforming)throw new N;return P.push(null)}}),AX=Z0((Y,q)=>{q.exports=O;var F=J3();h0()(O,F);function O(Z){if(!(this instanceof O))return new O(Z);F.call(this,Z)}O.prototype._transform=function(Z,N,V){V(null,Z)}}),vX=Z0((Y,q)=>{var F;function O(k){var v=!1;return function(){v||(v=!0,k.apply(void 0,arguments))}}var Z=e8().codes,N=Z.ERR_MISSING_ARGS,V=Z.ERR_STREAM_DESTROYED;function C(k){if(k)throw k}function B(k){return k.setHeader&&typeof k.abort=="function"}function D(k,v,M,w){w=O(w);var x=!1;k.on("close",function(){x=!0}),F===void 0&&(F=E5()),F(k,{readable:v,writable:M},function(_){if(_)return w(_);x=!0,w()});var g=!1;return function(_){if(!x&&!g){if(g=!0,B(k))return k.abort();if(typeof k.destroy=="function")return k.destroy();w(_||new V("pipe"))}}}function L(k){k()}function H(k,v){return k.pipe(v)}function P(k){return!k.length||typeof k[k.length-1]!="function"?C:k.pop()}function R(){for(var k=arguments.length,v=new Array(k),M=0;M<k;M++)v[M]=arguments[M];var w=P(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new N("streams");var x,g=v.map(function(_,p){var m=p<v.length-1,f=p>0;return D(_,m,f,function(s){x||(x=s),s&&g.forEach(L),!m&&(g.forEach(L),w(x))})});return v.reduce(H)}q.exports=R}),xX=Z0((Y,q)=>{Y=q.exports=V3(),Y.Stream=Y,Y.Readable=Y,Y.Writable=Y3(),Y.Duplex=r8(),Y.Transform=J3(),Y.PassThrough=AX(),Y.finished=E5(),Y.pipeline=vX()}),U3=Z0((Y,q)=>{var F=l0().Buffer,O=xX().Transform,Z=h0();function N(C,B){if(!F.isBuffer(C)&&typeof C!="string")throw new TypeError(B+" must be a string or a buffer")}function V(C){O.call(this),this._block=F.allocUnsafe(C),this._blockSize=C,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Z(V,O),V.prototype._transform=function(C,B,D){var L=null;try{this.update(C,B)}catch(H){L=H}D(L)},V.prototype._flush=function(C){var B=null;try{this.push(this.digest())}catch(D){B=D}C(B)},V.prototype.update=function(C,B){if(N(C,"Data"),this._finalized)throw new Error("Digest already called");F.isBuffer(C)||(C=F.from(C,B));for(var D=this._block,L=0;this._blockOffset+C.length-L>=this._blockSize;){for(var H=this._blockOffset;H<this._blockSize;)D[H++]=C[L++];this._update(),this._blockOffset=0}for(;L<C.length;)D[this._blockOffset++]=C[L++];for(var P=0,R=C.length*8;R>0;++P)this._length[P]+=R,R=this._length[P]/4294967296|0,R>0&&(this._length[P]-=4294967296*R);return this},V.prototype._update=function(){throw new Error("_update is not implemented")},V.prototype.digest=function(C){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var B=this._digest();C!==void 0&&(B=B.toString(C)),this._block.fill(0),this._blockOffset=0;for(var D=0;D<4;++D)this._length[D]=0;return B},V.prototype._digest=function(){throw new Error("_digest is not implemented")},q.exports=V}),w5=Z0((Y,q)=>{var F=h0(),O=U3(),Z=l0().Buffer,N=new Array(16);function V(){O.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}F(V,O),V.prototype._update=function(){for(var P=N,R=0;R<16;++R)P[R]=this._block.readInt32LE(R*4);var k=this._a,v=this._b,M=this._c,w=this._d;k=B(k,v,M,w,P[0],3614090360,7),w=B(w,k,v,M,P[1],3905402710,12),M=B(M,w,k,v,P[2],606105819,17),v=B(v,M,w,k,P[3],3250441966,22),k=B(k,v,M,w,P[4],4118548399,7),w=B(w,k,v,M,P[5],1200080426,12),M=B(M,w,k,v,P[6],2821735955,17),v=B(v,M,w,k,P[7],4249261313,22),k=B(k,v,M,w,P[8],1770035416,7),w=B(w,k,v,M,P[9],2336552879,12),M=B(M,w,k,v,P[10],4294925233,17),v=B(v,M,w,k,P[11],2304563134,22),k=B(k,v,M,w,P[12],1804603682,7),w=B(w,k,v,M,P[13],4254626195,12),M=B(M,w,k,v,P[14],2792965006,17),v=B(v,M,w,k,P[15],1236535329,22),k=D(k,v,M,w,P[1],4129170786,5),w=D(w,k,v,M,P[6],3225465664,9),M=D(M,w,k,v,P[11],643717713,14),v=D(v,M,w,k,P[0],3921069994,20),k=D(k,v,M,w,P[5],3593408605,5),w=D(w,k,v,M,P[10],38016083,9),M=D(M,w,k,v,P[15],3634488961,14),v=D(v,M,w,k,P[4],3889429448,20),k=D(k,v,M,w,P[9],568446438,5),w=D(w,k,v,M,P[14],3275163606,9),M=D(M,w,k,v,P[3],4107603335,14),v=D(v,M,w,k,P[8],1163531501,20),k=D(k,v,M,w,P[13],2850285829,5),w=D(w,k,v,M,P[2],4243563512,9),M=D(M,w,k,v,P[7],1735328473,14),v=D(v,M,w,k,P[12],2368359562,20),k=L(k,v,M,w,P[5],4294588738,4),w=L(w,k,v,M,P[8],2272392833,11),M=L(M,w,k,v,P[11],1839030562,16),v=L(v,M,w,k,P[14],4259657740,23),k=L(k,v,M,w,P[1],2763975236,4),w=L(w,k,v,M,P[4],1272893353,11),M=L(M,w,k,v,P[7],4139469664,16),v=L(v,M,w,k,P[10],3200236656,23),k=L(k,v,M,w,P[13],681279174,4),w=L(w,k,v,M,P[0],3936430074,11),M=L(M,w,k,v,P[3],3572445317,16),v=L(v,M,w,k,P[6],76029189,23),k=L(k,v,M,w,P[9],3654602809,4),w=L(w,k,v,M,P[12],3873151461,11),M=L(M,w,k,v,P[15],530742520,16),v=L(v,M,w,k,P[2],3299628645,23),k=H(k,v,M,w,P[0],4096336452,6),w=H(w,k,v,M,P[7],1126891415,10),M=H(M,w,k,v,P[14],2878612391,15),v=H(v,M,w,k,P[5],4237533241,21),k=H(k,v,M,w,P[12],1700485571,6),w=H(w,k,v,M,P[3],2399980690,10),M=H(M,w,k,v,P[10],4293915773,15),v=H(v,M,w,k,P[1],2240044497,21),k=H(k,v,M,w,P[8],1873313359,6),w=H(w,k,v,M,P[15],4264355552,10),M=H(M,w,k,v,P[6],2734768916,15),v=H(v,M,w,k,P[13],1309151649,21),k=H(k,v,M,w,P[4],4149444226,6),w=H(w,k,v,M,P[11],3174756917,10),M=H(M,w,k,v,P[2],718787259,15),v=H(v,M,w,k,P[9],3951481745,21),this._a=this._a+k|0,this._b=this._b+v|0,this._c=this._c+M|0,this._d=this._d+w|0},V.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 P=Z.allocUnsafe(16);return P.writeInt32LE(this._a,0),P.writeInt32LE(this._b,4),P.writeInt32LE(this._c,8),P.writeInt32LE(this._d,12),P};function C(P,R){return P<<R|P>>>32-R}function B(P,R,k,v,M,w,x){return C(P+(R&k|~R&v)+M+w|0,x)+R|0}function D(P,R,k,v,M,w,x){return C(P+(R&v|k&~v)+M+w|0,x)+R|0}function L(P,R,k,v,M,w,x){return C(P+(R^k^v)+M+w|0,x)+R|0}function H(P,R,k,v,M,w,x){return C(P+(k^(R|~v))+M+w|0,x)+R|0}q.exports=V}),g5=Z0((Y,q)=>{var F=R6().Buffer,O=h0(),Z=U3(),N=new Array(16),V=[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],C=[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],B=[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],D=[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],L=[0,1518500249,1859775393,2400959708,2840853838],H=[1352829926,1548603684,1836072691,2053994217,0];function P(){Z.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}O(P,Z),P.prototype._update=function(){for(var g=N,_=0;_<16;++_)g[_]=this._block.readInt32LE(_*4);for(var p=this._a|0,m=this._b|0,f=this._c|0,s=this._d|0,Q0=this._e|0,d=this._a|0,K0=this._b|0,Q=this._c|0,G=this._d|0,J=this._e|0,X=0;X<80;X+=1){var U,$;X<16?(U=k(p,m,f,s,Q0,g[V[X]],L[0],B[X]),$=x(d,K0,Q,G,J,g[C[X]],H[0],D[X])):X<32?(U=v(p,m,f,s,Q0,g[V[X]],L[1],B[X]),$=w(d,K0,Q,G,J,g[C[X]],H[1],D[X])):X<48?(U=M(p,m,f,s,Q0,g[V[X]],L[2],B[X]),$=M(d,K0,Q,G,J,g[C[X]],H[2],D[X])):X<64?(U=w(p,m,f,s,Q0,g[V[X]],L[3],B[X]),$=v(d,K0,Q,G,J,g[C[X]],H[3],D[X])):(U=x(p,m,f,s,Q0,g[V[X]],L[4],B[X]),$=k(d,K0,Q,G,J,g[C[X]],H[4],D[X])),p=Q0,Q0=s,s=R(f,10),f=m,m=U,d=J,J=G,G=R(Q,10),Q=K0,K0=$}var j=this._b+f+G|0;this._b=this._c+s+J|0,this._c=this._d+Q0+d|0,this._d=this._e+p+K0|0,this._e=this._a+m+Q|0,this._a=j},P.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 g=F.alloc?F.alloc(20):new F(20);return g.writeInt32LE(this._a,0),g.writeInt32LE(this._b,4),g.writeInt32LE(this._c,8),g.writeInt32LE(this._d,12),g.writeInt32LE(this._e,16),g};function R(g,_){return g<<_|g>>>32-_}function k(g,_,p,m,f,s,Q0,d){return R(g+(_^p^m)+s+Q0|0,d)+f|0}function v(g,_,p,m,f,s,Q0,d){return R(g+(_&p|~_&m)+s+Q0|0,d)+f|0}function M(g,_,p,m,f,s,Q0,d){return R(g+((_|~p)^m)+s+Q0|0,d)+f|0}function w(g,_,p,m,f,s,Q0,d){return R(g+(_&m|p&~m)+s+Q0|0,d)+f|0}function x(g,_,p,m,f,s,Q0,d){return R(g+(_^(p|~m))+s+Q0|0,d)+f|0}q.exports=P}),Q1=Z0((Y,q)=>{var F=l0().Buffer;function O(Z,N){this._block=F.alloc(Z),this._finalSize=N,this._blockSize=Z,this._len=0}O.prototype.update=function(Z,N){typeof Z=="string"&&(N=N||"utf8",Z=F.from(Z,N));for(var V=this._block,C=this._blockSize,B=Z.length,D=this._len,L=0;L<B;){for(var H=D%C,P=Math.min(B-L,C-H),R=0;R<P;R++)V[H+R]=Z[L+R];D+=P,L+=P,D%C===0&&this._update(V)}return this._len+=B,this},O.prototype.digest=function(Z){var N=this._len%this._blockSize;this._block[N]=128,this._block.fill(0,N+1),N>=this._finalSize&&(this._update(this._block),this._block.fill(0));var V=this._len*8;if(V<=4294967295)this._block.writeUInt32BE(V,this._blockSize-4);else{var C=(V&4294967295)>>>0,B=(V-C)/4294967296;this._block.writeUInt32BE(B,this._blockSize-8),this._block.writeUInt32BE(C,this._blockSize-4)}this._update(this._block);var D=this._hash();return Z?D.toString(Z):D},O.prototype._update=function(){throw new Error("_update must be implemented by subclass")},q.exports=O}),SX=Z0((Y,q)=>{var F=h0(),O=Q1(),Z=l0().Buffer,N=[1518500249,1859775393,-1894007588,-899497514],V=new Array(80);function C(){this.init(),this._w=V,O.call(this,64,56)}F(C,O),C.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function B(H){return H<<5|H>>>27}function D(H){return H<<30|H>>>2}function L(H,P,R,k){return H===0?P&R|~P&k:H===2?P&R|P&k|R&k:P^R^k}C.prototype._update=function(H){for(var P=this._w,R=this._a|0,k=this._b|0,v=this._c|0,M=this._d|0,w=this._e|0,x=0;x<16;++x)P[x]=H.readInt32BE(x*4);for(;x<80;++x)P[x]=P[x-3]^P[x-8]^P[x-14]^P[x-16];for(var g=0;g<80;++g){var _=~~(g/20),p=B(R)+L(_,k,v,M)+w+P[g]+N[_]|0;w=M,M=v,v=D(k),k=R,R=p}this._a=R+this._a|0,this._b=k+this._b|0,this._c=v+this._c|0,this._d=M+this._d|0,this._e=w+this._e|0},C.prototype._hash=function(){var H=Z.allocUnsafe(20);return H.writeInt32BE(this._a|0,0),H.writeInt32BE(this._b|0,4),H.writeInt32BE(this._c|0,8),H.writeInt32BE(this._d|0,12),H.writeInt32BE(this._e|0,16),H},q.exports=C}),EX=Z0((Y,q)=>{var F=h0(),O=Q1(),Z=l0().Buffer,N=[1518500249,1859775393,-1894007588,-899497514],V=new Array(80);function C(){this.init(),this._w=V,O.call(this,64,56)}F(C,O),C.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function B(P){return P<<1|P>>>31}function D(P){return P<<5|P>>>27}function L(P){return P<<30|P>>>2}function H(P,R,k,v){return P===0?R&k|~R&v:P===2?R&k|R&v|k&v:R^k^v}C.prototype._update=function(P){for(var R=this._w,k=this._a|0,v=this._b|0,M=this._c|0,w=this._d|0,x=this._e|0,g=0;g<16;++g)R[g]=P.readInt32BE(g*4);for(;g<80;++g)R[g]=B(R[g-3]^R[g-8]^R[g-14]^R[g-16]);for(var _=0;_<80;++_){var p=~~(_/20),m=D(k)+H(p,v,M,w)+x+R[_]+N[p]|0;x=w,w=M,M=L(v),v=k,k=m}this._a=k+this._a|0,this._b=v+this._b|0,this._c=M+this._c|0,this._d=w+this._d|0,this._e=x+this._e|0},C.prototype._hash=function(){var P=Z.allocUnsafe(20);return P.writeInt32BE(this._a|0,0),P.writeInt32BE(this._b|0,4),P.writeInt32BE(this._c|0,8),P.writeInt32BE(this._d|0,12),P.writeInt32BE(this._e|0,16),P},q.exports=C}),F3=Z0((Y,q)=>{var F=h0(),O=Q1(),Z=l0().Buffer,N=[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],V=new Array(64);function C(){this.init(),this._w=V,O.call(this,64,56)}F(C,O),C.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 B(k,v,M){return M^k&(v^M)}function D(k,v,M){return k&v|M&(k|v)}function L(k){return(k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10)}function H(k){return(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7)}function P(k){return(k>>>7|k<<25)^(k>>>18|k<<14)^k>>>3}function R(k){return(k>>>17|k<<15)^(k>>>19|k<<13)^k>>>10}C.prototype._update=function(k){for(var v=this._w,M=this._a|0,w=this._b|0,x=this._c|0,g=this._d|0,_=this._e|0,p=this._f|0,m=this._g|0,f=this._h|0,s=0;s<16;++s)v[s]=k.readInt32BE(s*4);for(;s<64;++s)v[s]=R(v[s-2])+v[s-7]+P(v[s-15])+v[s-16]|0;for(var Q0=0;Q0<64;++Q0){var d=f+H(_)+B(_,p,m)+N[Q0]+v[Q0]|0,K0=L(M)+D(M,w,x)|0;f=m,m=p,p=_,_=g+d|0,g=x,x=w,w=M,M=d+K0|0}this._a=M+this._a|0,this._b=w+this._b|0,this._c=x+this._c|0,this._d=g+this._d|0,this._e=_+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=f+this._h|0},C.prototype._hash=function(){var k=Z.allocUnsafe(32);return k.writeInt32BE(this._a,0),k.writeInt32BE(this._b,4),k.writeInt32BE(this._c,8),k.writeInt32BE(this._d,12),k.writeInt32BE(this._e,16),k.writeInt32BE(this._f,20),k.writeInt32BE(this._g,24),k.writeInt32BE(this._h,28),k},q.exports=C}),wX=Z0((Y,q)=>{var F=h0(),O=F3(),Z=Q1(),N=l0().Buffer,V=new Array(64);function C(){this.init(),this._w=V,Z.call(this,64,56)}F(C,O),C.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},C.prototype._hash=function(){var B=N.allocUnsafe(28);return B.writeInt32BE(this._a,0),B.writeInt32BE(this._b,4),B.writeInt32BE(this._c,8),B.writeInt32BE(this._d,12),B.writeInt32BE(this._e,16),B.writeInt32BE(this._f,20),B.writeInt32BE(this._g,24),B},q.exports=C}),K3=Z0((Y,q)=>{var F=h0(),O=Q1(),Z=l0().Buffer,N=[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],V=new Array(160);function C(){this.init(),this._w=V,O.call(this,128,112)}F(C,O),C.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 B(w,x,g){return g^w&(x^g)}function D(w,x,g){return w&x|g&(w|x)}function L(w,x){return(w>>>28|x<<4)^(x>>>2|w<<30)^(x>>>7|w<<25)}function H(w,x){return(w>>>14|x<<18)^(w>>>18|x<<14)^(x>>>9|w<<23)}function P(w,x){return(w>>>1|x<<31)^(w>>>8|x<<24)^w>>>7}function R(w,x){return(w>>>1|x<<31)^(w>>>8|x<<24)^(w>>>7|x<<25)}function k(w,x){return(w>>>19|x<<13)^(x>>>29|w<<3)^w>>>6}function v(w,x){return(w>>>19|x<<13)^(x>>>29|w<<3)^(w>>>6|x<<26)}function M(w,x){return w>>>0<x>>>0?1:0}C.prototype._update=function(w){for(var x=this._w,g=this._ah|0,_=this._bh|0,p=this._ch|0,m=this._dh|0,f=this._eh|0,s=this._fh|0,Q0=this._gh|0,d=this._hh|0,K0=this._al|0,Q=this._bl|0,G=this._cl|0,J=this._dl|0,X=this._el|0,U=this._fl|0,$=this._gl|0,j=this._hl|0,K=0;K<32;K+=2)x[K]=w.readInt32BE(K*4),x[K+1]=w.readInt32BE(K*4+4);for(;K<160;K+=2){var W=x[K-30],z=x[K-30+1],A=P(W,z),T=R(z,W);W=x[K-4],z=x[K-4+1];var y=k(W,z),r=v(z,W),a=x[K-14],t=x[K-14+1],l=x[K-32],h=x[K-32+1],n=T+t|0,q0=A+a+M(n,T)|0;n=n+r|0,q0=q0+y+M(n,r)|0,n=n+h|0,q0=q0+l+M(n,h)|0,x[K]=q0,x[K+1]=n}for(var G0=0;G0<160;G0+=2){q0=x[G0],n=x[G0+1];var F0=D(g,_,p),b=D(K0,Q,G),E=L(g,K0),u=L(K0,g),e=H(f,X),V0=H(X,f),W0=N[G0],J0=N[G0+1],Y0=B(f,s,Q0),X0=B(X,U,$),g0=j+V0|0,$0=d+e+M(g0,j)|0;g0=g0+X0|0,$0=$0+Y0+M(g0,X0)|0,g0=g0+J0|0,$0=$0+W0+M(g0,J0)|0,g0=g0+n|0,$0=$0+q0+M(g0,n)|0;var z0=u+b|0,_0=E+F0+M(z0,u)|0;d=Q0,j=$,Q0=s,$=U,s=f,U=X,X=J+g0|0,f=m+$0+M(X,J)|0,m=p,J=G,p=_,G=Q,_=g,Q=K0,K0=g0+z0|0,g=$0+_0+M(K0,g0)|0}this._al=this._al+K0|0,this._bl=this._bl+Q|0,this._cl=this._cl+G|0,this._dl=this._dl+J|0,this._el=this._el+X|0,this._fl=this._fl+U|0,this._gl=this._gl+$|0,this._hl=this._hl+j|0,this._ah=this._ah+g+M(this._al,K0)|0,this._bh=this._bh+_+M(this._bl,Q)|0,this._ch=this._ch+p+M(this._cl,G)|0,this._dh=this._dh+m+M(this._dl,J)|0,this._eh=this._eh+f+M(this._el,X)|0,this._fh=this._fh+s+M(this._fl,U)|0,this._gh=this._gh+Q0+M(this._gl,$)|0,this._hh=this._hh+d+M(this._hl,j)|0},C.prototype._hash=function(){var w=Z.allocUnsafe(64);function x(g,_,p){w.writeInt32BE(g,p),w.writeInt32BE(_,p+4)}return x(this._ah,this._al,0),x(this._bh,this._bl,8),x(this._ch,this._cl,16),x(this._dh,this._dl,24),x(this._eh,this._el,32),x(this._fh,this._fl,40),x(this._gh,this._gl,48),x(this._hh,this._hl,56),w},q.exports=C}),gX=Z0((Y,q)=>{var F=h0(),O=K3(),Z=Q1(),N=l0().Buffer,V=new Array(160);function C(){this.init(),this._w=V,Z.call(this,128,112)}F(C,O),C.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},C.prototype._hash=function(){var B=N.allocUnsafe(48);function D(L,H,P){B.writeInt32BE(L,P),B.writeInt32BE(H,P+4)}return D(this._ah,this._al,0),D(this._bh,this._bl,8),D(this._ch,this._cl,16),D(this._dh,this._dl,24),D(this._eh,this._el,32),D(this._fh,this._fl,40),B},q.exports=C}),y5=Z0((F,q)=>{var F=q.exports=function(O){O=O.toLowerCase();var Z=F[O];if(!Z)throw new Error(O+" is not supported (we accept pull requests)");return new Z};F.sha=SX(),F.sha1=EX(),F.sha224=wX(),F.sha256=F3(),F.sha384=gX(),F.sha512=K3()}),P6=Z0((Y,q)=>{q.exports={ArrayIsArray(F){return Array.isArray(F)},ArrayPrototypeIncludes(F,O){return F.includes(O)},ArrayPrototypeIndexOf(F,O){return F.indexOf(O)},ArrayPrototypeJoin(F,O){return F.join(O)},ArrayPrototypeMap(F,O){return F.map(O)},ArrayPrototypePop(F,O){return F.pop(O)},ArrayPrototypePush(F,O){return F.push(O)},ArrayPrototypeSlice(F,O,Z){return F.slice(O,Z)},Error,FunctionPrototypeCall(F,O,...Z){return F.call(O,...Z)},FunctionPrototypeSymbolHasInstance(F,O){return Function.prototype[Symbol.hasInstance].call(F,O)},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(F,O){return Object.defineProperties(F,O)},ObjectDefineProperty(F,O,Z){return Object.defineProperty(F,O,Z)},ObjectGetOwnPropertyDescriptor(F,O){return Object.getOwnPropertyDescriptor(F,O)},ObjectKeys(F){return Object.keys(F)},ObjectSetPrototypeOf(F,O){return Object.setPrototypeOf(F,O)},Promise,PromisePrototypeCatch(F,O){return F.catch(O)},PromisePrototypeThen(F,O,Z){return F.then(O,Z)},PromiseReject(F){return Promise.reject(F)},ReflectApply:Reflect.apply,RegExpPrototypeTest(F,O){return F.test(O)},SafeSet:Set,String,StringPrototypeSlice(F,O,Z){return F.slice(O,Z)},StringPrototypeToLowerCase(F){return F.toLowerCase()},StringPrototypeToUpperCase(F){return F.toUpperCase()},StringPrototypeTrim(F){return F.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(F,O,Z){return F.set(O,Z)},Uint8Array}}),e6=Z0((Y,q)=>{var F=R6(),O=Object.getPrototypeOf(async function(){}).constructor,Z=globalThis.Blob||F.Blob,N=typeof Z<"u"?function(C){return C instanceof Z}:function(C){return!1},V=class extends Error{constructor(C){if(!Array.isArray(C))throw new TypeError(`Expected input to be an Array, got ${typeof C}`);let B="";for(let D=0;D<C.length;D++)B+=` ${C[D].stack}
|
|
3
|
-
`;super(B),this.name="AggregateError",this.errors=C}};q.exports={AggregateError:V,kEmptyObject:Object.freeze({}),once(C){let B=!1;return function(...D){B||(B=!0,C.apply(this,D))}},createDeferredPromise:function(){let C,B;return{promise:new Promise((D,L)=>{C=D,B=L}),resolve:C,reject:B}},promisify(C){return new Promise((B,D)=>{C((L,...H)=>L?D(L):B(...H))})},debuglog(){return function(){}},format(C,...B){return C.replace(/%([sdifj])/g,function(...[D,L]){let H=B.shift();return L==="f"?H.toFixed(6):L==="j"?JSON.stringify(H):L==="s"&&typeof H=="object"?`${H.constructor!==Object?H.constructor.name:""} {}`.trim():H.toString()})},inspect(C){switch(typeof C){case"string":if(C.includes("'"))if(C.includes('"')){if(!C.includes("`")&&!C.includes("${"))return`\`${C}\``}else return`"${C}"`;return`'${C}'`;case"number":return isNaN(C)?"NaN":Object.is(C,-0)?String(C):C;case"bigint":return`${String(C)}n`;case"boolean":case"undefined":return String(C);case"object":return"{}"}},types:{isAsyncFunction(C){return C instanceof O},isArrayBufferView(C){return ArrayBuffer.isView(C)}},isBlob:N},q.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),_5=Z0((Y,q)=>{var{AbortController:F,AbortSignal:O}=typeof self<"u"?self:typeof window<"u"?window:void 0;q.exports=F,q.exports.AbortSignal=O,q.exports.default=F}),A6=Z0((Y,q)=>{var{format:F,inspect:O,AggregateError:Z}=e6(),N=globalThis.AggregateError||Z,V=Symbol("kIsNodeError"),C=["string","function","number","object","Function","Object","boolean","bigint","symbol"],B=/^([A-Z][a-z0-9]*)+$/,D="__node_internal_",L={};function H(x,g){if(!x)throw new L.ERR_INTERNAL_ASSERTION(g)}function P(x){let g="",_=x.length,p=x[0]==="-"?1:0;for(;_>=p+4;_-=3)g=`_${x.slice(_-3,_)}${g}`;return`${x.slice(0,_)}${g}`}function R(x,g,_){if(typeof g=="function")return H(g.length<=_.length,`Code: ${x}; The provided arguments length (${_.length}) does not match the required ones (${g.length}).`),g(..._);let p=(g.match(/%[dfijoOs]/g)||[]).length;return H(p===_.length,`Code: ${x}; The provided arguments length (${_.length}) does not match the required ones (${p}).`),_.length===0?g:F(g,..._)}function k(x,g,_){_||(_=Error);class p extends _{constructor(...m){super(R(x,g,m))}toString(){return`${this.name} [${x}]: ${this.message}`}}Object.defineProperties(p.prototype,{name:{value:_.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${x}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),p.prototype.code=x,p.prototype[V]=!0,L[x]=p}function v(x){let g=D+x.name;return Object.defineProperty(x,"name",{value:g}),x}function M(x,g){if(x&&g&&x!==g){if(Array.isArray(g.errors))return g.errors.push(x),g;let _=new N([g,x],g.message);return _.code=g.code,_}return x||g}var w=class extends Error{constructor(x="The operation was aborted",g=void 0){if(g!==void 0&&typeof g!="object")throw new L.ERR_INVALID_ARG_TYPE("options","Object",g);super(x,g),this.code="ABORT_ERR",this.name="AbortError"}};k("ERR_ASSERTION","%s",Error),k("ERR_INVALID_ARG_TYPE",(x,g,_)=>{H(typeof x=="string","'name' must be a string"),Array.isArray(g)||(g=[g]);let p="The ";x.endsWith(" argument")?p+=`${x} `:p+=`"${x}" ${x.includes(".")?"property":"argument"} `,p+="must be ";let m=[],f=[],s=[];for(let d of g)H(typeof d=="string","All expected entries have to be of type string"),C.includes(d)?m.push(d.toLowerCase()):B.test(d)?f.push(d):(H(d!=="object",'The value "object" should be written as "Object"'),s.push(d));if(f.length>0){let d=m.indexOf("object");d!==-1&&(m.splice(m,d,1),f.push("Object"))}if(m.length>0){switch(m.length){case 1:p+=`of type ${m[0]}`;break;case 2:p+=`one of type ${m[0]} or ${m[1]}`;break;default:{let d=m.pop();p+=`one of type ${m.join(", ")}, or ${d}`}}(f.length>0||s.length>0)&&(p+=" or ")}if(f.length>0){switch(f.length){case 1:p+=`an instance of ${f[0]}`;break;case 2:p+=`an instance of ${f[0]} or ${f[1]}`;break;default:{let d=f.pop();p+=`an instance of ${f.join(", ")}, or ${d}`}}s.length>0&&(p+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(p+="an "),p+=`${s[0]}`;break;case 2:p+=`one of ${s[0]} or ${s[1]}`;break;default:{let d=s.pop();p+=`one of ${s.join(", ")}, or ${d}`}}if(_==null)p+=`. Received ${_}`;else if(typeof _=="function"&&_.name)p+=`. Received function ${_.name}`;else if(typeof _=="object"){var Q0;(Q0=_.constructor)!==null&&Q0!==void 0&&Q0.name?p+=`. Received an instance of ${_.constructor.name}`:p+=`. Received ${O(_,{depth:-1})}`}else{let d=O(_,{colors:!1});d.length>25&&(d=`${d.slice(0,25)}...`),p+=`. Received type ${typeof _} (${d})`}return p},TypeError),k("ERR_INVALID_ARG_VALUE",(x,g,_="is invalid")=>{let p=O(g);return p.length>128&&(p=p.slice(0,128)+"..."),`The ${x.includes(".")?"property":"argument"} '${x}' ${_}. Received ${p}`},TypeError),k("ERR_INVALID_RETURN_VALUE",(x,g,_)=>{var p;let m=_!=null&&(p=_.constructor)!==null&&p!==void 0&&p.name?`instance of ${_.constructor.name}`:`type ${typeof _}`;return`Expected ${x} to be returned from the "${g}" function but got ${m}.`},TypeError),k("ERR_MISSING_ARGS",(...x)=>{H(x.length>0,"At least one arg needs to be specified");let g,_=x.length;switch(x=(Array.isArray(x)?x:[x]).map((p)=>`"${p}"`).join(" or "),_){case 1:g+=`The ${x[0]} argument`;break;case 2:g+=`The ${x[0]} and ${x[1]} arguments`;break;default:{let p=x.pop();g+=`The ${x.join(", ")}, and ${p} arguments`}break}return`${g} must be specified`},TypeError),k("ERR_OUT_OF_RANGE",(x,g,_)=>{H(g,'Missing "range" argument');let p;return Number.isInteger(_)&&Math.abs(_)>4294967296?p=P(String(_)):typeof _=="bigint"?(p=String(_),(_>2n**32n||_<-(2n**32n))&&(p=P(p)),p+="n"):p=O(_),`The value of "${x}" is out of range. It must be ${g}. Received ${p}`},RangeError),k("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),k("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),k("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),k("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),k("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),k("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),k("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),k("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),k("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),k("ERR_STREAM_WRITE_AFTER_END","write after end",Error),k("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),q.exports={AbortError:w,aggregateTwoErrors:v(M),hideStackFrames:v,codes:L}}),D7=Z0((Y,q)=>{var{ArrayIsArray:F,ArrayPrototypeIncludes:O,ArrayPrototypeJoin:Z,ArrayPrototypeMap:N,NumberIsInteger:V,NumberIsNaN:C,NumberMAX_SAFE_INTEGER:B,NumberMIN_SAFE_INTEGER:D,NumberParseInt:L,ObjectPrototypeHasOwnProperty:H,RegExpPrototypeExec:P,String:R,StringPrototypeToUpperCase:k,StringPrototypeTrim:v}=P6(),{hideStackFrames:M,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:x,ERR_INVALID_ARG_VALUE:g,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:p}}=A6(),{normalizeEncoding:m}=e6(),{isAsyncFunction:f,isArrayBufferView:s}=e6().types,Q0={};function d(J0){return J0===(J0|0)}function K0(J0){return J0===J0>>>0}var Q=/^[0-7]+$/,G="must be a 32-bit unsigned integer or an octal string";function J(J0,Y0,X0){if(typeof J0>"u"&&(J0=X0),typeof J0=="string"){if(P(Q,J0)===null)throw new g(Y0,J0,G);J0=L(J0,8)}return $(J0,Y0),J0}var X=M((J0,Y0,X0=D,g0=B)=>{if(typeof J0!="number")throw new x(Y0,"number",J0);if(!V(J0))throw new _(Y0,"an integer",J0);if(J0<X0||J0>g0)throw new _(Y0,`>= ${X0} && <= ${g0}`,J0)}),U=M((J0,Y0,X0=-2147483648,g0=2147483647)=>{if(typeof J0!="number")throw new x(Y0,"number",J0);if(!V(J0))throw new _(Y0,"an integer",J0);if(J0<X0||J0>g0)throw new _(Y0,`>= ${X0} && <= ${g0}`,J0)}),$=M((J0,Y0,X0=!1)=>{if(typeof J0!="number")throw new x(Y0,"number",J0);if(!V(J0))throw new _(Y0,"an integer",J0);let g0=X0?1:0,$0=4294967295;if(J0<g0||J0>$0)throw new _(Y0,`>= ${g0} && <= ${$0}`,J0)});function j(J0,Y0){if(typeof J0!="string")throw new x(Y0,"string",J0)}function K(J0,Y0,X0=void 0,g0){if(typeof J0!="number")throw new x(Y0,"number",J0);if(X0!=null&&J0<X0||g0!=null&&J0>g0||(X0!=null||g0!=null)&&C(J0))throw new _(Y0,`${X0!=null?`>= ${X0}`:""}${X0!=null&&g0!=null?" && ":""}${g0!=null?`<= ${g0}`:""}`,J0)}var W=M((J0,Y0,X0)=>{if(!O(X0,J0)){let g0=Z(N(X0,(z0)=>typeof z0=="string"?`'${z0}'`:R(z0)),", "),$0="must be one of: "+g0;throw new g(Y0,J0,$0)}});function z(J0,Y0){if(typeof J0!="boolean")throw new x(Y0,"boolean",J0)}function A(J0,Y0,X0){return J0==null||!H(J0,Y0)?X0:J0[Y0]}var T=M((J0,Y0,X0=null)=>{let g0=A(X0,"allowArray",!1),$0=A(X0,"allowFunction",!1);if(!A(X0,"nullable",!1)&&J0===null||!g0&&F(J0)||typeof J0!="object"&&(!$0||typeof J0!="function"))throw new x(Y0,"Object",J0)}),y=M((J0,Y0)=>{if(J0!=null&&typeof J0!="object"&&typeof J0!="function")throw new x(Y0,"a dictionary",J0)}),r=M((J0,Y0,X0=0)=>{if(!F(J0))throw new x(Y0,"Array",J0);if(J0.length<X0){let g0=`must be longer than ${X0}`;throw new g(Y0,J0,g0)}});function a(J0,Y0){r(J0,Y0);for(let X0=0;X0<J0.length;X0++)j(J0[X0],`${Y0}[${X0}]`)}function t(J0,Y0){r(J0,Y0);for(let X0=0;X0<J0.length;X0++)z(J0[X0],`${Y0}[${X0}]`)}function l(J0,Y0="signal"){if(j(J0,Y0),Q0[J0]===void 0)throw Q0[k(J0)]!==void 0?new p(J0+" (signals must use all capital letters)"):new p(J0)}var h=M((J0,Y0="buffer")=>{if(!s(J0))throw new x(Y0,["Buffer","TypedArray","DataView"],J0)});function n(J0,Y0){let X0=m(Y0),g0=J0.length;if(X0==="hex"&&g0%2!==0)throw new g("encoding",Y0,`is invalid for data of length ${g0}`)}function q0(J0,Y0="Port",X0=!0){if(typeof J0!="number"&&typeof J0!="string"||typeof J0=="string"&&v(J0).length===0||+J0!==+J0>>>0||J0>65535||J0===0&&!X0)throw new w(Y0,J0,X0);return J0|0}var G0=M((J0,Y0)=>{if(J0!==void 0&&(J0===null||typeof J0!="object"||!("aborted"in J0)))throw new x(Y0,"AbortSignal",J0)}),F0=M((J0,Y0)=>{if(typeof J0!="function")throw new x(Y0,"Function",J0)}),b=M((J0,Y0)=>{if(typeof J0!="function"||f(J0))throw new x(Y0,"Function",J0)}),E=M((J0,Y0)=>{if(J0!==void 0)throw new x(Y0,"undefined",J0)});function u(J0,Y0,X0){if(!O(X0,J0))throw new x(Y0,`('${Z(X0,"|")}')`,J0)}var e=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function V0(J0,Y0){if(typeof J0>"u"||!P(e,J0))throw new g(Y0,J0,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function W0(J0){if(typeof J0=="string")return V0(J0,"hints"),J0;if(F(J0)){let Y0=J0.length,X0="";if(Y0===0)return X0;for(let g0=0;g0<Y0;g0++){let $0=J0[g0];V0($0,"hints"),X0+=$0,g0!==Y0-1&&(X0+=", ")}return X0}throw new g("hints",J0,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}q.exports={isInt32:d,isUint32:K0,parseFileMode:J,validateArray:r,validateStringArray:a,validateBooleanArray:t,validateBoolean:z,validateBuffer:h,validateDictionary:y,validateEncoding:n,validateFunction:F0,validateInt32:U,validateInteger:X,validateNumber:K,validateObject:T,validateOneOf:W,validatePlainFunction:b,validatePort:q0,validateSignalName:l,validateString:j,validateUint32:$,validateUndefined:E,validateUnion:u,validateAbortSignal:G0,validateLinkHeaderValue:W0}}),s4=Z0((Y,q)=>{var F=q.exports={},O,Z;function N(){throw new Error("setTimeout has not been defined")}function V(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?O=setTimeout:O=N}catch{O=N}try{typeof clearTimeout=="function"?Z=clearTimeout:Z=V}catch{Z=V}})();function C(w){if(O===setTimeout)return setTimeout(w,0);if((O===N||!O)&&setTimeout)return O=setTimeout,setTimeout(w,0);try{return O(w,0)}catch{try{return O.call(null,w,0)}catch{return O.call(this,w,0)}}}function B(w){if(Z===clearTimeout)return clearTimeout(w);if((Z===V||!Z)&&clearTimeout)return Z=clearTimeout,clearTimeout(w);try{return Z(w)}catch{try{return Z.call(null,w)}catch{return Z.call(this,w)}}}var D=[],L=!1,H,P=-1;function R(){!L||!H||(L=!1,H.length?D=H.concat(D):P=-1,D.length&&k())}function k(){if(!L){var w=C(R);L=!0;for(var x=D.length;x;){for(H=D,D=[];++P<x;)H&&H[P].run();P=-1,x=D.length}H=null,L=!1,B(w)}}F.nextTick=function(w){var x=new Array(arguments.length-1);if(arguments.length>1)for(var g=1;g<arguments.length;g++)x[g-1]=arguments[g];D.push(new v(w,x)),D.length===1&&!L&&C(k)};function v(w,x){this.fun=w,this.array=x}v.prototype.run=function(){this.fun.apply(null,this.array)},F.title="browser",F.browser=!0,F.env={},F.argv=[],F.version="",F.versions={};function M(){}F.on=M,F.addListener=M,F.once=M,F.off=M,F.removeListener=M,F.removeAllListeners=M,F.emit=M,F.prependListener=M,F.prependOnceListener=M,F.listeners=function(w){return[]},F.binding=function(w){throw new Error("process.binding is not supported")},F.cwd=function(){return"/"},F.chdir=function(w){throw new Error("process.chdir is not supported")},F.umask=function(){return 0}}),W8={};C7(W8,{default:()=>z3});var z3,S8=v5(()=>{x5(W8,v8(s4())),z3=v8(s4())}),G8=Z0((Y,q)=>{var{Symbol:F,SymbolAsyncIterator:O,SymbolIterator:Z,SymbolFor:N}=P6(),V=F("kDestroyed"),C=F("kIsErrored"),B=F("kIsReadable"),D=F("kIsDisturbed"),L=N("nodejs.webstream.isClosedPromise"),H=N("nodejs.webstream.controllerErrorFunction");function P(A,T=!1){var y;return!!(A&&typeof A.pipe=="function"&&typeof A.on=="function"&&(!T||typeof A.pause=="function"&&typeof A.resume=="function")&&(!A._writableState||((y=A._readableState)===null||y===void 0?void 0:y.readable)!==!1)&&(!A._writableState||A._readableState))}function R(A){var T;return!!(A&&typeof A.write=="function"&&typeof A.on=="function"&&(!A._readableState||((T=A._writableState)===null||T===void 0?void 0:T.writable)!==!1))}function k(A){return!!(A&&typeof A.pipe=="function"&&A._readableState&&typeof A.on=="function"&&typeof A.write=="function")}function v(A){return A&&(A._readableState||A._writableState||typeof A.write=="function"&&typeof A.on=="function"||typeof A.pipe=="function"&&typeof A.on=="function")}function M(A){return!!(A&&!v(A)&&typeof A.pipeThrough=="function"&&typeof A.getReader=="function"&&typeof A.cancel=="function")}function w(A){return!!(A&&!v(A)&&typeof A.getWriter=="function"&&typeof A.abort=="function")}function x(A){return!!(A&&!v(A)&&typeof A.readable=="object"&&typeof A.writable=="object")}function g(A){return M(A)||w(A)||x(A)}function _(A,T){return A==null?!1:T===!0?typeof A[O]=="function":T===!1?typeof A[Z]=="function":typeof A[O]=="function"||typeof A[Z]=="function"}function p(A){if(!v(A))return null;let{_writableState:T,_readableState:y}=A,r=T||y;return!!(A.destroyed||A[V]||r!=null&&r.destroyed)}function m(A){if(!R(A))return null;if(A.writableEnded===!0)return!0;let T=A._writableState;return T!=null&&T.errored?!1:typeof T?.ended!="boolean"?null:T.ended}function f(A,T){if(!R(A))return null;if(A.writableFinished===!0)return!0;let y=A._writableState;return y!=null&&y.errored?!1:typeof y?.finished!="boolean"?null:!!(y.finished||T===!1&&y.ended===!0&&y.length===0)}function s(A){if(!P(A))return null;if(A.readableEnded===!0)return!0;let T=A._readableState;return!T||T.errored?!1:typeof T?.ended!="boolean"?null:T.ended}function Q0(A,T){if(!P(A))return null;let y=A._readableState;return y!=null&&y.errored?!1:typeof y?.endEmitted!="boolean"?null:!!(y.endEmitted||T===!1&&y.ended===!0&&y.length===0)}function d(A){return A&&A[B]!=null?A[B]:typeof A?.readable!="boolean"?null:p(A)?!1:P(A)&&A.readable&&!Q0(A)}function K0(A){return typeof A?.writable!="boolean"?null:p(A)?!1:R(A)&&A.writable&&!m(A)}function Q(A,T){return v(A)?p(A)?!0:!(T?.readable!==!1&&d(A)||T?.writable!==!1&&K0(A)):null}function G(A){var T,y;return v(A)?A.writableErrored?A.writableErrored:(T=(y=A._writableState)===null||y===void 0?void 0:y.errored)!==null&&T!==void 0?T:null:null}function J(A){var T,y;return v(A)?A.readableErrored?A.readableErrored:(T=(y=A._readableState)===null||y===void 0?void 0:y.errored)!==null&&T!==void 0?T:null:null}function X(A){if(!v(A))return null;if(typeof A.closed=="boolean")return A.closed;let{_writableState:T,_readableState:y}=A;return typeof T?.closed=="boolean"||typeof y?.closed=="boolean"?T?.closed||y?.closed:typeof A._closed=="boolean"&&U(A)?A._closed:null}function U(A){return typeof A._closed=="boolean"&&typeof A._defaultKeepAlive=="boolean"&&typeof A._removedConnection=="boolean"&&typeof A._removedContLen=="boolean"}function $(A){return typeof A._sent100=="boolean"&&U(A)}function j(A){var T;return typeof A._consuming=="boolean"&&typeof A._dumped=="boolean"&&((T=A.req)===null||T===void 0?void 0:T.upgradeOrConnect)===void 0}function K(A){if(!v(A))return null;let{_writableState:T,_readableState:y}=A,r=T||y;return!r&&$(A)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function W(A){var T;return!!(A&&((T=A[D])!==null&&T!==void 0?T:A.readableDidRead||A.readableAborted))}function z(A){var T,y,r,a,t,l,h,n,q0,G0;return!!(A&&((T=(y=(r=(a=(t=(l=A[C])!==null&&l!==void 0?l:A.readableErrored)!==null&&t!==void 0?t:A.writableErrored)!==null&&a!==void 0?a:(h=A._readableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&r!==void 0?r:(n=A._writableState)===null||n===void 0?void 0:n.errorEmitted)!==null&&y!==void 0?y:(q0=A._readableState)===null||q0===void 0?void 0:q0.errored)!==null&&T!==void 0?T:(G0=A._writableState)===null||G0===void 0?void 0:G0.errored))}q.exports={kDestroyed:V,isDisturbed:W,kIsDisturbed:D,isErrored:z,kIsErrored:C,isReadable:d,kIsReadable:B,kIsClosedPromise:L,kControllerErrorFunction:H,isClosed:X,isDestroyed:p,isDuplexNodeStream:k,isFinished:Q,isIterable:_,isReadableNodeStream:P,isReadableStream:M,isReadableEnded:s,isReadableFinished:Q0,isReadableErrored:J,isNodeStream:v,isWebStream:g,isWritable:K0,isWritableNodeStream:R,isWritableStream:w,isWritableEnded:m,isWritableFinished:f,isWritableErrored:G,isServerRequest:j,isServerResponse:$,willEmitClose:K,isTransformStream:x}}),$8=Z0((Y,q)=>{var F=(S8(),g6(W8)),{AbortError:O,codes:Z}=A6(),{ERR_INVALID_ARG_TYPE:N,ERR_STREAM_PREMATURE_CLOSE:V}=Z,{kEmptyObject:C,once:B}=e6(),{validateAbortSignal:D,validateFunction:L,validateObject:H,validateBoolean:P}=D7(),{Promise:R,PromisePrototypeThen:k}=P6(),{isClosed:v,isReadable:M,isReadableNodeStream:w,isReadableStream:x,isReadableFinished:g,isReadableErrored:_,isWritable:p,isWritableNodeStream:m,isWritableStream:f,isWritableFinished:s,isWritableErrored:Q0,isNodeStream:d,willEmitClose:K0,kIsClosedPromise:Q}=G8();function G(j){return j.setHeader&&typeof j.abort=="function"}var J=()=>{};function X(j,K,W){var z,A;if(arguments.length===2?(W=K,K=C):K==null?K=C:H(K,"options"),L(W,"callback"),D(K.signal,"options.signal"),W=B(W),x(j)||f(j))return U(j,K,W);if(!d(j))throw new N("stream",["ReadableStream","WritableStream","Stream"],j);let T=(z=K.readable)!==null&&z!==void 0?z:w(j),y=(A=K.writable)!==null&&A!==void 0?A:m(j),r=j._writableState,a=j._readableState,t=()=>{j.writable||n()},l=K0(j)&&w(j)===T&&m(j)===y,h=s(j,!1),n=()=>{h=!0,j.destroyed&&(l=!1),!(l&&(!j.readable||T))&&(!T||q0)&&W.call(j)},q0=g(j,!1),G0=()=>{q0=!0,j.destroyed&&(l=!1),!(l&&(!j.writable||y))&&(!y||h)&&W.call(j)},F0=(W0)=>{W.call(j,W0)},b=v(j),E=()=>{b=!0;let W0=Q0(j)||_(j);if(W0&&typeof W0!="boolean")return W.call(j,W0);if(T&&!q0&&w(j,!0)&&!g(j,!1))return W.call(j,new V);if(y&&!h&&!s(j,!1))return W.call(j,new V);W.call(j)},u=()=>{b=!0;let W0=Q0(j)||_(j);if(W0&&typeof W0!="boolean")return W.call(j,W0);W.call(j)},e=()=>{j.req.on("finish",n)};G(j)?(j.on("complete",n),l||j.on("abort",E),j.req?e():j.on("request",e)):y&&!r&&(j.on("end",t),j.on("close",t)),!l&&typeof j.aborted=="boolean"&&j.on("aborted",E),j.on("end",G0),j.on("finish",n),K.error!==!1&&j.on("error",F0),j.on("close",E),b?F.nextTick(E):r!=null&&r.errorEmitted||a!=null&&a.errorEmitted?l||F.nextTick(u):(!T&&(!l||M(j))&&(h||p(j)===!1)||!y&&(!l||p(j))&&(q0||M(j)===!1)||a&&j.req&&j.aborted)&&F.nextTick(u);let V0=()=>{W=J,j.removeListener("aborted",E),j.removeListener("complete",n),j.removeListener("abort",E),j.removeListener("request",e),j.req&&j.req.removeListener("finish",n),j.removeListener("end",t),j.removeListener("close",t),j.removeListener("finish",n),j.removeListener("end",G0),j.removeListener("error",F0),j.removeListener("close",E)};if(K.signal&&!b){let W0=()=>{let J0=W;V0(),J0.call(j,new O(void 0,{cause:K.signal.reason}))};if(K.signal.aborted)F.nextTick(W0);else{let J0=W;W=B((...Y0)=>{K.signal.removeEventListener("abort",W0),J0.apply(j,Y0)}),K.signal.addEventListener("abort",W0)}}return V0}function U(j,K,W){let z=!1,A=J;if(K.signal)if(A=()=>{z=!0,W.call(j,new O(void 0,{cause:K.signal.reason}))},K.signal.aborted)F.nextTick(A);else{let y=W;W=B((...r)=>{K.signal.removeEventListener("abort",A),y.apply(j,r)}),K.signal.addEventListener("abort",A)}let T=(...y)=>{z||F.nextTick(()=>W.apply(j,y))};return k(j[Q].promise,T,T),J}function $(j,K){var W;let z=!1;return K===null&&(K=C),(W=K)!==null&&W!==void 0&&W.cleanup&&(P(K.cleanup,"cleanup"),z=K.cleanup),new R((A,T)=>{let y=X(j,K,(r)=>{z&&y(),r?T(r):A()})})}q.exports=X,q.exports.finished=$}),W1=Z0((Y,q)=>{var F=(S8(),g6(W8)),{aggregateTwoErrors:O,codes:{ERR_MULTIPLE_CALLBACK:Z},AbortError:N}=A6(),{Symbol:V}=P6(),{kDestroyed:C,isDestroyed:B,isFinished:D,isServerRequest:L}=G8(),H=V("kDestroy"),P=V("kConstruct");function R(Q,G,J){Q&&(Q.stack,G&&!G.errored&&(G.errored=Q),J&&!J.errored&&(J.errored=Q))}function k(Q,G){let J=this._readableState,X=this._writableState,U=X||J;return X!=null&&X.destroyed||J!=null&&J.destroyed?(typeof G=="function"&&G(),this):(R(Q,X,J),X&&(X.destroyed=!0),J&&(J.destroyed=!0),U.constructed?v(this,Q,G):this.once(H,function($){v(this,O($,Q),G)}),this)}function v(Q,G,J){let X=!1;function U($){if(X)return;X=!0;let{_readableState:j,_writableState:K}=Q;R($,K,j),K&&(K.closed=!0),j&&(j.closed=!0),typeof J=="function"&&J($),$?F.nextTick(M,Q,$):F.nextTick(w,Q)}try{Q._destroy(G||null,U)}catch($){U($)}}function M(Q,G){x(Q,G),w(Q)}function w(Q){let{_readableState:G,_writableState:J}=Q;J&&(J.closeEmitted=!0),G&&(G.closeEmitted=!0),(J!=null&&J.emitClose||G!=null&&G.emitClose)&&Q.emit("close")}function x(Q,G){let{_readableState:J,_writableState:X}=Q;X!=null&&X.errorEmitted||J!=null&&J.errorEmitted||(X&&(X.errorEmitted=!0),J&&(J.errorEmitted=!0),Q.emit("error",G))}function g(){let Q=this._readableState,G=this._writableState;Q&&(Q.constructed=!0,Q.closed=!1,Q.closeEmitted=!1,Q.destroyed=!1,Q.errored=null,Q.errorEmitted=!1,Q.reading=!1,Q.ended=Q.readable===!1,Q.endEmitted=Q.readable===!1),G&&(G.constructed=!0,G.destroyed=!1,G.closed=!1,G.closeEmitted=!1,G.errored=null,G.errorEmitted=!1,G.finalCalled=!1,G.prefinished=!1,G.ended=G.writable===!1,G.ending=G.writable===!1,G.finished=G.writable===!1)}function _(Q,G,J){let{_readableState:X,_writableState:U}=Q;if(U!=null&&U.destroyed||X!=null&&X.destroyed)return this;X!=null&&X.autoDestroy||U!=null&&U.autoDestroy?Q.destroy(G):G&&(G.stack,U&&!U.errored&&(U.errored=G),X&&!X.errored&&(X.errored=G),J?F.nextTick(x,Q,G):x(Q,G))}function p(Q,G){if(typeof Q._construct!="function")return;let{_readableState:J,_writableState:X}=Q;J&&(J.constructed=!1),X&&(X.constructed=!1),Q.once(P,G),!(Q.listenerCount(P)>1)&&F.nextTick(m,Q)}function m(Q){let G=!1;function J(X){if(G){_(Q,X??new Z);return}G=!0;let{_readableState:U,_writableState:$}=Q,j=$||U;U&&(U.constructed=!0),$&&($.constructed=!0),j.destroyed?Q.emit(H,X):X?_(Q,X,!0):F.nextTick(f,Q)}try{Q._construct((X)=>{F.nextTick(J,X)})}catch(X){F.nextTick(J,X)}}function f(Q){Q.emit(P)}function s(Q){return Q?.setHeader&&typeof Q.abort=="function"}function Q0(Q){Q.emit("close")}function d(Q,G){Q.emit("error",G),F.nextTick(Q0,Q)}function K0(Q,G){!Q||B(Q)||(!G&&!D(Q)&&(G=new N),L(Q)?(Q.socket=null,Q.destroy(G)):s(Q)?Q.abort():s(Q.req)?Q.req.abort():typeof Q.destroy=="function"?Q.destroy(G):typeof Q.close=="function"?Q.close():G?F.nextTick(d,Q,G):F.nextTick(Q0,Q),Q.destroyed||(Q[C]=!0))}q.exports={construct:p,destroyer:K0,destroy:k,undestroy:g,errorOrDestroy:_}}),m5=Z0((Y,q)=>{var{ArrayIsArray:F,ObjectSetPrototypeOf:O}=P6(),{EventEmitter:Z}=x8();function N(C){Z.call(this,C)}O(N.prototype,Z.prototype),O(N,Z),N.prototype.pipe=function(C,B){let D=this;function L(w){C.writable&&C.write(w)===!1&&D.pause&&D.pause()}D.on("data",L);function H(){D.readable&&D.resume&&D.resume()}C.on("drain",H),!C._isStdio&&(!B||B.end!==!1)&&(D.on("end",R),D.on("close",k));let P=!1;function R(){P||(P=!0,C.end())}function k(){P||(P=!0,typeof C.destroy=="function"&&C.destroy())}function v(w){M(),Z.listenerCount(this,"error")===0&&this.emit("error",w)}V(D,"error",v),V(C,"error",v);function M(){D.removeListener("data",L),C.removeListener("drain",H),D.removeListener("end",R),D.removeListener("close",k),D.removeListener("error",v),C.removeListener("error",v),D.removeListener("end",M),D.removeListener("close",M),C.removeListener("close",M)}return D.on("end",M),D.on("close",M),C.on("close",M),C.emit("pipe",D),C};function V(C,B,D){if(typeof C.prependListener=="function")return C.prependListener(B,D);!C._events||!C._events[B]?C.on(B,D):F(C._events[B])?C._events[B].unshift(D):C._events[B]=[D,C._events[B]]}q.exports={Stream:N,prependListener:V}}),L7=Z0((Y,q)=>{var{AbortError:F,codes:O}=A6(),{isNodeStream:Z,isWebStream:N,kControllerErrorFunction:V}=G8(),C=$8(),{ERR_INVALID_ARG_TYPE:B}=O,D=(L,H)=>{if(typeof L!="object"||!("aborted"in L))throw new B(H,"AbortSignal",L)};q.exports.addAbortSignal=function(L,H){if(D(L,"signal"),!Z(H)&&!N(H))throw new B("stream",["ReadableStream","WritableStream","Stream"],H);return q.exports.addAbortSignalNoValidate(L,H)},q.exports.addAbortSignalNoValidate=function(L,H){if(typeof L!="object"||!("aborted"in L))return H;let P=Z(H)?()=>{H.destroy(new F(void 0,{cause:L.reason}))}:()=>{H[V](new F(void 0,{cause:L.reason}))};return L.aborted?P():(L.addEventListener("abort",P),C(H,()=>L.removeEventListener("abort",P))),H}}),yX=Z0((Y,q)=>{var{StringPrototypeSlice:F,SymbolIterator:O,TypedArrayPrototypeSet:Z,Uint8Array:N}=P6(),{Buffer:V}=R6(),{inspect:C}=e6();q.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(B){let D={data:B,next:null};this.length>0?this.tail.next=D:this.head=D,this.tail=D,++this.length}unshift(B){let D={data:B,next:this.head};this.length===0&&(this.tail=D),this.head=D,++this.length}shift(){if(this.length===0)return;let B=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,B}clear(){this.head=this.tail=null,this.length=0}join(B){if(this.length===0)return"";let D=this.head,L=""+D.data;for(;(D=D.next)!==null;)L+=B+D.data;return L}concat(B){if(this.length===0)return V.alloc(0);let D=V.allocUnsafe(B>>>0),L=this.head,H=0;for(;L;)Z(D,L.data,H),H+=L.data.length,L=L.next;return D}consume(B,D){let L=this.head.data;if(B<L.length){let H=L.slice(0,B);return this.head.data=L.slice(B),H}return B===L.length?this.shift():D?this._getString(B):this._getBuffer(B)}first(){return this.head.data}*[O](){for(let B=this.head;B;B=B.next)yield B.data}_getString(B){let D="",L=this.head,H=0;do{let P=L.data;if(B>P.length)D+=P,B-=P.length;else{B===P.length?(D+=P,++H,L.next?this.head=L.next:this.head=this.tail=null):(D+=F(P,0,B),this.head=L,L.data=F(P,B));break}++H}while((L=L.next)!==null);return this.length-=H,D}_getBuffer(B){let D=V.allocUnsafe(B),L=B,H=this.head,P=0;do{let R=H.data;if(B>R.length)Z(D,R,L-B),B-=R.length;else{B===R.length?(Z(D,R,L-B),++P,H.next?this.head=H.next:this.head=this.tail=null):(Z(D,new N(R.buffer,R.byteOffset,B),L-B),this.head=H,H.data=R.slice(B));break}++P}while((H=H.next)!==null);return this.length-=P,D}[Symbol.for("nodejs.util.inspect.custom")](B,D){return C(this,{...D,depth:0,customInspect:!1})}}}),p5=Z0((Y,q)=>{var{MathFloor:F,NumberIsInteger:O}=P6(),{ERR_INVALID_ARG_VALUE:Z}=A6().codes;function N(B,D,L){return B.highWaterMark!=null?B.highWaterMark:D?B[L]:null}function V(B){return B?16:16384}function C(B,D,L,H){let P=N(D,H,L);if(P!=null){if(!O(P)||P<0){let R=H?`options.${L}`:"options.highWaterMark";throw new Z(R,P)}return F(P)}return V(B.objectMode)}q.exports={getHighWaterMark:C,getDefaultHighWaterMark:V}}),Z3=Z0((Y,q)=>{var F=(S8(),g6(W8)),{PromisePrototypeThen:O,SymbolAsyncIterator:Z,SymbolIterator:N}=P6(),{Buffer:V}=R6(),{ERR_INVALID_ARG_TYPE:C,ERR_STREAM_NULL_VALUES:B}=A6().codes;function D(L,H,P){let R;if(typeof H=="string"||H instanceof V)return new L({objectMode:!0,...P,read(){this.push(H),this.push(null)}});let k;if(H&&H[Z])k=!0,R=H[Z]();else if(H&&H[N])k=!1,R=H[N]();else throw new C("iterable",["Iterable"],H);let v=new L({objectMode:!0,highWaterMark:1,...P}),M=!1;v._read=function(){M||(M=!0,x())},v._destroy=function(g,_){O(w(g),()=>F.nextTick(_,g),(p)=>F.nextTick(_,p||g))};async function w(g){let _=g!=null,p=typeof R.throw=="function";if(_&&p){let{value:m,done:f}=await R.throw(g);if(await m,f)return}if(typeof R.return=="function"){let{value:m}=await R.return();await m}}async function x(){for(;;){try{let{value:g,done:_}=k?await R.next():R.next();if(_)v.push(null);else{let p=g&&typeof g.then=="function"?await g:g;if(p===null)throw M=!1,new B;if(v.push(p))continue;M=!1}}catch(g){v.destroy(g)}break}}return v}q.exports=D}),N7=Z0((Y,q)=>{var F=(S8(),g6(W8)),{ArrayPrototypeIndexOf:O,NumberIsInteger:Z,NumberIsNaN:N,NumberParseInt:V,ObjectDefineProperties:C,ObjectKeys:B,ObjectSetPrototypeOf:D,Promise:L,SafeSet:H,SymbolAsyncIterator:P,Symbol:R}=P6();q.exports=A,A.ReadableState=z;var{EventEmitter:k}=x8(),{Stream:v,prependListener:M}=m5(),{Buffer:w}=R6(),{addAbortSignal:x}=L7(),g=$8(),_=e6().debuglog("stream",(I)=>{_=I}),p=yX(),m=W1(),{getHighWaterMark:f,getDefaultHighWaterMark:s}=p5(),{aggregateTwoErrors:Q0,codes:{ERR_INVALID_ARG_TYPE:d,ERR_METHOD_NOT_IMPLEMENTED:K0,ERR_OUT_OF_RANGE:Q,ERR_STREAM_PUSH_AFTER_EOF:G,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:J}}=A6(),{validateObject:X}=D7(),U=R("kPaused"),{StringDecoder:$}=S5(),j=Z3();D(A.prototype,v.prototype),D(A,v);var K=()=>{},{errorOrDestroy:W}=m;function z(I,S,c){typeof c!="boolean"&&(c=S instanceof Q8()),this.objectMode=!!(I&&I.objectMode),c&&(this.objectMode=this.objectMode||!!(I&&I.readableObjectMode)),this.highWaterMark=I?f(this,I,"readableHighWaterMark",c):s(!1),this.buffer=new p,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[U]=null,this.errorEmitted=!1,this.emitClose=!I||I.emitClose!==!1,this.autoDestroy=!I||I.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=I&&I.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,I&&I.encoding&&(this.decoder=new $(I.encoding),this.encoding=I.encoding)}function A(I){if(!(this instanceof A))return new A(I);let S=this instanceof Q8();this._readableState=new z(I,this,S),I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy),typeof I.construct=="function"&&(this._construct=I.construct),I.signal&&!S&&x(I.signal,this)),v.call(this,I),m.construct(this,()=>{this._readableState.needReadable&&q0(this,this._readableState)})}A.prototype.destroy=m.destroy,A.prototype._undestroy=m.undestroy,A.prototype._destroy=function(I,S){S(I)},A.prototype[k.captureRejectionSymbol]=function(I){this.destroy(I)},A.prototype.push=function(I,S){return T(this,I,S,!1)},A.prototype.unshift=function(I,S){return T(this,I,S,!0)};function T(I,S,c,o){_("readableAddChunk",S);let i=I._readableState,O0;if(i.objectMode||(typeof S=="string"?(c=c||i.defaultEncoding,i.encoding!==c&&(o&&i.encoding?S=w.from(S,c).toString(i.encoding):(S=w.from(S,c),c=""))):S instanceof w?c="":v._isUint8Array(S)?(S=v._uint8ArrayToBuffer(S),c=""):S!=null&&(O0=new d("chunk",["string","Buffer","Uint8Array"],S))),O0)W(I,O0);else if(S===null)i.reading=!1,l(I,i);else if(i.objectMode||S&&S.length>0)if(o)if(i.endEmitted)W(I,new J);else{if(i.destroyed||i.errored)return!1;y(I,i,S,!0)}else if(i.ended)W(I,new G);else{if(i.destroyed||i.errored)return!1;i.reading=!1,i.decoder&&!c?(S=i.decoder.write(S),i.objectMode||S.length!==0?y(I,i,S,!1):q0(I,i)):y(I,i,S,!1)}else o||(i.reading=!1,q0(I,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function y(I,S,c,o){S.flowing&&S.length===0&&!S.sync&&I.listenerCount("data")>0?(S.multiAwaitDrain?S.awaitDrainWriters.clear():S.awaitDrainWriters=null,S.dataEmitted=!0,I.emit("data",c)):(S.length+=S.objectMode?1:c.length,o?S.buffer.unshift(c):S.buffer.push(c),S.needReadable&&h(I)),q0(I,S)}A.prototype.isPaused=function(){let I=this._readableState;return I[U]===!0||I.flowing===!1},A.prototype.setEncoding=function(I){let S=new $(I);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;let c=this._readableState.buffer,o="";for(let i of c)o+=S.write(i);return c.clear(),o!==""&&c.push(o),this._readableState.length=o.length,this};var r=1073741824;function a(I){if(I>r)throw new Q("size","<= 1GiB",I);return I--,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I++,I}function t(I,S){return I<=0||S.length===0&&S.ended?0:S.objectMode?1:N(I)?S.flowing&&S.length?S.buffer.first().length:S.length:I<=S.length?I:S.ended?S.length:0}A.prototype.read=function(I){_("read",I),I===void 0?I=NaN:Z(I)||(I=V(I,10));let S=this._readableState,c=I;if(I>S.highWaterMark&&(S.highWaterMark=a(I)),I!==0&&(S.emittedReadable=!1),I===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return _("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?X0(this):h(this),null;if(I=t(I,S),I===0&&S.ended)return S.length===0&&X0(this),null;let o=S.needReadable;if(_("need readable",o),(S.length===0||S.length-I<S.highWaterMark)&&(o=!0,_("length less than watermark",o)),S.ended||S.reading||S.destroyed||S.errored||!S.constructed)o=!1,_("reading, ended or constructing",o);else if(o){_("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0);try{this._read(S.highWaterMark)}catch(O0){W(this,O0)}S.sync=!1,S.reading||(I=t(c,S))}let i;return I>0?i=Y0(I,S):i=null,i===null?(S.needReadable=S.length<=S.highWaterMark,I=0):(S.length-=I,S.multiAwaitDrain?S.awaitDrainWriters.clear():S.awaitDrainWriters=null),S.length===0&&(S.ended||(S.needReadable=!0),c!==I&&S.ended&&X0(this)),i!==null&&!S.errorEmitted&&!S.closeEmitted&&(S.dataEmitted=!0,this.emit("data",i)),i};function l(I,S){if(_("onEofChunk"),!S.ended){if(S.decoder){let c=S.decoder.end();c&&c.length&&(S.buffer.push(c),S.length+=S.objectMode?1:c.length)}S.ended=!0,S.sync?h(I):(S.needReadable=!1,S.emittedReadable=!0,n(I))}}function h(I){let S=I._readableState;_("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(_("emitReadable",S.flowing),S.emittedReadable=!0,F.nextTick(n,I))}function n(I){let S=I._readableState;_("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&!S.errored&&(S.length||S.ended)&&(I.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,V0(I)}function q0(I,S){!S.readingMore&&S.constructed&&(S.readingMore=!0,F.nextTick(G0,I,S))}function G0(I,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){let c=S.length;if(_("maybeReadMore read 0"),I.read(0),c===S.length)break}S.readingMore=!1}A.prototype._read=function(I){throw new K0("_read()")},A.prototype.pipe=function(I,S){let c=this,o=this._readableState;o.pipes.length===1&&(o.multiAwaitDrain||(o.multiAwaitDrain=!0,o.awaitDrainWriters=new H(o.awaitDrainWriters?[o.awaitDrainWriters]:[]))),o.pipes.push(I),_("pipe count=%d opts=%j",o.pipes.length,S);let i=(!S||S.end!==!1)&&I!==F.stdout&&I!==F.stderr?U0:L0;o.endEmitted?F.nextTick(i):c.once("end",i),I.on("unpipe",O0);function O0(D0,a0){_("onunpipe"),D0===c&&a0&&a0.hasUnpiped===!1&&(a0.hasUnpiped=!0,C0())}function U0(){_("onend"),I.end()}let j0,c0=!1;function C0(){_("cleanup"),I.removeListener("close",P0),I.removeListener("finish",$6),j0&&I.removeListener("drain",j0),I.removeListener("error",N0),I.removeListener("unpipe",O0),c.removeListener("end",U0),c.removeListener("end",L0),c.removeListener("data",m0),c0=!0,j0&&o.awaitDrainWriters&&(!I._writableState||I._writableState.needDrain)&&j0()}function H0(){c0||(o.pipes.length===1&&o.pipes[0]===I?(_("false write response, pause",0),o.awaitDrainWriters=I,o.multiAwaitDrain=!1):o.pipes.length>1&&o.pipes.includes(I)&&(_("false write response, pause",o.awaitDrainWriters.size),o.awaitDrainWriters.add(I)),c.pause()),j0||(j0=F0(c,I),I.on("drain",j0))}c.on("data",m0);function m0(D0){_("ondata");let a0=I.write(D0);_("dest.write",a0),a0===!1&&H0()}function N0(D0){if(_("onerror",D0),L0(),I.removeListener("error",N0),I.listenerCount("error")===0){let a0=I._writableState||I._readableState;a0&&!a0.errorEmitted?W(I,D0):I.emit("error",D0)}}M(I,"error",N0);function P0(){I.removeListener("finish",$6),L0()}I.once("close",P0);function $6(){_("onfinish"),I.removeListener("close",P0),L0()}I.once("finish",$6);function L0(){_("unpipe"),c.unpipe(I)}return I.emit("pipe",c),I.writableNeedDrain===!0?o.flowing&&H0():o.flowing||(_("pipe resume"),c.resume()),I};function F0(I,S){return function(){let c=I._readableState;c.awaitDrainWriters===S?(_("pipeOnDrain",1),c.awaitDrainWriters=null):c.multiAwaitDrain&&(_("pipeOnDrain",c.awaitDrainWriters.size),c.awaitDrainWriters.delete(S)),(!c.awaitDrainWriters||c.awaitDrainWriters.size===0)&&I.listenerCount("data")&&I.resume()}}A.prototype.unpipe=function(I){let S=this._readableState,c={hasUnpiped:!1};if(S.pipes.length===0)return this;if(!I){let i=S.pipes;S.pipes=[],this.pause();for(let O0=0;O0<i.length;O0++)i[O0].emit("unpipe",this,{hasUnpiped:!1});return this}let o=O(S.pipes,I);return o===-1?this:(S.pipes.splice(o,1),S.pipes.length===0&&this.pause(),I.emit("unpipe",this,c),this)},A.prototype.on=function(I,S){let c=v.prototype.on.call(this,I,S),o=this._readableState;return I==="data"?(o.readableListening=this.listenerCount("readable")>0,o.flowing!==!1&&this.resume()):I==="readable"&&!o.endEmitted&&!o.readableListening&&(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,_("on readable",o.length,o.reading),o.length?h(this):o.reading||F.nextTick(E,this)),c},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(I,S){let c=v.prototype.removeListener.call(this,I,S);return I==="readable"&&F.nextTick(b,this),c},A.prototype.off=A.prototype.removeListener,A.prototype.removeAllListeners=function(I){let S=v.prototype.removeAllListeners.apply(this,arguments);return(I==="readable"||I===void 0)&&F.nextTick(b,this),S};function b(I){let S=I._readableState;S.readableListening=I.listenerCount("readable")>0,S.resumeScheduled&&S[U]===!1?S.flowing=!0:I.listenerCount("data")>0?I.resume():S.readableListening||(S.flowing=null)}function E(I){_("readable nexttick read 0"),I.read(0)}A.prototype.resume=function(){let I=this._readableState;return I.flowing||(_("resume"),I.flowing=!I.readableListening,u(this,I)),I[U]=!1,this};function u(I,S){S.resumeScheduled||(S.resumeScheduled=!0,F.nextTick(e,I,S))}function e(I,S){_("resume",S.reading),S.reading||I.read(0),S.resumeScheduled=!1,I.emit("resume"),V0(I),S.flowing&&!S.reading&&I.read(0)}A.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[U]=!0,this};function V0(I){let S=I._readableState;for(_("flow",S.flowing);S.flowing&&I.read()!==null;);}A.prototype.wrap=function(I){let S=!1;I.on("data",(o)=>{!this.push(o)&&I.pause&&(S=!0,I.pause())}),I.on("end",()=>{this.push(null)}),I.on("error",(o)=>{W(this,o)}),I.on("close",()=>{this.destroy()}),I.on("destroy",()=>{this.destroy()}),this._read=()=>{S&&I.resume&&(S=!1,I.resume())};let c=B(I);for(let o=1;o<c.length;o++){let i=c[o];this[i]===void 0&&typeof I[i]=="function"&&(this[i]=I[i].bind(I))}return this},A.prototype[P]=function(){return W0(this)},A.prototype.iterator=function(I){return I!==void 0&&X(I,"options"),W0(this,I)};function W0(I,S){typeof I.read!="function"&&(I=A.wrap(I,{objectMode:!0}));let c=J0(I,S);return c.stream=I,c}async function*J0(I,S){let c=K;function o(U0){this===I?(c(),c=K):c=U0}I.on("readable",o);let i,O0=g(I,{writable:!1},(U0)=>{i=U0?Q0(i,U0):null,c(),c=K});try{for(;;){let U0=I.destroyed?null:I.read();if(U0!==null)yield U0;else{if(i)throw i;if(i===null)return;await new L(o)}}}catch(U0){throw i=Q0(i,U0),i}finally{(i||S?.destroyOnReturn!==!1)&&(i===void 0||I._readableState.autoDestroy)?m.destroyer(I,null):(I.off("readable",o),O0())}}C(A.prototype,{readable:{__proto__:null,get(){let I=this._readableState;return!!I&&I.readable!==!1&&!I.destroyed&&!I.errorEmitted&&!I.endEmitted},set(I){this._readableState&&(this._readableState.readable=!!I)}},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(I){this._readableState&&(this._readableState.flowing=I)}},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(I){!this._readableState||(this._readableState.destroyed=I)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),C(z.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[U]!==!1},set(I){this[U]=!!I}}}),A._fromList=Y0;function Y0(I,S){if(S.length===0)return null;let c;return S.objectMode?c=S.buffer.shift():!I||I>=S.length?(S.decoder?c=S.buffer.join(""):S.buffer.length===1?c=S.buffer.first():c=S.buffer.concat(S.length),S.buffer.clear()):c=S.buffer.consume(I,S.decoder),c}function X0(I){let S=I._readableState;_("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,F.nextTick(g0,S,I))}function g0(I,S){if(_("endReadableNT",I.endEmitted,I.length),!I.errored&&!I.closeEmitted&&!I.endEmitted&&I.length===0){if(I.endEmitted=!0,S.emit("end"),S.writable&&S.allowHalfOpen===!1)F.nextTick($0,S);else if(I.autoDestroy){let c=S._writableState;(!c||c.autoDestroy&&(c.finished||c.writable===!1))&&S.destroy()}}}function $0(I){I.writable&&!I.writableEnded&&!I.destroyed&&I.end()}A.from=function(I,S){return j(A,I,S)};var z0;function _0(){return z0===void 0&&(z0={}),z0}A.fromWeb=function(I,S){return _0().newStreamReadableFromReadableStream(I,S)},A.toWeb=function(I,S){return _0().newReadableStreamFromStreamReadable(I,S)},A.wrap=function(I,S){var c,o;return new A({objectMode:(c=(o=I.readableObjectMode)!==null&&o!==void 0?o:I.objectMode)!==null&&c!==void 0?c:!0,...S,destroy(i,O0){m.destroyer(I,i),O0(i)}}).wrap(I)}}),$3=Z0((Y,q)=>{var F=(S8(),g6(W8)),{ArrayPrototypeSlice:O,Error:Z,FunctionPrototypeSymbolHasInstance:N,ObjectDefineProperty:V,ObjectDefineProperties:C,ObjectSetPrototypeOf:B,StringPrototypeToLowerCase:D,Symbol:L,SymbolHasInstance:H}=P6();q.exports=$,$.WritableState=X;var{EventEmitter:P}=x8(),R=m5().Stream,{Buffer:k}=R6(),v=W1(),{addAbortSignal:M}=L7(),{getHighWaterMark:w,getDefaultHighWaterMark:x}=p5(),{ERR_INVALID_ARG_TYPE:g,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:p,ERR_STREAM_CANNOT_PIPE:m,ERR_STREAM_DESTROYED:f,ERR_STREAM_ALREADY_FINISHED:s,ERR_STREAM_NULL_VALUES:Q0,ERR_STREAM_WRITE_AFTER_END:d,ERR_UNKNOWN_ENCODING:K0}=A6().codes,{errorOrDestroy:Q}=v;B($.prototype,R.prototype),B($,R);function G(){}var J=L("kOnFinished");function X(E,u,e){typeof e!="boolean"&&(e=u instanceof Q8()),this.objectMode=!!(E&&E.objectMode),e&&(this.objectMode=this.objectMode||!!(E&&E.writableObjectMode)),this.highWaterMark=E?w(this,E,"writableHighWaterMark",e):x(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let V0=!!(E&&E.decodeStrings===!1);this.decodeStrings=!V0,this.defaultEncoding=E&&E.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=A.bind(void 0,u),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,U(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!E||E.emitClose!==!1,this.autoDestroy=!E||E.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[J]=[]}function U(E){E.buffered=[],E.bufferedIndex=0,E.allBuffers=!0,E.allNoop=!0}X.prototype.getBuffer=function(){return O(this.buffered,this.bufferedIndex)},V(X.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function $(E){let u=this instanceof Q8();if(!u&&!N($,this))return new $(E);this._writableState=new X(E,this,u),E&&(typeof E.write=="function"&&(this._write=E.write),typeof E.writev=="function"&&(this._writev=E.writev),typeof E.destroy=="function"&&(this._destroy=E.destroy),typeof E.final=="function"&&(this._final=E.final),typeof E.construct=="function"&&(this._construct=E.construct),E.signal&&M(E.signal,this)),R.call(this,E),v.construct(this,()=>{let e=this._writableState;e.writing||a(this,e),n(this,e)})}V($,H,{__proto__:null,value:function(E){return N(this,E)?!0:this!==$?!1:E&&E._writableState instanceof X}}),$.prototype.pipe=function(){Q(this,new m)};function j(E,u,e,V0){let W0=E._writableState;if(typeof e=="function")V0=e,e=W0.defaultEncoding;else{if(!e)e=W0.defaultEncoding;else if(e!=="buffer"&&!k.isEncoding(e))throw new K0(e);typeof V0!="function"&&(V0=G)}if(u===null)throw new Q0;if(!W0.objectMode)if(typeof u=="string")W0.decodeStrings!==!1&&(u=k.from(u,e),e="buffer");else if(u instanceof k)e="buffer";else if(R._isUint8Array(u))u=R._uint8ArrayToBuffer(u),e="buffer";else throw new g("chunk",["string","Buffer","Uint8Array"],u);let J0;return W0.ending?J0=new d:W0.destroyed&&(J0=new f("write")),J0?(F.nextTick(V0,J0),Q(E,J0,!0),J0):(W0.pendingcb++,K(E,W0,u,e,V0))}$.prototype.write=function(E,u,e){return j(this,E,u,e)===!0},$.prototype.cork=function(){this._writableState.corked++},$.prototype.uncork=function(){let E=this._writableState;E.corked&&(E.corked--,E.writing||a(this,E))},$.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=D(E)),!k.isEncoding(E))throw new K0(E);return this._writableState.defaultEncoding=E,this};function K(E,u,e,V0,W0){let J0=u.objectMode?1:e.length;u.length+=J0;let Y0=u.length<u.highWaterMark;return Y0||(u.needDrain=!0),u.writing||u.corked||u.errored||!u.constructed?(u.buffered.push({chunk:e,encoding:V0,callback:W0}),u.allBuffers&&V0!=="buffer"&&(u.allBuffers=!1),u.allNoop&&W0!==G&&(u.allNoop=!1)):(u.writelen=J0,u.writecb=W0,u.writing=!0,u.sync=!0,E._write(e,V0,u.onwrite),u.sync=!1),Y0&&!u.errored&&!u.destroyed}function W(E,u,e,V0,W0,J0,Y0){u.writelen=V0,u.writecb=Y0,u.writing=!0,u.sync=!0,u.destroyed?u.onwrite(new f("write")):e?E._writev(W0,u.onwrite):E._write(W0,J0,u.onwrite),u.sync=!1}function z(E,u,e,V0){--u.pendingcb,V0(e),r(u),Q(E,e)}function A(E,u){let e=E._writableState,V0=e.sync,W0=e.writecb;if(typeof W0!="function"){Q(E,new p);return}e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0,u?(u.stack,e.errored||(e.errored=u),E._readableState&&!E._readableState.errored&&(E._readableState.errored=u),V0?F.nextTick(z,E,e,u,W0):z(E,e,u,W0)):(e.buffered.length>e.bufferedIndex&&a(E,e),V0?e.afterWriteTickInfo!==null&&e.afterWriteTickInfo.cb===W0?e.afterWriteTickInfo.count++:(e.afterWriteTickInfo={count:1,cb:W0,stream:E,state:e},F.nextTick(T,e.afterWriteTickInfo)):y(E,e,1,W0))}function T({stream:E,state:u,count:e,cb:V0}){return u.afterWriteTickInfo=null,y(E,u,e,V0)}function y(E,u,e,V0){for(!u.ending&&!E.destroyed&&u.length===0&&u.needDrain&&(u.needDrain=!1,E.emit("drain"));e-- >0;)u.pendingcb--,V0();u.destroyed&&r(u),n(E,u)}function r(E){if(E.writing)return;for(let W0=E.bufferedIndex;W0<E.buffered.length;++W0){var u;let{chunk:J0,callback:Y0}=E.buffered[W0],X0=E.objectMode?1:J0.length;E.length-=X0,Y0((u=E.errored)!==null&&u!==void 0?u:new f("write"))}let e=E[J].splice(0);for(let W0=0;W0<e.length;W0++){var V0;e[W0]((V0=E.errored)!==null&&V0!==void 0?V0:new f("end"))}U(E)}function a(E,u){if(u.corked||u.bufferProcessing||u.destroyed||!u.constructed)return;let{buffered:e,bufferedIndex:V0,objectMode:W0}=u,J0=e.length-V0;if(!J0)return;let Y0=V0;if(u.bufferProcessing=!0,J0>1&&E._writev){u.pendingcb-=J0-1;let X0=u.allNoop?G:($0)=>{for(let z0=Y0;z0<e.length;++z0)e[z0].callback($0)},g0=u.allNoop&&Y0===0?e:O(e,Y0);g0.allBuffers=u.allBuffers,W(E,u,!0,u.length,g0,"",X0),U(u)}else{do{let{chunk:X0,encoding:g0,callback:$0}=e[Y0];e[Y0++]=null;let z0=W0?1:X0.length;W(E,u,!1,z0,X0,g0,$0)}while(Y0<e.length&&!u.writing);Y0===e.length?U(u):Y0>256?(e.splice(0,Y0),u.bufferedIndex=0):u.bufferedIndex=Y0}u.bufferProcessing=!1}$.prototype._write=function(E,u,e){if(this._writev)this._writev([{chunk:E,encoding:u}],e);else throw new _("_write()")},$.prototype._writev=null,$.prototype.end=function(E,u,e){let V0=this._writableState;typeof E=="function"?(e=E,E=null,u=null):typeof u=="function"&&(e=u,u=null);let W0;if(E!=null){let J0=j(this,E,u);J0 instanceof Z&&(W0=J0)}return V0.corked&&(V0.corked=1,this.uncork()),W0||(!V0.errored&&!V0.ending?(V0.ending=!0,n(this,V0,!0),V0.ended=!0):V0.finished?W0=new s("end"):V0.destroyed&&(W0=new f("end"))),typeof e=="function"&&(W0||V0.finished?F.nextTick(e,W0):V0[J].push(e)),this};function t(E){return E.ending&&!E.destroyed&&E.constructed&&E.length===0&&!E.errored&&E.buffered.length===0&&!E.finished&&!E.writing&&!E.errorEmitted&&!E.closeEmitted}function l(E,u){let e=!1;function V0(W0){if(e){Q(E,W0??p());return}if(e=!0,u.pendingcb--,W0){let J0=u[J].splice(0);for(let Y0=0;Y0<J0.length;Y0++)J0[Y0](W0);Q(E,W0,u.sync)}else t(u)&&(u.prefinished=!0,E.emit("prefinish"),u.pendingcb++,F.nextTick(q0,E,u))}u.sync=!0,u.pendingcb++;try{E._final(V0)}catch(W0){V0(W0)}u.sync=!1}function h(E,u){!u.prefinished&&!u.finalCalled&&(typeof E._final=="function"&&!u.destroyed?(u.finalCalled=!0,l(E,u)):(u.prefinished=!0,E.emit("prefinish")))}function n(E,u,e){t(u)&&(h(E,u),u.pendingcb===0&&(e?(u.pendingcb++,F.nextTick((V0,W0)=>{t(W0)?q0(V0,W0):W0.pendingcb--},E,u)):t(u)&&(u.pendingcb++,q0(E,u))))}function q0(E,u){u.pendingcb--,u.finished=!0;let e=u[J].splice(0);for(let V0=0;V0<e.length;V0++)e[V0]();if(E.emit("finish"),u.autoDestroy){let V0=E._readableState;(!V0||V0.autoDestroy&&(V0.endEmitted||V0.readable===!1))&&E.destroy()}}C($.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(E){this._writableState&&(this._writableState.destroyed=E)}},writable:{__proto__:null,get(){let E=this._writableState;return!!E&&E.writable!==!1&&!E.destroyed&&!E.errored&&!E.ending&&!E.ended},set(E){this._writableState&&(this._writableState.writable=!!E)}},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 E=this._writableState;return E?!E.destroyed&&!E.ending&&E.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 G0=v.destroy;$.prototype.destroy=function(E,u){let e=this._writableState;return!e.destroyed&&(e.bufferedIndex<e.buffered.length||e[J].length)&&F.nextTick(r,e),G0.call(this,E,u),this},$.prototype._undestroy=v.undestroy,$.prototype._destroy=function(E,u){u(E)},$.prototype[P.captureRejectionSymbol]=function(E){this.destroy(E)};var F0;function b(){return F0===void 0&&(F0={}),F0}$.fromWeb=function(E,u){return b().newStreamWritableFromWritableStream(E,u)},$.toWeb=function(E){return b().newWritableStreamFromStreamWritable(E)}}),_X=Z0((Y,q)=>{var F=(S8(),g6(W8)),O=R6(),{isReadable:Z,isWritable:N,isIterable:V,isNodeStream:C,isReadableNodeStream:B,isWritableNodeStream:D,isDuplexNodeStream:L}=G8(),H=$8(),{AbortError:P,codes:{ERR_INVALID_ARG_TYPE:R,ERR_INVALID_RETURN_VALUE:k}}=A6(),{destroyer:v}=W1(),M=Q8(),w=N7(),{createDeferredPromise:x}=e6(),g=Z3(),_=globalThis.Blob||O.Blob,p=typeof _<"u"?function(K0){return K0 instanceof _}:function(K0){return!1},m=globalThis.AbortController||_5().AbortController,{FunctionPrototypeCall:f}=P6(),s=class extends M{constructor(K0){super(K0),K0?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),K0?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};q.exports=function K0(Q,G){if(L(Q))return Q;if(B(Q))return d({readable:Q});if(D(Q))return d({writable:Q});if(C(Q))return d({writable:!1,readable:!1});if(typeof Q=="function"){let{value:X,write:U,final:$,destroy:j}=Q0(Q);if(V(X))return g(s,X,{objectMode:!0,write:U,final:$,destroy:j});let K=X?.then;if(typeof K=="function"){let W,z=f(K,X,(A)=>{if(A!=null)throw new k("nully","body",A)},(A)=>{v(W,A)});return W=new s({objectMode:!0,readable:!1,write:U,final(A){$(async()=>{try{await z,F.nextTick(A,null)}catch(T){F.nextTick(A,T)}})},destroy:j})}throw new k("Iterable, AsyncIterable or AsyncFunction",G,X)}if(p(Q))return K0(Q.arrayBuffer());if(V(Q))return g(s,Q,{objectMode:!0,writable:!1});if(typeof Q?.writable=="object"||typeof Q?.readable=="object"){let X=Q!=null&&Q.readable?B(Q?.readable)?Q?.readable:K0(Q.readable):void 0,U=Q!=null&&Q.writable?D(Q?.writable)?Q?.writable:K0(Q.writable):void 0;return d({readable:X,writable:U})}let J=Q?.then;if(typeof J=="function"){let X;return f(J,Q,(U)=>{U!=null&&X.push(U),X.push(null)},(U)=>{v(X,U)}),X=new s({objectMode:!0,writable:!1,read(){}})}throw new R(G,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],Q)};function Q0(K0){let{promise:Q,resolve:G}=x(),J=new m,X=J.signal;return{value:K0(async function*(){for(;;){let U=Q;Q=null;let{chunk:$,done:j,cb:K}=await U;if(F.nextTick(K),j)return;if(X.aborted)throw new P(void 0,{cause:X.reason});({promise:Q,resolve:G}=x()),yield $}}(),{signal:X}),write(U,$,j){let K=G;G=null,K({chunk:U,done:!1,cb:j})},final(U){let $=G;G=null,$({done:!0,cb:U})},destroy(U,$){J.abort(),$(U)}}}function d(K0){let Q=K0.readable&&typeof K0.readable.read!="function"?w.wrap(K0.readable):K0.readable,G=K0.writable,J=!!Z(Q),X=!!N(G),U,$,j,K,W;function z(A){let T=K;K=null,T?T(A):A&&W.destroy(A)}return W=new s({readableObjectMode:!!(Q!=null&&Q.readableObjectMode),writableObjectMode:!!(G!=null&&G.writableObjectMode),readable:J,writable:X}),X&&(H(G,(A)=>{X=!1,A&&v(Q,A),z(A)}),W._write=function(A,T,y){G.write(A,T)?y():U=y},W._final=function(A){G.end(),$=A},G.on("drain",function(){if(U){let A=U;U=null,A()}}),G.on("finish",function(){if($){let A=$;$=null,A()}})),J&&(H(Q,(A)=>{J=!1,A&&v(Q,A),z(A)}),Q.on("readable",function(){if(j){let A=j;j=null,A()}}),Q.on("end",function(){W.push(null)}),W._read=function(){for(;;){let A=Q.read();if(A===null){j=W._read;return}if(!W.push(A))return}}),W._destroy=function(A,T){!A&&K!==null&&(A=new P),j=null,U=null,$=null,K===null?T(A):(K=T,v(G,A),v(Q,A))},W}}),Q8=Z0((Y,q)=>{var{ObjectDefineProperties:F,ObjectGetOwnPropertyDescriptor:O,ObjectKeys:Z,ObjectSetPrototypeOf:N}=P6();q.exports=B;var V=N7(),C=$3();N(B.prototype,V.prototype),N(B,V);{let P=Z(C.prototype);for(let R=0;R<P.length;R++){let k=P[R];B.prototype[k]||(B.prototype[k]=C.prototype[k])}}function B(P){if(!(this instanceof B))return new B(P);V.call(this,P),C.call(this,P),P?(this.allowHalfOpen=P.allowHalfOpen!==!1,P.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),P.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}F(B.prototype,{writable:{__proto__:null,...O(C.prototype,"writable")},writableHighWaterMark:{__proto__:null,...O(C.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...O(C.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...O(C.prototype,"writableBuffer")},writableLength:{__proto__:null,...O(C.prototype,"writableLength")},writableFinished:{__proto__:null,...O(C.prototype,"writableFinished")},writableCorked:{__proto__:null,...O(C.prototype,"writableCorked")},writableEnded:{__proto__:null,...O(C.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...O(C.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(P){this._readableState&&this._writableState&&(this._readableState.destroyed=P,this._writableState.destroyed=P)}}});var D;function L(){return D===void 0&&(D={}),D}B.fromWeb=function(P,R){return L().newStreamDuplexFromReadableWritablePair(P,R)},B.toWeb=function(P){return L().newReadableWritablePairFromDuplex(P)};var H;B.from=function(P){return H||(H=_X()),H(P,"body")}}),q3=Z0((Y,q)=>{var{ObjectSetPrototypeOf:F,Symbol:O}=P6();q.exports=B;var{ERR_METHOD_NOT_IMPLEMENTED:Z}=A6().codes,N=Q8(),{getHighWaterMark:V}=p5();F(B.prototype,N.prototype),F(B,N);var C=O("kCallback");function B(H){if(!(this instanceof B))return new B(H);let P=H?V(this,H,"readableHighWaterMark",!0):null;P===0&&(H={...H,highWaterMark:null,readableHighWaterMark:P,writableHighWaterMark:H.writableHighWaterMark||0}),N.call(this,H),this._readableState.sync=!1,this[C]=null,H&&(typeof H.transform=="function"&&(this._transform=H.transform),typeof H.flush=="function"&&(this._flush=H.flush)),this.on("prefinish",L)}function D(H){typeof this._flush=="function"&&!this.destroyed?this._flush((P,R)=>{if(P){H?H(P):this.destroy(P);return}R!=null&&this.push(R),this.push(null),H&&H()}):(this.push(null),H&&H())}function L(){this._final!==D&&D.call(this)}B.prototype._final=D,B.prototype._transform=function(H,P,R){throw new Z("_transform()")},B.prototype._write=function(H,P,R){let k=this._readableState,v=this._writableState,M=k.length;this._transform(H,P,(w,x)=>{if(w){R(w);return}x!=null&&this.push(x),v.ended||M===k.length||k.length<k.highWaterMark?R():this[C]=R})},B.prototype._read=function(){if(this[C]){let H=this[C];this[C]=null,H()}}}),j3=Z0((Y,q)=>{var{ObjectSetPrototypeOf:F}=P6();q.exports=Z;var O=q3();F(Z.prototype,O.prototype),F(Z,O);function Z(N){if(!(this instanceof Z))return new Z(N);O.call(this,N)}Z.prototype._transform=function(N,V,C){C(null,N)}}),b5=Z0((Y,q)=>{var F=(S8(),g6(W8)),{ArrayIsArray:O,Promise:Z,SymbolAsyncIterator:N}=P6(),V=$8(),{once:C}=e6(),B=W1(),D=Q8(),{aggregateTwoErrors:L,codes:{ERR_INVALID_ARG_TYPE:H,ERR_INVALID_RETURN_VALUE:P,ERR_MISSING_ARGS:R,ERR_STREAM_DESTROYED:k,ERR_STREAM_PREMATURE_CLOSE:v},AbortError:M}=A6(),{validateFunction:w,validateAbortSignal:x}=D7(),{isIterable:g,isReadable:_,isReadableNodeStream:p,isNodeStream:m,isTransformStream:f,isWebStream:s,isReadableStream:Q0,isReadableEnded:d}=G8(),K0=globalThis.AbortController||_5().AbortController,Q,G;function J(T,y,r){let a=!1;T.on("close",()=>{a=!0});let t=V(T,{readable:y,writable:r},(l)=>{a=!l});return{destroy:(l)=>{a||(a=!0,B.destroyer(T,l||new k("pipe")))},cleanup:t}}function X(T){return w(T[T.length-1],"streams[stream.length - 1]"),T.pop()}function U(T){if(g(T))return T;if(p(T))return $(T);throw new H("val",["Readable","Iterable","AsyncIterable"],T)}async function*$(T){G||(G=N7()),yield*G.prototype[N].call(T)}async function j(T,y,r,{end:a}){let t,l=null,h=(G0)=>{if(G0&&(t=G0),l){let F0=l;l=null,F0()}},n=()=>new Z((G0,F0)=>{t?F0(t):l=()=>{t?F0(t):G0()}});y.on("drain",h);let q0=V(y,{readable:!1},h);try{y.writableNeedDrain&&await n();for await(let G0 of T)y.write(G0)||await n();a&&y.end(),await n(),r()}catch(G0){r(t!==G0?L(t,G0):G0)}finally{q0(),y.off("drain",h)}}async function K(T,y,r,{end:a}){f(y)&&(y=y.writable);let t=y.getWriter();try{for await(let l of T)await t.ready,t.write(l).catch(()=>{});await t.ready,a&&await t.close(),r()}catch(l){try{await t.abort(l),r(l)}catch(h){r(h)}}}function W(...T){return z(T,C(X(T)))}function z(T,y,r){if(T.length===1&&O(T[0])&&(T=T[0]),T.length<2)throw new R("streams");let a=new K0,t=a.signal,l=r?.signal,h=[];x(l,"options.signal");function n(){u(new M)}l?.addEventListener("abort",n);let q0,G0,F0=[],b=0;function E(Y0){u(Y0,--b===0)}function u(Y0,X0){if(Y0&&(!q0||q0.code==="ERR_STREAM_PREMATURE_CLOSE")&&(q0=Y0),!(!q0&&!X0)){for(;F0.length;)F0.shift()(q0);l?.removeEventListener("abort",n),a.abort(),X0&&(q0||h.forEach((g0)=>g0()),F.nextTick(y,q0,G0))}}let e;for(let Y0=0;Y0<T.length;Y0++){let X0=T[Y0],g0=Y0<T.length-1,$0=Y0>0,z0=g0||r?.end!==!1,_0=Y0===T.length-1;if(m(X0)){let I=function(S){S&&S.name!=="AbortError"&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"&&E(S)};var V0=I;if(z0){let{destroy:S,cleanup:c}=J(X0,g0,$0);F0.push(S),_(X0)&&_0&&h.push(c)}X0.on("error",I),_(X0)&&_0&&h.push(()=>{X0.removeListener("error",I)})}if(Y0===0)if(typeof X0=="function"){if(e=X0({signal:t}),!g(e))throw new P("Iterable, AsyncIterable or Stream","source",e)}else g(X0)||p(X0)||f(X0)?e=X0:e=D.from(X0);else if(typeof X0=="function"){if(f(e)){var W0;e=U((W0=e)===null||W0===void 0?void 0:W0.readable)}else e=U(e);if(e=X0(e,{signal:t}),g0){if(!g(e,!0))throw new P("AsyncIterable",`transform[${Y0-1}]`,e)}else{var J0;Q||(Q=j3());let I=new Q({objectMode:!0}),S=(J0=e)===null||J0===void 0?void 0:J0.then;if(typeof S=="function")b++,S.call(e,(i)=>{G0=i,i!=null&&I.write(i),z0&&I.end(),F.nextTick(E)},(i)=>{I.destroy(i),F.nextTick(E,i)});else if(g(e,!0))b++,j(e,I,E,{end:z0});else if(Q0(e)||f(e)){let i=e.readable||e;b++,j(i,I,E,{end:z0})}else throw new P("AsyncIterable or Promise","destination",e);e=I;let{destroy:c,cleanup:o}=J(e,!1,!0);F0.push(c),_0&&h.push(o)}}else if(m(X0)){if(p(e)){b+=2;let I=A(e,X0,E,{end:z0});_(X0)&&_0&&h.push(I)}else if(f(e)||Q0(e)){let I=e.readable||e;b++,j(I,X0,E,{end:z0})}else if(g(e))b++,j(e,X0,E,{end:z0});else throw new H("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],e);e=X0}else if(s(X0)){if(p(e))b++,K(U(e),X0,E,{end:z0});else if(Q0(e)||g(e))b++,K(e,X0,E,{end:z0});else if(f(e))b++,K(e.readable,X0,E,{end:z0});else throw new H("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],e);e=X0}else e=D.from(X0)}return(t!=null&&t.aborted||l!=null&&l.aborted)&&F.nextTick(n),e}function A(T,y,r,{end:a}){let t=!1;if(y.on("close",()=>{t||r(new v)}),T.pipe(y,{end:!1}),a){let h=function(){t=!0,y.end()};var l=h;d(T)?F.nextTick(h):T.once("end",h)}else r();return V(T,{readable:!0,writable:!1},(h)=>{let n=T._readableState;h&&h.code==="ERR_STREAM_PREMATURE_CLOSE"&&n&&n.ended&&!n.errored&&!n.errorEmitted?T.once("end",r).once("error",r):r(h)}),V(y,{readable:!1,writable:!0},r)}q.exports={pipelineImpl:z,pipeline:W}}),H3=Z0((Y,q)=>{var{pipeline:F}=b5(),O=Q8(),{destroyer:Z}=W1(),{isNodeStream:N,isReadable:V,isWritable:C,isWebStream:B,isTransformStream:D,isWritableStream:L,isReadableStream:H}=G8(),{AbortError:P,codes:{ERR_INVALID_ARG_VALUE:R,ERR_MISSING_ARGS:k}}=A6(),v=$8();q.exports=function(...M){if(M.length===0)throw new k("streams");if(M.length===1)return O.from(M[0]);let w=[...M];if(typeof M[0]=="function"&&(M[0]=O.from(M[0])),typeof M[M.length-1]=="function"){let Q=M.length-1;M[Q]=O.from(M[Q])}for(let Q=0;Q<M.length;++Q)if(!(!N(M[Q])&&!B(M[Q]))){if(Q<M.length-1&&!(V(M[Q])||H(M[Q])||D(M[Q])))throw new R(`streams[${Q}]`,w[Q],"must be readable");if(Q>0&&!(C(M[Q])||L(M[Q])||D(M[Q])))throw new R(`streams[${Q}]`,w[Q],"must be writable")}let x,g,_,p,m;function f(Q){let G=p;p=null,G?G(Q):Q?m.destroy(Q):!K0&&!d&&m.destroy()}let s=M[0],Q0=F(M,f),d=!!(C(s)||L(s)||D(s)),K0=!!(V(Q0)||H(Q0)||D(Q0));if(m=new O({writableObjectMode:!!(s!=null&&s.writableObjectMode),readableObjectMode:!!(Q0!=null&&Q0.writableObjectMode),writable:d,readable:K0}),d){if(N(s))m._write=function(G,J,X){s.write(G,J)?X():x=X},m._final=function(G){s.end(),g=G},s.on("drain",function(){if(x){let G=x;x=null,G()}});else if(B(s)){let G=(D(s)?s.writable:s).getWriter();m._write=async function(J,X,U){try{await G.ready,G.write(J).catch(()=>{}),U()}catch($){U($)}},m._final=async function(J){try{await G.ready,G.close().catch(()=>{}),g=J}catch(X){J(X)}}}let Q=D(Q0)?Q0.readable:Q0;v(Q,()=>{if(g){let G=g;g=null,G()}})}if(K0){if(N(Q0))Q0.on("readable",function(){if(_){let Q=_;_=null,Q()}}),Q0.on("end",function(){m.push(null)}),m._read=function(){for(;;){let Q=Q0.read();if(Q===null){_=m._read;return}if(!m.push(Q))return}};else if(B(Q0)){let Q=(D(Q0)?Q0.readable:Q0).getReader();m._read=async function(){for(;;)try{let{value:G,done:J}=await Q.read();if(!m.push(G))return;if(J){m.push(null);return}}catch{return}}}}return m._destroy=function(Q,G){!Q&&p!==null&&(Q=new P),_=null,x=null,g=null,p===null?G(Q):(p=G,N(Q0)&&Z(Q0,Q))},m}}),mX=Z0((Y,q)=>{var F=globalThis.AbortController||_5().AbortController,{codes:{ERR_INVALID_ARG_VALUE:O,ERR_INVALID_ARG_TYPE:Z,ERR_MISSING_ARGS:N,ERR_OUT_OF_RANGE:V},AbortError:C}=A6(),{validateAbortSignal:B,validateInteger:D,validateObject:L}=D7(),H=P6().Symbol("kWeak"),{finished:P}=$8(),R=H3(),{addAbortSignalNoValidate:k}=L7(),{isWritable:v,isNodeStream:M}=G8(),{ArrayPrototypePush:w,MathFloor:x,Number:g,NumberIsNaN:_,Promise:p,PromiseReject:m,PromisePrototypeThen:f,Symbol:s}=P6(),Q0=s("kEmpty"),d=s("kEof");function K0(a,t){if(t!=null&&L(t,"options"),t?.signal!=null&&B(t.signal,"options.signal"),M(a)&&!v(a))throw new O("stream",a,"must be writable");let l=R(this,a);return t!=null&&t.signal&&k(t.signal,l),l}function Q(a,t){if(typeof a!="function")throw new Z("fn",["Function","AsyncFunction"],a);t!=null&&L(t,"options"),t?.signal!=null&&B(t.signal,"options.signal");let l=1;return t?.concurrency!=null&&(l=x(t.concurrency)),D(l,"concurrency",1),async function*(){var h,n;let q0=new F,G0=this,F0=[],b=q0.signal,E={signal:b},u=()=>q0.abort();t!=null&&(h=t.signal)!==null&&h!==void 0&&h.aborted&&u(),t==null||(n=t.signal)===null||n===void 0||n.addEventListener("abort",u);let e,V0,W0=!1;function J0(){W0=!0}async function Y0(){try{for await(let $0 of G0){var X0;if(W0)return;if(b.aborted)throw new C;try{$0=a($0,E)}catch(z0){$0=m(z0)}$0!==Q0&&(typeof((X0=$0)===null||X0===void 0?void 0:X0.catch)=="function"&&$0.catch(J0),F0.push($0),e&&(e(),e=null),!W0&&F0.length&&F0.length>=l&&await new p((z0)=>{V0=z0}))}F0.push(d)}catch($0){let z0=m($0);f(z0,void 0,J0),F0.push(z0)}finally{var g0;W0=!0,e&&(e(),e=null),t==null||(g0=t.signal)===null||g0===void 0||g0.removeEventListener("abort",u)}}Y0();try{for(;;){for(;F0.length>0;){let X0=await F0[0];if(X0===d)return;if(b.aborted)throw new C;X0!==Q0&&(yield X0),F0.shift(),V0&&(V0(),V0=null)}await new p((X0)=>{e=X0})}}finally{q0.abort(),W0=!0,V0&&(V0(),V0=null)}}.call(this)}function G(a=void 0){return a!=null&&L(a,"options"),a?.signal!=null&&B(a.signal,"options.signal"),async function*(){let t=0;for await(let h of this){var l;if(a!=null&&(l=a.signal)!==null&&l!==void 0&&l.aborted)throw new C({cause:a.signal.reason});yield[t++,h]}}.call(this)}async function J(a,t=void 0){for await(let l of j.call(this,a,t))return!0;return!1}async function X(a,t=void 0){if(typeof a!="function")throw new Z("fn",["Function","AsyncFunction"],a);return!await J.call(this,async(...l)=>!await a(...l),t)}async function U(a,t){for await(let l of j.call(this,a,t))return l}async function $(a,t){if(typeof a!="function")throw new Z("fn",["Function","AsyncFunction"],a);async function l(h,n){return await a(h,n),Q0}for await(let h of Q.call(this,l,t));}function j(a,t){if(typeof a!="function")throw new Z("fn",["Function","AsyncFunction"],a);async function l(h,n){return await a(h,n)?h:Q0}return Q.call(this,l,t)}var K=class extends N{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function W(a,t,l){var h;if(typeof a!="function")throw new Z("reducer",["Function","AsyncFunction"],a);l!=null&&L(l,"options"),l?.signal!=null&&B(l.signal,"options.signal");let n=arguments.length>1;if(l!=null&&(h=l.signal)!==null&&h!==void 0&&h.aborted){let E=new C(void 0,{cause:l.signal.reason});throw this.once("error",()=>{}),await P(this.destroy(E)),E}let q0=new F,G0=q0.signal;if(l!=null&&l.signal){let E={once:!0,[H]:this};l.signal.addEventListener("abort",()=>q0.abort(),E)}let F0=!1;try{for await(let E of this){var b;if(F0=!0,l!=null&&(b=l.signal)!==null&&b!==void 0&&b.aborted)throw new C;n?t=await a(t,E,{signal:G0}):(t=E,n=!0)}if(!F0&&!n)throw new K}finally{q0.abort()}return t}async function z(a){a!=null&&L(a,"options"),a?.signal!=null&&B(a.signal,"options.signal");let t=[];for await(let h of this){var l;if(a!=null&&(l=a.signal)!==null&&l!==void 0&&l.aborted)throw new C(void 0,{cause:a.signal.reason});w(t,h)}return t}function A(a,t){let l=Q.call(this,a,t);return async function*(){for await(let h of l)yield*h}.call(this)}function T(a){if(a=g(a),_(a))return 0;if(a<0)throw new V("number",">= 0",a);return a}function y(a,t=void 0){return t!=null&&L(t,"options"),t?.signal!=null&&B(t.signal,"options.signal"),a=T(a),async function*(){var l;if(t!=null&&(l=t.signal)!==null&&l!==void 0&&l.aborted)throw new C;for await(let n of this){var h;if(t!=null&&(h=t.signal)!==null&&h!==void 0&&h.aborted)throw new C;a--<=0&&(yield n)}}.call(this)}function r(a,t=void 0){return t!=null&&L(t,"options"),t?.signal!=null&&B(t.signal,"options.signal"),a=T(a),async function*(){var l;if(t!=null&&(l=t.signal)!==null&&l!==void 0&&l.aborted)throw new C;for await(let n of this){var h;if(t!=null&&(h=t.signal)!==null&&h!==void 0&&h.aborted)throw new C;if(a-- >0)yield n;else return}}.call(this)}q.exports.streamReturningOperators={asIndexedPairs:G,drop:y,filter:j,flatMap:A,map:Q,take:r,compose:K0},q.exports.promiseReturningOperators={every:X,forEach:$,reduce:W,toArray:z,some:J,find:U}}),C3=Z0((Y,q)=>{var{ArrayPrototypePop:F,Promise:O}=P6(),{isIterable:Z,isNodeStream:N,isWebStream:V}=G8(),{pipelineImpl:C}=b5(),{finished:B}=$8();O3();function D(...L){return new O((H,P)=>{let R,k,v=L[L.length-1];if(v&&typeof v=="object"&&!N(v)&&!Z(v)&&!V(v)){let M=F(L);R=M.signal,k=M.end}C(L,(M,w)=>{M?P(M):H(w)},{signal:R,end:k})})}q.exports={finished:B,pipeline:D}}),O3=Z0((Y,q)=>{var{Buffer:F}=R6(),{ObjectDefineProperty:O,ObjectKeys:Z,ReflectApply:N}=P6(),{promisify:{custom:V}}=e6(),{streamReturningOperators:C,promiseReturningOperators:B}=mX(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:D}}=A6(),L=H3(),{pipeline:H}=b5(),{destroyer:P}=W1(),R=$8(),k=C3(),v=G8(),M=q.exports=m5().Stream;M.isDisturbed=v.isDisturbed,M.isErrored=v.isErrored,M.isReadable=v.isReadable,M.Readable=N7();for(let g of Z(C)){let _=function(...m){if(new.target)throw D();return M.Readable.from(N(p,this,m))};w=_;let p=C[g];O(_,"name",{__proto__:null,value:p.name}),O(_,"length",{__proto__:null,value:p.length}),O(M.Readable.prototype,g,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}var w;for(let g of Z(B)){let _=function(...m){if(new.target)throw D();return N(p,this,m)};w=_;let p=B[g];O(_,"name",{__proto__:null,value:p.name}),O(_,"length",{__proto__:null,value:p.length}),O(M.Readable.prototype,g,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}var w;M.Writable=$3(),M.Duplex=Q8(),M.Transform=q3(),M.PassThrough=j3(),M.pipeline=H;var{addAbortSignal:x}=L7();M.addAbortSignal=x,M.finished=R,M.destroy=P,M.compose=L,O(M,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return k}}),O(H,V,{__proto__:null,enumerable:!0,get(){return k.pipeline}}),O(R,V,{__proto__:null,enumerable:!0,get(){return k.finished}}),M.Stream=M,M._isUint8Array=function(g){return g instanceof Uint8Array},M._uint8ArrayToBuffer=function(g){return F.from(g.buffer,g.byteOffset,g.byteLength)}}),t4=Z0((Y,q)=>{var F=O3(),O=C3(),Z=F.Readable.destroy;q.exports=F.Readable,q.exports._uint8ArrayToBuffer=F._uint8ArrayToBuffer,q.exports._isUint8Array=F._isUint8Array,q.exports.isDisturbed=F.isDisturbed,q.exports.isErrored=F.isErrored,q.exports.isReadable=F.isReadable,q.exports.Readable=F.Readable,q.exports.Writable=F.Writable,q.exports.Duplex=F.Duplex,q.exports.Transform=F.Transform,q.exports.PassThrough=F.PassThrough,q.exports.addAbortSignal=F.addAbortSignal,q.exports.finished=F.finished,q.exports.destroy=F.destroy,q.exports.destroy=Z,q.exports.pipeline=F.pipeline,q.exports.compose=F.compose,Object.defineProperty(F,"promises",{configurable:!0,enumerable:!0,get(){return O}}),q.exports.Stream=F.Stream,q.exports.default=q.exports}),h5={};C7(h5,{default:()=>D3});var D3,pX=v5(()=>{x5(h5,v8(t4())),D3=v8(t4())}),q8=Z0((Y,q)=>{var F=l0().Buffer,O=(pX(),g6(h5)).Transform,Z=S5().StringDecoder,N=h0();function V(C){O.call(this),this.hashMode=typeof C=="string",this.hashMode?this[C]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}N(V,O),V.prototype.update=function(C,B,D){typeof C=="string"&&(C=F.from(C,B));var L=this._update(C);return this.hashMode?this:(D&&(L=this._toString(L,D)),L)},V.prototype.setAutoPadding=function(){},V.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},V.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},V.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},V.prototype._transform=function(C,B,D){var L;try{this.hashMode?this._update(C):this.push(this._update(C))}catch(H){L=H}finally{D(L)}},V.prototype._flush=function(C){var B;try{this.push(this.__final())}catch(D){B=D}C(B)},V.prototype._finalOrDigest=function(C){var B=this.__final()||F.alloc(0);return C&&(B=this._toString(B,C,!0)),B},V.prototype._toString=function(C,B,D){if(this._decoder||(this._decoder=new Z(B),this._encoding=B),this._encoding!==B)throw new Error("can't switch encodings");var L=this._decoder.write(C);return D&&(L+=this._decoder.end()),L},q.exports=V}),w1=Z0((Y,q)=>{var F=h0(),O=w5(),Z=g5(),N=y5(),V=q8();function C(B){V.call(this,"digest"),this._hash=B}F(C,V),C.prototype._update=function(B){this._hash.update(B)},C.prototype._final=function(){return this._hash.digest()},q.exports=function(B){return B=B.toLowerCase(),B==="md5"?new O:B==="rmd160"||B==="ripemd160"?new Z:new C(N(B))}}),bX=Z0((Y,q)=>{var F=h0(),O=l0().Buffer,Z=q8(),N=O.alloc(128),V=64;function C(B,D){Z.call(this,"digest"),typeof D=="string"&&(D=O.from(D)),this._alg=B,this._key=D,D.length>V?D=B(D):D.length<V&&(D=O.concat([D,N],V));for(var L=this._ipad=O.allocUnsafe(V),H=this._opad=O.allocUnsafe(V),P=0;P<V;P++)L[P]=D[P]^54,H[P]=D[P]^92;this._hash=[L]}F(C,Z),C.prototype._update=function(B){this._hash.push(B)},C.prototype._final=function(){var B=this._alg(O.concat(this._hash));return this._alg(O.concat([this._opad,B]))},q.exports=C}),L3=Z0((Y,q)=>{var F=w5();q.exports=function(O){return new F().update(O).digest()}}),N3=Z0((Y,q)=>{var F=h0(),O=bX(),Z=q8(),N=l0().Buffer,V=L3(),C=g5(),B=y5(),D=N.alloc(128);function L(H,P){Z.call(this,"digest"),typeof P=="string"&&(P=N.from(P));var R=H==="sha512"||H==="sha384"?128:64;if(this._alg=H,this._key=P,P.length>R){var k=H==="rmd160"?new C:B(H);P=k.update(P).digest()}else P.length<R&&(P=N.concat([P,D],R));for(var v=this._ipad=N.allocUnsafe(R),M=this._opad=N.allocUnsafe(R),w=0;w<R;w++)v[w]=P[w]^54,M[w]=P[w]^92;this._hash=H==="rmd160"?new C:B(H),this._hash.update(v)}F(L,Z),L.prototype._update=function(H){this._hash.update(H)},L.prototype._final=function(){var H=this._hash.digest(),P=this._alg==="rmd160"?new C:B(this._alg);return P.update(this._opad).update(H).digest()},q.exports=function(H,P){return H=H.toLowerCase(),H==="rmd160"||H==="ripemd160"?new L("rmd160",P):H==="md5"?new O(V,P):new L(H,P)}}),P3=Z0((Y,q)=>{q.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"}}}),hX=Z0((Y,q)=>{q.exports=P3()}),k3=Z0((Y,q)=>{var F=Math.pow(2,30)-1;q.exports=function(O,Z){if(typeof O!="number")throw new TypeError("Iterations not a number");if(O<0)throw new TypeError("Bad iterations");if(typeof Z!="number")throw new TypeError("Key length not a number");if(Z<0||Z>F||Z!==Z)throw new TypeError("Bad key length")}}),B3=Z0((Y,q)=>{var F;window.process&&window.process.browser?F="utf-8":window.process&&window.process.version?(O=parseInt(process.version.split(".")[0].slice(1),10),F=O>=6?"utf-8":"binary"):F="utf-8";var O;q.exports=F}),R3=Z0((Y,q)=>{var F=l0().Buffer;q.exports=function(O,Z,N){if(F.isBuffer(O))return O;if(typeof O=="string")return F.from(O,Z);if(ArrayBuffer.isView(O))return F.from(O.buffer);throw new TypeError(N+" must be a string, a Buffer, a typed array or a DataView")}}),I3=Z0((Y,q)=>{var F=L3(),O=g5(),Z=y5(),N=l0().Buffer,V=k3(),C=B3(),B=R3(),D=N.alloc(128),L={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function H(k,v,M){var w=P(k),x=k==="sha512"||k==="sha384"?128:64;v.length>x?v=w(v):v.length<x&&(v=N.concat([v,D],x));for(var g=N.allocUnsafe(x+L[k]),_=N.allocUnsafe(x+L[k]),p=0;p<x;p++)g[p]=v[p]^54,_[p]=v[p]^92;var m=N.allocUnsafe(x+M+4);g.copy(m,0,0,x),this.ipad1=m,this.ipad2=g,this.opad=_,this.alg=k,this.blocksize=x,this.hash=w,this.size=L[k]}H.prototype.run=function(k,v){k.copy(v,this.blocksize);var M=this.hash(v);return M.copy(this.opad,this.blocksize),this.hash(this.opad)};function P(k){function v(w){return Z(k).update(w).digest()}function M(w){return new O().update(w).digest()}return k==="rmd160"||k==="ripemd160"?M:k==="md5"?F:v}function R(k,v,M,w,x){V(M,w),k=B(k,C,"Password"),v=B(v,C,"Salt"),x=x||"sha1";var g=new H(x,k,v.length),_=N.allocUnsafe(w),p=N.allocUnsafe(v.length+4);v.copy(p,0,0,v.length);for(var m=0,f=L[x],s=Math.ceil(w/f),Q0=1;Q0<=s;Q0++){p.writeUInt32BE(Q0,v.length);for(var d=g.run(p,g.ipad1),K0=d,Q=1;Q<M;Q++){K0=g.run(K0,g.ipad2);for(var G=0;G<f;G++)d[G]^=K0[G]}d.copy(_,m),m+=f}return _}q.exports=R}),cX=Z0((Y,q)=>{var F=l0().Buffer,O=k3(),Z=B3(),N=I3(),V=R3(),C,B=window.crypto&&window.crypto.subtle,D={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"},L=[];function H(M){if(window.process&&!window.process.browser||!B||!B.importKey||!B.deriveBits)return Promise.resolve(!1);if(L[M]!==void 0)return L[M];C=C||F.alloc(8);var w=k(C,C,10,128,M).then(function(){return!0}).catch(function(){return!1});return L[M]=w,w}var P;function R(){return P||(window.process&&window.process.nextTick?P=window.process.nextTick:window.queueMicrotask?P=window.queueMicrotask:window.setImmediate?P=window.setImmediate:P=window.setTimeout,P)}function k(M,w,x,g,_){return B.importKey("raw",M,{name:"PBKDF2"},!1,["deriveBits"]).then(function(p){return B.deriveBits({name:"PBKDF2",salt:w,iterations:x,hash:{name:_}},p,g<<3)}).then(function(p){return F.from(p)})}function v(M,w){M.then(function(x){R()(function(){w(null,x)})},function(x){R()(function(){w(x)})})}q.exports=function(M,w,x,g,_,p){typeof _=="function"&&(p=_,_=void 0),_=_||"sha1";var m=D[_.toLowerCase()];if(!m||typeof window.Promise!="function"){R()(function(){var f;try{f=N(M,w,x,g,_)}catch(s){return p(s)}p(null,f)});return}if(O(x,g),M=V(M,Z,"Password"),w=V(w,Z,"Salt"),typeof p!="function")throw new Error("No callback provided to pbkdf2");v(H(m).then(function(f){return f?k(M,w,x,g,m):N(M,w,x,g,_)}),p)}}),T3=Z0((Y)=>{Y.pbkdf2=cX(),Y.pbkdf2Sync=I3()}),M3=Z0((Y)=>{Y.readUInt32BE=function(Z,N){var V=Z[0+N]<<24|Z[1+N]<<16|Z[2+N]<<8|Z[3+N];return V>>>0},Y.writeUInt32BE=function(Z,N,V){Z[0+V]=N>>>24,Z[1+V]=N>>>16&255,Z[2+V]=N>>>8&255,Z[3+V]=N&255},Y.ip=function(Z,N,V,C){for(var B=0,D=0,L=6;L>=0;L-=2){for(var H=0;H<=24;H+=8)B<<=1,B|=N>>>H+L&1;for(var H=0;H<=24;H+=8)B<<=1,B|=Z>>>H+L&1}for(var L=6;L>=0;L-=2){for(var H=1;H<=25;H+=8)D<<=1,D|=N>>>H+L&1;for(var H=1;H<=25;H+=8)D<<=1,D|=Z>>>H+L&1}V[C+0]=B>>>0,V[C+1]=D>>>0},Y.rip=function(Z,N,V,C){for(var B=0,D=0,L=0;L<4;L++)for(var H=24;H>=0;H-=8)B<<=1,B|=N>>>H+L&1,B<<=1,B|=Z>>>H+L&1;for(var L=4;L<8;L++)for(var H=24;H>=0;H-=8)D<<=1,D|=N>>>H+L&1,D<<=1,D|=Z>>>H+L&1;V[C+0]=B>>>0,V[C+1]=D>>>0},Y.pc1=function(Z,N,V,C){for(var B=0,D=0,L=7;L>=5;L--){for(var H=0;H<=24;H+=8)B<<=1,B|=N>>H+L&1;for(var H=0;H<=24;H+=8)B<<=1,B|=Z>>H+L&1}for(var H=0;H<=24;H+=8)B<<=1,B|=N>>H+L&1;for(var L=1;L<=3;L++){for(var H=0;H<=24;H+=8)D<<=1,D|=N>>H+L&1;for(var H=0;H<=24;H+=8)D<<=1,D|=Z>>H+L&1}for(var H=0;H<=24;H+=8)D<<=1,D|=Z>>H+L&1;V[C+0]=B>>>0,V[C+1]=D>>>0},Y.r28shl=function(Z,N){return Z<<N&268435455|Z>>>28-N};var q=[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];Y.pc2=function(Z,N,V,C){for(var B=0,D=0,L=q.length>>>1,H=0;H<L;H++)B<<=1,B|=Z>>>q[H]&1;for(var H=L;H<q.length;H++)D<<=1,D|=N>>>q[H]&1;V[C+0]=B>>>0,V[C+1]=D>>>0},Y.expand=function(Z,N,V){var C=0,B=0;C=(Z&1)<<5|Z>>>27;for(var D=23;D>=15;D-=4)C<<=6,C|=Z>>>D&63;for(var D=11;D>=3;D-=4)B|=Z>>>D&63,B<<=6;B|=(Z&31)<<1|Z>>>31,N[V+0]=C>>>0,N[V+1]=B>>>0};var F=[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];Y.substitute=function(Z,N){for(var V=0,C=0;C<4;C++){var B=Z>>>18-C*6&63,D=F[C*64+B];V<<=4,V|=D}for(var C=0;C<4;C++){var B=N>>>18-C*6&63,D=F[256+C*64+B];V<<=4,V|=D}return V>>>0};var O=[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];Y.permute=function(Z){for(var N=0,V=0;V<O.length;V++)N<<=1,N|=Z>>>O[V]&1;return N>>>0},Y.padSplit=function(Z,N,V){for(var C=Z.toString(2);C.length<N;)C="0"+C;for(var B=[],D=0;D<N;D+=V)B.push(C.slice(D,D+V));return B.join(" ")}}),y6=Z0((Y,q)=>{q.exports=F;function F(O,Z){if(!O)throw new Error(Z||"Assertion failed")}F.equal=function(O,Z,N){if(O!=Z)throw new Error(N||"Assertion failed: "+O+" != "+Z)}}),c5=Z0((Y,q)=>{var F=y6();function O(Z){this.options=Z,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=Z.padding!==!1}q.exports=O,O.prototype._init=function(){},O.prototype.update=function(Z){return Z.length===0?[]:this.type==="decrypt"?this._updateDecrypt(Z):this._updateEncrypt(Z)},O.prototype._buffer=function(Z,N){for(var V=Math.min(this.buffer.length-this.bufferOff,Z.length-N),C=0;C<V;C++)this.buffer[this.bufferOff+C]=Z[N+C];return this.bufferOff+=V,V},O.prototype._flushBuffer=function(Z,N){return this._update(this.buffer,0,Z,N),this.bufferOff=0,this.blockSize},O.prototype._updateEncrypt=function(Z){var N=0,V=0,C=(this.bufferOff+Z.length)/this.blockSize|0,B=new Array(C*this.blockSize);this.bufferOff!==0&&(N+=this._buffer(Z,N),this.bufferOff===this.buffer.length&&(V+=this._flushBuffer(B,V)));for(var D=Z.length-(Z.length-N)%this.blockSize;N<D;N+=this.blockSize)this._update(Z,N,B,V),V+=this.blockSize;for(;N<Z.length;N++,this.bufferOff++)this.buffer[this.bufferOff]=Z[N];return B},O.prototype._updateDecrypt=function(Z){for(var N=0,V=0,C=Math.ceil((this.bufferOff+Z.length)/this.blockSize)-1,B=new Array(C*this.blockSize);C>0;C--)N+=this._buffer(Z,N),V+=this._flushBuffer(B,V);return N+=this._buffer(Z,N),B},O.prototype.final=function(Z){var N;Z&&(N=this.update(Z));var V;return this.type==="encrypt"?V=this._finalEncrypt():V=this._finalDecrypt(),N?N.concat(V):V},O.prototype._pad=function(Z,N){if(N===0)return!1;for(;N<Z.length;)Z[N++]=0;return!0},O.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var Z=new Array(this.blockSize);return this._update(this.buffer,0,Z,0),Z},O.prototype._unpad=function(Z){return Z},O.prototype._finalDecrypt=function(){F.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var Z=new Array(this.blockSize);return this._flushBuffer(Z,0),this._unpad(Z)}}),A3=Z0((Y,q)=>{var F=y6(),O=h0(),Z=M3(),N=c5();function V(){this.tmp=new Array(2),this.keys=null}function C(D){N.call(this,D);var L=new V;this._desState=L,this.deriveKeys(L,D.key)}O(C,N),q.exports=C,C.create=function(D){return new C(D)};var B=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];C.prototype.deriveKeys=function(D,L){D.keys=new Array(32),F.equal(L.length,this.blockSize,"Invalid key length");var H=Z.readUInt32BE(L,0),P=Z.readUInt32BE(L,4);Z.pc1(H,P,D.tmp,0),H=D.tmp[0],P=D.tmp[1];for(var R=0;R<D.keys.length;R+=2){var k=B[R>>>1];H=Z.r28shl(H,k),P=Z.r28shl(P,k),Z.pc2(H,P,D.keys,R)}},C.prototype._update=function(D,L,H,P){var R=this._desState,k=Z.readUInt32BE(D,L),v=Z.readUInt32BE(D,L+4);Z.ip(k,v,R.tmp,0),k=R.tmp[0],v=R.tmp[1],this.type==="encrypt"?this._encrypt(R,k,v,R.tmp,0):this._decrypt(R,k,v,R.tmp,0),k=R.tmp[0],v=R.tmp[1],Z.writeUInt32BE(H,k,P),Z.writeUInt32BE(H,v,P+4)},C.prototype._pad=function(D,L){if(this.padding===!1)return!1;for(var H=D.length-L,P=L;P<D.length;P++)D[P]=H;return!0},C.prototype._unpad=function(D){if(this.padding===!1)return D;for(var L=D[D.length-1],H=D.length-L;H<D.length;H++)F.equal(D[H],L);return D.slice(0,D.length-L)},C.prototype._encrypt=function(D,L,H,P,R){for(var k=L,v=H,M=0;M<D.keys.length;M+=2){var w=D.keys[M],x=D.keys[M+1];Z.expand(v,D.tmp,0),w^=D.tmp[0],x^=D.tmp[1];var g=Z.substitute(w,x),_=Z.permute(g),p=v;v=(k^_)>>>0,k=p}Z.rip(v,k,P,R)},C.prototype._decrypt=function(D,L,H,P,R){for(var k=H,v=L,M=D.keys.length-2;M>=0;M-=2){var w=D.keys[M],x=D.keys[M+1];Z.expand(k,D.tmp,0),w^=D.tmp[0],x^=D.tmp[1];var g=Z.substitute(w,x),_=Z.permute(g),p=k;k=(v^_)>>>0,v=p}Z.rip(k,v,P,R)}}),lX=Z0((Y)=>{var q=y6(),F=h0(),O={};function Z(V){q.equal(V.length,8,"Invalid IV length"),this.iv=new Array(8);for(var C=0;C<this.iv.length;C++)this.iv[C]=V[C]}function N(V){function C(H){V.call(this,H),this._cbcInit()}F(C,V);for(var B=Object.keys(O),D=0;D<B.length;D++){var L=B[D];C.prototype[L]=O[L]}return C.create=function(H){return new C(H)},C}Y.instantiate=N,O._cbcInit=function(){var V=new Z(this.options.iv);this._cbcState=V},O._update=function(V,C,B,D){var L=this._cbcState,H=this.constructor.super_.prototype,P=L.iv;if(this.type==="encrypt"){for(var R=0;R<this.blockSize;R++)P[R]^=V[C+R];H._update.call(this,P,0,B,D);for(var R=0;R<this.blockSize;R++)P[R]=B[D+R]}else{H._update.call(this,V,C,B,D);for(var R=0;R<this.blockSize;R++)B[D+R]^=P[R];for(var R=0;R<this.blockSize;R++)P[R]=V[C+R]}}}),uX=Z0((Y,q)=>{var F=y6(),O=h0(),Z=c5(),N=A3();function V(B,D){F.equal(D.length,24,"Invalid key length");var L=D.slice(0,8),H=D.slice(8,16),P=D.slice(16,24);B==="encrypt"?this.ciphers=[N.create({type:"encrypt",key:L}),N.create({type:"decrypt",key:H}),N.create({type:"encrypt",key:P})]:this.ciphers=[N.create({type:"decrypt",key:P}),N.create({type:"encrypt",key:H}),N.create({type:"decrypt",key:L})]}function C(B){Z.call(this,B);var D=new V(this.type,this.options.key);this._edeState=D}O(C,Z),q.exports=C,C.create=function(B){return new C(B)},C.prototype._update=function(B,D,L,H){var P=this._edeState;P.ciphers[0]._update(B,D,L,H),P.ciphers[1]._update(L,H,L,H),P.ciphers[2]._update(L,H,L,H)},C.prototype._pad=N.prototype._pad,C.prototype._unpad=N.prototype._unpad}),dX=Z0((Y)=>{Y.utils=M3(),Y.Cipher=c5(),Y.DES=A3(),Y.CBC=lX(),Y.EDE=uX()}),fX=Z0((Y,q)=>{var F=q8(),O=dX(),Z=h0(),N=l0().Buffer,V={"des-ede3-cbc":O.CBC.instantiate(O.EDE),"des-ede3":O.EDE,"des-ede-cbc":O.CBC.instantiate(O.EDE),"des-ede":O.EDE,"des-cbc":O.CBC.instantiate(O.DES),"des-ecb":O.DES};V.des=V["des-cbc"],V.des3=V["des-ede3-cbc"],q.exports=C,Z(C,F);function C(B){F.call(this);var D=B.mode.toLowerCase(),L=V[D],H;B.decrypt?H="decrypt":H="encrypt";var P=B.key;N.isBuffer(P)||(P=N.from(P)),(D==="des-ede"||D==="des-ede-cbc")&&(P=N.concat([P,P.slice(0,8)]));var R=B.iv;N.isBuffer(R)||(R=N.from(R)),this._des=L.create({key:P,iv:R,type:H})}C.prototype._update=function(B){return N.from(this._des.update(B))},C.prototype._final=function(){return N.from(this._des.final())}}),oX=Z0((Y)=>{Y.encrypt=function(q,F){return q._cipher.encryptBlock(F)},Y.decrypt=function(q,F){return q._cipher.decryptBlock(F)}}),g1=Z0((Y,q)=>{q.exports=function(F,O){for(var Z=Math.min(F.length,O.length),N=new Buffer(Z),V=0;V<Z;++V)N[V]=F[V]^O[V];return N}}),aX=Z0((Y)=>{var q=g1();Y.encrypt=function(F,O){var Z=q(O,F._prev);return F._prev=F._cipher.encryptBlock(Z),F._prev},Y.decrypt=function(F,O){var Z=F._prev;F._prev=O;var N=F._cipher.decryptBlock(O);return q(N,Z)}}),nX=Z0((Y)=>{var q=l0().Buffer,F=g1();function O(Z,N,V){var C=N.length,B=F(N,Z._cache);return Z._cache=Z._cache.slice(C),Z._prev=q.concat([Z._prev,V?N:B]),B}Y.encrypt=function(Z,N,V){for(var C=q.allocUnsafe(0),B;N.length;)if(Z._cache.length===0&&(Z._cache=Z._cipher.encryptBlock(Z._prev),Z._prev=q.allocUnsafe(0)),Z._cache.length<=N.length)B=Z._cache.length,C=q.concat([C,O(Z,N.slice(0,B),V)]),N=N.slice(B);else{C=q.concat([C,O(Z,N,V)]);break}return C}}),rX=Z0((Y)=>{var q=l0().Buffer;function F(O,Z,N){var V=O._cipher.encryptBlock(O._prev),C=V[0]^Z;return O._prev=q.concat([O._prev.slice(1),q.from([N?Z:C])]),C}Y.encrypt=function(O,Z,N){for(var V=Z.length,C=q.allocUnsafe(V),B=-1;++B<V;)C[B]=F(O,Z[B],N);return C}}),iX=Z0((Y)=>{var q=l0().Buffer;function F(Z,N,V){for(var C,B=-1,D=8,L=0,H,P;++B<D;)C=Z._cipher.encryptBlock(Z._prev),H=N&1<<7-B?128:0,P=C[0]^H,L+=(P&128)>>B%8,Z._prev=O(Z._prev,V?H:P);return L}function O(Z,N){var V=Z.length,C=-1,B=q.allocUnsafe(Z.length);for(Z=q.concat([Z,q.from([N])]);++C<V;)B[C]=Z[C]<<1|Z[C+1]>>7;return B}Y.encrypt=function(Z,N,V){for(var C=N.length,B=q.allocUnsafe(C),D=-1;++D<C;)B[D]=F(Z,N[D],V);return B}}),sX=Z0((Y)=>{var q=g1();function F(O){return O._prev=O._cipher.encryptBlock(O._prev),O._prev}Y.encrypt=function(O,Z){for(;O._cache.length<Z.length;)O._cache=Buffer.concat([O._cache,F(O)]);var N=O._cache.slice(0,Z.length);return O._cache=O._cache.slice(Z.length),q(Z,N)}}),v3=Z0((Y,q)=>{function F(O){for(var Z=O.length,N;Z--;)if(N=O.readUInt8(Z),N===255)O.writeUInt8(0,Z);else{N++,O.writeUInt8(N,Z);break}}q.exports=F}),e4=Z0((Y)=>{var q=g1(),F=l0().Buffer,O=v3();function Z(V){var C=V._cipher.encryptBlockRaw(V._prev);return O(V._prev),C}var N=16;Y.encrypt=function(V,C){var B=Math.ceil(C.length/N),D=V._cache.length;V._cache=F.concat([V._cache,F.allocUnsafe(B*N)]);for(var L=0;L<B;L++){var H=Z(V),P=D+L*N;V._cache.writeUInt32BE(H[0],P+0),V._cache.writeUInt32BE(H[1],P+4),V._cache.writeUInt32BE(H[2],P+8),V._cache.writeUInt32BE(H[3],P+12)}var R=V._cache.slice(0,C.length);return V._cache=V._cache.slice(C.length),q(C,R)}}),x3=Z0((Y,q)=>{q.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"}}}),l5=Z0((Y,q)=>{var F={ECB:oX(),CBC:aX(),CFB:nX(),CFB8:rX(),CFB1:iX(),OFB:sX(),CTR:e4(),GCM:e4()},O=x3();for(Z in O)O[Z].module=F[O[Z].mode];var Z;q.exports=O}),P7=Z0((Y,q)=>{var F=l0().Buffer;function O(D){F.isBuffer(D)||(D=F.from(D));for(var L=D.length/4|0,H=new Array(L),P=0;P<L;P++)H[P]=D.readUInt32BE(P*4);return H}function Z(D){for(var L=0;L<D.length;D++)D[L]=0}function N(D,L,H,P,R){for(var k=H[0],v=H[1],M=H[2],w=H[3],x=D[0]^L[0],g=D[1]^L[1],_=D[2]^L[2],p=D[3]^L[3],m,f,s,Q0,d=4,K0=1;K0<R;K0++)m=k[x>>>24]^v[g>>>16&255]^M[_>>>8&255]^w[p&255]^L[d++],f=k[g>>>24]^v[_>>>16&255]^M[p>>>8&255]^w[x&255]^L[d++],s=k[_>>>24]^v[p>>>16&255]^M[x>>>8&255]^w[g&255]^L[d++],Q0=k[p>>>24]^v[x>>>16&255]^M[g>>>8&255]^w[_&255]^L[d++],x=m,g=f,_=s,p=Q0;return m=(P[x>>>24]<<24|P[g>>>16&255]<<16|P[_>>>8&255]<<8|P[p&255])^L[d++],f=(P[g>>>24]<<24|P[_>>>16&255]<<16|P[p>>>8&255]<<8|P[x&255])^L[d++],s=(P[_>>>24]<<24|P[p>>>16&255]<<16|P[x>>>8&255]<<8|P[g&255])^L[d++],Q0=(P[p>>>24]<<24|P[x>>>16&255]<<16|P[g>>>8&255]<<8|P[_&255])^L[d++],m=m>>>0,f=f>>>0,s=s>>>0,Q0=Q0>>>0,[m,f,s,Q0]}var V=[0,1,2,4,8,16,32,64,128,27,54],C=function(){for(var D=new Array(256),L=0;L<256;L++)L<128?D[L]=L<<1:D[L]=L<<1^283;for(var H=[],P=[],R=[[],[],[],[]],k=[[],[],[],[]],v=0,M=0,w=0;w<256;++w){var x=M^M<<1^M<<2^M<<3^M<<4;x=x>>>8^x&255^99,H[v]=x,P[x]=v;var g=D[v],_=D[g],p=D[_],m=D[x]*257^x*16843008;R[0][v]=m<<24|m>>>8,R[1][v]=m<<16|m>>>16,R[2][v]=m<<8|m>>>24,R[3][v]=m,m=p*16843009^_*65537^g*257^v*16843008,k[0][x]=m<<24|m>>>8,k[1][x]=m<<16|m>>>16,k[2][x]=m<<8|m>>>24,k[3][x]=m,v===0?v=M=1:(v=g^D[D[D[p^g]]],M^=D[D[M]])}return{SBOX:H,INV_SBOX:P,SUB_MIX:R,INV_SUB_MIX:k}}();function B(D){this._key=O(D),this._reset()}B.blockSize=16,B.keySize=32,B.prototype.blockSize=B.blockSize,B.prototype.keySize=B.keySize,B.prototype._reset=function(){for(var D=this._key,L=D.length,H=L+6,P=(H+1)*4,R=[],k=0;k<L;k++)R[k]=D[k];for(k=L;k<P;k++){var v=R[k-1];k%L===0?(v=v<<8|v>>>24,v=C.SBOX[v>>>24]<<24|C.SBOX[v>>>16&255]<<16|C.SBOX[v>>>8&255]<<8|C.SBOX[v&255],v^=V[k/L|0]<<24):L>6&&k%L===4&&(v=C.SBOX[v>>>24]<<24|C.SBOX[v>>>16&255]<<16|C.SBOX[v>>>8&255]<<8|C.SBOX[v&255]),R[k]=R[k-L]^v}for(var M=[],w=0;w<P;w++){var x=P-w,g=R[x-(w%4?0:4)];w<4||x<=4?M[w]=g:M[w]=C.INV_SUB_MIX[0][C.SBOX[g>>>24]]^C.INV_SUB_MIX[1][C.SBOX[g>>>16&255]]^C.INV_SUB_MIX[2][C.SBOX[g>>>8&255]]^C.INV_SUB_MIX[3][C.SBOX[g&255]]}this._nRounds=H,this._keySchedule=R,this._invKeySchedule=M},B.prototype.encryptBlockRaw=function(D){return D=O(D),N(D,this._keySchedule,C.SUB_MIX,C.SBOX,this._nRounds)},B.prototype.encryptBlock=function(D){var L=this.encryptBlockRaw(D),H=F.allocUnsafe(16);return H.writeUInt32BE(L[0],0),H.writeUInt32BE(L[1],4),H.writeUInt32BE(L[2],8),H.writeUInt32BE(L[3],12),H},B.prototype.decryptBlock=function(D){D=O(D);var L=D[1];D[1]=D[3],D[3]=L;var H=N(D,this._invKeySchedule,C.INV_SUB_MIX,C.INV_SBOX,this._nRounds),P=F.allocUnsafe(16);return P.writeUInt32BE(H[0],0),P.writeUInt32BE(H[3],4),P.writeUInt32BE(H[2],8),P.writeUInt32BE(H[1],12),P},B.prototype.scrub=function(){Z(this._keySchedule),Z(this._invKeySchedule),Z(this._key)},q.exports.AES=B}),tX=Z0((Y,q)=>{var F=l0().Buffer,O=F.alloc(16,0);function Z(C){return[C.readUInt32BE(0),C.readUInt32BE(4),C.readUInt32BE(8),C.readUInt32BE(12)]}function N(C){var B=F.allocUnsafe(16);return B.writeUInt32BE(C[0]>>>0,0),B.writeUInt32BE(C[1]>>>0,4),B.writeUInt32BE(C[2]>>>0,8),B.writeUInt32BE(C[3]>>>0,12),B}function V(C){this.h=C,this.state=F.alloc(16,0),this.cache=F.allocUnsafe(0)}V.prototype.ghash=function(C){for(var B=-1;++B<C.length;)this.state[B]^=C[B];this._multiply()},V.prototype._multiply=function(){for(var C=Z(this.h),B=[0,0,0,0],D,L,H,P=-1;++P<128;){for(L=(this.state[~~(P/8)]&1<<7-P%8)!==0,L&&(B[0]^=C[0],B[1]^=C[1],B[2]^=C[2],B[3]^=C[3]),H=(C[3]&1)!==0,D=3;D>0;D--)C[D]=C[D]>>>1|(C[D-1]&1)<<31;C[0]=C[0]>>>1,H&&(C[0]=C[0]^225<<24)}this.state=N(B)},V.prototype.update=function(C){this.cache=F.concat([this.cache,C]);for(var B;this.cache.length>=16;)B=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(B)},V.prototype.final=function(C,B){return this.cache.length&&this.ghash(F.concat([this.cache,O],16)),this.ghash(N([0,C,0,B])),this.state},q.exports=V}),S3=Z0((Y,q)=>{var F=P7(),O=l0().Buffer,Z=q8(),N=h0(),V=tX(),C=g1(),B=v3();function D(P,R){var k=0;P.length!==R.length&&k++;for(var v=Math.min(P.length,R.length),M=0;M<v;++M)k+=P[M]^R[M];return k}function L(P,R,k){if(R.length===12)return P._finID=O.concat([R,O.from([0,0,0,1])]),O.concat([R,O.from([0,0,0,2])]);var v=new V(k),M=R.length,w=M%16;v.update(R),w&&(w=16-w,v.update(O.alloc(w,0))),v.update(O.alloc(8,0));var x=M*8,g=O.alloc(8);g.writeUIntBE(x,0,8),v.update(g),P._finID=v.state;var _=O.from(P._finID);return B(_),_}function H(P,R,k,v){Z.call(this);var M=O.alloc(4,0);this._cipher=new F.AES(R);var w=this._cipher.encryptBlock(M);this._ghash=new V(w),k=L(this,k,w),this._prev=O.from(k),this._cache=O.allocUnsafe(0),this._secCache=O.allocUnsafe(0),this._decrypt=v,this._alen=0,this._len=0,this._mode=P,this._authTag=null,this._called=!1}N(H,Z),H.prototype._update=function(P){if(!this._called&&this._alen){var R=16-this._alen%16;R<16&&(R=O.alloc(R,0),this._ghash.update(R))}this._called=!0;var k=this._mode.encrypt(this,P);return this._decrypt?this._ghash.update(P):this._ghash.update(k),this._len+=P.length,k},H.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var P=C(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&D(P,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=P,this._cipher.scrub()},H.prototype.getAuthTag=function(){if(this._decrypt||!O.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},H.prototype.setAuthTag=function(P){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=P},H.prototype.setAAD=function(P){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(P),this._alen+=P.length},q.exports=H}),E3=Z0((Y,q)=>{var F=P7(),O=l0().Buffer,Z=q8(),N=h0();function V(C,B,D,L){Z.call(this),this._cipher=new F.AES(B),this._prev=O.from(D),this._cache=O.allocUnsafe(0),this._secCache=O.allocUnsafe(0),this._decrypt=L,this._mode=C}N(V,Z),V.prototype._update=function(C){return this._mode.encrypt(this,C,this._decrypt)},V.prototype._final=function(){this._cipher.scrub()},q.exports=V}),k7=Z0((Y,q)=>{var F=l0().Buffer,O=w5();function Z(N,V,C,B){if(F.isBuffer(N)||(N=F.from(N,"binary")),V&&(F.isBuffer(V)||(V=F.from(V,"binary")),V.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var D=C/8,L=F.alloc(D),H=F.alloc(B||0),P=F.alloc(0);D>0||B>0;){var R=new O;R.update(P),R.update(N),V&&R.update(V),P=R.digest();var k=0;if(D>0){var v=L.length-D;k=Math.min(D,P.length),P.copy(L,v,0,k),D-=k}if(k<P.length&&B>0){var M=H.length-B,w=Math.min(B,P.length-k);P.copy(H,M,k,k+w),B-=w}}return P.fill(0),{key:L,iv:H}}q.exports=Z}),eX=Z0((Y)=>{var q=l5(),F=S3(),O=l0().Buffer,Z=E3(),N=q8(),V=P7(),C=k7(),B=h0();function D(k,v,M){N.call(this),this._cache=new H,this._cipher=new V.AES(v),this._prev=O.from(M),this._mode=k,this._autopadding=!0}B(D,N),D.prototype._update=function(k){this._cache.add(k);for(var v,M,w=[];v=this._cache.get();)M=this._mode.encrypt(this,v),w.push(M);return O.concat(w)};var L=O.alloc(16,16);D.prototype._final=function(){var k=this._cache.flush();if(this._autopadding)return k=this._mode.encrypt(this,k),this._cipher.scrub(),k;if(!k.equals(L))throw this._cipher.scrub(),new Error("data not multiple of block length")},D.prototype.setAutoPadding=function(k){return this._autopadding=!!k,this};function H(){this.cache=O.allocUnsafe(0)}H.prototype.add=function(k){this.cache=O.concat([this.cache,k])},H.prototype.get=function(){if(this.cache.length>15){var k=this.cache.slice(0,16);return this.cache=this.cache.slice(16),k}return null},H.prototype.flush=function(){for(var k=16-this.cache.length,v=O.allocUnsafe(k),M=-1;++M<k;)v.writeUInt8(k,M);return O.concat([this.cache,v])};function P(k,v,M){var w=q[k.toLowerCase()];if(!w)throw new TypeError("invalid suite type");if(typeof v=="string"&&(v=O.from(v)),v.length!==w.key/8)throw new TypeError("invalid key length "+v.length);if(typeof M=="string"&&(M=O.from(M)),w.mode!=="GCM"&&M.length!==w.iv)throw new TypeError("invalid iv length "+M.length);return w.type==="stream"?new Z(w.module,v,M):w.type==="auth"?new F(w.module,v,M):new D(w.module,v,M)}function R(k,v){var M=q[k.toLowerCase()];if(!M)throw new TypeError("invalid suite type");var w=C(v,!1,M.key,M.iv);return P(k,w.key,w.iv)}Y.createCipheriv=P,Y.createCipher=R}),QY=Z0((Y)=>{var q=S3(),F=l0().Buffer,O=l5(),Z=E3(),N=q8(),V=P7(),C=k7(),B=h0();function D(k,v,M){N.call(this),this._cache=new L,this._last=void 0,this._cipher=new V.AES(v),this._prev=F.from(M),this._mode=k,this._autopadding=!0}B(D,N),D.prototype._update=function(k){this._cache.add(k);for(var v,M,w=[];v=this._cache.get(this._autopadding);)M=this._mode.decrypt(this,v),w.push(M);return F.concat(w)},D.prototype._final=function(){var k=this._cache.flush();if(this._autopadding)return H(this._mode.decrypt(this,k));if(k)throw new Error("data not multiple of block length")},D.prototype.setAutoPadding=function(k){return this._autopadding=!!k,this};function L(){this.cache=F.allocUnsafe(0)}L.prototype.add=function(k){this.cache=F.concat([this.cache,k])},L.prototype.get=function(k){var v;if(k){if(this.cache.length>16)return v=this.cache.slice(0,16),this.cache=this.cache.slice(16),v}else if(this.cache.length>=16)return v=this.cache.slice(0,16),this.cache=this.cache.slice(16),v;return null},L.prototype.flush=function(){if(this.cache.length)return this.cache};function H(k){var v=k[15];if(v<1||v>16)throw new Error("unable to decrypt data");for(var M=-1;++M<v;)if(k[M+(16-v)]!==v)throw new Error("unable to decrypt data");if(v!==16)return k.slice(0,16-v)}function P(k,v,M){var w=O[k.toLowerCase()];if(!w)throw new TypeError("invalid suite type");if(typeof M=="string"&&(M=F.from(M)),w.mode!=="GCM"&&M.length!==w.iv)throw new TypeError("invalid iv length "+M.length);if(typeof v=="string"&&(v=F.from(v)),v.length!==w.key/8)throw new TypeError("invalid key length "+v.length);return w.type==="stream"?new Z(w.module,v,M,!0):w.type==="auth"?new q(w.module,v,M,!0):new D(w.module,v,M)}function R(k,v){var M=O[k.toLowerCase()];if(!M)throw new TypeError("invalid suite type");var w=C(v,!1,M.key,M.iv);return P(k,w.key,w.iv)}Y.createDecipher=R,Y.createDecipheriv=P}),u5=Z0((Y)=>{var q=eX(),F=QY(),O=x3();function Z(){return Object.keys(O)}Y.createCipher=Y.Cipher=q.createCipher,Y.createCipheriv=Y.Cipheriv=q.createCipheriv,Y.createDecipher=Y.Decipher=F.createDecipher,Y.createDecipheriv=Y.Decipheriv=F.createDecipheriv,Y.listCiphers=Y.getCiphers=Z}),WY=Z0((Y)=>{Y["des-ecb"]={key:8,iv:0},Y["des-cbc"]=Y.des={key:8,iv:8},Y["des-ede3-cbc"]=Y.des3={key:24,iv:8},Y["des-ede3"]={key:24,iv:0},Y["des-ede-cbc"]={key:16,iv:8},Y["des-ede"]={key:16,iv:0}}),GY=Z0((Y)=>{var q=fX(),F=u5(),O=l5(),Z=WY(),N=k7();function V(H,P){H=H.toLowerCase();var R,k;if(O[H])R=O[H].key,k=O[H].iv;else if(Z[H])R=Z[H].key*8,k=Z[H].iv;else throw new TypeError("invalid suite type");var v=N(P,!1,R,k);return B(H,v.key,v.iv)}function C(H,P){H=H.toLowerCase();var R,k;if(O[H])R=O[H].key,k=O[H].iv;else if(Z[H])R=Z[H].key*8,k=Z[H].iv;else throw new TypeError("invalid suite type");var v=N(P,!1,R,k);return D(H,v.key,v.iv)}function B(H,P,R){if(H=H.toLowerCase(),O[H])return F.createCipheriv(H,P,R);if(Z[H])return new q({key:P,iv:R,mode:H});throw new TypeError("invalid suite type")}function D(H,P,R){if(H=H.toLowerCase(),O[H])return F.createDecipheriv(H,P,R);if(Z[H])return new q({key:P,iv:R,mode:H,decrypt:!0});throw new TypeError("invalid suite type")}function L(){return Object.keys(Z).concat(F.getCiphers())}Y.createCipher=Y.Cipher=V,Y.createCipheriv=Y.Cipheriv=B,Y.createDecipher=Y.Decipher=C,Y.createDecipheriv=Y.Decipheriv=D,Y.listCiphers=Y.getCiphers=L}),E8=Z0(()=>{}),w3=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,u=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(u,U0)|0,z=Math.imul(u,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(u,C0)|0,z=z+Math.imul(u,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(u,N0)|0,z=z+Math.imul(u,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(u,L0)|0,z=z+Math.imul(u,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(u,k0)|0,z=z+Math.imul(u,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(u,R0)|0,z=z+Math.imul(u,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(u,T0)|0,z=z+Math.imul(u,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(u,A0)|0,z=z+Math.imul(u,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(u,x0)|0,z=z+Math.imul(u,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(u,E0)|0,z=z+Math.imul(u,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new d(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function d(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}d.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},d.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},d.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},d.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},d.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},d.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},d.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},d.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},d.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},d.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},d.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},d.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},d.prototype.sqr=function(Q){return this.mul(Q,Q)},d.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},d.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},d.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},d.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},d.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){d.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,d),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),XY=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,u=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(u,U0)|0,z=Math.imul(u,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(u,C0)|0,z=z+Math.imul(u,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(u,N0)|0,z=z+Math.imul(u,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(u,L0)|0,z=z+Math.imul(u,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(u,k0)|0,z=z+Math.imul(u,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(u,R0)|0,z=z+Math.imul(u,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(u,T0)|0,z=z+Math.imul(u,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(u,A0)|0,z=z+Math.imul(u,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(u,x0)|0,z=z+Math.imul(u,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(u,E0)|0,z=z+Math.imul(u,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new d(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function d(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}d.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},d.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},d.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},d.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},d.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},d.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},d.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},d.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},d.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},d.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},d.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},d.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},d.prototype.sqr=function(Q){return this.mul(Q,Q)},d.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},d.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},d.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},d.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},d.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){d.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,d),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),YY=Z0(()=>{}),d5=Z0((Y,q)=>{var F;q.exports=function(N){return F||(F=new O(null)),F.generate(N)};function O(N){this.rand=N}if(q.exports.Rand=O,O.prototype.generate=function(N){return this._rand(N)},O.prototype._rand=function(N){if(this.rand.getBytes)return this.rand.getBytes(N);for(var V=new Uint8Array(N),C=0;C<V.length;C++)V[C]=this.rand.getByte();return V},typeof self=="object")self.crypto&&self.crypto.getRandomValues?O.prototype._rand=function(N){var V=new Uint8Array(N);return self.crypto.getRandomValues(V),V}:self.msCrypto&&self.msCrypto.getRandomValues?O.prototype._rand=function(N){var V=new Uint8Array(N);return self.msCrypto.getRandomValues(V),V}:typeof window=="object"&&(O.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Z=YY(),typeof Z.randomBytes!="function")throw new Error("Not supported");O.prototype._rand=function(N){return Z.randomBytes(N)}}catch{}var Z}),g3=Z0((Y,q)=>{var F=XY(),O=d5();function Z(N){this.rand=N||new O.Rand}q.exports=Z,Z.create=function(N){return new Z(N)},Z.prototype._randbelow=function(N){var V=N.bitLength(),C=Math.ceil(V/8);do var B=new F(this.rand.generate(C));while(B.cmp(N)>=0);return B},Z.prototype._randrange=function(N,V){var C=V.sub(N);return N.add(this._randbelow(C))},Z.prototype.test=function(N,V,C){var B=N.bitLength(),D=F.mont(N),L=new F(1).toRed(D);V||(V=Math.max(1,B/48|0));for(var H=N.subn(1),P=0;!H.testn(P);P++);for(var R=N.shrn(P),k=H.toRed(D),v=!0;V>0;V--){var M=this._randrange(new F(2),H);C&&C(M);var w=M.toRed(D).redPow(R);if(!(w.cmp(L)===0||w.cmp(k)===0)){for(var x=1;x<P;x++){if(w=w.redSqr(),w.cmp(L)===0)return!1;if(w.cmp(k)===0)break}if(x===P)return!1}}return v},Z.prototype.getDivisor=function(N,V){var C=N.bitLength(),B=F.mont(N),D=new F(1).toRed(B);V||(V=Math.max(1,C/48|0));for(var L=N.subn(1),H=0;!L.testn(H);H++);for(var P=N.shrn(H),R=L.toRed(B);V>0;V--){var k=this._randrange(new F(2),L),v=N.gcd(k);if(v.cmpn(1)!==0)return v;var M=k.toRed(B).redPow(P);if(!(M.cmp(D)===0||M.cmp(R)===0)){for(var w=1;w<H;w++){if(M=M.redSqr(),M.cmp(D)===0)return M.fromRed().subn(1).gcd(N);if(M.cmp(R)===0)break}if(w===H)return M=M.redSqr(),M.fromRed().subn(1).gcd(N)}}return!1}}),y3=Z0((Y,q)=>{var F=t8();q.exports=m,m.simpleSieve=_,m.fermatTest=p;var O=w3(),Z=new O(24),N=g3(),V=new N,C=new O(1),B=new O(2),D=new O(5),L=new O(16),H=new O(8),P=new O(10),R=new O(3),k=new O(7),v=new O(11),M=new O(4),w=new O(12),x=null;function g(){if(x!==null)return x;var f=1048576,s=[];s[0]=2;for(var Q0=1,d=3;d<f;d+=2){for(var K0=Math.ceil(Math.sqrt(d)),Q=0;Q<Q0&&s[Q]<=K0&&d%s[Q]!==0;Q++);Q0!==Q&&s[Q]<=K0||(s[Q0++]=d)}return x=s,s}function _(f){for(var s=g(),Q0=0;Q0<s.length;Q0++)if(f.modn(s[Q0])===0)return f.cmpn(s[Q0])===0;return!0}function p(f){var s=O.mont(f);return B.toRed(s).redPow(f.subn(1)).fromRed().cmpn(1)===0}function m(f,s){if(f<16)return s===2||s===5?new O([140,123]):new O([140,39]);s=new O(s);for(var Q0,d;;){for(Q0=new O(F(Math.ceil(f/8)));Q0.bitLength()>f;)Q0.ishrn(1);if(Q0.isEven()&&Q0.iadd(C),Q0.testn(1)||Q0.iadd(B),s.cmp(B)){if(!s.cmp(D))for(;Q0.mod(P).cmp(R);)Q0.iadd(M)}else for(;Q0.mod(Z).cmp(v);)Q0.iadd(M);if(d=Q0.shrn(1),_(d)&&_(Q0)&&p(d)&&p(Q0)&&V.test(d)&&V.test(Q0))return Q0}}}),VY=Z0((Y,q)=>{q.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"}}}),JY=Z0((Y,q)=>{var F=w3(),O=g3(),Z=new O,N=new F(24),V=new F(11),C=new F(10),B=new F(3),D=new F(7),L=y3(),H=t8();q.exports=M;function P(x,g){return g=g||"utf8",Buffer.isBuffer(x)||(x=new Buffer(x,g)),this._pub=new F(x),this}function R(x,g){return g=g||"utf8",Buffer.isBuffer(x)||(x=new Buffer(x,g)),this._priv=new F(x),this}var k={};function v(x,g){var _=g.toString("hex"),p=[_,x.toString(16)].join("_");if(p in k)return k[p];var m=0;if(x.isEven()||!L.simpleSieve||!L.fermatTest(x)||!Z.test(x))return m+=1,_==="02"||_==="05"?m+=8:m+=4,k[p]=m,m;Z.test(x.shrn(1))||(m+=2);var f;switch(_){case"02":x.mod(N).cmp(V)&&(m+=8);break;case"05":f=x.mod(C),f.cmp(B)&&f.cmp(D)&&(m+=8);break;default:m+=4}return k[p]=m,m}function M(x,g,_){this.setGenerator(g),this.__prime=new F(x),this._prime=F.mont(this.__prime),this._primeLen=x.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,_?(this.setPublicKey=P,this.setPrivateKey=R):this._primeCode=8}Object.defineProperty(M.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=v(this.__prime,this.__gen)),this._primeCode}}),M.prototype.generateKeys=function(){return this._priv||(this._priv=new F(H(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},M.prototype.computeSecret=function(x){x=new F(x),x=x.toRed(this._prime);var g=x.redPow(this._priv).fromRed(),_=new Buffer(g.toArray()),p=this.getPrime();if(_.length<p.length){var m=new Buffer(p.length-_.length);m.fill(0),_=Buffer.concat([m,_])}return _},M.prototype.getPublicKey=function(x){return w(this._pub,x)},M.prototype.getPrivateKey=function(x){return w(this._priv,x)},M.prototype.getPrime=function(x){return w(this.__prime,x)},M.prototype.getGenerator=function(x){return w(this._gen,x)},M.prototype.setGenerator=function(x,g){return g=g||"utf8",Buffer.isBuffer(x)||(x=new Buffer(x,g)),this.__gen=x,this._gen=new F(x),this};function w(x,g){var _=new Buffer(x.toArray());return g?_.toString(g):_}}),UY=Z0((Y)=>{var q=y3(),F=VY(),O=JY();function Z(C){var B=new Buffer(F[C].prime,"hex"),D=new Buffer(F[C].gen,"hex");return new O(B,D)}var N={binary:!0,hex:!0,base64:!0};function V(C,B,D,L){return Buffer.isBuffer(B)||N[B]===void 0?V(C,"binary",B,D):(B=B||"binary",L=L||"binary",D=D||new Buffer([2]),Buffer.isBuffer(D)||(D=new Buffer(D,L)),typeof C=="number"?new O(q(C,D),D,!0):(Buffer.isBuffer(C)||(C=new Buffer(C,B)),new O(C,D,!0)))}Y.DiffieHellmanGroup=Y.createDiffieHellmanGroup=Y.getDiffieHellman=Z,Y.createDiffieHellman=Y.DiffieHellman=V}),_3=Z0((Y,q)=>{q.exports=x8().EventEmitter}),FY=Z0((Y,q)=>{function F(M,w){var x=Object.keys(M);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(M);w&&(g=g.filter(function(_){return Object.getOwnPropertyDescriptor(M,_).enumerable})),x.push.apply(x,g)}return x}function O(M){for(var w=1;w<arguments.length;w++){var x=arguments[w]!=null?arguments[w]:{};w%2?F(Object(x),!0).forEach(function(g){Z(M,g,x[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(x)):F(Object(x)).forEach(function(g){Object.defineProperty(M,g,Object.getOwnPropertyDescriptor(x,g))})}return M}function Z(M,w,x){return w=B(w),(w in M)?Object.defineProperty(M,w,{value:x,enumerable:!0,configurable:!0,writable:!0}):M[w]=x,M}function N(M,w){if(!(M instanceof w))throw new TypeError("Cannot call a class as a function")}function V(M,w){for(var x=0;x<w.length;x++){var g=w[x];g.enumerable=g.enumerable||!1,g.configurable=!0,("value"in g)&&(g.writable=!0),Object.defineProperty(M,B(g.key),g)}}function C(M,w,x){return w&&V(M.prototype,w),x&&V(M,x),Object.defineProperty(M,"prototype",{writable:!1}),M}function B(M){var w=D(M,"string");return typeof w=="symbol"?w:String(w)}function D(M,w){if(typeof M!="object"||M===null)return M;var x=M[Symbol.toPrimitive];if(x!==void 0){var g=x.call(M,w||"default");if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(M)}var L=R6(),H=L.Buffer,P=O7(),R=P.inspect,k=R&&R.custom||"inspect";function v(M,w,x){H.prototype.copy.call(M,w,x)}q.exports=function(){function M(){N(this,M),this.head=null,this.tail=null,this.length=0}return C(M,[{key:"push",value:function(w){var x={data:w,next:null};this.length>0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(w){var x={data:w,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(w){if(this.length===0)return"";for(var x=this.head,g=""+x.data;x=x.next;)g+=w+x.data;return g}},{key:"concat",value:function(w){if(this.length===0)return H.alloc(0);for(var x=H.allocUnsafe(w>>>0),g=this.head,_=0;g;)v(g.data,x,_),_+=g.data.length,g=g.next;return x}},{key:"consume",value:function(w,x){var g;return w<this.head.data.length?(g=this.head.data.slice(0,w),this.head.data=this.head.data.slice(w)):w===this.head.data.length?g=this.shift():g=x?this._getString(w):this._getBuffer(w),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(w){var x=this.head,g=1,_=x.data;for(w-=_.length;x=x.next;){var p=x.data,m=w>p.length?p.length:w;if(m===p.length?_+=p:_+=p.slice(0,w),w-=m,w===0){m===p.length?(++g,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=p.slice(m));break}++g}return this.length-=g,_}},{key:"_getBuffer",value:function(w){var x=H.allocUnsafe(w),g=this.head,_=1;for(g.data.copy(x),w-=g.data.length;g=g.next;){var p=g.data,m=w>p.length?p.length:w;if(p.copy(x,x.length-w,0,m),w-=m,w===0){m===p.length?(++_,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=p.slice(m));break}++_}return this.length-=_,x}},{key:k,value:function(w,x){return R(this,O(O({},x),{},{depth:0,customInspect:!1}))}}]),M}()}),m3=Z0((Y,q)=>{function F(B,D){var L=this,H=this._readableState&&this._readableState.destroyed,P=this._writableState&&this._writableState.destroyed;return H||P?(D?D(B):B&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(V,this,B)):process.nextTick(V,this,B)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(B||null,function(R){!D&&R?L._writableState?L._writableState.errorEmitted?process.nextTick(Z,L):(L._writableState.errorEmitted=!0,process.nextTick(O,L,R)):process.nextTick(O,L,R):D?(process.nextTick(Z,L),D(R)):process.nextTick(Z,L)}),this)}function O(B,D){V(B,D),Z(B)}function Z(B){B._writableState&&!B._writableState.emitClose||B._readableState&&!B._readableState.emitClose||B.emit("close")}function N(){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 V(B,D){B.emit("error",D)}function C(B,D){var{_readableState:L,_writableState:H}=B;L&&L.autoDestroy||H&&H.autoDestroy?B.destroy(D):B.emit("error",D)}q.exports={destroy:F,undestroy:N,errorOrDestroy:C}}),G1=Z0((Y,q)=>{function F(D,L){D.prototype=Object.create(L.prototype),D.prototype.constructor=D,D.__proto__=L}var O={};function Z(D,L,H){H||(H=Error);function P(k,v,M){return typeof L=="string"?L:L(k,v,M)}var R=function(k){F(v,k);function v(M,w,x){return k.call(this,P(M,w,x))||this}return v}(H);R.prototype.name=H.name,R.prototype.code=D,O[D]=R}function N(D,L){if(Array.isArray(D)){var H=D.length;return D=D.map(function(P){return String(P)}),H>2?"one of ".concat(L," ").concat(D.slice(0,H-1).join(", "),", or ")+D[H-1]:H===2?"one of ".concat(L," ").concat(D[0]," or ").concat(D[1]):"of ".concat(L," ").concat(D[0])}else return"of ".concat(L," ").concat(String(D))}function V(D,L,H){return D.substr(!H||H<0?0:+H,L.length)===L}function C(D,L,H){return(H===void 0||H>D.length)&&(H=D.length),D.substring(H-L.length,H)===L}function B(D,L,H){return typeof H!="number"&&(H=0),H+L.length>D.length?!1:D.indexOf(L,H)!==-1}Z("ERR_INVALID_OPT_VALUE",function(D,L){return'The value "'+L+'" is invalid for option "'+D+'"'},TypeError),Z("ERR_INVALID_ARG_TYPE",function(D,L,H){var P;typeof L=="string"&&V(L,"not ")?(P="must not be",L=L.replace(/^not /,"")):P="must be";var R;if(C(D," argument"))R="The ".concat(D," ").concat(P," ").concat(N(L,"type"));else{var k=B(D,".")?"property":"argument";R='The "'.concat(D,'" ').concat(k," ").concat(P," ").concat(N(L,"type"))}return R+=". Received type ".concat(typeof H),R},TypeError),Z("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Z("ERR_METHOD_NOT_IMPLEMENTED",function(D){return"The "+D+" method is not implemented"}),Z("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Z("ERR_STREAM_DESTROYED",function(D){return"Cannot call "+D+" after a stream was destroyed"}),Z("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Z("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Z("ERR_STREAM_WRITE_AFTER_END","write after end"),Z("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Z("ERR_UNKNOWN_ENCODING",function(D){return"Unknown encoding: "+D},TypeError),Z("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),q.exports.codes=O}),p3=Z0((Y,q)=>{var F=G1().codes.ERR_INVALID_OPT_VALUE;function O(N,V,C){return N.highWaterMark!=null?N.highWaterMark:V?N[C]:null}function Z(N,V,C,B){var D=O(V,B,C);if(D!=null){if(!(isFinite(D)&&Math.floor(D)===D)||D<0){var L=B?C:"highWaterMark";throw new F(L,D)}return Math.floor(D)}return N.objectMode?16:16384}q.exports={getHighWaterMark:Z}}),b3=Z0((Y,q)=>{q.exports=d;function F(l){var h=this;this.next=null,this.entry=null,this.finish=function(){t(h,l)}}var O;d.WritableState=s;var Z={deprecate:X3()},N=_3(),V=R6().Buffer,C=(typeof window<"u"?window:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B(l){return V.from(l)}function D(l){return V.isBuffer(l)||l instanceof C}var L=m3(),H=p3(),P=H.getHighWaterMark,R=G1().codes,k=R.ERR_INVALID_ARG_TYPE,v=R.ERR_METHOD_NOT_IMPLEMENTED,M=R.ERR_MULTIPLE_CALLBACK,w=R.ERR_STREAM_CANNOT_PIPE,x=R.ERR_STREAM_DESTROYED,g=R.ERR_STREAM_NULL_VALUES,_=R.ERR_STREAM_WRITE_AFTER_END,p=R.ERR_UNKNOWN_ENCODING,m=L.errorOrDestroy;h0()(d,N);function f(){}function s(l,h,n){O=O||i8(),l=l||{},typeof n!="boolean"&&(n=h instanceof O),this.objectMode=!!l.objectMode,n&&(this.objectMode=this.objectMode||!!l.writableObjectMode),this.highWaterMark=P(this,l,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q0=l.decodeStrings===!1;this.decodeStrings=!q0,this.defaultEncoding=l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G0){j(h,G0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=l.emitClose!==!1,this.autoDestroy=!!l.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new F(this)}s.prototype.getBuffer=function(){for(var l=this.bufferedRequest,h=[];l;)h.push(l),l=l.next;return h},function(){try{Object.defineProperty(s.prototype,"buffer",{get:Z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Q0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Q0=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(l){return Q0.call(this,l)?!0:this!==d?!1:l&&l._writableState instanceof s}})):Q0=function(l){return l instanceof this};function d(l){O=O||i8();var h=this instanceof O;if(!h&&!Q0.call(d,this))return new d(l);this._writableState=new s(l,this,h),this.writable=!0,l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final)),N.call(this)}d.prototype.pipe=function(){m(this,new w)};function K0(l,h){var n=new _;m(l,n),process.nextTick(h,n)}function Q(l,h,n,q0){var G0;return n===null?G0=new g:typeof n!="string"&&!h.objectMode&&(G0=new k("chunk",["string","Buffer"],n)),G0?(m(l,G0),process.nextTick(q0,G0),!1):!0}d.prototype.write=function(l,h,n){var q0=this._writableState,G0=!1,F0=!q0.objectMode&&D(l);return F0&&!V.isBuffer(l)&&(l=B(l)),typeof h=="function"&&(n=h,h=null),F0?h="buffer":h||(h=q0.defaultEncoding),typeof n!="function"&&(n=f),q0.ending?K0(this,n):(F0||Q(this,q0,l,n))&&(q0.pendingcb++,G0=J(this,q0,F0,l,h,n)),G0},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var l=this._writableState;l.corked&&(l.corked--,!l.writing&&!l.corked&&!l.bufferProcessing&&l.bufferedRequest&&z(this,l))},d.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new p(l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(l,h,n){return!l.objectMode&&l.decodeStrings!==!1&&typeof h=="string"&&(h=V.from(h,n)),h}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J(l,h,n,q0,G0,F0){if(!n){var b=G(h,q0,G0);q0!==b&&(n=!0,G0="buffer",q0=b)}var E=h.objectMode?1:q0.length;h.length+=E;var u=h.length<h.highWaterMark;if(u||(h.needDrain=!0),h.writing||h.corked){var e=h.lastBufferedRequest;h.lastBufferedRequest={chunk:q0,encoding:G0,isBuf:n,callback:F0,next:null},e?e.next=h.lastBufferedRequest:h.bufferedRequest=h.lastBufferedRequest,h.bufferedRequestCount+=1}else X(l,h,!1,E,q0,G0,F0);return u}function X(l,h,n,q0,G0,F0,b){h.writelen=q0,h.writecb=b,h.writing=!0,h.sync=!0,h.destroyed?h.onwrite(new x("write")):n?l._writev(G0,h.onwrite):l._write(G0,F0,h.onwrite),h.sync=!1}function U(l,h,n,q0,G0){--h.pendingcb,n?(process.nextTick(G0,q0),process.nextTick(r,l,h),l._writableState.errorEmitted=!0,m(l,q0)):(G0(q0),l._writableState.errorEmitted=!0,m(l,q0),r(l,h))}function $(l){l.writing=!1,l.writecb=null,l.length-=l.writelen,l.writelen=0}function j(l,h){var n=l._writableState,q0=n.sync,G0=n.writecb;if(typeof G0!="function")throw new M;if($(n),h)U(l,n,q0,h,G0);else{var F0=A(n)||l.destroyed;!F0&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&z(l,n),q0?process.nextTick(K,l,n,F0,G0):K(l,n,F0,G0)}}function K(l,h,n,q0){n||W(l,h),h.pendingcb--,q0(),r(l,h)}function W(l,h){h.length===0&&h.needDrain&&(h.needDrain=!1,l.emit("drain"))}function z(l,h){h.bufferProcessing=!0;var n=h.bufferedRequest;if(l._writev&&n&&n.next){var q0=h.bufferedRequestCount,G0=new Array(q0),F0=h.corkedRequestsFree;F0.entry=n;for(var b=0,E=!0;n;)G0[b]=n,n.isBuf||(E=!1),n=n.next,b+=1;G0.allBuffers=E,X(l,h,!0,h.length,G0,"",F0.finish),h.pendingcb++,h.lastBufferedRequest=null,F0.next?(h.corkedRequestsFree=F0.next,F0.next=null):h.corkedRequestsFree=new F(h),h.bufferedRequestCount=0}else{for(;n;){var{chunk:u,encoding:e,callback:V0}=n,W0=h.objectMode?1:u.length;if(X(l,h,!1,W0,u,e,V0),n=n.next,h.bufferedRequestCount--,h.writing)break}n===null&&(h.lastBufferedRequest=null)}h.bufferedRequest=n,h.bufferProcessing=!1}d.prototype._write=function(l,h,n){n(new v("_write()"))},d.prototype._writev=null,d.prototype.end=function(l,h,n){var q0=this._writableState;return typeof l=="function"?(n=l,l=null,h=null):typeof h=="function"&&(n=h,h=null),l!=null&&this.write(l,h),q0.corked&&(q0.corked=1,this.uncork()),q0.ending||a(this,q0,n),this},Object.defineProperty(d.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A(l){return l.ending&&l.length===0&&l.bufferedRequest===null&&!l.finished&&!l.writing}function T(l,h){l._final(function(n){h.pendingcb--,n&&m(l,n),h.prefinished=!0,l.emit("prefinish"),r(l,h)})}function y(l,h){!h.prefinished&&!h.finalCalled&&(typeof l._final=="function"&&!h.destroyed?(h.pendingcb++,h.finalCalled=!0,process.nextTick(T,l,h)):(h.prefinished=!0,l.emit("prefinish")))}function r(l,h){var n=A(h);if(n&&(y(l,h),h.pendingcb===0&&(h.finished=!0,l.emit("finish"),h.autoDestroy))){var q0=l._readableState;(!q0||q0.autoDestroy&&q0.endEmitted)&&l.destroy()}return n}function a(l,h,n){h.ending=!0,r(l,h),n&&(h.finished?process.nextTick(n):l.once("finish",n)),h.ended=!0,l.writable=!1}function t(l,h,n){var q0=l.entry;for(l.entry=null;q0;){var G0=q0.callback;h.pendingcb--,G0(n),q0=q0.next}h.corkedRequestsFree.next=l}Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(l){!this._writableState||(this._writableState.destroyed=l)}}),d.prototype.destroy=L.destroy,d.prototype._undestroy=L.undestroy,d.prototype._destroy=function(l,h){h(l)}}),i8=Z0((Y,q)=>{var F=Object.keys||function(H){var P=[];for(var R in H)P.push(R);return P};q.exports=B;var O=h3(),Z=b3();h0()(B,O);for(N=F(Z.prototype),C=0;C<N.length;C++)V=N[C],B.prototype[V]||(B.prototype[V]=Z.prototype[V]);var N,V,C;function B(H){if(!(this instanceof B))return new B(H);O.call(this,H),Z.call(this,H),this.allowHalfOpen=!0,H&&(H.readable===!1&&(this.readable=!1),H.writable===!1&&(this.writable=!1),H.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",D)))}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function D(){this._writableState.ended||process.nextTick(L,this)}function L(H){H.end()}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(H){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=H,this._writableState.destroyed=H)}})}),f5=Z0((Y,q)=>{var F=G1().codes.ERR_STREAM_PREMATURE_CLOSE;function O(C){var B=!1;return function(){if(!B){B=!0;for(var D=arguments.length,L=new Array(D),H=0;H<D;H++)L[H]=arguments[H];C.apply(this,L)}}}function Z(){}function N(C){return C.setHeader&&typeof C.abort=="function"}function V(C,B,D){if(typeof B=="function")return V(C,null,B);B||(B={}),D=O(D||Z);var L=B.readable||B.readable!==!1&&C.readable,H=B.writable||B.writable!==!1&&C.writable,P=function(){C.writable||k()},R=C._writableState&&C._writableState.finished,k=function(){H=!1,R=!0,L||D.call(C)},v=C._readableState&&C._readableState.endEmitted,M=function(){L=!1,v=!0,H||D.call(C)},w=function(_){D.call(C,_)},x=function(){var _;if(L&&!v)return(!C._readableState||!C._readableState.ended)&&(_=new F),D.call(C,_);if(H&&!R)return(!C._writableState||!C._writableState.ended)&&(_=new F),D.call(C,_)},g=function(){C.req.on("finish",k)};return N(C)?(C.on("complete",k),C.on("abort",x),C.req?g():C.on("request",g)):H&&!C._writableState&&(C.on("end",P),C.on("close",P)),C.on("end",M),C.on("finish",k),B.error!==!1&&C.on("error",w),C.on("close",x),function(){C.removeListener("complete",k),C.removeListener("abort",x),C.removeListener("request",g),C.req&&C.req.removeListener("finish",k),C.removeListener("end",P),C.removeListener("close",P),C.removeListener("finish",k),C.removeListener("end",M),C.removeListener("error",w),C.removeListener("close",x)}}q.exports=V}),KY=Z0((Y,q)=>{var F;function O(p,m,f){return m=Z(m),(m in p)?Object.defineProperty(p,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):p[m]=f,p}function Z(p){var m=N(p,"string");return typeof m=="symbol"?m:String(m)}function N(p,m){if(typeof p!="object"||p===null)return p;var f=p[Symbol.toPrimitive];if(f!==void 0){var s=f.call(p,m||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var V=f5(),C=Symbol("lastResolve"),B=Symbol("lastReject"),D=Symbol("error"),L=Symbol("ended"),H=Symbol("lastPromise"),P=Symbol("handlePromise"),R=Symbol("stream");function k(p,m){return{value:p,done:m}}function v(p){var m=p[C];if(m!==null){var f=p[R].read();f!==null&&(p[H]=null,p[C]=null,p[B]=null,m(k(f,!1)))}}function M(p){process.nextTick(v,p)}function w(p,m){return function(f,s){p.then(function(){if(m[L]){f(k(void 0,!0));return}m[P](f,s)},s)}}var x=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((F={get stream(){return this[R]},next:function(){var p=this,m=this[D];if(m!==null)return Promise.reject(m);if(this[L])return Promise.resolve(k(void 0,!0));if(this[R].destroyed)return new Promise(function(d,K0){process.nextTick(function(){p[D]?K0(p[D]):d(k(void 0,!0))})});var f=this[H],s;if(f)s=new Promise(w(f,this));else{var Q0=this[R].read();if(Q0!==null)return Promise.resolve(k(Q0,!1));s=new Promise(this[P])}return this[H]=s,s}},O(F,Symbol.asyncIterator,function(){return this}),O(F,"return",function(){var p=this;return new Promise(function(m,f){p[R].destroy(null,function(s){if(s){f(s);return}m(k(void 0,!0))})})}),F),x),_=function(p){var m,f=Object.create(g,(m={},O(m,R,{value:p,writable:!0}),O(m,C,{value:null,writable:!0}),O(m,B,{value:null,writable:!0}),O(m,D,{value:null,writable:!0}),O(m,L,{value:p._readableState.endEmitted,writable:!0}),O(m,P,{value:function(s,Q0){var d=f[R].read();d?(f[H]=null,f[C]=null,f[B]=null,s(k(d,!1))):(f[C]=s,f[B]=Q0)},writable:!0}),m));return f[H]=null,V(p,function(s){if(s&&s.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q0=f[B];Q0!==null&&(f[H]=null,f[C]=null,f[B]=null,Q0(s)),f[D]=s;return}var d=f[C];d!==null&&(f[H]=null,f[C]=null,f[B]=null,d(k(void 0,!0))),f[L]=!0}),p.on("readable",M.bind(null,f)),f};q.exports=_}),zY=Z0((Y,q)=>{q.exports=function(){throw new Error("Readable.from is not available in the browser")}}),h3=Z0((Y,q)=>{q.exports=Q;var F;Q.ReadableState=K0;var O=x8().EventEmitter,Z=function(b,E){return b.listeners(E).length},N=_3(),V=R6().Buffer,C=(typeof window<"u"?window:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B(b){return V.from(b)}function D(b){return V.isBuffer(b)||b instanceof C}var L=O7(),H;L&&L.debuglog?H=L.debuglog("stream"):H=function(){};var P=FY(),R=m3(),k=p3(),v=k.getHighWaterMark,M=G1().codes,w=M.ERR_INVALID_ARG_TYPE,x=M.ERR_STREAM_PUSH_AFTER_EOF,g=M.ERR_METHOD_NOT_IMPLEMENTED,_=M.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,p,m,f;h0()(Q,N);var s=R.errorOrDestroy,Q0=["error","close","destroy","pause","resume"];function d(b,E,u){if(typeof b.prependListener=="function")return b.prependListener(E,u);!b._events||!b._events[E]?b.on(E,u):Array.isArray(b._events[E])?b._events[E].unshift(u):b._events[E]=[u,b._events[E]]}function K0(b,E,u){F=F||i8(),b=b||{},typeof u!="boolean"&&(u=E instanceof F),this.objectMode=!!b.objectMode,u&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.highWaterMark=v(this,b,"readableHighWaterMark",u),this.buffer=new P,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=b.emitClose!==!1,this.autoDestroy=!!b.autoDestroy,this.destroyed=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(p||(p=(j7(),g6(x1)).StringDecoder),this.decoder=new p(b.encoding),this.encoding=b.encoding)}function Q(b){if(F=F||i8(),!(this instanceof Q))return new Q(b);var E=this instanceof F;this._readableState=new K0(b,this,E),this.readable=!0,b&&(typeof b.read=="function"&&(this._read=b.read),typeof b.destroy=="function"&&(this._destroy=b.destroy)),N.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(b){!this._readableState||(this._readableState.destroyed=b)}}),Q.prototype.destroy=R.destroy,Q.prototype._undestroy=R.undestroy,Q.prototype._destroy=function(b,E){E(b)},Q.prototype.push=function(b,E){var u=this._readableState,e;return u.objectMode?e=!0:typeof b=="string"&&(E=E||u.defaultEncoding,E!==u.encoding&&(b=V.from(b,E),E=""),e=!0),G(this,b,E,!1,e)},Q.prototype.unshift=function(b){return G(this,b,null,!0,!1)};function G(b,E,u,e,V0){H("readableAddChunk",E);var W0=b._readableState;if(E===null)W0.reading=!1,K(b,W0);else{var J0;if(V0||(J0=X(W0,E)),J0)s(b,J0);else if(W0.objectMode||E&&E.length>0)if(typeof E!="string"&&!W0.objectMode&&Object.getPrototypeOf(E)!==V.prototype&&(E=B(E)),e)W0.endEmitted?s(b,new _):J(b,W0,E,!0);else if(W0.ended)s(b,new x);else{if(W0.destroyed)return!1;W0.reading=!1,W0.decoder&&!u?(E=W0.decoder.write(E),W0.objectMode||E.length!==0?J(b,W0,E,!1):A(b,W0)):J(b,W0,E,!1)}else e||(W0.reading=!1,A(b,W0))}return!W0.ended&&(W0.length<W0.highWaterMark||W0.length===0)}function J(b,E,u,e){E.flowing&&E.length===0&&!E.sync?(E.awaitDrain=0,b.emit("data",u)):(E.length+=E.objectMode?1:u.length,e?E.buffer.unshift(u):E.buffer.push(u),E.needReadable&&W(b)),A(b,E)}function X(b,E){var u;return!D(E)&&typeof E!="string"&&E!==void 0&&!b.objectMode&&(u=new w("chunk",["string","Buffer","Uint8Array"],E)),u}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(b){p||(p=(j7(),g6(x1)).StringDecoder);var E=new p(b);this._readableState.decoder=E,this._readableState.encoding=this._readableState.decoder.encoding;for(var u=this._readableState.buffer.head,e="";u!==null;)e+=E.write(u.data),u=u.next;return this._readableState.buffer.clear(),e!==""&&this._readableState.buffer.push(e),this._readableState.length=e.length,this};var U=1073741824;function $(b){return b>=U?b=U:(b--,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,b|=b>>>16,b++),b}function j(b,E){return b<=0||E.length===0&&E.ended?0:E.objectMode?1:b!==b?E.flowing&&E.length?E.buffer.head.data.length:E.length:(b>E.highWaterMark&&(E.highWaterMark=$(b)),b<=E.length?b:E.ended?E.length:(E.needReadable=!0,0))}Q.prototype.read=function(b){H("read",b),b=parseInt(b,10);var E=this._readableState,u=b;if(b!==0&&(E.emittedReadable=!1),b===0&&E.needReadable&&((E.highWaterMark!==0?E.length>=E.highWaterMark:E.length>0)||E.ended))return H("read: emitReadable",E.length,E.ended),E.length===0&&E.ended?q0(this):W(this),null;if(b=j(b,E),b===0&&E.ended)return E.length===0&&q0(this),null;var e=E.needReadable;H("need readable",e),(E.length===0||E.length-b<E.highWaterMark)&&(e=!0,H("length less than watermark",e)),E.ended||E.reading?(e=!1,H("reading or ended",e)):e&&(H("do read"),E.reading=!0,E.sync=!0,E.length===0&&(E.needReadable=!0),this._read(E.highWaterMark),E.sync=!1,E.reading||(b=j(u,E)));var V0;return b>0?V0=n(b,E):V0=null,V0===null?(E.needReadable=E.length<=E.highWaterMark,b=0):(E.length-=b,E.awaitDrain=0),E.length===0&&(E.ended||(E.needReadable=!0),u!==b&&E.ended&&q0(this)),V0!==null&&this.emit("data",V0),V0};function K(b,E){if(H("onEofChunk"),!E.ended){if(E.decoder){var u=E.decoder.end();u&&u.length&&(E.buffer.push(u),E.length+=E.objectMode?1:u.length)}E.ended=!0,E.sync?W(b):(E.needReadable=!1,E.emittedReadable||(E.emittedReadable=!0,z(b)))}}function W(b){var E=b._readableState;H("emitReadable",E.needReadable,E.emittedReadable),E.needReadable=!1,E.emittedReadable||(H("emitReadable",E.flowing),E.emittedReadable=!0,process.nextTick(z,b))}function z(b){var E=b._readableState;H("emitReadable_",E.destroyed,E.length,E.ended),!E.destroyed&&(E.length||E.ended)&&(b.emit("readable"),E.emittedReadable=!1),E.needReadable=!E.flowing&&!E.ended&&E.length<=E.highWaterMark,h(b)}function A(b,E){E.readingMore||(E.readingMore=!0,process.nextTick(T,b,E))}function T(b,E){for(;!E.reading&&!E.ended&&(E.length<E.highWaterMark||E.flowing&&E.length===0);){var u=E.length;if(H("maybeReadMore read 0"),b.read(0),u===E.length)break}E.readingMore=!1}Q.prototype._read=function(b){s(this,new g("_read()"))},Q.prototype.pipe=function(b,E){var u=this,e=this._readableState;switch(e.pipesCount){case 0:e.pipes=b;break;case 1:e.pipes=[e.pipes,b];break;default:e.pipes.push(b);break}e.pipesCount+=1,H("pipe count=%d opts=%j",e.pipesCount,E);var V0=(!E||E.end!==!1)&&b!==process.stdout&&b!==process.stderr,W0=V0?Y0:c;e.endEmitted?process.nextTick(W0):u.once("end",W0),b.on("unpipe",J0);function J0(o,i){H("onunpipe"),o===u&&i&&i.hasUnpiped===!1&&(i.hasUnpiped=!0,$0())}function Y0(){H("onend"),b.end()}var X0=y(u);b.on("drain",X0);var g0=!1;function $0(){H("cleanup"),b.removeListener("close",I),b.removeListener("finish",S),b.removeListener("drain",X0),b.removeListener("error",_0),b.removeListener("unpipe",J0),u.removeListener("end",Y0),u.removeListener("end",c),u.removeListener("data",z0),g0=!0,e.awaitDrain&&(!b._writableState||b._writableState.needDrain)&&X0()}u.on("data",z0);function z0(o){H("ondata");var i=b.write(o);H("dest.write",i),i===!1&&((e.pipesCount===1&&e.pipes===b||e.pipesCount>1&&F0(e.pipes,b)!==-1)&&!g0&&(H("false write response, pause",e.awaitDrain),e.awaitDrain++),u.pause())}function _0(o){H("onerror",o),c(),b.removeListener("error",_0),Z(b,"error")===0&&s(b,o)}d(b,"error",_0);function I(){b.removeListener("finish",S),c()}b.once("close",I);function S(){H("onfinish"),b.removeListener("close",I),c()}b.once("finish",S);function c(){H("unpipe"),u.unpipe(b)}return b.emit("pipe",u),e.flowing||(H("pipe resume"),u.resume()),b};function y(b){return function(){var E=b._readableState;H("pipeOnDrain",E.awaitDrain),E.awaitDrain&&E.awaitDrain--,E.awaitDrain===0&&Z(b,"data")&&(E.flowing=!0,h(b))}}Q.prototype.unpipe=function(b){var E=this._readableState,u={hasUnpiped:!1};if(E.pipesCount===0)return this;if(E.pipesCount===1)return b&&b!==E.pipes?this:(b||(b=E.pipes),E.pipes=null,E.pipesCount=0,E.flowing=!1,b&&b.emit("unpipe",this,u),this);if(!b){var{pipes:e,pipesCount:V0}=E;E.pipes=null,E.pipesCount=0,E.flowing=!1;for(var W0=0;W0<V0;W0++)e[W0].emit("unpipe",this,{hasUnpiped:!1});return this}var J0=F0(E.pipes,b);return J0===-1?this:(E.pipes.splice(J0,1),E.pipesCount-=1,E.pipesCount===1&&(E.pipes=E.pipes[0]),b.emit("unpipe",this,u),this)},Q.prototype.on=function(b,E){var u=N.prototype.on.call(this,b,E),e=this._readableState;return b==="data"?(e.readableListening=this.listenerCount("readable")>0,e.flowing!==!1&&this.resume()):b==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,H("on readable",e.length,e.reading),e.length?W(this):e.reading||process.nextTick(a,this)),u},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(b,E){var u=N.prototype.removeListener.call(this,b,E);return b==="readable"&&process.nextTick(r,this),u},Q.prototype.removeAllListeners=function(b){var E=N.prototype.removeAllListeners.apply(this,arguments);return(b==="readable"||b===void 0)&&process.nextTick(r,this),E};function r(b){var E=b._readableState;E.readableListening=b.listenerCount("readable")>0,E.resumeScheduled&&!E.paused?E.flowing=!0:b.listenerCount("data")>0&&b.resume()}function a(b){H("readable nexttick read 0"),b.read(0)}Q.prototype.resume=function(){var b=this._readableState;return b.flowing||(H("resume"),b.flowing=!b.readableListening,t(this,b)),b.paused=!1,this};function t(b,E){E.resumeScheduled||(E.resumeScheduled=!0,process.nextTick(l,b,E))}function l(b,E){H("resume",E.reading),E.reading||b.read(0),E.resumeScheduled=!1,b.emit("resume"),h(b),E.flowing&&!E.reading&&b.read(0)}Q.prototype.pause=function(){return H("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(H("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function h(b){var E=b._readableState;for(H("flow",E.flowing);E.flowing&&b.read()!==null;);}Q.prototype.wrap=function(b){var E=this,u=this._readableState,e=!1;b.on("end",function(){if(H("wrapped end"),u.decoder&&!u.ended){var J0=u.decoder.end();J0&&J0.length&&E.push(J0)}E.push(null)}),b.on("data",function(J0){if(H("wrapped data"),u.decoder&&(J0=u.decoder.write(J0)),!(u.objectMode&&J0==null)&&!(!u.objectMode&&(!J0||!J0.length))){var Y0=E.push(J0);Y0||(e=!0,b.pause())}});for(var V0 in b)this[V0]===void 0&&typeof b[V0]=="function"&&(this[V0]=function(J0){return function(){return b[J0].apply(b,arguments)}}(V0));for(var W0=0;W0<Q0.length;W0++)b.on(Q0[W0],this.emit.bind(this,Q0[W0]));return this._read=function(J0){H("wrapped _read",J0),e&&(e=!1,b.resume())},this},typeof Symbol=="function"&&(Q.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=KY()),m(this)}),Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(b){this._readableState&&(this._readableState.flowing=b)}}),Q._fromList=n,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function n(b,E){if(E.length===0)return null;var u;return E.objectMode?u=E.buffer.shift():!b||b>=E.length?(E.decoder?u=E.buffer.join(""):E.buffer.length===1?u=E.buffer.first():u=E.buffer.concat(E.length),E.buffer.clear()):u=E.buffer.consume(b,E.decoder),u}function q0(b){var E=b._readableState;H("endReadable",E.endEmitted),E.endEmitted||(E.ended=!0,process.nextTick(G0,E,b))}function G0(b,E){if(H("endReadableNT",b.endEmitted,b.length),!b.endEmitted&&b.length===0&&(b.endEmitted=!0,E.readable=!1,E.emit("end"),b.autoDestroy)){var u=E._writableState;(!u||u.autoDestroy&&u.finished)&&E.destroy()}}typeof Symbol=="function"&&(Q.from=function(b,E){return f===void 0&&(f=zY()),f(Q,b,E)});function F0(b,E){for(var u=0,e=b.length;u<e;u++)if(b[u]===E)return u;return-1}}),c3=Z0((Y,q)=>{q.exports=D;var F=G1().codes,O=F.ERR_METHOD_NOT_IMPLEMENTED,Z=F.ERR_MULTIPLE_CALLBACK,N=F.ERR_TRANSFORM_ALREADY_TRANSFORMING,V=F.ERR_TRANSFORM_WITH_LENGTH_0,C=i8();h0()(D,C);function B(P,R){var k=this._transformState;k.transforming=!1;var v=k.writecb;if(v===null)return this.emit("error",new Z);k.writechunk=null,k.writecb=null,R!=null&&this.push(R),v(P);var M=this._readableState;M.reading=!1,(M.needReadable||M.length<M.highWaterMark)&&this._read(M.highWaterMark)}function D(P){if(!(this instanceof D))return new D(P);C.call(this,P),this._transformState={afterTransform:B.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,P&&(typeof P.transform=="function"&&(this._transform=P.transform),typeof P.flush=="function"&&(this._flush=P.flush)),this.on("prefinish",L)}function L(){var P=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(R,k){H(P,R,k)}):H(this,null,null)}D.prototype.push=function(P,R){return this._transformState.needTransform=!1,C.prototype.push.call(this,P,R)},D.prototype._transform=function(P,R,k){k(new O("_transform()"))},D.prototype._write=function(P,R,k){var v=this._transformState;if(v.writecb=k,v.writechunk=P,v.writeencoding=R,!v.transforming){var M=this._readableState;(v.needTransform||M.needReadable||M.length<M.highWaterMark)&&this._read(M.highWaterMark)}},D.prototype._read=function(P){var R=this._transformState;R.writechunk!==null&&!R.transforming?(R.transforming=!0,this._transform(R.writechunk,R.writeencoding,R.afterTransform)):R.needTransform=!0},D.prototype._destroy=function(P,R){C.prototype._destroy.call(this,P,function(k){R(k)})};function H(P,R,k){if(R)return P.emit("error",R);if(k!=null&&P.push(k),P._writableState.length)throw new V;if(P._transformState.transforming)throw new N;return P.push(null)}}),ZY=Z0((Y,q)=>{q.exports=O;var F=c3();h0()(O,F);function O(Z){if(!(this instanceof O))return new O(Z);F.call(this,Z)}O.prototype._transform=function(Z,N,V){V(null,Z)}}),$Y=Z0((Y,q)=>{var F;function O(k){var v=!1;return function(){v||(v=!0,k.apply(void 0,arguments))}}var Z=G1().codes,N=Z.ERR_MISSING_ARGS,V=Z.ERR_STREAM_DESTROYED;function C(k){if(k)throw k}function B(k){return k.setHeader&&typeof k.abort=="function"}function D(k,v,M,w){w=O(w);var x=!1;k.on("close",function(){x=!0}),F===void 0&&(F=f5()),F(k,{readable:v,writable:M},function(_){if(_)return w(_);x=!0,w()});var g=!1;return function(_){if(!x&&!g){if(g=!0,B(k))return k.abort();if(typeof k.destroy=="function")return k.destroy();w(_||new V("pipe"))}}}function L(k){k()}function H(k,v){return k.pipe(v)}function P(k){return!k.length||typeof k[k.length-1]!="function"?C:k.pop()}function R(){for(var k=arguments.length,v=new Array(k),M=0;M<k;M++)v[M]=arguments[M];var w=P(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new N("streams");var x,g=v.map(function(_,p){var m=p<v.length-1,f=p>0;return D(_,m,f,function(s){x||(x=s),s&&g.forEach(L),!m&&(g.forEach(L),w(x))})});return v.reduce(H)}q.exports=R}),qY=Z0((Y,q)=>{Y=q.exports=h3(),Y.Stream=Y,Y.Readable=Y,Y.Writable=b3(),Y.Duplex=i8(),Y.Transform=c3(),Y.PassThrough=ZY(),Y.finished=f5(),Y.pipeline=$Y()}),o5=Z0((Y,q)=>{(function(F,O){function Z(X,U){if(!X)throw new Error(U||"Assertion failed")}function N(X,U){X.super_=U;var $=function(){};$.prototype=U.prototype,X.prototype=new $,X.prototype.constructor=X}function V(X,U,$){if(V.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((U==="le"||U==="be")&&($=U,U=10),this._init(X||0,U||10,$||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(X){return X instanceof V?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===V.wordSize&&Array.isArray(X.words)},V.max=function(X,U){return X.cmp(U)>0?X:U},V.min=function(X,U){return X.cmp(U)<0?X:U},V.prototype._init=function(X,U,$){if(typeof X=="number")return this._initNumber(X,U,$);if(typeof X=="object")return this._initArray(X,U,$);U==="hex"&&(U=16),Z(U===(U|0)&&U>=2&&U<=36),X=X.toString().replace(/\s+/g,"");var j=0;X[0]==="-"&&(j++,this.negative=1),j<X.length&&(U===16?this._parseHex(X,j,$):(this._parseBase(X,U,j),$==="le"&&this._initArray(this.toArray(),U,$)))},V.prototype._initNumber=function(X,U,$){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):(Z(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),$==="le"&&this._initArray(this.toArray(),U,$)},V.prototype._initArray=function(X,U,$){if(Z(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 j=0;j<this.length;j++)this.words[j]=0;var K,W,z=0;if($==="be")for(j=X.length-1,K=0;j>=0;j-=3)W=X[j]|X[j-1]<<8|X[j-2]<<16,this.words[K]|=W<<z&67108863,this.words[K+1]=W>>>26-z&67108863,z+=24,z>=26&&(z-=26,K++);else if($==="le")for(j=0,K=0;j<X.length;j+=3)W=X[j]|X[j+1]<<8|X[j+2]<<16,this.words[K]|=W<<z&67108863,this.words[K+1]=W>>>26-z&67108863,z+=24,z>=26&&(z-=26,K++);return this._strip()};function B(X,U){var $=X.charCodeAt(U);if($>=48&&$<=57)return $-48;if($>=65&&$<=70)return $-55;if($>=97&&$<=102)return $-87;Z(!1,"Invalid character in "+X)}function D(X,U,$){var j=B(X,$);return $-1>=U&&(j|=B(X,$-1)<<4),j}V.prototype._parseHex=function(X,U,$){this.length=Math.ceil((X.length-U)/6),this.words=new Array(this.length);for(var j=0;j<this.length;j++)this.words[j]=0;var K=0,W=0,z;if($==="be")for(j=X.length-1;j>=U;j-=2)z=D(X,U,j)<<K,this.words[W]|=z&67108863,K>=18?(K-=18,W+=1,this.words[W]|=z>>>26):K+=8;else{var A=X.length-U;for(j=A%2===0?U+1:U;j<X.length;j+=2)z=D(X,U,j)<<K,this.words[W]|=z&67108863,K>=18?(K-=18,W+=1,this.words[W]|=z>>>26):K+=8}this._strip()};function L(X,U,$,j){for(var K=0,W=0,z=Math.min(X.length,$),A=U;A<z;A++){var T=X.charCodeAt(A)-48;K*=j,T>=49?W=T-49+10:T>=17?W=T-17+10:W=T,Z(T>=0&&W<j,"Invalid character"),K+=W}return K}V.prototype._parseBase=function(X,U,$){this.words=[0],this.length=1;for(var j=0,K=1;K<=67108863;K*=U)j++;j--,K=K/U|0;for(var W=X.length-$,z=W%j,A=Math.min(W,W-z)+$,T=0,y=$;y<A;y+=j)T=L(X,y,y+j,U),this.imuln(K),this.words[0]+T<67108864?this.words[0]+=T:this._iaddn(T);if(z!==0){var r=1;for(T=L(X,y,X.length,U),y=0;y<z;y++)r*=U;this.imuln(r),this.words[0]+T<67108864?this.words[0]+=T:this._iaddn(T)}this._strip()},V.prototype.copy=function(X){X.words=new Array(this.length);for(var U=0;U<this.length;U++)X.words[U]=this.words[U];X.length=this.length,X.negative=this.negative,X.red=this.red};function H(X,U){X.words=U.words,X.length=U.length,X.negative=U.negative,X.red=U.red}if(V.prototype._move=function(X){H(X,this)},V.prototype.clone=function(){var X=new V(null);return this.copy(X),X},V.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},V.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{V.prototype[Symbol.for("nodejs.util.inspect.custom")]=P}catch{V.prototype.inspect=P}else V.prototype.inspect=P;function P(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var R=["","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"],k=[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],v=[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];V.prototype.toString=function(X,U){X=X||10,U=U|0||1;var $;if(X===16||X==="hex"){$="";for(var j=0,K=0,W=0;W<this.length;W++){var z=this.words[W],A=((z<<j|K)&16777215).toString(16);K=z>>>24-j&16777215,j+=2,j>=26&&(j-=26,W--),K!==0||W!==this.length-1?$=R[6-A.length]+A+$:$=A+$}for(K!==0&&($=K.toString(16)+$);$.length%U!==0;)$="0"+$;return this.negative!==0&&($="-"+$),$}if(X===(X|0)&&X>=2&&X<=36){var T=k[X],y=v[X];$="";var r=this.clone();for(r.negative=0;!r.isZero();){var a=r.modrn(y).toString(X);r=r.idivn(y),r.isZero()?$=a+$:$=R[T-a.length]+a+$}for(this.isZero()&&($="0"+$);$.length%U!==0;)$="0"+$;return this.negative!==0&&($="-"+$),$}Z(!1,"Base should be between 2 and 36")},V.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&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},V.prototype.toJSON=function(){return this.toString(16,2)},C&&(V.prototype.toBuffer=function(X,U){return this.toArrayLike(C,X,U)}),V.prototype.toArray=function(X,U){return this.toArrayLike(Array,X,U)};var M=function(X,U){return X.allocUnsafe?X.allocUnsafe(U):new X(U)};V.prototype.toArrayLike=function(X,U,$){this._strip();var j=this.byteLength(),K=$||Math.max(1,j);Z(j<=K,"byte array longer than desired length"),Z(K>0,"Requested array length <= 0");var W=M(X,K),z=U==="le"?"LE":"BE";return this["_toArrayLike"+z](W,j),W},V.prototype._toArrayLikeLE=function(X,U){for(var $=0,j=0,K=0,W=0;K<this.length;K++){var z=this.words[K]<<W|j;X[$++]=z&255,$<X.length&&(X[$++]=z>>8&255),$<X.length&&(X[$++]=z>>16&255),W===6?($<X.length&&(X[$++]=z>>24&255),j=0,W=0):(j=z>>>24,W+=2)}if($<X.length)for(X[$++]=j;$<X.length;)X[$++]=0},V.prototype._toArrayLikeBE=function(X,U){for(var $=X.length-1,j=0,K=0,W=0;K<this.length;K++){var z=this.words[K]<<W|j;X[$--]=z&255,$>=0&&(X[$--]=z>>8&255),$>=0&&(X[$--]=z>>16&255),W===6?($>=0&&(X[$--]=z>>24&255),j=0,W=0):(j=z>>>24,W+=2)}if($>=0)for(X[$--]=j;$>=0;)X[$--]=0},Math.clz32?V.prototype._countBits=function(X){return 32-Math.clz32(X)}:V.prototype._countBits=function(X){var U=X,$=0;return U>=4096&&($+=13,U>>>=13),U>=64&&($+=7,U>>>=7),U>=8&&($+=4,U>>>=4),U>=2&&($+=2,U>>>=2),$+U},V.prototype._zeroBits=function(X){if(X===0)return 26;var U=X,$=0;return(U&8191)===0&&($+=13,U>>>=13),(U&127)===0&&($+=7,U>>>=7),(U&15)===0&&($+=4,U>>>=4),(U&3)===0&&($+=2,U>>>=2),(U&1)===0&&$++,$},V.prototype.bitLength=function(){var X=this.words[this.length-1],U=this._countBits(X);return(this.length-1)*26+U};function w(X){for(var U=new Array(X.bitLength()),$=0;$<U.length;$++){var j=$/26|0,K=$%26;U[$]=X.words[j]>>>K&1}return U}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,U=0;U<this.length;U++){var $=this._zeroBits(this.words[U]);if(X+=$,$!==26)break}return X},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},V.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var U=0;U<X.length;U++)this.words[U]=this.words[U]|X.words[U];return this._strip()},V.prototype.ior=function(X){return Z((this.negative|X.negative)===0),this.iuor(X)},V.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},V.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},V.prototype.iuand=function(X){var U;this.length>X.length?U=X:U=this;for(var $=0;$<U.length;$++)this.words[$]=this.words[$]&X.words[$];return this.length=U.length,this._strip()},V.prototype.iand=function(X){return Z((this.negative|X.negative)===0),this.iuand(X)},V.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},V.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},V.prototype.iuxor=function(X){var U,$;this.length>X.length?(U=this,$=X):(U=X,$=this);for(var j=0;j<$.length;j++)this.words[j]=U.words[j]^$.words[j];if(this!==U)for(;j<U.length;j++)this.words[j]=U.words[j];return this.length=U.length,this._strip()},V.prototype.ixor=function(X){return Z((this.negative|X.negative)===0),this.iuxor(X)},V.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},V.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},V.prototype.inotn=function(X){Z(typeof X=="number"&&X>=0);var U=Math.ceil(X/26)|0,$=X%26;this._expand(U),$>0&&U--;for(var j=0;j<U;j++)this.words[j]=~this.words[j]&67108863;return $>0&&(this.words[j]=~this.words[j]&67108863>>26-$),this._strip()},V.prototype.notn=function(X){return this.clone().inotn(X)},V.prototype.setn=function(X,U){Z(typeof X=="number"&&X>=0);var $=X/26|0,j=X%26;return this._expand($+1),U?this.words[$]=this.words[$]|1<<j:this.words[$]=this.words[$]&~(1<<j),this._strip()},V.prototype.iadd=function(X){var U;if(this.negative!==0&&X.negative===0)return this.negative=0,U=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,U=this.isub(X),X.negative=1,U._normSign();var $,j;this.length>X.length?($=this,j=X):($=X,j=this);for(var K=0,W=0;W<j.length;W++)U=($.words[W]|0)+(j.words[W]|0)+K,this.words[W]=U&67108863,K=U>>>26;for(;K!==0&&W<$.length;W++)U=($.words[W]|0)+K,this.words[W]=U&67108863,K=U>>>26;if(this.length=$.length,K!==0)this.words[this.length]=K,this.length++;else if($!==this)for(;W<$.length;W++)this.words[W]=$.words[W];return this},V.prototype.add=function(X){var U;return X.negative!==0&&this.negative===0?(X.negative=0,U=this.sub(X),X.negative^=1,U):X.negative===0&&this.negative!==0?(this.negative=0,U=X.sub(this),this.negative=1,U):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},V.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var U=this.iadd(X);return X.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var $=this.cmp(X);if($===0)return this.negative=0,this.length=1,this.words[0]=0,this;var j,K;$>0?(j=this,K=X):(j=X,K=this);for(var W=0,z=0;z<K.length;z++)U=(j.words[z]|0)-(K.words[z]|0)+W,W=U>>26,this.words[z]=U&67108863;for(;W!==0&&z<j.length;z++)U=(j.words[z]|0)+W,W=U>>26,this.words[z]=U&67108863;if(W===0&&z<j.length&&j!==this)for(;z<j.length;z++)this.words[z]=j.words[z];return this.length=Math.max(this.length,z),j!==this&&(this.negative=1),this._strip()},V.prototype.sub=function(X){return this.clone().isub(X)};function x(X,U,$){$.negative=U.negative^X.negative;var j=X.length+U.length|0;$.length=j,j=j-1|0;var K=X.words[0]|0,W=U.words[0]|0,z=K*W,A=z&67108863,T=z/67108864|0;$.words[0]=A;for(var y=1;y<j;y++){for(var r=T>>>26,a=T&67108863,t=Math.min(y,U.length-1),l=Math.max(0,y-X.length+1);l<=t;l++){var h=y-l|0;K=X.words[h]|0,W=U.words[l]|0,z=K*W+a,r+=z/67108864|0,a=z&67108863}$.words[y]=a|0,T=r|0}return T!==0?$.words[y]=T|0:$.length--,$._strip()}var g=function(X,U,$){var j=X.words,K=U.words,W=$.words,z=0,A,T,y,r=j[0]|0,a=r&8191,t=r>>>13,l=j[1]|0,h=l&8191,n=l>>>13,q0=j[2]|0,G0=q0&8191,F0=q0>>>13,b=j[3]|0,E=b&8191,u=b>>>13,e=j[4]|0,V0=e&8191,W0=e>>>13,J0=j[5]|0,Y0=J0&8191,X0=J0>>>13,g0=j[6]|0,$0=g0&8191,z0=g0>>>13,_0=j[7]|0,I=_0&8191,S=_0>>>13,c=j[8]|0,o=c&8191,i=c>>>13,O0=j[9]|0,U0=O0&8191,j0=O0>>>13,c0=K[0]|0,C0=c0&8191,H0=c0>>>13,m0=K[1]|0,N0=m0&8191,P0=m0>>>13,$6=K[2]|0,L0=$6&8191,D0=$6>>>13,a0=K[3]|0,k0=a0&8191,B0=a0>>>13,C6=K[4]|0,R0=C6&8191,I0=C6>>>13,O6=K[5]|0,T0=O6&8191,M0=O6>>>13,D6=K[6]|0,A0=D6&8191,v0=D6>>>13,L6=K[7]|0,x0=L6&8191,S0=L6>>>13,N6=K[8]|0,E0=N6&8191,w0=N6>>>13,z6=K[9]|0,p0=z6&8191,b0=z6>>>13;$.negative=X.negative^U.negative,$.length=19,A=Math.imul(a,C0),T=Math.imul(a,H0),T=T+Math.imul(t,C0)|0,y=Math.imul(t,H0);var n0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(n0>>>26)|0,n0&=67108863,A=Math.imul(h,C0),T=Math.imul(h,H0),T=T+Math.imul(n,C0)|0,y=Math.imul(n,H0),A=A+Math.imul(a,N0)|0,T=T+Math.imul(a,P0)|0,T=T+Math.imul(t,N0)|0,y=y+Math.imul(t,P0)|0;var r0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(r0>>>26)|0,r0&=67108863,A=Math.imul(G0,C0),T=Math.imul(G0,H0),T=T+Math.imul(F0,C0)|0,y=Math.imul(F0,H0),A=A+Math.imul(h,N0)|0,T=T+Math.imul(h,P0)|0,T=T+Math.imul(n,N0)|0,y=y+Math.imul(n,P0)|0,A=A+Math.imul(a,L0)|0,T=T+Math.imul(a,D0)|0,T=T+Math.imul(t,L0)|0,y=y+Math.imul(t,D0)|0;var i0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(i0>>>26)|0,i0&=67108863,A=Math.imul(E,C0),T=Math.imul(E,H0),T=T+Math.imul(u,C0)|0,y=Math.imul(u,H0),A=A+Math.imul(G0,N0)|0,T=T+Math.imul(G0,P0)|0,T=T+Math.imul(F0,N0)|0,y=y+Math.imul(F0,P0)|0,A=A+Math.imul(h,L0)|0,T=T+Math.imul(h,D0)|0,T=T+Math.imul(n,L0)|0,y=y+Math.imul(n,D0)|0,A=A+Math.imul(a,k0)|0,T=T+Math.imul(a,B0)|0,T=T+Math.imul(t,k0)|0,y=y+Math.imul(t,B0)|0;var s0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(s0>>>26)|0,s0&=67108863,A=Math.imul(V0,C0),T=Math.imul(V0,H0),T=T+Math.imul(W0,C0)|0,y=Math.imul(W0,H0),A=A+Math.imul(E,N0)|0,T=T+Math.imul(E,P0)|0,T=T+Math.imul(u,N0)|0,y=y+Math.imul(u,P0)|0,A=A+Math.imul(G0,L0)|0,T=T+Math.imul(G0,D0)|0,T=T+Math.imul(F0,L0)|0,y=y+Math.imul(F0,D0)|0,A=A+Math.imul(h,k0)|0,T=T+Math.imul(h,B0)|0,T=T+Math.imul(n,k0)|0,y=y+Math.imul(n,B0)|0,A=A+Math.imul(a,R0)|0,T=T+Math.imul(a,I0)|0,T=T+Math.imul(t,R0)|0,y=y+Math.imul(t,I0)|0;var t0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(t0>>>26)|0,t0&=67108863,A=Math.imul(Y0,C0),T=Math.imul(Y0,H0),T=T+Math.imul(X0,C0)|0,y=Math.imul(X0,H0),A=A+Math.imul(V0,N0)|0,T=T+Math.imul(V0,P0)|0,T=T+Math.imul(W0,N0)|0,y=y+Math.imul(W0,P0)|0,A=A+Math.imul(E,L0)|0,T=T+Math.imul(E,D0)|0,T=T+Math.imul(u,L0)|0,y=y+Math.imul(u,D0)|0,A=A+Math.imul(G0,k0)|0,T=T+Math.imul(G0,B0)|0,T=T+Math.imul(F0,k0)|0,y=y+Math.imul(F0,B0)|0,A=A+Math.imul(h,R0)|0,T=T+Math.imul(h,I0)|0,T=T+Math.imul(n,R0)|0,y=y+Math.imul(n,I0)|0,A=A+Math.imul(a,T0)|0,T=T+Math.imul(a,M0)|0,T=T+Math.imul(t,T0)|0,y=y+Math.imul(t,M0)|0;var e0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(e0>>>26)|0,e0&=67108863,A=Math.imul($0,C0),T=Math.imul($0,H0),T=T+Math.imul(z0,C0)|0,y=Math.imul(z0,H0),A=A+Math.imul(Y0,N0)|0,T=T+Math.imul(Y0,P0)|0,T=T+Math.imul(X0,N0)|0,y=y+Math.imul(X0,P0)|0,A=A+Math.imul(V0,L0)|0,T=T+Math.imul(V0,D0)|0,T=T+Math.imul(W0,L0)|0,y=y+Math.imul(W0,D0)|0,A=A+Math.imul(E,k0)|0,T=T+Math.imul(E,B0)|0,T=T+Math.imul(u,k0)|0,y=y+Math.imul(u,B0)|0,A=A+Math.imul(G0,R0)|0,T=T+Math.imul(G0,I0)|0,T=T+Math.imul(F0,R0)|0,y=y+Math.imul(F0,I0)|0,A=A+Math.imul(h,T0)|0,T=T+Math.imul(h,M0)|0,T=T+Math.imul(n,T0)|0,y=y+Math.imul(n,M0)|0,A=A+Math.imul(a,A0)|0,T=T+Math.imul(a,v0)|0,T=T+Math.imul(t,A0)|0,y=y+Math.imul(t,v0)|0;var Q6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,A=Math.imul(I,C0),T=Math.imul(I,H0),T=T+Math.imul(S,C0)|0,y=Math.imul(S,H0),A=A+Math.imul($0,N0)|0,T=T+Math.imul($0,P0)|0,T=T+Math.imul(z0,N0)|0,y=y+Math.imul(z0,P0)|0,A=A+Math.imul(Y0,L0)|0,T=T+Math.imul(Y0,D0)|0,T=T+Math.imul(X0,L0)|0,y=y+Math.imul(X0,D0)|0,A=A+Math.imul(V0,k0)|0,T=T+Math.imul(V0,B0)|0,T=T+Math.imul(W0,k0)|0,y=y+Math.imul(W0,B0)|0,A=A+Math.imul(E,R0)|0,T=T+Math.imul(E,I0)|0,T=T+Math.imul(u,R0)|0,y=y+Math.imul(u,I0)|0,A=A+Math.imul(G0,T0)|0,T=T+Math.imul(G0,M0)|0,T=T+Math.imul(F0,T0)|0,y=y+Math.imul(F0,M0)|0,A=A+Math.imul(h,A0)|0,T=T+Math.imul(h,v0)|0,T=T+Math.imul(n,A0)|0,y=y+Math.imul(n,v0)|0,A=A+Math.imul(a,x0)|0,T=T+Math.imul(a,S0)|0,T=T+Math.imul(t,x0)|0,y=y+Math.imul(t,S0)|0;var W6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(W6>>>26)|0,W6&=67108863,A=Math.imul(o,C0),T=Math.imul(o,H0),T=T+Math.imul(i,C0)|0,y=Math.imul(i,H0),A=A+Math.imul(I,N0)|0,T=T+Math.imul(I,P0)|0,T=T+Math.imul(S,N0)|0,y=y+Math.imul(S,P0)|0,A=A+Math.imul($0,L0)|0,T=T+Math.imul($0,D0)|0,T=T+Math.imul(z0,L0)|0,y=y+Math.imul(z0,D0)|0,A=A+Math.imul(Y0,k0)|0,T=T+Math.imul(Y0,B0)|0,T=T+Math.imul(X0,k0)|0,y=y+Math.imul(X0,B0)|0,A=A+Math.imul(V0,R0)|0,T=T+Math.imul(V0,I0)|0,T=T+Math.imul(W0,R0)|0,y=y+Math.imul(W0,I0)|0,A=A+Math.imul(E,T0)|0,T=T+Math.imul(E,M0)|0,T=T+Math.imul(u,T0)|0,y=y+Math.imul(u,M0)|0,A=A+Math.imul(G0,A0)|0,T=T+Math.imul(G0,v0)|0,T=T+Math.imul(F0,A0)|0,y=y+Math.imul(F0,v0)|0,A=A+Math.imul(h,x0)|0,T=T+Math.imul(h,S0)|0,T=T+Math.imul(n,x0)|0,y=y+Math.imul(n,S0)|0,A=A+Math.imul(a,E0)|0,T=T+Math.imul(a,w0)|0,T=T+Math.imul(t,E0)|0,y=y+Math.imul(t,w0)|0;var G6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(G6>>>26)|0,G6&=67108863,A=Math.imul(U0,C0),T=Math.imul(U0,H0),T=T+Math.imul(j0,C0)|0,y=Math.imul(j0,H0),A=A+Math.imul(o,N0)|0,T=T+Math.imul(o,P0)|0,T=T+Math.imul(i,N0)|0,y=y+Math.imul(i,P0)|0,A=A+Math.imul(I,L0)|0,T=T+Math.imul(I,D0)|0,T=T+Math.imul(S,L0)|0,y=y+Math.imul(S,D0)|0,A=A+Math.imul($0,k0)|0,T=T+Math.imul($0,B0)|0,T=T+Math.imul(z0,k0)|0,y=y+Math.imul(z0,B0)|0,A=A+Math.imul(Y0,R0)|0,T=T+Math.imul(Y0,I0)|0,T=T+Math.imul(X0,R0)|0,y=y+Math.imul(X0,I0)|0,A=A+Math.imul(V0,T0)|0,T=T+Math.imul(V0,M0)|0,T=T+Math.imul(W0,T0)|0,y=y+Math.imul(W0,M0)|0,A=A+Math.imul(E,A0)|0,T=T+Math.imul(E,v0)|0,T=T+Math.imul(u,A0)|0,y=y+Math.imul(u,v0)|0,A=A+Math.imul(G0,x0)|0,T=T+Math.imul(G0,S0)|0,T=T+Math.imul(F0,x0)|0,y=y+Math.imul(F0,S0)|0,A=A+Math.imul(h,E0)|0,T=T+Math.imul(h,w0)|0,T=T+Math.imul(n,E0)|0,y=y+Math.imul(n,w0)|0,A=A+Math.imul(a,p0)|0,T=T+Math.imul(a,b0)|0,T=T+Math.imul(t,p0)|0,y=y+Math.imul(t,b0)|0;var X6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(X6>>>26)|0,X6&=67108863,A=Math.imul(U0,N0),T=Math.imul(U0,P0),T=T+Math.imul(j0,N0)|0,y=Math.imul(j0,P0),A=A+Math.imul(o,L0)|0,T=T+Math.imul(o,D0)|0,T=T+Math.imul(i,L0)|0,y=y+Math.imul(i,D0)|0,A=A+Math.imul(I,k0)|0,T=T+Math.imul(I,B0)|0,T=T+Math.imul(S,k0)|0,y=y+Math.imul(S,B0)|0,A=A+Math.imul($0,R0)|0,T=T+Math.imul($0,I0)|0,T=T+Math.imul(z0,R0)|0,y=y+Math.imul(z0,I0)|0,A=A+Math.imul(Y0,T0)|0,T=T+Math.imul(Y0,M0)|0,T=T+Math.imul(X0,T0)|0,y=y+Math.imul(X0,M0)|0,A=A+Math.imul(V0,A0)|0,T=T+Math.imul(V0,v0)|0,T=T+Math.imul(W0,A0)|0,y=y+Math.imul(W0,v0)|0,A=A+Math.imul(E,x0)|0,T=T+Math.imul(E,S0)|0,T=T+Math.imul(u,x0)|0,y=y+Math.imul(u,S0)|0,A=A+Math.imul(G0,E0)|0,T=T+Math.imul(G0,w0)|0,T=T+Math.imul(F0,E0)|0,y=y+Math.imul(F0,w0)|0,A=A+Math.imul(h,p0)|0,T=T+Math.imul(h,b0)|0,T=T+Math.imul(n,p0)|0,y=y+Math.imul(n,b0)|0;var Y6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,A=Math.imul(U0,L0),T=Math.imul(U0,D0),T=T+Math.imul(j0,L0)|0,y=Math.imul(j0,D0),A=A+Math.imul(o,k0)|0,T=T+Math.imul(o,B0)|0,T=T+Math.imul(i,k0)|0,y=y+Math.imul(i,B0)|0,A=A+Math.imul(I,R0)|0,T=T+Math.imul(I,I0)|0,T=T+Math.imul(S,R0)|0,y=y+Math.imul(S,I0)|0,A=A+Math.imul($0,T0)|0,T=T+Math.imul($0,M0)|0,T=T+Math.imul(z0,T0)|0,y=y+Math.imul(z0,M0)|0,A=A+Math.imul(Y0,A0)|0,T=T+Math.imul(Y0,v0)|0,T=T+Math.imul(X0,A0)|0,y=y+Math.imul(X0,v0)|0,A=A+Math.imul(V0,x0)|0,T=T+Math.imul(V0,S0)|0,T=T+Math.imul(W0,x0)|0,y=y+Math.imul(W0,S0)|0,A=A+Math.imul(E,E0)|0,T=T+Math.imul(E,w0)|0,T=T+Math.imul(u,E0)|0,y=y+Math.imul(u,w0)|0,A=A+Math.imul(G0,p0)|0,T=T+Math.imul(G0,b0)|0,T=T+Math.imul(F0,p0)|0,y=y+Math.imul(F0,b0)|0;var V6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(V6>>>26)|0,V6&=67108863,A=Math.imul(U0,k0),T=Math.imul(U0,B0),T=T+Math.imul(j0,k0)|0,y=Math.imul(j0,B0),A=A+Math.imul(o,R0)|0,T=T+Math.imul(o,I0)|0,T=T+Math.imul(i,R0)|0,y=y+Math.imul(i,I0)|0,A=A+Math.imul(I,T0)|0,T=T+Math.imul(I,M0)|0,T=T+Math.imul(S,T0)|0,y=y+Math.imul(S,M0)|0,A=A+Math.imul($0,A0)|0,T=T+Math.imul($0,v0)|0,T=T+Math.imul(z0,A0)|0,y=y+Math.imul(z0,v0)|0,A=A+Math.imul(Y0,x0)|0,T=T+Math.imul(Y0,S0)|0,T=T+Math.imul(X0,x0)|0,y=y+Math.imul(X0,S0)|0,A=A+Math.imul(V0,E0)|0,T=T+Math.imul(V0,w0)|0,T=T+Math.imul(W0,E0)|0,y=y+Math.imul(W0,w0)|0,A=A+Math.imul(E,p0)|0,T=T+Math.imul(E,b0)|0,T=T+Math.imul(u,p0)|0,y=y+Math.imul(u,b0)|0;var J6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(J6>>>26)|0,J6&=67108863,A=Math.imul(U0,R0),T=Math.imul(U0,I0),T=T+Math.imul(j0,R0)|0,y=Math.imul(j0,I0),A=A+Math.imul(o,T0)|0,T=T+Math.imul(o,M0)|0,T=T+Math.imul(i,T0)|0,y=y+Math.imul(i,M0)|0,A=A+Math.imul(I,A0)|0,T=T+Math.imul(I,v0)|0,T=T+Math.imul(S,A0)|0,y=y+Math.imul(S,v0)|0,A=A+Math.imul($0,x0)|0,T=T+Math.imul($0,S0)|0,T=T+Math.imul(z0,x0)|0,y=y+Math.imul(z0,S0)|0,A=A+Math.imul(Y0,E0)|0,T=T+Math.imul(Y0,w0)|0,T=T+Math.imul(X0,E0)|0,y=y+Math.imul(X0,w0)|0,A=A+Math.imul(V0,p0)|0,T=T+Math.imul(V0,b0)|0,T=T+Math.imul(W0,p0)|0,y=y+Math.imul(W0,b0)|0;var U6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(U6>>>26)|0,U6&=67108863,A=Math.imul(U0,T0),T=Math.imul(U0,M0),T=T+Math.imul(j0,T0)|0,y=Math.imul(j0,M0),A=A+Math.imul(o,A0)|0,T=T+Math.imul(o,v0)|0,T=T+Math.imul(i,A0)|0,y=y+Math.imul(i,v0)|0,A=A+Math.imul(I,x0)|0,T=T+Math.imul(I,S0)|0,T=T+Math.imul(S,x0)|0,y=y+Math.imul(S,S0)|0,A=A+Math.imul($0,E0)|0,T=T+Math.imul($0,w0)|0,T=T+Math.imul(z0,E0)|0,y=y+Math.imul(z0,w0)|0,A=A+Math.imul(Y0,p0)|0,T=T+Math.imul(Y0,b0)|0,T=T+Math.imul(X0,p0)|0,y=y+Math.imul(X0,b0)|0;var F6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(F6>>>26)|0,F6&=67108863,A=Math.imul(U0,A0),T=Math.imul(U0,v0),T=T+Math.imul(j0,A0)|0,y=Math.imul(j0,v0),A=A+Math.imul(o,x0)|0,T=T+Math.imul(o,S0)|0,T=T+Math.imul(i,x0)|0,y=y+Math.imul(i,S0)|0,A=A+Math.imul(I,E0)|0,T=T+Math.imul(I,w0)|0,T=T+Math.imul(S,E0)|0,y=y+Math.imul(S,w0)|0,A=A+Math.imul($0,p0)|0,T=T+Math.imul($0,b0)|0,T=T+Math.imul(z0,p0)|0,y=y+Math.imul(z0,b0)|0;var K6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(K6>>>26)|0,K6&=67108863,A=Math.imul(U0,x0),T=Math.imul(U0,S0),T=T+Math.imul(j0,x0)|0,y=Math.imul(j0,S0),A=A+Math.imul(o,E0)|0,T=T+Math.imul(o,w0)|0,T=T+Math.imul(i,E0)|0,y=y+Math.imul(i,w0)|0,A=A+Math.imul(I,p0)|0,T=T+Math.imul(I,b0)|0,T=T+Math.imul(S,p0)|0,y=y+Math.imul(S,b0)|0;var f7=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(f7>>>26)|0,f7&=67108863,A=Math.imul(U0,E0),T=Math.imul(U0,w0),T=T+Math.imul(j0,E0)|0,y=Math.imul(j0,w0),A=A+Math.imul(o,p0)|0,T=T+Math.imul(o,b0)|0,T=T+Math.imul(i,p0)|0,y=y+Math.imul(i,b0)|0;var o7=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(o7>>>26)|0,o7&=67108863,A=Math.imul(U0,p0),T=Math.imul(U0,b0),T=T+Math.imul(j0,p0)|0,y=Math.imul(j0,b0);var a7=(z+A|0)+((T&8191)<<13)|0;return z=(y+(T>>>13)|0)+(a7>>>26)|0,a7&=67108863,W[0]=n0,W[1]=r0,W[2]=i0,W[3]=s0,W[4]=t0,W[5]=e0,W[6]=Q6,W[7]=W6,W[8]=G6,W[9]=X6,W[10]=Y6,W[11]=V6,W[12]=J6,W[13]=U6,W[14]=F6,W[15]=K6,W[16]=f7,W[17]=o7,W[18]=a7,z!==0&&(W[19]=z,$.length++),$};Math.imul||(g=x);function _(X,U,$){$.negative=U.negative^X.negative,$.length=X.length+U.length;for(var j=0,K=0,W=0;W<$.length-1;W++){var z=K;K=0;for(var A=j&67108863,T=Math.min(W,U.length-1),y=Math.max(0,W-X.length+1);y<=T;y++){var r=W-y,a=X.words[r]|0,t=U.words[y]|0,l=a*t,h=l&67108863;z=z+(l/67108864|0)|0,h=h+A|0,A=h&67108863,z=z+(h>>>26)|0,K+=z>>>26,z&=67108863}$.words[W]=A,j=z,z=K}return j!==0?$.words[W]=j:$.length--,$._strip()}function p(X,U,$){return _(X,U,$)}V.prototype.mulTo=function(X,U){var $,j=this.length+X.length;return this.length===10&&X.length===10?$=g(this,X,U):j<63?$=x(this,X,U):j<1024?$=_(this,X,U):$=p(this,X,U),$};function m(X,U){this.x=X,this.y=U}m.prototype.makeRBT=function(X){for(var U=new Array(X),$=V.prototype._countBits(X)-1,j=0;j<X;j++)U[j]=this.revBin(j,$,X);return U},m.prototype.revBin=function(X,U,$){if(X===0||X===$-1)return X;for(var j=0,K=0;K<U;K++)j|=(X&1)<<U-K-1,X>>=1;return j},m.prototype.permute=function(X,U,$,j,K,W){for(var z=0;z<W;z++)j[z]=U[X[z]],K[z]=$[X[z]]},m.prototype.transform=function(X,U,$,j,K,W){this.permute(W,X,U,$,j,K);for(var z=1;z<K;z<<=1)for(var A=z<<1,T=Math.cos(2*Math.PI/A),y=Math.sin(2*Math.PI/A),r=0;r<K;r+=A)for(var a=T,t=y,l=0;l<z;l++){var h=$[r+l],n=j[r+l],q0=$[r+l+z],G0=j[r+l+z],F0=a*q0-t*G0;G0=a*G0+t*q0,q0=F0,$[r+l]=h+q0,j[r+l]=n+G0,$[r+l+z]=h-q0,j[r+l+z]=n-G0,l!==A&&(F0=T*a-y*t,t=T*t+y*a,a=F0)}},m.prototype.guessLen13b=function(X,U){var $=Math.max(U,X)|1,j=$&1,K=0;for($=$/2|0;$;$=$>>>1)K++;return 1<<K+1+j},m.prototype.conjugate=function(X,U,$){if(!($<=1))for(var j=0;j<$/2;j++){var K=X[j];X[j]=X[$-j-1],X[$-j-1]=K,K=U[j],U[j]=-U[$-j-1],U[$-j-1]=-K}},m.prototype.normalize13b=function(X,U){for(var $=0,j=0;j<U/2;j++){var K=Math.round(X[2*j+1]/U)*8192+Math.round(X[2*j]/U)+$;X[j]=K&67108863,K<67108864?$=0:$=K/67108864|0}return X},m.prototype.convert13b=function(X,U,$,j){for(var K=0,W=0;W<U;W++)K=K+(X[W]|0),$[2*W]=K&8191,K=K>>>13,$[2*W+1]=K&8191,K=K>>>13;for(W=2*U;W<j;++W)$[W]=0;Z(K===0),Z((K&-8192)===0)},m.prototype.stub=function(X){for(var U=new Array(X),$=0;$<X;$++)U[$]=0;return U},m.prototype.mulp=function(X,U,$){var j=2*this.guessLen13b(X.length,U.length),K=this.makeRBT(j),W=this.stub(j),z=new Array(j),A=new Array(j),T=new Array(j),y=new Array(j),r=new Array(j),a=new Array(j),t=$.words;t.length=j,this.convert13b(X.words,X.length,z,j),this.convert13b(U.words,U.length,y,j),this.transform(z,W,A,T,j,K),this.transform(y,W,r,a,j,K);for(var l=0;l<j;l++){var h=A[l]*r[l]-T[l]*a[l];T[l]=A[l]*a[l]+T[l]*r[l],A[l]=h}return this.conjugate(A,T,j),this.transform(A,T,t,W,j,K),this.conjugate(t,W,j),this.normalize13b(t,j),$.negative=X.negative^U.negative,$.length=X.length+U.length,$._strip()},V.prototype.mul=function(X){var U=new V(null);return U.words=new Array(this.length+X.length),this.mulTo(X,U)},V.prototype.mulf=function(X){var U=new V(null);return U.words=new Array(this.length+X.length),p(this,X,U)},V.prototype.imul=function(X){return this.clone().mulTo(X,this)},V.prototype.imuln=function(X){var U=X<0;U&&(X=-X),Z(typeof X=="number"),Z(X<67108864);for(var $=0,j=0;j<this.length;j++){var K=(this.words[j]|0)*X,W=(K&67108863)+($&67108863);$>>=26,$+=K/67108864|0,$+=W>>>26,this.words[j]=W&67108863}return $!==0&&(this.words[j]=$,this.length++),U?this.ineg():this},V.prototype.muln=function(X){return this.clone().imuln(X)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(X){var U=w(X);if(U.length===0)return new V(1);for(var $=this,j=0;j<U.length&&U[j]===0;j++,$=$.sqr());if(++j<U.length)for(var K=$.sqr();j<U.length;j++,K=K.sqr())U[j]!==0&&($=$.mul(K));return $},V.prototype.iushln=function(X){Z(typeof X=="number"&&X>=0);var U=X%26,$=(X-U)/26,j=67108863>>>26-U<<26-U,K;if(U!==0){var W=0;for(K=0;K<this.length;K++){var z=this.words[K]&j,A=(this.words[K]|0)-z<<U;this.words[K]=A|W,W=z>>>26-U}W&&(this.words[K]=W,this.length++)}if($!==0){for(K=this.length-1;K>=0;K--)this.words[K+$]=this.words[K];for(K=0;K<$;K++)this.words[K]=0;this.length+=$}return this._strip()},V.prototype.ishln=function(X){return Z(this.negative===0),this.iushln(X)},V.prototype.iushrn=function(X,U,$){Z(typeof X=="number"&&X>=0);var j;U?j=(U-U%26)/26:j=0;var K=X%26,W=Math.min((X-K)/26,this.length),z=67108863^67108863>>>K<<K,A=$;if(j-=W,j=Math.max(0,j),A){for(var T=0;T<W;T++)A.words[T]=this.words[T];A.length=W}if(W!==0)if(this.length>W)for(this.length-=W,T=0;T<this.length;T++)this.words[T]=this.words[T+W];else this.words[0]=0,this.length=1;var y=0;for(T=this.length-1;T>=0&&(y!==0||T>=j);T--){var r=this.words[T]|0;this.words[T]=y<<26-K|r>>>K,y=r&z}return A&&y!==0&&(A.words[A.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},V.prototype.ishrn=function(X,U,$){return Z(this.negative===0),this.iushrn(X,U,$)},V.prototype.shln=function(X){return this.clone().ishln(X)},V.prototype.ushln=function(X){return this.clone().iushln(X)},V.prototype.shrn=function(X){return this.clone().ishrn(X)},V.prototype.ushrn=function(X){return this.clone().iushrn(X)},V.prototype.testn=function(X){Z(typeof X=="number"&&X>=0);var U=X%26,$=(X-U)/26,j=1<<U;if(this.length<=$)return!1;var K=this.words[$];return!!(K&j)},V.prototype.imaskn=function(X){Z(typeof X=="number"&&X>=0);var U=X%26,$=(X-U)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=$)return this;if(U!==0&&$++,this.length=Math.min($,this.length),U!==0){var j=67108863^67108863>>>U<<U;this.words[this.length-1]&=j}return this._strip()},V.prototype.maskn=function(X){return this.clone().imaskn(X)},V.prototype.iaddn=function(X){return Z(typeof X=="number"),Z(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)},V.prototype._iaddn=function(X){this.words[0]+=X;for(var U=0;U<this.length&&this.words[U]>=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},V.prototype.isubn=function(X){if(Z(typeof X=="number"),Z(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 U=0;U<this.length&&this.words[U]<0;U++)this.words[U]+=67108864,this.words[U+1]-=1;return this._strip()},V.prototype.addn=function(X){return this.clone().iaddn(X)},V.prototype.subn=function(X){return this.clone().isubn(X)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(X,U,$){var j=X.length+$,K;this._expand(j);var W,z=0;for(K=0;K<X.length;K++){W=(this.words[K+$]|0)+z;var A=(X.words[K]|0)*U;W-=A&67108863,z=(W>>26)-(A/67108864|0),this.words[K+$]=W&67108863}for(;K<this.length-$;K++)W=(this.words[K+$]|0)+z,z=W>>26,this.words[K+$]=W&67108863;if(z===0)return this._strip();for(Z(z===-1),z=0,K=0;K<this.length;K++)W=-(this.words[K]|0)+z,z=W>>26,this.words[K]=W&67108863;return this.negative=1,this._strip()},V.prototype._wordDiv=function(X,U){var $=this.length-X.length,j=this.clone(),K=X,W=K.words[K.length-1]|0,z=this._countBits(W);$=26-z,$!==0&&(K=K.ushln($),j.iushln($),W=K.words[K.length-1]|0);var A=j.length-K.length,T;if(U!=="mod"){T=new V(null),T.length=A+1,T.words=new Array(T.length);for(var y=0;y<T.length;y++)T.words[y]=0}var r=j.clone()._ishlnsubmul(K,1,A);r.negative===0&&(j=r,T&&(T.words[A]=1));for(var a=A-1;a>=0;a--){var t=(j.words[K.length+a]|0)*67108864+(j.words[K.length+a-1]|0);for(t=Math.min(t/W|0,67108863),j._ishlnsubmul(K,t,a);j.negative!==0;)t--,j.negative=0,j._ishlnsubmul(K,1,a),j.isZero()||(j.negative^=1);T&&(T.words[a]=t)}return T&&T._strip(),j._strip(),U!=="div"&&$!==0&&j.iushrn($),{div:T||null,mod:j}},V.prototype.divmod=function(X,U,$){if(Z(!X.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var j,K,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,U),U!=="mod"&&(j=W.div.neg()),U!=="div"&&(K=W.mod.neg(),$&&K.negative!==0&&K.iadd(X)),{div:j,mod:K}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),U),U!=="mod"&&(j=W.div.neg()),{div:j,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),U),U!=="div"&&(K=W.mod.neg(),$&&K.negative!==0&&K.isub(X)),{div:W.div,mod:K}):X.length>this.length||this.cmp(X)<0?{div:new V(0),mod:this}:X.length===1?U==="div"?{div:this.divn(X.words[0]),mod:null}:U==="mod"?{div:null,mod:new V(this.modrn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new V(this.modrn(X.words[0]))}:this._wordDiv(X,U)},V.prototype.div=function(X){return this.divmod(X,"div",!1).div},V.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},V.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},V.prototype.divRound=function(X){var U=this.divmod(X);if(U.mod.isZero())return U.div;var $=U.div.negative!==0?U.mod.isub(X):U.mod,j=X.ushrn(1),K=X.andln(1),W=$.cmp(j);return W<0||K===1&&W===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},V.prototype.modrn=function(X){var U=X<0;U&&(X=-X),Z(X<=67108863);for(var $=(1<<26)%X,j=0,K=this.length-1;K>=0;K--)j=($*j+(this.words[K]|0))%X;return U?-j:j},V.prototype.modn=function(X){return this.modrn(X)},V.prototype.idivn=function(X){var U=X<0;U&&(X=-X),Z(X<=67108863);for(var $=0,j=this.length-1;j>=0;j--){var K=(this.words[j]|0)+$*67108864;this.words[j]=K/X|0,$=K%X}return this._strip(),U?this.ineg():this},V.prototype.divn=function(X){return this.clone().idivn(X)},V.prototype.egcd=function(X){Z(X.negative===0),Z(!X.isZero());var U=this,$=X.clone();U.negative!==0?U=U.umod(X):U=U.clone();for(var j=new V(1),K=new V(0),W=new V(0),z=new V(1),A=0;U.isEven()&&$.isEven();)U.iushrn(1),$.iushrn(1),++A;for(var T=$.clone(),y=U.clone();!U.isZero();){for(var r=0,a=1;(U.words[0]&a)===0&&r<26;++r,a<<=1);if(r>0)for(U.iushrn(r);r-- >0;)(j.isOdd()||K.isOdd())&&(j.iadd(T),K.isub(y)),j.iushrn(1),K.iushrn(1);for(var t=0,l=1;($.words[0]&l)===0&&t<26;++t,l<<=1);if(t>0)for($.iushrn(t);t-- >0;)(W.isOdd()||z.isOdd())&&(W.iadd(T),z.isub(y)),W.iushrn(1),z.iushrn(1);U.cmp($)>=0?(U.isub($),j.isub(W),K.isub(z)):($.isub(U),W.isub(j),z.isub(K))}return{a:W,b:z,gcd:$.iushln(A)}},V.prototype._invmp=function(X){Z(X.negative===0),Z(!X.isZero());var U=this,$=X.clone();U.negative!==0?U=U.umod(X):U=U.clone();for(var j=new V(1),K=new V(0),W=$.clone();U.cmpn(1)>0&&$.cmpn(1)>0;){for(var z=0,A=1;(U.words[0]&A)===0&&z<26;++z,A<<=1);if(z>0)for(U.iushrn(z);z-- >0;)j.isOdd()&&j.iadd(W),j.iushrn(1);for(var T=0,y=1;($.words[0]&y)===0&&T<26;++T,y<<=1);if(T>0)for($.iushrn(T);T-- >0;)K.isOdd()&&K.iadd(W),K.iushrn(1);U.cmp($)>=0?(U.isub($),j.isub(K)):($.isub(U),K.isub(j))}var r;return U.cmpn(1)===0?r=j:r=K,r.cmpn(0)<0&&r.iadd(X),r},V.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var U=this.clone(),$=X.clone();U.negative=0,$.negative=0;for(var j=0;U.isEven()&&$.isEven();j++)U.iushrn(1),$.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;$.isEven();)$.iushrn(1);var K=U.cmp($);if(K<0){var W=U;U=$,$=W}else if(K===0||$.cmpn(1)===0)break;U.isub($)}while(!0);return $.iushln(j)},V.prototype.invm=function(X){return this.egcd(X).a.umod(X)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(X){return this.words[0]&X},V.prototype.bincn=function(X){Z(typeof X=="number");var U=X%26,$=(X-U)/26,j=1<<U;if(this.length<=$)return this._expand($+1),this.words[$]|=j,this;for(var K=j,W=$;K!==0&&W<this.length;W++){var z=this.words[W]|0;z+=K,K=z>>>26,z&=67108863,this.words[W]=z}return K!==0&&(this.words[W]=K,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(X){var U=X<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this._strip();var $;if(this.length>1)$=1;else{U&&(X=-X),Z(X<=67108863,"Number is too big");var j=this.words[0]|0;$=j===X?0:j<X?-1:1}return this.negative!==0?-$|0:$},V.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var U=this.ucmp(X);return this.negative!==0?-U|0:U},V.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var U=0,$=this.length-1;$>=0;$--){var j=this.words[$]|0,K=X.words[$]|0;if(j!==K){j<K?U=-1:j>K&&(U=1);break}}return U},V.prototype.gtn=function(X){return this.cmpn(X)===1},V.prototype.gt=function(X){return this.cmp(X)===1},V.prototype.gten=function(X){return this.cmpn(X)>=0},V.prototype.gte=function(X){return this.cmp(X)>=0},V.prototype.ltn=function(X){return this.cmpn(X)===-1},V.prototype.lt=function(X){return this.cmp(X)===-1},V.prototype.lten=function(X){return this.cmpn(X)<=0},V.prototype.lte=function(X){return this.cmp(X)<=0},V.prototype.eqn=function(X){return this.cmpn(X)===0},V.prototype.eq=function(X){return this.cmp(X)===0},V.red=function(X){return new G(X)},V.prototype.toRed=function(X){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(X){return this.red=X,this},V.prototype.forceRed=function(X){return Z(!this.red,"Already a number in reduction context"),this._forceRed(X)},V.prototype.redAdd=function(X){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},V.prototype.redIAdd=function(X){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},V.prototype.redSub=function(X){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},V.prototype.redISub=function(X){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},V.prototype.redShl=function(X){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},V.prototype.redMul=function(X){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},V.prototype.redIMul=function(X){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(X){return Z(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var f={k256:null,p224:null,p192:null,p25519:null};function s(X,U){this.name=X,this.p=new V(U,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}s.prototype._tmp=function(){var X=new V(null);return X.words=new Array(Math.ceil(this.n/13)),X},s.prototype.ireduce=function(X){var U=X,$;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),$=U.bitLength();while($>this.n);var j=$<this.n?-1:U.ucmp(this.p);return j===0?(U.words[0]=0,U.length=1):j>0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},s.prototype.split=function(X,U){X.iushrn(this.n,0,U)},s.prototype.imulK=function(X){return X.imul(this.k)};function Q0(){s.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(Q0,s),Q0.prototype.split=function(X,U){for(var $=4194303,j=Math.min(X.length,9),K=0;K<j;K++)U.words[K]=X.words[K];if(U.length=j,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(U.words[U.length++]=W&$,K=10;K<X.length;K++){var z=X.words[K]|0;X.words[K-10]=(z&$)<<4|W>>>22,W=z}W>>>=22,X.words[K-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},Q0.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var U=0,$=0;$<X.length;$++){var j=X.words[$]|0;U+=j*977,X.words[$]=U&67108863,U=j*64+(U/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function d(){s.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(d,s);function K0(){s.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(K0,s);function Q(){s.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q,s),Q.prototype.imulK=function(X){for(var U=0,$=0;$<X.length;$++){var j=(X.words[$]|0)*19+U,K=j&67108863;j>>>=26,X.words[$]=K,U=j}return U!==0&&(X.words[X.length++]=U),X},V._prime=function(X){if(f[X])return f[X];var U;if(X==="k256")U=new Q0;else if(X==="p224")U=new d;else if(X==="p192")U=new K0;else if(X==="p25519")U=new Q;else throw new Error("Unknown prime "+X);return f[X]=U,U};function G(X){if(typeof X=="string"){var U=V._prime(X);this.m=U.p,this.prime=U}else Z(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}G.prototype._verify1=function(X){Z(X.negative===0,"red works only with positives"),Z(X.red,"red works only with red numbers")},G.prototype._verify2=function(X,U){Z((X.negative|U.negative)===0,"red works only with positives"),Z(X.red&&X.red===U.red,"red works only with red numbers")},G.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):(H(X,X.umod(this.m)._forceRed(this)),X)},G.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},G.prototype.add=function(X,U){this._verify2(X,U);var $=X.add(U);return $.cmp(this.m)>=0&&$.isub(this.m),$._forceRed(this)},G.prototype.iadd=function(X,U){this._verify2(X,U);var $=X.iadd(U);return $.cmp(this.m)>=0&&$.isub(this.m),$},G.prototype.sub=function(X,U){this._verify2(X,U);var $=X.sub(U);return $.cmpn(0)<0&&$.iadd(this.m),$._forceRed(this)},G.prototype.isub=function(X,U){this._verify2(X,U);var $=X.isub(U);return $.cmpn(0)<0&&$.iadd(this.m),$},G.prototype.shl=function(X,U){return this._verify1(X),this.imod(X.ushln(U))},G.prototype.imul=function(X,U){return this._verify2(X,U),this.imod(X.imul(U))},G.prototype.mul=function(X,U){return this._verify2(X,U),this.imod(X.mul(U))},G.prototype.isqr=function(X){return this.imul(X,X.clone())},G.prototype.sqr=function(X){return this.mul(X,X)},G.prototype.sqrt=function(X){if(X.isZero())return X.clone();var U=this.m.andln(3);if(Z(U%2===1),U===3){var $=this.m.add(new V(1)).iushrn(2);return this.pow(X,$)}for(var j=this.m.subn(1),K=0;!j.isZero()&&j.andln(1)===0;)K++,j.iushrn(1);Z(!j.isZero());var W=new V(1).toRed(this),z=W.redNeg(),A=this.m.subn(1).iushrn(1),T=this.m.bitLength();for(T=new V(2*T*T).toRed(this);this.pow(T,A).cmp(z)!==0;)T.redIAdd(z);for(var y=this.pow(T,j),r=this.pow(X,j.addn(1).iushrn(1)),a=this.pow(X,j),t=K;a.cmp(W)!==0;){for(var l=a,h=0;l.cmp(W)!==0;h++)l=l.redSqr();Z(h<t);var n=this.pow(y,new V(1).iushln(t-h-1));r=r.redMul(n),y=n.redSqr(),a=a.redMul(y),t=h}return r},G.prototype.invm=function(X){var U=X._invmp(this.m);return U.negative!==0?(U.negative=0,this.imod(U).redNeg()):this.imod(U)},G.prototype.pow=function(X,U){if(U.isZero())return new V(1).toRed(this);if(U.cmpn(1)===0)return X.clone();var $=4,j=new Array(1<<$);j[0]=new V(1).toRed(this),j[1]=X;for(var K=2;K<j.length;K++)j[K]=this.mul(j[K-1],X);var W=j[0],z=0,A=0,T=U.bitLength()%26;for(T===0&&(T=26),K=U.length-1;K>=0;K--){for(var y=U.words[K],r=T-1;r>=0;r--){var a=y>>r&1;if(W!==j[0]&&(W=this.sqr(W)),a===0&&z===0){A=0;continue}z<<=1,z|=a,A++,!(A!==$&&(K!==0||r!==0))&&(W=this.mul(W,j[z]),A=0,z=0)}T=26}return W},G.prototype.convertTo=function(X){var U=X.umod(this.m);return U===X?U.clone():U},G.prototype.convertFrom=function(X){var U=X.clone();return U.red=null,U},V.mont=function(X){return new J(X)};function J(X){G.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(J,G),J.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},J.prototype.convertFrom=function(X){var U=this.imod(X.mul(this.rinv));return U.red=null,U},J.prototype.imul=function(X,U){if(X.isZero()||U.isZero())return X.words[0]=0,X.length=1,X;var $=X.imul(U),j=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=$.isub(j).iushrn(this.shift),W=K;return K.cmp(this.m)>=0?W=K.isub(this.m):K.cmpn(0)<0&&(W=K.iadd(this.m)),W._forceRed(this)},J.prototype.mul=function(X,U){if(X.isZero()||U.isZero())return new V(0)._forceRed(this);var $=X.mul(U),j=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=$.isub(j).iushrn(this.shift),W=K;return K.cmp(this.m)>=0?W=K.isub(this.m):K.cmpn(0)<0&&(W=K.iadd(this.m)),W._forceRed(this)},J.prototype.invm=function(X){var U=this.imod(X._invmp(this.m).mul(this.r2));return U._forceRed(this)}})(typeof q>"u"||q,Y)}),a5=Z0((Y,q)=>{var F=o5(),O=t8();function Z(C){var B=N(C),D=B.toRed(F.mont(C.modulus)).redPow(new F(C.publicExponent)).fromRed();return{blinder:D,unblinder:B.invm(C.modulus)}}function N(C){var B=C.modulus.byteLength(),D;do D=new F(O(B));while(D.cmp(C.modulus)>=0||!D.umod(C.prime1)||!D.umod(C.prime2));return D}function V(C,B){var D=Z(B),L=B.modulus.byteLength(),H=new F(C).mul(D.blinder).umod(B.modulus),P=H.toRed(F.mont(B.prime1)),R=H.toRed(F.mont(B.prime2)),k=B.coefficient,v=B.prime1,M=B.prime2,w=P.redPow(B.exponent1).fromRed(),x=R.redPow(B.exponent2).fromRed(),g=w.isub(x).imul(k).umod(v).imul(M);return x.iadd(g).imul(D.unblinder).umod(B.modulus).toArrayLike(Buffer,"be",L)}V.getr=N,q.exports=V}),jY=Z0((Y,q)=>{q.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"}}}),X8=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,u=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(u,U0)|0,z=Math.imul(u,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(u,C0)|0,z=z+Math.imul(u,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(u,N0)|0,z=z+Math.imul(u,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(u,L0)|0,z=z+Math.imul(u,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(u,k0)|0,z=z+Math.imul(u,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(u,R0)|0,z=z+Math.imul(u,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(u,T0)|0,z=z+Math.imul(u,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(u,A0)|0,z=z+Math.imul(u,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(u,x0)|0,z=z+Math.imul(u,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(u,E0)|0,z=z+Math.imul(u,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new d(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function d(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}d.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},d.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},d.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},d.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},d.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},d.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},d.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},d.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},d.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},d.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},d.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},d.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},d.prototype.sqr=function(Q){return this.mul(Q,Q)},d.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},d.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},d.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},d.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},d.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){d.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,d),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),l3=Z0((Y)=>{var q=Y;function F(N,V){if(Array.isArray(N))return N.slice();if(!N)return[];var C=[];if(typeof N!="string"){for(var B=0;B<N.length;B++)C[B]=N[B]|0;return C}if(V==="hex"){N=N.replace(/[^a-z0-9]+/ig,""),N.length%2!==0&&(N="0"+N);for(var B=0;B<N.length;B+=2)C.push(parseInt(N[B]+N[B+1],16))}else for(var B=0;B<N.length;B++){var D=N.charCodeAt(B),L=D>>8,H=D&255;L?C.push(L,H):C.push(H)}return C}q.toArray=F;function O(N){return N.length===1?"0"+N:N}q.zero2=O;function Z(N){for(var V="",C=0;C<N.length;C++)V+=O(N[C].toString(16));return V}q.toHex=Z,q.encode=function(N,V){return V==="hex"?Z(N):N}}),_6=Z0((Y)=>{var q=Y,F=X8(),O=y6(),Z=l3();q.assert=O,q.toArray=Z.toArray,q.zero2=Z.zero2,q.toHex=Z.toHex,q.encode=Z.encode;function N(L,H,P){var R=new Array(Math.max(L.bitLength(),P)+1);R.fill(0);for(var k=1<<H+1,v=L.clone(),M=0;M<R.length;M++){var w,x=v.andln(k-1);v.isOdd()?(x>(k>>1)-1?w=(k>>1)-x:w=x,v.isubn(w)):w=0,R[M]=w,v.iushrn(1)}return R}q.getNAF=N;function V(L,H){var P=[[],[]];L=L.clone(),H=H.clone();for(var R=0,k=0,v;L.cmpn(-R)>0||H.cmpn(-k)>0;){var M=L.andln(3)+R&3,w=H.andln(3)+k&3;M===3&&(M=-1),w===3&&(w=-1);var x;(M&1)===0?x=0:(v=L.andln(7)+R&7,(v===3||v===5)&&w===2?x=-M:x=M),P[0].push(x);var g;(w&1)===0?g=0:(v=H.andln(7)+k&7,(v===3||v===5)&&M===2?g=-w:g=w),P[1].push(g),2*R===x+1&&(R=1-R),2*k===g+1&&(k=1-k),L.iushrn(1),H.iushrn(1)}return P}q.getJSF=V;function C(L,H,P){var R="_"+H;L.prototype[H]=function(){return this[R]!==void 0?this[R]:this[R]=P.call(this)}}q.cachedProperty=C;function B(L){return typeof L=="string"?q.toArray(L,"hex"):L}q.parseBytes=B;function D(L){return new F(L,"hex","le")}q.intFromLE=D}),B7=Z0((Y,q)=>{var F=X8(),O=_6(),Z=O.getNAF,N=O.getJSF,V=O.assert;function C(D,L){this.type=D,this.p=new F(L.p,16),this.red=L.prime?F.red(L.prime):F.mont(this.p),this.zero=new F(0).toRed(this.red),this.one=new F(1).toRed(this.red),this.two=new F(2).toRed(this.red),this.n=L.n&&new F(L.n,16),this.g=L.g&&this.pointFromJSON(L.g,L.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 H=this.n&&this.p.div(this.n);!H||H.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}q.exports=C,C.prototype.point=function(){throw new Error("Not implemented")},C.prototype.validate=function(){throw new Error("Not implemented")},C.prototype._fixedNafMul=function(D,L){V(D.precomputed);var H=D._getDoubles(),P=Z(L,1,this._bitLength),R=(1<<H.step+1)-(H.step%2===0?2:1);R/=3;var k=[],v,M;for(v=0;v<P.length;v+=H.step){M=0;for(var w=v+H.step-1;w>=v;w--)M=(M<<1)+P[w];k.push(M)}for(var x=this.jpoint(null,null,null),g=this.jpoint(null,null,null),_=R;_>0;_--){for(v=0;v<k.length;v++)M=k[v],M===_?g=g.mixedAdd(H.points[v]):M===-_&&(g=g.mixedAdd(H.points[v].neg()));x=x.add(g)}return x.toP()},C.prototype._wnafMul=function(D,L){var H=4,P=D._getNAFPoints(H);H=P.wnd;for(var R=P.points,k=Z(L,H,this._bitLength),v=this.jpoint(null,null,null),M=k.length-1;M>=0;M--){for(var w=0;M>=0&&k[M]===0;M--)w++;if(M>=0&&w++,v=v.dblp(w),M<0)break;var x=k[M];V(x!==0),D.type==="affine"?x>0?v=v.mixedAdd(R[x-1>>1]):v=v.mixedAdd(R[-x-1>>1].neg()):x>0?v=v.add(R[x-1>>1]):v=v.add(R[-x-1>>1].neg())}return D.type==="affine"?v.toP():v},C.prototype._wnafMulAdd=function(D,L,H,P,R){var k=this._wnafT1,v=this._wnafT2,M=this._wnafT3,w=0,x,g,_;for(x=0;x<P;x++){_=L[x];var p=_._getNAFPoints(D);k[x]=p.wnd,v[x]=p.points}for(x=P-1;x>=1;x-=2){var m=x-1,f=x;if(k[m]!==1||k[f]!==1){M[m]=Z(H[m],k[m],this._bitLength),M[f]=Z(H[f],k[f],this._bitLength),w=Math.max(M[m].length,w),w=Math.max(M[f].length,w);continue}var s=[L[m],null,null,L[f]];L[m].y.cmp(L[f].y)===0?(s[1]=L[m].add(L[f]),s[2]=L[m].toJ().mixedAdd(L[f].neg())):L[m].y.cmp(L[f].y.redNeg())===0?(s[1]=L[m].toJ().mixedAdd(L[f]),s[2]=L[m].add(L[f].neg())):(s[1]=L[m].toJ().mixedAdd(L[f]),s[2]=L[m].toJ().mixedAdd(L[f].neg()));var Q0=[-3,-1,-5,-7,0,7,5,1,3],d=N(H[m],H[f]);for(w=Math.max(d[0].length,w),M[m]=new Array(w),M[f]=new Array(w),g=0;g<w;g++){var K0=d[0][g]|0,Q=d[1][g]|0;M[m][g]=Q0[(K0+1)*3+(Q+1)],M[f][g]=0,v[m]=s}}var G=this.jpoint(null,null,null),J=this._wnafT4;for(x=w;x>=0;x--){for(var X=0;x>=0;){var U=!0;for(g=0;g<P;g++)J[g]=M[g][x]|0,J[g]!==0&&(U=!1);if(!U)break;X++,x--}if(x>=0&&X++,G=G.dblp(X),x<0)break;for(g=0;g<P;g++){var $=J[g];$!==0&&($>0?_=v[g][$-1>>1]:$<0&&(_=v[g][-$-1>>1].neg()),_.type==="affine"?G=G.mixedAdd(_):G=G.add(_))}}for(x=0;x<P;x++)v[x]=null;return R?G:G.toP()};function B(D,L){this.curve=D,this.type=L,this.precomputed=null}C.BasePoint=B,B.prototype.eq=function(){throw new Error("Not implemented")},B.prototype.validate=function(){return this.curve.validate(this)},C.prototype.decodePoint=function(D,L){D=O.toArray(D,L);var H=this.p.byteLength();if((D[0]===4||D[0]===6||D[0]===7)&&D.length-1===2*H){D[0]===6?V(D[D.length-1]%2===0):D[0]===7&&V(D[D.length-1]%2===1);var P=this.point(D.slice(1,1+H),D.slice(1+H,1+2*H));return P}else if((D[0]===2||D[0]===3)&&D.length-1===H)return this.pointFromX(D.slice(1,1+H),D[0]===3);throw new Error("Unknown point format")},B.prototype.encodeCompressed=function(D){return this.encode(D,!0)},B.prototype._encode=function(D){var L=this.curve.p.byteLength(),H=this.getX().toArray("be",L);return D?[this.getY().isEven()?2:3].concat(H):[4].concat(H,this.getY().toArray("be",L))},B.prototype.encode=function(D,L){return O.encode(this._encode(L),D)},B.prototype.precompute=function(D){if(this.precomputed)return this;var L={doubles:null,naf:null,beta:null};return L.naf=this._getNAFPoints(8),L.doubles=this._getDoubles(4,D),L.beta=this._getBeta(),this.precomputed=L,this},B.prototype._hasDoubles=function(D){if(!this.precomputed)return!1;var L=this.precomputed.doubles;return L?L.points.length>=Math.ceil((D.bitLength()+1)/L.step):!1},B.prototype._getDoubles=function(D,L){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var H=[this],P=this,R=0;R<L;R+=D){for(var k=0;k<D;k++)P=P.dbl();H.push(P)}return{step:D,points:H}},B.prototype._getNAFPoints=function(D){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var L=[this],H=(1<<D)-1,P=H===1?null:this.dbl(),R=1;R<H;R++)L[R]=L[R-1].add(P);return{wnd:D,points:L}},B.prototype._getBeta=function(){return null},B.prototype.dblp=function(D){for(var L=this,H=0;H<D;H++)L=L.dbl();return L}}),HY=Z0((Y,q)=>{var F=_6(),O=X8(),Z=h0(),N=B7(),V=F.assert;function C(L){N.call(this,"short",L),this.a=new O(L.a,16).toRed(this.red),this.b=new O(L.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(L),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Z(C,N),q.exports=C,C.prototype._getEndomorphism=function(L){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var H,P;if(L.beta)H=new O(L.beta,16).toRed(this.red);else{var R=this._getEndoRoots(this.p);H=R[0].cmp(R[1])<0?R[0]:R[1],H=H.toRed(this.red)}if(L.lambda)P=new O(L.lambda,16);else{var k=this._getEndoRoots(this.n);this.g.mul(k[0]).x.cmp(this.g.x.redMul(H))===0?P=k[0]:(P=k[1],V(this.g.mul(P).x.cmp(this.g.x.redMul(H))===0))}var v;return L.basis?v=L.basis.map(function(M){return{a:new O(M.a,16),b:new O(M.b,16)}}):v=this._getEndoBasis(P),{beta:H,lambda:P,basis:v}}},C.prototype._getEndoRoots=function(L){var H=L===this.p?this.red:O.mont(L),P=new O(2).toRed(H).redInvm(),R=P.redNeg(),k=new O(3).toRed(H).redNeg().redSqrt().redMul(P),v=R.redAdd(k).fromRed(),M=R.redSub(k).fromRed();return[v,M]},C.prototype._getEndoBasis=function(L){for(var H=this.n.ushrn(Math.floor(this.n.bitLength()/2)),P=L,R=this.n.clone(),k=new O(1),v=new O(0),M=new O(0),w=new O(1),x,g,_,p,m,f,s,Q0=0,d,K0;P.cmpn(0)!==0;){var Q=R.div(P);d=R.sub(Q.mul(P)),K0=M.sub(Q.mul(k));var G=w.sub(Q.mul(v));if(!_&&d.cmp(H)<0)x=s.neg(),g=k,_=d.neg(),p=K0;else if(_&&++Q0===2)break;s=d,R=P,P=d,M=k,k=K0,w=v,v=G}m=d.neg(),f=K0;var J=_.sqr().add(p.sqr()),X=m.sqr().add(f.sqr());return X.cmp(J)>=0&&(m=x,f=g),_.negative&&(_=_.neg(),p=p.neg()),m.negative&&(m=m.neg(),f=f.neg()),[{a:_,b:p},{a:m,b:f}]},C.prototype._endoSplit=function(L){var H=this.endo.basis,P=H[0],R=H[1],k=R.b.mul(L).divRound(this.n),v=P.b.neg().mul(L).divRound(this.n),M=k.mul(P.a),w=v.mul(R.a),x=k.mul(P.b),g=v.mul(R.b),_=L.sub(M).sub(w),p=x.add(g).neg();return{k1:_,k2:p}},C.prototype.pointFromX=function(L,H){L=new O(L,16),L.red||(L=L.toRed(this.red));var P=L.redSqr().redMul(L).redIAdd(L.redMul(this.a)).redIAdd(this.b),R=P.redSqrt();if(R.redSqr().redSub(P).cmp(this.zero)!==0)throw new Error("invalid point");var k=R.fromRed().isOdd();return(H&&!k||!H&&k)&&(R=R.redNeg()),this.point(L,R)},C.prototype.validate=function(L){if(L.inf)return!0;var{x:H,y:P}=L,R=this.a.redMul(H),k=H.redSqr().redMul(H).redIAdd(R).redIAdd(this.b);return P.redSqr().redISub(k).cmpn(0)===0},C.prototype._endoWnafMulAdd=function(L,H,P){for(var R=this._endoWnafT1,k=this._endoWnafT2,v=0;v<L.length;v++){var M=this._endoSplit(H[v]),w=L[v],x=w._getBeta();M.k1.negative&&(M.k1.ineg(),w=w.neg(!0)),M.k2.negative&&(M.k2.ineg(),x=x.neg(!0)),R[v*2]=w,R[v*2+1]=x,k[v*2]=M.k1,k[v*2+1]=M.k2}for(var g=this._wnafMulAdd(1,R,k,v*2,P),_=0;_<v*2;_++)R[_]=null,k[_]=null;return g};function B(L,H,P,R){N.BasePoint.call(this,L,"affine"),H===null&&P===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new O(H,16),this.y=new O(P,16),R&&(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)}Z(B,N.BasePoint),C.prototype.point=function(L,H,P){return new B(this,L,H,P)},C.prototype.pointFromJSON=function(L,H){return B.fromJSON(this,L,H)},B.prototype._getBeta=function(){if(this.curve.endo){var L=this.precomputed;if(L&&L.beta)return L.beta;var H=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(L){var P=this.curve,R=function(k){return P.point(k.x.redMul(P.endo.beta),k.y)};L.beta=H,H.precomputed={beta:null,naf:L.naf&&{wnd:L.naf.wnd,points:L.naf.points.map(R)},doubles:L.doubles&&{step:L.doubles.step,points:L.doubles.points.map(R)}}}return H}},B.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]},B.fromJSON=function(L,H,P){typeof H=="string"&&(H=JSON.parse(H));var R=L.point(H[0],H[1],P);if(!H[2])return R;function k(M){return L.point(M[0],M[1],P)}var v=H[2];return R.precomputed={beta:null,doubles:v.doubles&&{step:v.doubles.step,points:[R].concat(v.doubles.points.map(k))},naf:v.naf&&{wnd:v.naf.wnd,points:[R].concat(v.naf.points.map(k))}},R},B.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)+">"},B.prototype.isInfinity=function(){return this.inf},B.prototype.add=function(L){if(this.inf)return L;if(L.inf)return this;if(this.eq(L))return this.dbl();if(this.neg().eq(L))return this.curve.point(null,null);if(this.x.cmp(L.x)===0)return this.curve.point(null,null);var H=this.y.redSub(L.y);H.cmpn(0)!==0&&(H=H.redMul(this.x.redSub(L.x).redInvm()));var P=H.redSqr().redISub(this.x).redISub(L.x),R=H.redMul(this.x.redSub(P)).redISub(this.y);return this.curve.point(P,R)},B.prototype.dbl=function(){if(this.inf)return this;var L=this.y.redAdd(this.y);if(L.cmpn(0)===0)return this.curve.point(null,null);var H=this.curve.a,P=this.x.redSqr(),R=L.redInvm(),k=P.redAdd(P).redIAdd(P).redIAdd(H).redMul(R),v=k.redSqr().redISub(this.x.redAdd(this.x)),M=k.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,M)},B.prototype.getX=function(){return this.x.fromRed()},B.prototype.getY=function(){return this.y.fromRed()},B.prototype.mul=function(L){return L=new O(L,16),this.isInfinity()?this:this._hasDoubles(L)?this.curve._fixedNafMul(this,L):this.curve.endo?this.curve._endoWnafMulAdd([this],[L]):this.curve._wnafMul(this,L)},B.prototype.mulAdd=function(L,H,P){var R=[this,H],k=[L,P];return this.curve.endo?this.curve._endoWnafMulAdd(R,k):this.curve._wnafMulAdd(1,R,k,2)},B.prototype.jmulAdd=function(L,H,P){var R=[this,H],k=[L,P];return this.curve.endo?this.curve._endoWnafMulAdd(R,k,!0):this.curve._wnafMulAdd(1,R,k,2,!0)},B.prototype.eq=function(L){return this===L||this.inf===L.inf&&(this.inf||this.x.cmp(L.x)===0&&this.y.cmp(L.y)===0)},B.prototype.neg=function(L){if(this.inf)return this;var H=this.curve.point(this.x,this.y.redNeg());if(L&&this.precomputed){var P=this.precomputed,R=function(k){return k.neg()};H.precomputed={naf:P.naf&&{wnd:P.naf.wnd,points:P.naf.points.map(R)},doubles:P.doubles&&{step:P.doubles.step,points:P.doubles.points.map(R)}}}return H},B.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var L=this.curve.jpoint(this.x,this.y,this.curve.one);return L};function D(L,H,P,R){N.BasePoint.call(this,L,"jacobian"),H===null&&P===null&&R===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new O(0)):(this.x=new O(H,16),this.y=new O(P,16),this.z=new O(R,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}Z(D,N.BasePoint),C.prototype.jpoint=function(L,H,P){return new D(this,L,H,P)},D.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var L=this.z.redInvm(),H=L.redSqr(),P=this.x.redMul(H),R=this.y.redMul(H).redMul(L);return this.curve.point(P,R)},D.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},D.prototype.add=function(L){if(this.isInfinity())return L;if(L.isInfinity())return this;var H=L.z.redSqr(),P=this.z.redSqr(),R=this.x.redMul(H),k=L.x.redMul(P),v=this.y.redMul(H.redMul(L.z)),M=L.y.redMul(P.redMul(this.z)),w=R.redSub(k),x=v.redSub(M);if(w.cmpn(0)===0)return x.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=w.redSqr(),_=g.redMul(w),p=R.redMul(g),m=x.redSqr().redIAdd(_).redISub(p).redISub(p),f=x.redMul(p.redISub(m)).redISub(v.redMul(_)),s=this.z.redMul(L.z).redMul(w);return this.curve.jpoint(m,f,s)},D.prototype.mixedAdd=function(L){if(this.isInfinity())return L.toJ();if(L.isInfinity())return this;var H=this.z.redSqr(),P=this.x,R=L.x.redMul(H),k=this.y,v=L.y.redMul(H).redMul(this.z),M=P.redSub(R),w=k.redSub(v);if(M.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var x=M.redSqr(),g=x.redMul(M),_=P.redMul(x),p=w.redSqr().redIAdd(g).redISub(_).redISub(_),m=w.redMul(_.redISub(p)).redISub(k.redMul(g)),f=this.z.redMul(M);return this.curve.jpoint(p,m,f)},D.prototype.dblp=function(L){if(L===0)return this;if(this.isInfinity())return this;if(!L)return this.dbl();var H;if(this.curve.zeroA||this.curve.threeA){var P=this;for(H=0;H<L;H++)P=P.dbl();return P}var R=this.curve.a,k=this.curve.tinv,v=this.x,M=this.y,w=this.z,x=w.redSqr().redSqr(),g=M.redAdd(M);for(H=0;H<L;H++){var _=v.redSqr(),p=g.redSqr(),m=p.redSqr(),f=_.redAdd(_).redIAdd(_).redIAdd(R.redMul(x)),s=v.redMul(p),Q0=f.redSqr().redISub(s.redAdd(s)),d=s.redISub(Q0),K0=f.redMul(d);K0=K0.redIAdd(K0).redISub(m);var Q=g.redMul(w);H+1<L&&(x=x.redMul(m)),v=Q0,w=Q,g=K0}return this.curve.jpoint(v,g.redMul(k),w)},D.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},D.prototype._zeroDbl=function(){var L,H,P;if(this.zOne){var R=this.x.redSqr(),k=this.y.redSqr(),v=k.redSqr(),M=this.x.redAdd(k).redSqr().redISub(R).redISub(v);M=M.redIAdd(M);var w=R.redAdd(R).redIAdd(R),x=w.redSqr().redISub(M).redISub(M),g=v.redIAdd(v);g=g.redIAdd(g),g=g.redIAdd(g),L=x,H=w.redMul(M.redISub(x)).redISub(g),P=this.y.redAdd(this.y)}else{var _=this.x.redSqr(),p=this.y.redSqr(),m=p.redSqr(),f=this.x.redAdd(p).redSqr().redISub(_).redISub(m);f=f.redIAdd(f);var s=_.redAdd(_).redIAdd(_),Q0=s.redSqr(),d=m.redIAdd(m);d=d.redIAdd(d),d=d.redIAdd(d),L=Q0.redISub(f).redISub(f),H=s.redMul(f.redISub(L)).redISub(d),P=this.y.redMul(this.z),P=P.redIAdd(P)}return this.curve.jpoint(L,H,P)},D.prototype._threeDbl=function(){var L,H,P;if(this.zOne){var R=this.x.redSqr(),k=this.y.redSqr(),v=k.redSqr(),M=this.x.redAdd(k).redSqr().redISub(R).redISub(v);M=M.redIAdd(M);var w=R.redAdd(R).redIAdd(R).redIAdd(this.curve.a),x=w.redSqr().redISub(M).redISub(M);L=x;var g=v.redIAdd(v);g=g.redIAdd(g),g=g.redIAdd(g),H=w.redMul(M.redISub(x)).redISub(g),P=this.y.redAdd(this.y)}else{var _=this.z.redSqr(),p=this.y.redSqr(),m=this.x.redMul(p),f=this.x.redSub(_).redMul(this.x.redAdd(_));f=f.redAdd(f).redIAdd(f);var s=m.redIAdd(m);s=s.redIAdd(s);var Q0=s.redAdd(s);L=f.redSqr().redISub(Q0),P=this.y.redAdd(this.z).redSqr().redISub(p).redISub(_);var d=p.redSqr();d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d),H=f.redMul(s.redISub(L)).redISub(d)}return this.curve.jpoint(L,H,P)},D.prototype._dbl=function(){var L=this.curve.a,H=this.x,P=this.y,R=this.z,k=R.redSqr().redSqr(),v=H.redSqr(),M=P.redSqr(),w=v.redAdd(v).redIAdd(v).redIAdd(L.redMul(k)),x=H.redAdd(H);x=x.redIAdd(x);var g=x.redMul(M),_=w.redSqr().redISub(g.redAdd(g)),p=g.redISub(_),m=M.redSqr();m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var f=w.redMul(p).redISub(m),s=P.redAdd(P).redMul(R);return this.curve.jpoint(_,f,s)},D.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var L=this.x.redSqr(),H=this.y.redSqr(),P=this.z.redSqr(),R=H.redSqr(),k=L.redAdd(L).redIAdd(L),v=k.redSqr(),M=this.x.redAdd(H).redSqr().redISub(L).redISub(R);M=M.redIAdd(M),M=M.redAdd(M).redIAdd(M),M=M.redISub(v);var w=M.redSqr(),x=R.redIAdd(R);x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var g=k.redIAdd(M).redSqr().redISub(v).redISub(w).redISub(x),_=H.redMul(g);_=_.redIAdd(_),_=_.redIAdd(_);var p=this.x.redMul(w).redISub(_);p=p.redIAdd(p),p=p.redIAdd(p);var m=this.y.redMul(g.redMul(x.redISub(g)).redISub(M.redMul(w)));m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var f=this.z.redAdd(M).redSqr().redISub(P).redISub(w);return this.curve.jpoint(p,m,f)},D.prototype.mul=function(L,H){return L=new O(L,H),this.curve._wnafMul(this,L)},D.prototype.eq=function(L){if(L.type==="affine")return this.eq(L.toJ());if(this===L)return!0;var H=this.z.redSqr(),P=L.z.redSqr();if(this.x.redMul(P).redISub(L.x.redMul(H)).cmpn(0)!==0)return!1;var R=H.redMul(this.z),k=P.redMul(L.z);return this.y.redMul(k).redISub(L.y.redMul(R)).cmpn(0)===0},D.prototype.eqXToP=function(L){var H=this.z.redSqr(),P=L.toRed(this.curve.red).redMul(H);if(this.x.cmp(P)===0)return!0;for(var R=L.clone(),k=this.curve.redN.redMul(H);;){if(R.iadd(this.curve.n),R.cmp(this.curve.p)>=0)return!1;if(P.redIAdd(k),this.x.cmp(P)===0)return!0}},D.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)+">"},D.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),CY=Z0((Y,q)=>{var F=X8(),O=h0(),Z=B7(),N=_6();function V(B){Z.call(this,"mont",B),this.a=new F(B.a,16).toRed(this.red),this.b=new F(B.b,16).toRed(this.red),this.i4=new F(4).toRed(this.red).redInvm(),this.two=new F(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}O(V,Z),q.exports=V,V.prototype.validate=function(B){var D=B.normalize().x,L=D.redSqr(),H=L.redMul(D).redAdd(L.redMul(this.a)).redAdd(D),P=H.redSqrt();return P.redSqr().cmp(H)===0};function C(B,D,L){Z.BasePoint.call(this,B,"projective"),D===null&&L===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new F(D,16),this.z=new F(L,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}O(C,Z.BasePoint),V.prototype.decodePoint=function(B,D){return this.point(N.toArray(B,D),1)},V.prototype.point=function(B,D){return new C(this,B,D)},V.prototype.pointFromJSON=function(B){return C.fromJSON(this,B)},C.prototype.precompute=function(){},C.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},C.fromJSON=function(B,D){return new C(B,D[0],D[1]||B.one)},C.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)+">"},C.prototype.isInfinity=function(){return this.z.cmpn(0)===0},C.prototype.dbl=function(){var B=this.x.redAdd(this.z),D=B.redSqr(),L=this.x.redSub(this.z),H=L.redSqr(),P=D.redSub(H),R=D.redMul(H),k=P.redMul(H.redAdd(this.curve.a24.redMul(P)));return this.curve.point(R,k)},C.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.diffAdd=function(B,D){var L=this.x.redAdd(this.z),H=this.x.redSub(this.z),P=B.x.redAdd(B.z),R=B.x.redSub(B.z),k=R.redMul(L),v=P.redMul(H),M=D.z.redMul(k.redAdd(v).redSqr()),w=D.x.redMul(k.redISub(v).redSqr());return this.curve.point(M,w)},C.prototype.mul=function(B){for(var D=B.clone(),L=this,H=this.curve.point(null,null),P=this,R=[];D.cmpn(0)!==0;D.iushrn(1))R.push(D.andln(1));for(var k=R.length-1;k>=0;k--)R[k]===0?(L=L.diffAdd(H,P),H=H.dbl()):(H=L.diffAdd(H,P),L=L.dbl());return H},C.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.eq=function(B){return this.getX().cmp(B.getX())===0},C.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},C.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),OY=Z0((Y,q)=>{var F=_6(),O=X8(),Z=h0(),N=B7(),V=F.assert;function C(D){this.twisted=(D.a|0)!==1,this.mOneA=this.twisted&&(D.a|0)===-1,this.extended=this.mOneA,N.call(this,"edwards",D),this.a=new O(D.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new O(D.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new O(D.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),V(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(D.c|0)===1}Z(C,N),q.exports=C,C.prototype._mulA=function(D){return this.mOneA?D.redNeg():this.a.redMul(D)},C.prototype._mulC=function(D){return this.oneC?D:this.c.redMul(D)},C.prototype.jpoint=function(D,L,H,P){return this.point(D,L,H,P)},C.prototype.pointFromX=function(D,L){D=new O(D,16),D.red||(D=D.toRed(this.red));var H=D.redSqr(),P=this.c2.redSub(this.a.redMul(H)),R=this.one.redSub(this.c2.redMul(this.d).redMul(H)),k=P.redMul(R.redInvm()),v=k.redSqrt();if(v.redSqr().redSub(k).cmp(this.zero)!==0)throw new Error("invalid point");var M=v.fromRed().isOdd();return(L&&!M||!L&&M)&&(v=v.redNeg()),this.point(D,v)},C.prototype.pointFromY=function(D,L){D=new O(D,16),D.red||(D=D.toRed(this.red));var H=D.redSqr(),P=H.redSub(this.c2),R=H.redMul(this.d).redMul(this.c2).redSub(this.a),k=P.redMul(R.redInvm());if(k.cmp(this.zero)===0){if(L)throw new Error("invalid point");return this.point(this.zero,D)}var v=k.redSqrt();if(v.redSqr().redSub(k).cmp(this.zero)!==0)throw new Error("invalid point");return v.fromRed().isOdd()!==L&&(v=v.redNeg()),this.point(v,D)},C.prototype.validate=function(D){if(D.isInfinity())return!0;D.normalize();var L=D.x.redSqr(),H=D.y.redSqr(),P=L.redMul(this.a).redAdd(H),R=this.c2.redMul(this.one.redAdd(this.d.redMul(L).redMul(H)));return P.cmp(R)===0};function B(D,L,H,P,R){N.BasePoint.call(this,D,"projective"),L===null&&H===null&&P===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 O(L,16),this.y=new O(H,16),this.z=P?new O(P,16):this.curve.one,this.t=R&&new O(R,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()))))}Z(B,N.BasePoint),C.prototype.pointFromJSON=function(D){return B.fromJSON(this,D)},C.prototype.point=function(D,L,H,P){return new B(this,D,L,H,P)},B.fromJSON=function(D,L){return new B(D,L[0],L[1],L[2])},B.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)+">"},B.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},B.prototype._extDbl=function(){var D=this.x.redSqr(),L=this.y.redSqr(),H=this.z.redSqr();H=H.redIAdd(H);var P=this.curve._mulA(D),R=this.x.redAdd(this.y).redSqr().redISub(D).redISub(L),k=P.redAdd(L),v=k.redSub(H),M=P.redSub(L),w=R.redMul(v),x=k.redMul(M),g=R.redMul(M),_=v.redMul(k);return this.curve.point(w,x,_,g)},B.prototype._projDbl=function(){var D=this.x.redAdd(this.y).redSqr(),L=this.x.redSqr(),H=this.y.redSqr(),P,R,k,v,M,w;if(this.curve.twisted){v=this.curve._mulA(L);var x=v.redAdd(H);this.zOne?(P=D.redSub(L).redSub(H).redMul(x.redSub(this.curve.two)),R=x.redMul(v.redSub(H)),k=x.redSqr().redSub(x).redSub(x)):(M=this.z.redSqr(),w=x.redSub(M).redISub(M),P=D.redSub(L).redISub(H).redMul(w),R=x.redMul(v.redSub(H)),k=x.redMul(w))}else v=L.redAdd(H),M=this.curve._mulC(this.z).redSqr(),w=v.redSub(M).redSub(M),P=this.curve._mulC(D.redISub(v)).redMul(w),R=this.curve._mulC(v).redMul(L.redISub(H)),k=v.redMul(w);return this.curve.point(P,R,k)},B.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},B.prototype._extAdd=function(D){var L=this.y.redSub(this.x).redMul(D.y.redSub(D.x)),H=this.y.redAdd(this.x).redMul(D.y.redAdd(D.x)),P=this.t.redMul(this.curve.dd).redMul(D.t),R=this.z.redMul(D.z.redAdd(D.z)),k=H.redSub(L),v=R.redSub(P),M=R.redAdd(P),w=H.redAdd(L),x=k.redMul(v),g=M.redMul(w),_=k.redMul(w),p=v.redMul(M);return this.curve.point(x,g,p,_)},B.prototype._projAdd=function(D){var L=this.z.redMul(D.z),H=L.redSqr(),P=this.x.redMul(D.x),R=this.y.redMul(D.y),k=this.curve.d.redMul(P).redMul(R),v=H.redSub(k),M=H.redAdd(k),w=this.x.redAdd(this.y).redMul(D.x.redAdd(D.y)).redISub(P).redISub(R),x=L.redMul(v).redMul(w),g,_;return this.curve.twisted?(g=L.redMul(M).redMul(R.redSub(this.curve._mulA(P))),_=v.redMul(M)):(g=L.redMul(M).redMul(R.redSub(P)),_=this.curve._mulC(v).redMul(M)),this.curve.point(x,g,_)},B.prototype.add=function(D){return this.isInfinity()?D:D.isInfinity()?this:this.curve.extended?this._extAdd(D):this._projAdd(D)},B.prototype.mul=function(D){return this._hasDoubles(D)?this.curve._fixedNafMul(this,D):this.curve._wnafMul(this,D)},B.prototype.mulAdd=function(D,L,H){return this.curve._wnafMulAdd(1,[this,L],[D,H],2,!1)},B.prototype.jmulAdd=function(D,L,H){return this.curve._wnafMulAdd(1,[this,L],[D,H],2,!0)},B.prototype.normalize=function(){if(this.zOne)return this;var D=this.z.redInvm();return this.x=this.x.redMul(D),this.y=this.y.redMul(D),this.t&&(this.t=this.t.redMul(D)),this.z=this.curve.one,this.zOne=!0,this},B.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},B.prototype.getX=function(){return this.normalize(),this.x.fromRed()},B.prototype.getY=function(){return this.normalize(),this.y.fromRed()},B.prototype.eq=function(D){return this===D||this.getX().cmp(D.getX())===0&&this.getY().cmp(D.getY())===0},B.prototype.eqXToP=function(D){var L=D.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(L)===0)return!0;for(var H=D.clone(),P=this.curve.redN.redMul(this.z);;){if(H.iadd(this.curve.n),H.cmp(this.curve.p)>=0)return!1;if(L.redIAdd(P),this.x.cmp(L)===0)return!0}},B.prototype.toP=B.prototype.normalize,B.prototype.mixedAdd=B.prototype.add}),u3=Z0((Y)=>{var q=Y;q.base=B7(),q.short=HY(),q.mont=CY(),q.edwards=OY()}),o6=Z0((Y)=>{var q=y6(),F=h0();Y.inherits=F;function O(G,J){return(G.charCodeAt(J)&64512)!==55296||J<0||J+1>=G.length?!1:(G.charCodeAt(J+1)&64512)===56320}function Z(G,J){if(Array.isArray(G))return G.slice();if(!G)return[];var X=[];if(typeof G=="string")if(J){if(J==="hex")for(G=G.replace(/[^a-z0-9]+/ig,""),G.length%2!==0&&(G="0"+G),$=0;$<G.length;$+=2)X.push(parseInt(G[$]+G[$+1],16))}else for(var U=0,$=0;$<G.length;$++){var j=G.charCodeAt($);j<128?X[U++]=j:j<2048?(X[U++]=j>>6|192,X[U++]=j&63|128):O(G,$)?(j=65536+((j&1023)<<10)+(G.charCodeAt(++$)&1023),X[U++]=j>>18|240,X[U++]=j>>12&63|128,X[U++]=j>>6&63|128,X[U++]=j&63|128):(X[U++]=j>>12|224,X[U++]=j>>6&63|128,X[U++]=j&63|128)}else for($=0;$<G.length;$++)X[$]=G[$]|0;return X}Y.toArray=Z;function N(G){for(var J="",X=0;X<G.length;X++)J+=B(G[X].toString(16));return J}Y.toHex=N;function V(G){var J=G>>>24|G>>>8&65280|G<<8&16711680|(G&255)<<24;return J>>>0}Y.htonl=V;function C(G,J){for(var X="",U=0;U<G.length;U++){var $=G[U];J==="little"&&($=V($)),X+=D($.toString(16))}return X}Y.toHex32=C;function B(G){return G.length===1?"0"+G:G}Y.zero2=B;function D(G){return G.length===7?"0"+G:G.length===6?"00"+G:G.length===5?"000"+G:G.length===4?"0000"+G:G.length===3?"00000"+G:G.length===2?"000000"+G:G.length===1?"0000000"+G:G}Y.zero8=D;function L(G,J,X,U){var $=X-J;q($%4===0);for(var j=new Array($/4),K=0,W=J;K<j.length;K++,W+=4){var z;U==="big"?z=G[W]<<24|G[W+1]<<16|G[W+2]<<8|G[W+3]:z=G[W+3]<<24|G[W+2]<<16|G[W+1]<<8|G[W],j[K]=z>>>0}return j}Y.join32=L;function H(G,J){for(var X=new Array(G.length*4),U=0,$=0;U<G.length;U++,$+=4){var j=G[U];J==="big"?(X[$]=j>>>24,X[$+1]=j>>>16&255,X[$+2]=j>>>8&255,X[$+3]=j&255):(X[$+3]=j>>>24,X[$+2]=j>>>16&255,X[$+1]=j>>>8&255,X[$]=j&255)}return X}Y.split32=H;function P(G,J){return G>>>J|G<<32-J}Y.rotr32=P;function R(G,J){return G<<J|G>>>32-J}Y.rotl32=R;function k(G,J){return G+J>>>0}Y.sum32=k;function v(G,J,X){return G+J+X>>>0}Y.sum32_3=v;function M(G,J,X,U){return G+J+X+U>>>0}Y.sum32_4=M;function w(G,J,X,U,$){return G+J+X+U+$>>>0}Y.sum32_5=w;function x(G,J,X,U){var $=G[J],j=G[J+1],K=U+j>>>0,W=(K<U?1:0)+X+$;G[J]=W>>>0,G[J+1]=K}Y.sum64=x;function g(G,J,X,U){var $=J+U>>>0,j=($<J?1:0)+G+X;return j>>>0}Y.sum64_hi=g;function _(G,J,X,U){var $=J+U;return $>>>0}Y.sum64_lo=_;function p(G,J,X,U,$,j,K,W){var z=0,A=J;A=A+U>>>0,z+=A<J?1:0,A=A+j>>>0,z+=A<j?1:0,A=A+W>>>0,z+=A<W?1:0;var T=G+X+$+K+z;return T>>>0}Y.sum64_4_hi=p;function m(G,J,X,U,$,j,K,W){var z=J+U+j+W;return z>>>0}Y.sum64_4_lo=m;function f(G,J,X,U,$,j,K,W,z,A){var T=0,y=J;y=y+U>>>0,T+=y<J?1:0,y=y+j>>>0,T+=y<j?1:0,y=y+W>>>0,T+=y<W?1:0,y=y+A>>>0,T+=y<A?1:0;var r=G+X+$+K+z+T;return r>>>0}Y.sum64_5_hi=f;function s(G,J,X,U,$,j,K,W,z,A){var T=J+U+j+W+A;return T>>>0}Y.sum64_5_lo=s;function Q0(G,J,X){var U=J<<32-X|G>>>X;return U>>>0}Y.rotr64_hi=Q0;function d(G,J,X){var U=G<<32-X|J>>>X;return U>>>0}Y.rotr64_lo=d;function K0(G,J,X){return G>>>X}Y.shr64_hi=K0;function Q(G,J,X){var U=G<<32-X|J>>>X;return U>>>0}Y.shr64_lo=Q}),y1=Z0((Y)=>{var q=o6(),F=y6();function O(){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}Y.BlockHash=O,O.prototype.update=function(Z,N){if(Z=q.toArray(Z,N),this.pending?this.pending=this.pending.concat(Z):this.pending=Z,this.pendingTotal+=Z.length,this.pending.length>=this._delta8){Z=this.pending;var V=Z.length%this._delta8;this.pending=Z.slice(Z.length-V,Z.length),this.pending.length===0&&(this.pending=null),Z=q.join32(Z,0,Z.length-V,this.endian);for(var C=0;C<Z.length;C+=this._delta32)this._update(Z,C,C+this._delta32)}return this},O.prototype.digest=function(Z){return this.update(this._pad()),F(this.pending===null),this._digest(Z)},O.prototype._pad=function(){var Z=this.pendingTotal,N=this._delta8,V=N-(Z+this.padLength)%N,C=new Array(V+this.padLength);C[0]=128;for(var B=1;B<V;B++)C[B]=0;if(Z<<=3,this.endian==="big"){for(var D=8;D<this.padLength;D++)C[B++]=0;C[B++]=0,C[B++]=0,C[B++]=0,C[B++]=0,C[B++]=Z>>>24&255,C[B++]=Z>>>16&255,C[B++]=Z>>>8&255,C[B++]=Z&255}else for(C[B++]=Z&255,C[B++]=Z>>>8&255,C[B++]=Z>>>16&255,C[B++]=Z>>>24&255,C[B++]=0,C[B++]=0,C[B++]=0,C[B++]=0,D=8;D<this.padLength;D++)C[B++]=0;return C}}),d3=Z0((Y)=>{var q=o6(),F=q.rotr32;function O(H,P,R,k){if(H===0)return Z(P,R,k);if(H===1||H===3)return V(P,R,k);if(H===2)return N(P,R,k)}Y.ft_1=O;function Z(H,P,R){return H&P^~H&R}Y.ch32=Z;function N(H,P,R){return H&P^H&R^P&R}Y.maj32=N;function V(H,P,R){return H^P^R}Y.p32=V;function C(H){return F(H,2)^F(H,13)^F(H,22)}Y.s0_256=C;function B(H){return F(H,6)^F(H,11)^F(H,25)}Y.s1_256=B;function D(H){return F(H,7)^F(H,18)^H>>>3}Y.g0_256=D;function L(H){return F(H,17)^F(H,19)^H>>>10}Y.g1_256=L}),DY=Z0((Y,q)=>{var F=o6(),O=y1(),Z=d3(),N=F.rotl32,V=F.sum32,C=F.sum32_5,B=Z.ft_1,D=O.BlockHash,L=[1518500249,1859775393,2400959708,3395469782];function H(){if(!(this instanceof H))return new H;D.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}F.inherits(H,D),q.exports=H,H.blockSize=512,H.outSize=160,H.hmacStrength=80,H.padLength=64,H.prototype._update=function(P,R){for(var k=this.W,v=0;v<16;v++)k[v]=P[R+v];for(;v<k.length;v++)k[v]=N(k[v-3]^k[v-8]^k[v-14]^k[v-16],1);var M=this.h[0],w=this.h[1],x=this.h[2],g=this.h[3],_=this.h[4];for(v=0;v<k.length;v++){var p=~~(v/20),m=C(N(M,5),B(p,w,x,g),_,k[v],L[p]);_=g,g=x,x=N(w,30),w=M,M=m}this.h[0]=V(this.h[0],M),this.h[1]=V(this.h[1],w),this.h[2]=V(this.h[2],x),this.h[3]=V(this.h[3],g),this.h[4]=V(this.h[4],_)},H.prototype._digest=function(P){return P==="hex"?F.toHex32(this.h,"big"):F.split32(this.h,"big")}}),f3=Z0((Y,q)=>{var F=o6(),O=y1(),Z=d3(),N=y6(),V=F.sum32,C=F.sum32_4,B=F.sum32_5,D=Z.ch32,L=Z.maj32,H=Z.s0_256,P=Z.s1_256,R=Z.g0_256,k=Z.g1_256,v=O.BlockHash,M=[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;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=M,this.W=new Array(64)}F.inherits(w,v),q.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(x,g){for(var _=this.W,p=0;p<16;p++)_[p]=x[g+p];for(;p<_.length;p++)_[p]=C(k(_[p-2]),_[p-7],R(_[p-15]),_[p-16]);var m=this.h[0],f=this.h[1],s=this.h[2],Q0=this.h[3],d=this.h[4],K0=this.h[5],Q=this.h[6],G=this.h[7];for(N(this.k.length===_.length),p=0;p<_.length;p++){var J=B(G,P(d),D(d,K0,Q),this.k[p],_[p]),X=V(H(m),L(m,f,s));G=Q,Q=K0,K0=d,d=V(Q0,J),Q0=s,s=f,f=m,m=V(J,X)}this.h[0]=V(this.h[0],m),this.h[1]=V(this.h[1],f),this.h[2]=V(this.h[2],s),this.h[3]=V(this.h[3],Q0),this.h[4]=V(this.h[4],d),this.h[5]=V(this.h[5],K0),this.h[6]=V(this.h[6],Q),this.h[7]=V(this.h[7],G)},w.prototype._digest=function(x){return x==="hex"?F.toHex32(this.h,"big"):F.split32(this.h,"big")}}),LY=Z0((Y,q)=>{var F=o6(),O=f3();function Z(){if(!(this instanceof Z))return new Z;O.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}F.inherits(Z,O),q.exports=Z,Z.blockSize=512,Z.outSize=224,Z.hmacStrength=192,Z.padLength=64,Z.prototype._digest=function(N){return N==="hex"?F.toHex32(this.h.slice(0,7),"big"):F.split32(this.h.slice(0,7),"big")}}),o3=Z0((Y,q)=>{var F=o6(),O=y1(),Z=y6(),N=F.rotr64_hi,V=F.rotr64_lo,C=F.shr64_hi,B=F.shr64_lo,D=F.sum64,L=F.sum64_hi,H=F.sum64_lo,P=F.sum64_4_hi,R=F.sum64_4_lo,k=F.sum64_5_hi,v=F.sum64_5_lo,M=O.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 x(){if(!(this instanceof x))return new x;M.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)}F.inherits(x,M),q.exports=x,x.blockSize=1024,x.outSize=512,x.hmacStrength=192,x.padLength=128,x.prototype._prepareBlock=function(X,U){for(var $=this.W,j=0;j<32;j++)$[j]=X[U+j];for(;j<$.length;j+=2){var K=G($[j-4],$[j-3]),W=J($[j-4],$[j-3]),z=$[j-14],A=$[j-13],T=K0($[j-30],$[j-29]),y=Q($[j-30],$[j-29]),r=$[j-32],a=$[j-31];$[j]=P(K,W,z,A,T,y,r,a),$[j+1]=R(K,W,z,A,T,y,r,a)}},x.prototype._update=function(X,U){this._prepareBlock(X,U);var $=this.W,j=this.h[0],K=this.h[1],W=this.h[2],z=this.h[3],A=this.h[4],T=this.h[5],y=this.h[6],r=this.h[7],a=this.h[8],t=this.h[9],l=this.h[10],h=this.h[11],n=this.h[12],q0=this.h[13],G0=this.h[14],F0=this.h[15];Z(this.k.length===$.length);for(var b=0;b<$.length;b+=2){var E=G0,u=F0,e=Q0(a,t),V0=d(a,t),W0=g(a,t,l,h,n,q0),J0=_(a,t,l,h,n,q0),Y0=this.k[b],X0=this.k[b+1],g0=$[b],$0=$[b+1],z0=k(E,u,e,V0,W0,J0,Y0,X0,g0,$0),_0=v(E,u,e,V0,W0,J0,Y0,X0,g0,$0);E=f(j,K),u=s(j,K),e=p(j,K,W,z,A,T),V0=m(j,K,W,z,A,T);var I=L(E,u,e,V0),S=H(E,u,e,V0);G0=n,F0=q0,n=l,q0=h,l=a,h=t,a=L(y,r,z0,_0),t=H(r,r,z0,_0),y=A,r=T,A=W,T=z,W=j,z=K,j=L(z0,_0,I,S),K=H(z0,_0,I,S)}D(this.h,0,j,K),D(this.h,2,W,z),D(this.h,4,A,T),D(this.h,6,y,r),D(this.h,8,a,t),D(this.h,10,l,h),D(this.h,12,n,q0),D(this.h,14,G0,F0)},x.prototype._digest=function(X){return X==="hex"?F.toHex32(this.h,"big"):F.split32(this.h,"big")};function g(X,U,$,j,K){var W=X&$^~X&K;return W<0&&(W+=4294967296),W}function _(X,U,$,j,K,W){var z=U&j^~U&W;return z<0&&(z+=4294967296),z}function p(X,U,$,j,K){var W=X&$^X&K^$&K;return W<0&&(W+=4294967296),W}function m(X,U,$,j,K,W){var z=U&j^U&W^j&W;return z<0&&(z+=4294967296),z}function f(X,U){var $=N(X,U,28),j=N(U,X,2),K=N(U,X,7),W=$^j^K;return W<0&&(W+=4294967296),W}function s(X,U){var $=V(X,U,28),j=V(U,X,2),K=V(U,X,7),W=$^j^K;return W<0&&(W+=4294967296),W}function Q0(X,U){var $=N(X,U,14),j=N(X,U,18),K=N(U,X,9),W=$^j^K;return W<0&&(W+=4294967296),W}function d(X,U){var $=V(X,U,14),j=V(X,U,18),K=V(U,X,9),W=$^j^K;return W<0&&(W+=4294967296),W}function K0(X,U){var $=N(X,U,1),j=N(X,U,8),K=C(X,U,7),W=$^j^K;return W<0&&(W+=4294967296),W}function Q(X,U){var $=V(X,U,1),j=V(X,U,8),K=B(X,U,7),W=$^j^K;return W<0&&(W+=4294967296),W}function G(X,U){var $=N(X,U,19),j=N(U,X,29),K=C(X,U,6),W=$^j^K;return W<0&&(W+=4294967296),W}function J(X,U){var $=V(X,U,19),j=V(U,X,29),K=B(X,U,6),W=$^j^K;return W<0&&(W+=4294967296),W}}),NY=Z0((Y,q)=>{var F=o6(),O=o3();function Z(){if(!(this instanceof Z))return new Z;O.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}F.inherits(Z,O),q.exports=Z,Z.blockSize=1024,Z.outSize=384,Z.hmacStrength=192,Z.padLength=128,Z.prototype._digest=function(N){return N==="hex"?F.toHex32(this.h.slice(0,12),"big"):F.split32(this.h.slice(0,12),"big")}}),PY=Z0((Y)=>{Y.sha1=DY(),Y.sha224=LY(),Y.sha256=f3(),Y.sha384=NY(),Y.sha512=o3()}),kY=Z0((Y)=>{var q=o6(),F=y1(),O=q.rotl32,Z=q.sum32,N=q.sum32_3,V=q.sum32_4,C=F.BlockHash;function B(){if(!(this instanceof B))return new B;C.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}q.inherits(B,C),Y.ripemd160=B,B.blockSize=512,B.outSize=160,B.hmacStrength=192,B.padLength=64,B.prototype._update=function(M,w){for(var x=this.h[0],g=this.h[1],_=this.h[2],p=this.h[3],m=this.h[4],f=x,s=g,Q0=_,d=p,K0=m,Q=0;Q<80;Q++){var G=Z(O(V(x,D(Q,g,_,p),M[P[Q]+w],L(Q)),k[Q]),m);x=m,m=p,p=O(_,10),_=g,g=G,G=Z(O(V(f,D(79-Q,s,Q0,d),M[R[Q]+w],H(Q)),v[Q]),K0),f=K0,K0=d,d=O(Q0,10),Q0=s,s=G}G=N(this.h[1],_,d),this.h[1]=N(this.h[2],p,K0),this.h[2]=N(this.h[3],m,f),this.h[3]=N(this.h[4],x,s),this.h[4]=N(this.h[0],g,Q0),this.h[0]=G},B.prototype._digest=function(M){return M==="hex"?q.toHex32(this.h,"little"):q.split32(this.h,"little")};function D(M,w,x,g){return M<=15?w^x^g:M<=31?w&x|~w&g:M<=47?(w|~x)^g:M<=63?w&g|x&~g:w^(x|~g)}function L(M){return M<=15?0:M<=31?1518500249:M<=47?1859775393:M<=63?2400959708:2840853838}function H(M){return M<=15?1352829926:M<=31?1548603684:M<=47?1836072691:M<=63?2053994217:0}var P=[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],R=[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],k=[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],v=[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]}),BY=Z0((Y,q)=>{var F=o6(),O=y6();function Z(N,V,C){if(!(this instanceof Z))return new Z(N,V,C);this.Hash=N,this.blockSize=N.blockSize/8,this.outSize=N.outSize/8,this.inner=null,this.outer=null,this._init(F.toArray(V,C))}q.exports=Z,Z.prototype._init=function(N){N.length>this.blockSize&&(N=new this.Hash().update(N).digest()),O(N.length<=this.blockSize);for(var V=N.length;V<this.blockSize;V++)N.push(0);for(V=0;V<N.length;V++)N[V]^=54;for(this.inner=new this.Hash().update(N),V=0;V<N.length;V++)N[V]^=106;this.outer=new this.Hash().update(N)},Z.prototype.update=function(N,V){return this.inner.update(N,V),this},Z.prototype.digest=function(N){return this.outer.update(this.inner.digest()),this.outer.digest(N)}}),n5=Z0((Y)=>{var q=Y;q.utils=o6(),q.common=y1(),q.sha=PY(),q.ripemd=kY(),q.hmac=BY(),q.sha1=q.sha.sha1,q.sha256=q.sha.sha256,q.sha224=q.sha.sha224,q.sha384=q.sha.sha384,q.sha512=q.sha.sha512,q.ripemd160=q.ripemd.ripemd160}),RY=Z0((Y,q)=>{q.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"]]}}}),r5=Z0((Y)=>{var q=Y,F=n5(),O=u3(),Z=_6(),N=Z.assert;function V(D){D.type==="short"?this.curve=new O.short(D):D.type==="edwards"?this.curve=new O.edwards(D):this.curve=new O.mont(D),this.g=this.curve.g,this.n=this.curve.n,this.hash=D.hash,N(this.g.validate(),"Invalid curve"),N(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}q.PresetCurve=V;function C(D,L){Object.defineProperty(q,D,{configurable:!0,enumerable:!0,get:function(){var H=new V(L);return Object.defineProperty(q,D,{configurable:!0,enumerable:!0,value:H}),H}})}C("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:F.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),C("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:F.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),C("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:F.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),C("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:F.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"]}),C("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:F.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"]}),C("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:F.sha256,gRed:!1,g:["9"]}),C("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:F.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var B;try{B=RY()}catch{B=void 0}C("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:F.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",B]})}),IY=Z0((Y,q)=>{var F=n5(),O=l3(),Z=y6();function N(V){if(!(this instanceof N))return new N(V);this.hash=V.hash,this.predResist=!!V.predResist,this.outLen=this.hash.outSize,this.minEntropy=V.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var C=O.toArray(V.entropy,V.entropyEnc||"hex"),B=O.toArray(V.nonce,V.nonceEnc||"hex"),D=O.toArray(V.pers,V.persEnc||"hex");Z(C.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(C,B,D)}q.exports=N,N.prototype._init=function(V,C,B){var D=V.concat(C).concat(B);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var L=0;L<this.V.length;L++)this.K[L]=0,this.V[L]=1;this._update(D),this._reseed=1,this.reseedInterval=281474976710656},N.prototype._hmac=function(){return new F.hmac(this.hash,this.K)},N.prototype._update=function(V){var C=this._hmac().update(this.V).update([0]);V&&(C=C.update(V)),this.K=C.digest(),this.V=this._hmac().update(this.V).digest(),V&&(this.K=this._hmac().update(this.V).update([1]).update(V).digest(),this.V=this._hmac().update(this.V).digest())},N.prototype.reseed=function(V,C,B,D){typeof C!="string"&&(D=B,B=C,C=null),V=O.toArray(V,C),B=O.toArray(B,D),Z(V.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(V.concat(B||[])),this._reseed=1},N.prototype.generate=function(V,C,B,D){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof C!="string"&&(D=B,B=C,C=null),B&&(B=O.toArray(B,D||"hex"),this._update(B));for(var L=[];L.length<V;)this.V=this._hmac().update(this.V).digest(),L=L.concat(this.V);var H=L.slice(0,V);return this._update(B),this._reseed++,O.encode(H,C)}}),TY=Z0((Y,q)=>{var F=X8(),O=_6(),Z=O.assert;function N(V,C){this.ec=V,this.priv=null,this.pub=null,C.priv&&this._importPrivate(C.priv,C.privEnc),C.pub&&this._importPublic(C.pub,C.pubEnc)}q.exports=N,N.fromPublic=function(V,C,B){return C instanceof N?C:new N(V,{pub:C,pubEnc:B})},N.fromPrivate=function(V,C,B){return C instanceof N?C:new N(V,{priv:C,privEnc:B})},N.prototype.validate=function(){var V=this.getPublic();return V.isInfinity()?{result:!1,reason:"Invalid public key"}:V.validate()?V.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"}},N.prototype.getPublic=function(V,C){return typeof V=="string"&&(C=V,V=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),C?this.pub.encode(C,V):this.pub},N.prototype.getPrivate=function(V){return V==="hex"?this.priv.toString(16,2):this.priv},N.prototype._importPrivate=function(V,C){this.priv=new F(V,C||16),this.priv=this.priv.umod(this.ec.curve.n)},N.prototype._importPublic=function(V,C){if(V.x||V.y){this.ec.curve.type==="mont"?Z(V.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Z(V.x&&V.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(V.x,V.y);return}this.pub=this.ec.curve.decodePoint(V,C)},N.prototype.derive=function(V){return V.validate()||Z(V.validate(),"public point not validated"),V.mul(this.priv).getX()},N.prototype.sign=function(V,C,B){return this.ec.sign(V,this,C,B)},N.prototype.verify=function(V,C){return this.ec.verify(V,C,this)},N.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),MY=Z0((Y,q)=>{var F=X8(),O=_6(),Z=O.assert;function N(L,H){if(L instanceof N)return L;this._importDER(L,H)||(Z(L.r&&L.s,"Signature without r or s"),this.r=new F(L.r,16),this.s=new F(L.s,16),L.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=L.recoveryParam)}q.exports=N;function V(){this.place=0}function C(L,H){var P=L[H.place++];if(!(P&128))return P;var R=P&15;if(R===0||R>4)return!1;for(var k=0,v=0,M=H.place;v<R;v++,M++)k<<=8,k|=L[M],k>>>=0;return k<=127?!1:(H.place=M,k)}function B(L){for(var H=0,P=L.length-1;!L[H]&&!(L[H+1]&128)&&H<P;)H++;return H===0?L:L.slice(H)}N.prototype._importDER=function(L,H){L=O.toArray(L,H);var P=new V;if(L[P.place++]!==48)return!1;var R=C(L,P);if(R===!1||R+P.place!==L.length||L[P.place++]!==2)return!1;var k=C(L,P);if(k===!1)return!1;var v=L.slice(P.place,k+P.place);if(P.place+=k,L[P.place++]!==2)return!1;var M=C(L,P);if(M===!1||L.length!==M+P.place)return!1;var w=L.slice(P.place,M+P.place);if(v[0]===0)if(v[1]&128)v=v.slice(1);else return!1;if(w[0]===0)if(w[1]&128)w=w.slice(1);else return!1;return this.r=new F(v),this.s=new F(w),this.recoveryParam=null,!0};function D(L,H){if(H<128){L.push(H);return}var P=1+(Math.log(H)/Math.LN2>>>3);for(L.push(P|128);--P;)L.push(H>>>(P<<3)&255);L.push(H)}N.prototype.toDER=function(L){var H=this.r.toArray(),P=this.s.toArray();for(H[0]&128&&(H=[0].concat(H)),P[0]&128&&(P=[0].concat(P)),H=B(H),P=B(P);!P[0]&&!(P[1]&128);)P=P.slice(1);var R=[2];D(R,H.length),R=R.concat(H),R.push(2),D(R,P.length);var k=R.concat(P),v=[48];return D(v,k.length),v=v.concat(k),O.encode(v,L)}}),AY=Z0((Y,q)=>{var F=X8(),O=IY(),Z=_6(),N=r5(),V=d5(),C=Z.assert,B=TY(),D=MY();function L(H){if(!(this instanceof L))return new L(H);typeof H=="string"&&(C(Object.prototype.hasOwnProperty.call(N,H),"Unknown curve "+H),H=N[H]),H instanceof N.PresetCurve&&(H={curve:H}),this.curve=H.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=H.curve.g,this.g.precompute(H.curve.n.bitLength()+1),this.hash=H.hash||H.curve.hash}q.exports=L,L.prototype.keyPair=function(H){return new B(this,H)},L.prototype.keyFromPrivate=function(H,P){return B.fromPrivate(this,H,P)},L.prototype.keyFromPublic=function(H,P){return B.fromPublic(this,H,P)},L.prototype.genKeyPair=function(H){H||(H={});for(var P=new O({hash:this.hash,pers:H.pers,persEnc:H.persEnc||"utf8",entropy:H.entropy||V(this.hash.hmacStrength),entropyEnc:H.entropy&&H.entropyEnc||"utf8",nonce:this.n.toArray()}),R=this.n.byteLength(),k=this.n.sub(new F(2));;){var v=new F(P.generate(R));if(!(v.cmp(k)>0))return v.iaddn(1),this.keyFromPrivate(v)}},L.prototype._truncateToN=function(H,P){var R=H.byteLength()*8-this.n.bitLength();return R>0&&(H=H.ushrn(R)),!P&&H.cmp(this.n)>=0?H.sub(this.n):H},L.prototype.sign=function(H,P,R,k){typeof R=="object"&&(k=R,R=null),k||(k={}),P=this.keyFromPrivate(P,R),H=this._truncateToN(new F(H,16));for(var v=this.n.byteLength(),M=P.getPrivate().toArray("be",v),w=H.toArray("be",v),x=new O({hash:this.hash,entropy:M,nonce:w,pers:k.pers,persEnc:k.persEnc||"utf8"}),g=this.n.sub(new F(1)),_=0;;_++){var p=k.k?k.k(_):new F(x.generate(this.n.byteLength()));if(p=this._truncateToN(p,!0),!(p.cmpn(1)<=0||p.cmp(g)>=0)){var m=this.g.mul(p);if(!m.isInfinity()){var f=m.getX(),s=f.umod(this.n);if(s.cmpn(0)!==0){var Q0=p.invm(this.n).mul(s.mul(P.getPrivate()).iadd(H));if(Q0=Q0.umod(this.n),Q0.cmpn(0)!==0){var d=(m.getY().isOdd()?1:0)|(f.cmp(s)!==0?2:0);return k.canonical&&Q0.cmp(this.nh)>0&&(Q0=this.n.sub(Q0),d^=1),new D({r:s,s:Q0,recoveryParam:d})}}}}}},L.prototype.verify=function(H,P,R,k){H=this._truncateToN(new F(H,16)),R=this.keyFromPublic(R,k),P=new D(P,"hex");var{r:v,s:M}=P;if(v.cmpn(1)<0||v.cmp(this.n)>=0||M.cmpn(1)<0||M.cmp(this.n)>=0)return!1;var w=M.invm(this.n),x=w.mul(H).umod(this.n),g=w.mul(v).umod(this.n),_;return this.curve._maxwellTrick?(_=this.g.jmulAdd(x,R.getPublic(),g),_.isInfinity()?!1:_.eqXToP(v)):(_=this.g.mulAdd(x,R.getPublic(),g),_.isInfinity()?!1:_.getX().umod(this.n).cmp(v)===0)},L.prototype.recoverPubKey=function(H,P,R,k){C((3&R)===R,"The recovery param is more than two bits"),P=new D(P,k);var v=this.n,M=new F(H),w=P.r,x=P.s,g=R&1,_=R>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&_)throw new Error("Unable to find sencond key candinate");_?w=this.curve.pointFromX(w.add(this.curve.n),g):w=this.curve.pointFromX(w,g);var p=P.r.invm(v),m=v.sub(M).mul(p).umod(v),f=x.mul(p).umod(v);return this.g.mulAdd(m,w,f)},L.prototype.getKeyRecoveryParam=function(H,P,R,k){if(P=new D(P,k),P.recoveryParam!==null)return P.recoveryParam;for(var v=0;v<4;v++){var M;try{M=this.recoverPubKey(H,P,v)}catch{continue}if(M.eq(R))return v}throw new Error("Unable to find valid recovery factor")}}),vY=Z0((Y,q)=>{var F=_6(),O=F.assert,Z=F.parseBytes,N=F.cachedProperty;function V(C,B){this.eddsa=C,this._secret=Z(B.secret),C.isPoint(B.pub)?this._pub=B.pub:this._pubBytes=Z(B.pub)}V.fromPublic=function(C,B){return B instanceof V?B:new V(C,{pub:B})},V.fromSecret=function(C,B){return B instanceof V?B:new V(C,{secret:B})},V.prototype.secret=function(){return this._secret},N(V,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),N(V,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),N(V,"privBytes",function(){var C=this.eddsa,B=this.hash(),D=C.encodingLength-1,L=B.slice(0,C.encodingLength);return L[0]&=248,L[D]&=127,L[D]|=64,L}),N(V,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),N(V,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),N(V,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),V.prototype.sign=function(C){return O(this._secret,"KeyPair can only verify"),this.eddsa.sign(C,this)},V.prototype.verify=function(C,B){return this.eddsa.verify(C,B,this)},V.prototype.getSecret=function(C){return O(this._secret,"KeyPair is public only"),F.encode(this.secret(),C)},V.prototype.getPublic=function(C){return F.encode(this.pubBytes(),C)},q.exports=V}),xY=Z0((Y,q)=>{var F=X8(),O=_6(),Z=O.assert,N=O.cachedProperty,V=O.parseBytes;function C(B,D){this.eddsa=B,typeof D!="object"&&(D=V(D)),Array.isArray(D)&&(D={R:D.slice(0,B.encodingLength),S:D.slice(B.encodingLength)}),Z(D.R&&D.S,"Signature without R or S"),B.isPoint(D.R)&&(this._R=D.R),D.S instanceof F&&(this._S=D.S),this._Rencoded=Array.isArray(D.R)?D.R:D.Rencoded,this._Sencoded=Array.isArray(D.S)?D.S:D.Sencoded}N(C,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),N(C,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),N(C,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),N(C,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),C.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},C.prototype.toHex=function(){return O.encode(this.toBytes(),"hex").toUpperCase()},q.exports=C}),SY=Z0((Y,q)=>{var F=n5(),O=r5(),Z=_6(),N=Z.assert,V=Z.parseBytes,C=vY(),B=xY();function D(L){if(N(L==="ed25519","only tested with ed25519 so far"),!(this instanceof D))return new D(L);L=O[L].curve,this.curve=L,this.g=L.g,this.g.precompute(L.n.bitLength()+1),this.pointClass=L.point().constructor,this.encodingLength=Math.ceil(L.n.bitLength()/8),this.hash=F.sha512}q.exports=D,D.prototype.sign=function(L,H){L=V(L);var P=this.keyFromSecret(H),R=this.hashInt(P.messagePrefix(),L),k=this.g.mul(R),v=this.encodePoint(k),M=this.hashInt(v,P.pubBytes(),L).mul(P.priv()),w=R.add(M).umod(this.curve.n);return this.makeSignature({R:k,S:w,Rencoded:v})},D.prototype.verify=function(L,H,P){L=V(L),H=this.makeSignature(H);var R=this.keyFromPublic(P),k=this.hashInt(H.Rencoded(),R.pubBytes(),L),v=this.g.mul(H.S()),M=H.R().add(R.pub().mul(k));return M.eq(v)},D.prototype.hashInt=function(){for(var L=this.hash(),H=0;H<arguments.length;H++)L.update(arguments[H]);return Z.intFromLE(L.digest()).umod(this.curve.n)},D.prototype.keyFromPublic=function(L){return C.fromPublic(this,L)},D.prototype.keyFromSecret=function(L){return C.fromSecret(this,L)},D.prototype.makeSignature=function(L){return L instanceof B?L:new B(this,L)},D.prototype.encodePoint=function(L){var H=L.getY().toArray("le",this.encodingLength);return H[this.encodingLength-1]|=L.getX().isOdd()?128:0,H},D.prototype.decodePoint=function(L){L=Z.parseBytes(L);var H=L.length-1,P=L.slice(0,H).concat(L[H]&-129),R=(L[H]&128)!==0,k=Z.intFromLE(P);return this.curve.pointFromY(k,R)},D.prototype.encodeInt=function(L){return L.toArray("le",this.encodingLength)},D.prototype.decodeInt=function(L){return Z.intFromLE(L)},D.prototype.isPoint=function(L){return L instanceof this.pointClass}}),i5=Z0((Y)=>{var q=Y;q.version=jY().version,q.utils=_6(),q.rand=d5(),q.curve=u3(),q.curves=r5(),q.ec=AY(),q.eddsa=SY()}),a3=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,u=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(u,U0)|0,z=Math.imul(u,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(u,C0)|0,z=z+Math.imul(u,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(u,N0)|0,z=z+Math.imul(u,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(u,L0)|0,z=z+Math.imul(u,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(u,k0)|0,z=z+Math.imul(u,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(u,R0)|0,z=z+Math.imul(u,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(u,T0)|0,z=z+Math.imul(u,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(u,A0)|0,z=z+Math.imul(u,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(u,x0)|0,z=z+Math.imul(u,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(u,E0)|0,z=z+Math.imul(u,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new d(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function d(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}d.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},d.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},d.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},d.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},d.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},d.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},d.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},d.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},d.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},d.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},d.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},d.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},d.prototype.sqr=function(Q){return this.mul(Q,Q)},d.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},d.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},d.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},d.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},d.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){d.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,d),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),s5=Z0((Y,q)=>{var F=R6(),O=F.Buffer,Z={},N;for(N in F)!F.hasOwnProperty(N)||N==="SlowBuffer"||N==="Buffer"||(Z[N]=F[N]);var V=Z.Buffer={};for(N in O)!O.hasOwnProperty(N)||N==="allocUnsafe"||N==="allocUnsafeSlow"||(V[N]=O[N]);if(Z.Buffer.prototype=O.prototype,(!V.from||V.from===Uint8Array.from)&&(V.from=function(C,B,D){if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof C);if(C&&typeof C.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);return O(C,B,D)}),V.alloc||(V.alloc=function(C,B,D){if(typeof C!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof C);if(C<0||C>=2*(1<<30))throw new RangeError('The value "'+C+'" is invalid for option "size"');var L=O(C);return!B||B.length===0?L.fill(0):typeof D=="string"?L.fill(B,D):L.fill(B),L}),!Z.kStringMaxLength)try{Z.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}Z.constants||(Z.constants={MAX_LENGTH:Z.kMaxLength},Z.kStringMaxLength&&(Z.constants.MAX_STRING_LENGTH=Z.kStringMaxLength)),q.exports=Z}),t5=Z0((Y)=>{var q=h0();function F(Z){this._reporterState={obj:null,path:[],options:Z||{},errors:[]}}Y.Reporter=F,F.prototype.isError=function(Z){return Z instanceof O},F.prototype.save=function(){let Z=this._reporterState;return{obj:Z.obj,pathLen:Z.path.length}},F.prototype.restore=function(Z){let N=this._reporterState;N.obj=Z.obj,N.path=N.path.slice(0,Z.pathLen)},F.prototype.enterKey=function(Z){return this._reporterState.path.push(Z)},F.prototype.exitKey=function(Z){let N=this._reporterState;N.path=N.path.slice(0,Z-1)},F.prototype.leaveKey=function(Z,N,V){let C=this._reporterState;this.exitKey(Z),C.obj!==null&&(C.obj[N]=V)},F.prototype.path=function(){return this._reporterState.path.join("/")},F.prototype.enterObject=function(){let Z=this._reporterState,N=Z.obj;return Z.obj={},N},F.prototype.leaveObject=function(Z){let N=this._reporterState,V=N.obj;return N.obj=Z,V},F.prototype.error=function(Z){let N,V=this._reporterState,C=Z instanceof O;if(C?N=Z:N=new O(V.path.map(function(B){return"["+JSON.stringify(B)+"]"}).join(""),Z.message||Z,Z.stack),!V.options.partial)throw N;return C||V.errors.push(N),N},F.prototype.wrapResult=function(Z){let N=this._reporterState;return N.options.partial?{result:this.isError(Z)?null:Z,errors:N.errors}:Z};function O(Z,N){this.path=Z,this.rethrow(N)}q(O,Error),O.prototype.rethrow=function(Z){if(this.message=Z+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,O),!this.stack)try{throw new Error(this.message)}catch(N){this.stack=N.stack}return this}}),S1=Z0((Y)=>{var q=h0(),F=t5().Reporter,O=s5().Buffer;function Z(V,C){if(F.call(this,C),!O.isBuffer(V)){this.error("Input not Buffer");return}this.base=V,this.offset=0,this.length=V.length}q(Z,F),Y.DecoderBuffer=Z,Z.isDecoderBuffer=function(V){return V instanceof Z?!0:typeof V=="object"&&O.isBuffer(V.base)&&V.constructor.name==="DecoderBuffer"&&typeof V.offset=="number"&&typeof V.length=="number"&&typeof V.save=="function"&&typeof V.restore=="function"&&typeof V.isEmpty=="function"&&typeof V.readUInt8=="function"&&typeof V.skip=="function"&&typeof V.raw=="function"},Z.prototype.save=function(){return{offset:this.offset,reporter:F.prototype.save.call(this)}},Z.prototype.restore=function(V){let C=new Z(this.base);return C.offset=V.offset,C.length=this.offset,this.offset=V.offset,F.prototype.restore.call(this,V.reporter),C},Z.prototype.isEmpty=function(){return this.offset===this.length},Z.prototype.readUInt8=function(V){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(V||"DecoderBuffer overrun")},Z.prototype.skip=function(V,C){if(!(this.offset+V<=this.length))return this.error(C||"DecoderBuffer overrun");let B=new Z(this.base);return B._reporterState=this._reporterState,B.offset=this.offset,B.length=this.offset+V,this.offset+=V,B},Z.prototype.raw=function(V){return this.base.slice(V?V.offset:this.offset,this.length)};function N(V,C){if(Array.isArray(V))this.length=0,this.value=V.map(function(B){return N.isEncoderBuffer(B)||(B=new N(B,C)),this.length+=B.length,B},this);else if(typeof V=="number"){if(!(0<=V&&V<=255))return C.error("non-byte EncoderBuffer value");this.value=V,this.length=1}else if(typeof V=="string")this.value=V,this.length=O.byteLength(V);else if(O.isBuffer(V))this.value=V,this.length=V.length;else return C.error("Unsupported type: "+typeof V)}Y.EncoderBuffer=N,N.isEncoderBuffer=function(V){return V instanceof N?!0:typeof V=="object"&&V.constructor.name==="EncoderBuffer"&&typeof V.length=="number"&&typeof V.join=="function"},N.prototype.join=function(V,C){return V||(V=O.alloc(this.length)),C||(C=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(B){B.join(V,C),C+=B.length}):(typeof this.value=="number"?V[C]=this.value:typeof this.value=="string"?V.write(this.value,C):O.isBuffer(this.value)&&this.value.copy(V,C),C+=this.length)),V}}),e5=Z0((Y,q)=>{var F=t5().Reporter,O=S1().EncoderBuffer,Z=S1().DecoderBuffer,N=y6(),V=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],C=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(V),B=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function D(H,P,R){let k={};this._baseState=k,k.name=R,k.enc=H,k.parent=P||null,k.children=null,k.tag=null,k.args=null,k.reverseArgs=null,k.choice=null,k.optional=!1,k.any=!1,k.obj=!1,k.use=null,k.useDecoder=null,k.key=null,k.default=null,k.explicit=null,k.implicit=null,k.contains=null,k.parent||(k.children=[],this._wrap())}q.exports=D;var L=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];D.prototype.clone=function(){let H=this._baseState,P={};L.forEach(function(k){P[k]=H[k]});let R=new this.constructor(P.parent);return R._baseState=P,R},D.prototype._wrap=function(){let H=this._baseState;C.forEach(function(P){this[P]=function(){let R=new this.constructor(this);return H.children.push(R),R[P].apply(R,arguments)}},this)},D.prototype._init=function(H){let P=this._baseState;N(P.parent===null),H.call(this),P.children=P.children.filter(function(R){return R._baseState.parent===this},this),N.equal(P.children.length,1,"Root node can have only one child")},D.prototype._useArgs=function(H){let P=this._baseState,R=H.filter(function(k){return k instanceof this.constructor},this);H=H.filter(function(k){return!(k instanceof this.constructor)},this),R.length!==0&&(N(P.children===null),P.children=R,R.forEach(function(k){k._baseState.parent=this},this)),H.length!==0&&(N(P.args===null),P.args=H,P.reverseArgs=H.map(function(k){if(typeof k!="object"||k.constructor!==Object)return k;let v={};return Object.keys(k).forEach(function(M){M==(M|0)&&(M|=0);let w=k[M];v[w]=M}),v}))},B.forEach(function(H){D.prototype[H]=function(){let P=this._baseState;throw new Error(H+" not implemented for encoding: "+P.enc)}}),V.forEach(function(H){D.prototype[H]=function(){let P=this._baseState,R=Array.prototype.slice.call(arguments);return N(P.tag===null),P.tag=H,this._useArgs(R),this}}),D.prototype.use=function(H){N(H);let P=this._baseState;return N(P.use===null),P.use=H,this},D.prototype.optional=function(){let H=this._baseState;return H.optional=!0,this},D.prototype.def=function(H){let P=this._baseState;return N(P.default===null),P.default=H,P.optional=!0,this},D.prototype.explicit=function(H){let P=this._baseState;return N(P.explicit===null&&P.implicit===null),P.explicit=H,this},D.prototype.implicit=function(H){let P=this._baseState;return N(P.explicit===null&&P.implicit===null),P.implicit=H,this},D.prototype.obj=function(){let H=this._baseState,P=Array.prototype.slice.call(arguments);return H.obj=!0,P.length!==0&&this._useArgs(P),this},D.prototype.key=function(H){let P=this._baseState;return N(P.key===null),P.key=H,this},D.prototype.any=function(){let H=this._baseState;return H.any=!0,this},D.prototype.choice=function(H){let P=this._baseState;return N(P.choice===null),P.choice=H,this._useArgs(Object.keys(H).map(function(R){return H[R]})),this},D.prototype.contains=function(H){let P=this._baseState;return N(P.use===null),P.contains=H,this},D.prototype._decode=function(H,P){let R=this._baseState;if(R.parent===null)return H.wrapResult(R.children[0]._decode(H,P));let k=R.default,v=!0,M=null;if(R.key!==null&&(M=H.enterKey(R.key)),R.optional){let x=null;if(R.explicit!==null?x=R.explicit:R.implicit!==null?x=R.implicit:R.tag!==null&&(x=R.tag),x===null&&!R.any){let g=H.save();try{R.choice===null?this._decodeGeneric(R.tag,H,P):this._decodeChoice(H,P),v=!0}catch{v=!1}H.restore(g)}else if(v=this._peekTag(H,x,R.any),H.isError(v))return v}let w;if(R.obj&&v&&(w=H.enterObject()),v){if(R.explicit!==null){let g=this._decodeTag(H,R.explicit);if(H.isError(g))return g;H=g}let x=H.offset;if(R.use===null&&R.choice===null){let g;R.any&&(g=H.save());let _=this._decodeTag(H,R.implicit!==null?R.implicit:R.tag,R.any);if(H.isError(_))return _;R.any?k=H.raw(g):H=_}if(P&&P.track&&R.tag!==null&&P.track(H.path(),x,H.length,"tagged"),P&&P.track&&R.tag!==null&&P.track(H.path(),H.offset,H.length,"content"),R.any||(R.choice===null?k=this._decodeGeneric(R.tag,H,P):k=this._decodeChoice(H,P)),H.isError(k))return k;if(!R.any&&R.choice===null&&R.children!==null&&R.children.forEach(function(g){g._decode(H,P)}),R.contains&&(R.tag==="octstr"||R.tag==="bitstr")){let g=new Z(k);k=this._getUse(R.contains,H._reporterState.obj)._decode(g,P)}}return R.obj&&v&&(k=H.leaveObject(w)),R.key!==null&&(k!==null||v===!0)?H.leaveKey(M,R.key,k):M!==null&&H.exitKey(M),k},D.prototype._decodeGeneric=function(H,P,R){let k=this._baseState;return H==="seq"||H==="set"?null:H==="seqof"||H==="setof"?this._decodeList(P,H,k.args[0],R):/str$/.test(H)?this._decodeStr(P,H,R):H==="objid"&&k.args?this._decodeObjid(P,k.args[0],k.args[1],R):H==="objid"?this._decodeObjid(P,null,null,R):H==="gentime"||H==="utctime"?this._decodeTime(P,H,R):H==="null_"?this._decodeNull(P,R):H==="bool"?this._decodeBool(P,R):H==="objDesc"?this._decodeStr(P,H,R):H==="int"||H==="enum"?this._decodeInt(P,k.args&&k.args[0],R):k.use!==null?this._getUse(k.use,P._reporterState.obj)._decode(P,R):P.error("unknown tag: "+H)},D.prototype._getUse=function(H,P){let R=this._baseState;return R.useDecoder=this._use(H,P),N(R.useDecoder._baseState.parent===null),R.useDecoder=R.useDecoder._baseState.children[0],R.implicit!==R.useDecoder._baseState.implicit&&(R.useDecoder=R.useDecoder.clone(),R.useDecoder._baseState.implicit=R.implicit),R.useDecoder},D.prototype._decodeChoice=function(H,P){let R=this._baseState,k=null,v=!1;return Object.keys(R.choice).some(function(M){let w=H.save(),x=R.choice[M];try{let g=x._decode(H,P);if(H.isError(g))return!1;k={type:M,value:g},v=!0}catch{return H.restore(w),!1}return!0},this),v?k:H.error("Choice not matched")},D.prototype._createEncoderBuffer=function(H){return new O(H,this.reporter)},D.prototype._encode=function(H,P,R){let k=this._baseState;if(k.default!==null&&k.default===H)return;let v=this._encodeValue(H,P,R);if(v!==void 0&&!this._skipDefault(v,P,R))return v},D.prototype._encodeValue=function(H,P,R){let k=this._baseState;if(k.parent===null)return k.children[0]._encode(H,P||new F);let v=null;if(this.reporter=P,k.optional&&H===void 0)if(k.default!==null)H=k.default;else return;let M=null,w=!1;if(k.any)v=this._createEncoderBuffer(H);else if(k.choice)v=this._encodeChoice(H,P);else if(k.contains)M=this._getUse(k.contains,R)._encode(H,P),w=!0;else if(k.children)M=k.children.map(function(x){if(x._baseState.tag==="null_")return x._encode(null,P,H);if(x._baseState.key===null)return P.error("Child should have a key");let g=P.enterKey(x._baseState.key);if(typeof H!="object")return P.error("Child expected, but input is not object");let _=x._encode(H[x._baseState.key],P,H);return P.leaveKey(g),_},this).filter(function(x){return x}),M=this._createEncoderBuffer(M);else if(k.tag==="seqof"||k.tag==="setof"){if(!(k.args&&k.args.length===1))return P.error("Too many args for : "+k.tag);if(!Array.isArray(H))return P.error("seqof/setof, but data is not Array");let x=this.clone();x._baseState.implicit=null,M=this._createEncoderBuffer(H.map(function(g){let _=this._baseState;return this._getUse(_.args[0],H)._encode(g,P)},x))}else k.use!==null?v=this._getUse(k.use,R)._encode(H,P):(M=this._encodePrimitive(k.tag,H),w=!0);if(!k.any&&k.choice===null){let x=k.implicit!==null?k.implicit:k.tag,g=k.implicit===null?"universal":"context";x===null?k.use===null&&P.error("Tag could be omitted only for .use()"):k.use===null&&(v=this._encodeComposite(x,w,g,M))}return k.explicit!==null&&(v=this._encodeComposite(k.explicit,!1,"context",v)),v},D.prototype._encodeChoice=function(H,P){let R=this._baseState,k=R.choice[H.type];return k||N(!1,H.type+" not found in "+JSON.stringify(Object.keys(R.choice))),k._encode(H.value,P)},D.prototype._encodePrimitive=function(H,P){let R=this._baseState;if(/str$/.test(H))return this._encodeStr(P,H);if(H==="objid"&&R.args)return this._encodeObjid(P,R.reverseArgs[0],R.args[1]);if(H==="objid")return this._encodeObjid(P,null,null);if(H==="gentime"||H==="utctime")return this._encodeTime(P,H);if(H==="null_")return this._encodeNull();if(H==="int"||H==="enum")return this._encodeInt(P,R.args&&R.reverseArgs[0]);if(H==="bool")return this._encodeBool(P);if(H==="objDesc")return this._encodeStr(P,H);throw new Error("Unsupported tag: "+H)},D.prototype._isNumstr=function(H){return/^[0-9 ]*$/.test(H)},D.prototype._isPrintstr=function(H){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(H)}}),Q9=Z0((Y)=>{function q(F){let O={};return Object.keys(F).forEach(function(Z){(Z|0)==Z&&(Z=Z|0);let N=F[Z];O[N]=Z}),O}Y.tagClass={0:"universal",1:"application",2:"context",3:"private"},Y.tagClassByName=q(Y.tagClass),Y.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"},Y.tagByName=q(Y.tag)}),n3=Z0((Y,q)=>{var F=h0(),O=s5().Buffer,Z=e5(),N=Q9();function V(L){this.enc="der",this.name=L.name,this.entity=L,this.tree=new C,this.tree._init(L.body)}q.exports=V,V.prototype.encode=function(L,H){return this.tree._encode(L,H).join()};function C(L){Z.call(this,"der",L)}F(C,Z),C.prototype._encodeComposite=function(L,H,P,R){let k=D(L,H,P,this.reporter);if(R.length<128){let w=O.alloc(2);return w[0]=k,w[1]=R.length,this._createEncoderBuffer([w,R])}let v=1;for(let w=R.length;w>=256;w>>=8)v++;let M=O.alloc(2+v);M[0]=k,M[1]=128|v;for(let w=1+v,x=R.length;x>0;w--,x>>=8)M[w]=x&255;return this._createEncoderBuffer([M,R])},C.prototype._encodeStr=function(L,H){if(H==="bitstr")return this._createEncoderBuffer([L.unused|0,L.data]);if(H==="bmpstr"){let P=O.alloc(L.length*2);for(let R=0;R<L.length;R++)P.writeUInt16BE(L.charCodeAt(R),R*2);return this._createEncoderBuffer(P)}else return H==="numstr"?this._isNumstr(L)?this._createEncoderBuffer(L):this.reporter.error("Encoding of string type: numstr supports only digits and space"):H==="printstr"?this._isPrintstr(L)?this._createEncoderBuffer(L):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(H)?this._createEncoderBuffer(L):H==="objDesc"?this._createEncoderBuffer(L):this.reporter.error("Encoding of string type: "+H+" unsupported")},C.prototype._encodeObjid=function(L,H,P){if(typeof L=="string"){if(!H)return this.reporter.error("string objid given, but no values map found");if(!H.hasOwnProperty(L))return this.reporter.error("objid not found in values map");L=H[L].split(/[\s.]+/g);for(let M=0;M<L.length;M++)L[M]|=0}else if(Array.isArray(L)){L=L.slice();for(let M=0;M<L.length;M++)L[M]|=0}if(!Array.isArray(L))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(L));if(!P){if(L[1]>=40)return this.reporter.error("Second objid identifier OOB");L.splice(0,2,L[0]*40+L[1])}let R=0;for(let M=0;M<L.length;M++){let w=L[M];for(R++;w>=128;w>>=7)R++}let k=O.alloc(R),v=k.length-1;for(let M=L.length-1;M>=0;M--){let w=L[M];for(k[v--]=w&127;(w>>=7)>0;)k[v--]=128|w&127}return this._createEncoderBuffer(k)};function B(L){return L<10?"0"+L:L}C.prototype._encodeTime=function(L,H){let P,R=new Date(L);return H==="gentime"?P=[B(R.getUTCFullYear()),B(R.getUTCMonth()+1),B(R.getUTCDate()),B(R.getUTCHours()),B(R.getUTCMinutes()),B(R.getUTCSeconds()),"Z"].join(""):H==="utctime"?P=[B(R.getUTCFullYear()%100),B(R.getUTCMonth()+1),B(R.getUTCDate()),B(R.getUTCHours()),B(R.getUTCMinutes()),B(R.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+H+" time is not supported yet"),this._encodeStr(P,"octstr")},C.prototype._encodeNull=function(){return this._createEncoderBuffer("")},C.prototype._encodeInt=function(L,H){if(typeof L=="string"){if(!H)return this.reporter.error("String int or enum given, but no values map");if(!H.hasOwnProperty(L))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(L));L=H[L]}if(typeof L!="number"&&!O.isBuffer(L)){let k=L.toArray();!L.sign&&k[0]&128&&k.unshift(0),L=O.from(k)}if(O.isBuffer(L)){let k=L.length;L.length===0&&k++;let v=O.alloc(k);return L.copy(v),L.length===0&&(v[0]=0),this._createEncoderBuffer(v)}if(L<128)return this._createEncoderBuffer(L);if(L<256)return this._createEncoderBuffer([0,L]);let P=1;for(let k=L;k>=256;k>>=8)P++;let R=new Array(P);for(let k=R.length-1;k>=0;k--)R[k]=L&255,L>>=8;return R[0]&128&&R.unshift(0),this._createEncoderBuffer(O.from(R))},C.prototype._encodeBool=function(L){return this._createEncoderBuffer(L?255:0)},C.prototype._use=function(L,H){return typeof L=="function"&&(L=L(H)),L._getEncoder("der").tree},C.prototype._skipDefault=function(L,H,P){let R=this._baseState,k;if(R.default===null)return!1;let v=L.join();if(R.defaultBuffer===void 0&&(R.defaultBuffer=this._encodeValue(R.default,H,P).join()),v.length!==R.defaultBuffer.length)return!1;for(k=0;k<v.length;k++)if(v[k]!==R.defaultBuffer[k])return!1;return!0};function D(L,H,P,R){let k;if(L==="seqof"?L="seq":L==="setof"&&(L="set"),N.tagByName.hasOwnProperty(L))k=N.tagByName[L];else if(typeof L=="number"&&(L|0)===L)k=L;else return R.error("Unknown tag: "+L);return k>=31?R.error("Multi-octet tag encoding unsupported"):(H||(k|=32),k|=N.tagClassByName[P||"universal"]<<6,k)}}),EY=Z0((Y,q)=>{var F=h0(),O=n3();function Z(N){O.call(this,N),this.enc="pem"}F(Z,O),q.exports=Z,Z.prototype.encode=function(N,V){let C=O.prototype.encode.call(this,N).toString("base64"),B=["-----BEGIN "+V.label+"-----"];for(let D=0;D<C.length;D+=64)B.push(C.slice(D,D+64));return B.push("-----END "+V.label+"-----"),B.join(`
|
|
4
|
-
`)}}),r3=Z0((Y)=>{var q=Y;q.der=n3(),q.pem=EY()}),i3=Z0((Y,q)=>{var F=h0(),O=a3(),Z=S1().DecoderBuffer,N=e5(),V=Q9();function C(H){this.enc="der",this.name=H.name,this.entity=H,this.tree=new B,this.tree._init(H.body)}q.exports=C,C.prototype.decode=function(H,P){return Z.isDecoderBuffer(H)||(H=new Z(H,P)),this.tree._decode(H,P)};function B(H){N.call(this,"der",H)}F(B,N),B.prototype._peekTag=function(H,P,R){if(H.isEmpty())return!1;let k=H.save(),v=D(H,'Failed to peek tag: "'+P+'"');return H.isError(v)?v:(H.restore(k),v.tag===P||v.tagStr===P||v.tagStr+"of"===P||R)},B.prototype._decodeTag=function(H,P,R){let k=D(H,'Failed to decode tag of "'+P+'"');if(H.isError(k))return k;let v=L(H,k.primitive,'Failed to get length of "'+P+'"');if(H.isError(v))return v;if(!R&&k.tag!==P&&k.tagStr!==P&&k.tagStr+"of"!==P)return H.error('Failed to match tag: "'+P+'"');if(k.primitive||v!==null)return H.skip(v,'Failed to match body of: "'+P+'"');let M=H.save(),w=this._skipUntilEnd(H,'Failed to skip indefinite length body: "'+this.tag+'"');return H.isError(w)?w:(v=H.offset-M.offset,H.restore(M),H.skip(v,'Failed to match body of: "'+P+'"'))},B.prototype._skipUntilEnd=function(H,P){for(;;){let R=D(H,P);if(H.isError(R))return R;let k=L(H,R.primitive,P);if(H.isError(k))return k;let v;if(R.primitive||k!==null?v=H.skip(k):v=this._skipUntilEnd(H,P),H.isError(v))return v;if(R.tagStr==="end")break}},B.prototype._decodeList=function(H,P,R,k){let v=[];for(;!H.isEmpty();){let M=this._peekTag(H,"end");if(H.isError(M))return M;let w=R.decode(H,"der",k);if(H.isError(w)&&M)break;v.push(w)}return v},B.prototype._decodeStr=function(H,P){if(P==="bitstr"){let R=H.readUInt8();return H.isError(R)?R:{unused:R,data:H.raw()}}else if(P==="bmpstr"){let R=H.raw();if(R.length%2===1)return H.error("Decoding of string type: bmpstr length mismatch");let k="";for(let v=0;v<R.length/2;v++)k+=String.fromCharCode(R.readUInt16BE(v*2));return k}else if(P==="numstr"){let R=H.raw().toString("ascii");return this._isNumstr(R)?R:H.error("Decoding of string type: numstr unsupported characters")}else{if(P==="octstr")return H.raw();if(P==="objDesc")return H.raw();if(P==="printstr"){let R=H.raw().toString("ascii");return this._isPrintstr(R)?R:H.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(P)?H.raw().toString():H.error("Decoding of string type: "+P+" unsupported")}},B.prototype._decodeObjid=function(H,P,R){let k,v=[],M=0,w=0;for(;!H.isEmpty();)w=H.readUInt8(),M<<=7,M|=w&127,(w&128)===0&&(v.push(M),M=0);w&128&&v.push(M);let x=v[0]/40|0,g=v[0]%40;if(R?k=v:k=[x,g].concat(v.slice(1)),P){let _=P[k.join(" ")];_===void 0&&(_=P[k.join(".")]),_!==void 0&&(k=_)}return k},B.prototype._decodeTime=function(H,P){let R=H.raw().toString(),k,v,M,w,x,g;if(P==="gentime")k=R.slice(0,4)|0,v=R.slice(4,6)|0,M=R.slice(6,8)|0,w=R.slice(8,10)|0,x=R.slice(10,12)|0,g=R.slice(12,14)|0;else if(P==="utctime")k=R.slice(0,2)|0,v=R.slice(2,4)|0,M=R.slice(4,6)|0,w=R.slice(6,8)|0,x=R.slice(8,10)|0,g=R.slice(10,12)|0,k<70?k=2000+k:k=1900+k;else return H.error("Decoding "+P+" time is not supported yet");return Date.UTC(k,v-1,M,w,x,g,0)},B.prototype._decodeNull=function(){return null},B.prototype._decodeBool=function(H){let P=H.readUInt8();return H.isError(P)?P:P!==0},B.prototype._decodeInt=function(H,P){let R=H.raw(),k=new O(R);return P&&(k=P[k.toString(10)]||k),k},B.prototype._use=function(H,P){return typeof H=="function"&&(H=H(P)),H._getDecoder("der").tree};function D(H,P){let R=H.readUInt8(P);if(H.isError(R))return R;let k=V.tagClass[R>>6],v=(R&32)===0;if((R&31)===31){let w=R;for(R=0;(w&128)===128;){if(w=H.readUInt8(P),H.isError(w))return w;R<<=7,R|=w&127}}else R&=31;let M=V.tag[R];return{cls:k,primitive:v,tag:R,tagStr:M}}function L(H,P,R){let k=H.readUInt8(R);if(H.isError(k))return k;if(!P&&k===128)return null;if((k&128)===0)return k;let v=k&127;if(v>4)return H.error("length octect is too long");k=0;for(let M=0;M<v;M++){k<<=8;let w=H.readUInt8(R);if(H.isError(w))return w;k|=w}return k}}),wY=Z0((Y,q)=>{var F=h0(),O=s5().Buffer,Z=i3();function N(V){Z.call(this,V),this.enc="pem"}F(N,Z),q.exports=N,N.prototype.decode=function(V,C){let B=V.toString().split(/[\r\n]+/g),D=C.label.toUpperCase(),L=/^-----(BEGIN|END) ([^-]+)-----$/,H=-1,P=-1;for(let v=0;v<B.length;v++){let M=B[v].match(L);if(M!==null&&M[2]===D)if(H===-1){if(M[1]!=="BEGIN")break;H=v}else{if(M[1]!=="END")break;P=v;break}}if(H===-1||P===-1)throw new Error("PEM section not found for: "+D);let R=B.slice(H+1,P).join("");R.replace(/[^a-z0-9+/=]+/gi,"");let k=O.from(R,"base64");return Z.prototype.decode.call(this,k,C)}}),s3=Z0((Y)=>{var q=Y;q.der=i3(),q.pem=wY()}),gY=Z0((Y)=>{var q=r3(),F=s3(),O=h0(),Z=Y;Z.define=function(V,C){return new N(V,C)};function N(V,C){this.name=V,this.body=C,this.decoders={},this.encoders={}}N.prototype._createNamed=function(V){let C=this.name;function B(D){this._initNamed(D,C)}return O(B,V),B.prototype._initNamed=function(D,L){V.call(this,D,L)},new B(this)},N.prototype._getDecoder=function(V){return V=V||"der",this.decoders.hasOwnProperty(V)||(this.decoders[V]=this._createNamed(F[V])),this.decoders[V]},N.prototype.decode=function(V,C,B){return this._getDecoder(C).decode(V,B)},N.prototype._getEncoder=function(V){return V=V||"der",this.encoders.hasOwnProperty(V)||(this.encoders[V]=this._createNamed(q[V])),this.encoders[V]},N.prototype.encode=function(V,C,B){return this._getEncoder(C).encode(V,B)}}),yY=Z0((Y)=>{var q=Y;q.Reporter=t5().Reporter,q.DecoderBuffer=S1().DecoderBuffer,q.EncoderBuffer=S1().EncoderBuffer,q.Node=e5()}),_Y=Z0((Y)=>{var q=Y;q._reverse=function(F){let O={};return Object.keys(F).forEach(function(Z){(Z|0)==Z&&(Z=Z|0);let N=F[Z];O[N]=Z}),O},q.der=Q9()}),t3=Z0((Y)=>{var q=Y;q.bignum=a3(),q.define=gY().define,q.base=yY(),q.constants=_Y(),q.decoders=s3(),q.encoders=r3()}),mY=Z0((Y,q)=>{var F=t3(),O=F.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),Z=F.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),N=F.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),V=F.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(N),this.key("subjectPublicKey").bitstr())}),C=F.define("RelativeDistinguishedName",function(){this.setof(Z)}),B=F.define("RDNSequence",function(){this.seqof(C)}),D=F.define("Name",function(){this.choice({rdnSequence:this.use(B)})}),L=F.define("Validity",function(){this.seq().obj(this.key("notBefore").use(O),this.key("notAfter").use(O))}),H=F.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),P=F.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(N),this.key("issuer").use(D),this.key("validity").use(L),this.key("subject").use(D),this.key("subjectPublicKeyInfo").use(V),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(H).optional())}),R=F.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(P),this.key("signatureAlgorithm").use(N),this.key("signatureValue").bitstr())});q.exports=R}),pY=Z0((Y)=>{var q=t3();Y.certificate=mY();var F=q.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())});Y.RSAPrivateKey=F;var O=q.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Y.RSAPublicKey=O;var Z=q.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(N),this.key("subjectPublicKey").bitstr())});Y.PublicKey=Z;var N=q.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())}),V=q.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(N),this.key("subjectPrivateKey").octstr())});Y.PrivateKey=V;var C=q.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())});Y.EncryptedPrivateKey=C;var B=q.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())});Y.DSAPrivateKey=B,Y.DSAparam=q.define("DSAparam",function(){this.int()});var D=q.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(L),this.key("publicKey").optional().explicit(1).bitstr())});Y.ECPrivateKey=D;var L=q.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});Y.signature=q.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),bY=Z0((Y,q)=>{q.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"}}),hY=Z0((Y,q)=>{var F=/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,O=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Z=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,N=k7(),V=u5(),C=l0().Buffer;q.exports=function(B,D){var L=B.toString(),H=L.match(F),P;if(H){var R="aes"+H[1],k=C.from(H[2],"hex"),v=C.from(H[3].replace(/[\r\n]/g,""),"base64"),M=N(D,k.slice(0,8),parseInt(H[1],10)).key,w=[],x=V.createDecipheriv(R,M,k);w.push(x.update(v)),w.push(x.final()),P=C.concat(w)}else{var g=L.match(Z);P=C.from(g[2].replace(/[\r\n]/g,""),"base64")}var _=L.match(O)[1];return{tag:_,data:P}}}),R7=Z0((Y,q)=>{var F=pY(),O=bY(),Z=hY(),N=u5(),V=T3(),C=l0().Buffer;q.exports=B;function B(L){var H;typeof L=="object"&&!C.isBuffer(L)&&(H=L.passphrase,L=L.key),typeof L=="string"&&(L=C.from(L));var P=Z(L,H),R=P.tag,k=P.data,v,M;switch(R){case"CERTIFICATE":M=F.certificate.decode(k,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(M||(M=F.PublicKey.decode(k,"der")),v=M.algorithm.algorithm.join("."),v){case"1.2.840.113549.1.1.1":return F.RSAPublicKey.decode(M.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return M.subjectPrivateKey=M.subjectPublicKey,{type:"ec",data:M};case"1.2.840.10040.4.1":return M.algorithm.params.pub_key=F.DSAparam.decode(M.subjectPublicKey.data,"der"),{type:"dsa",data:M.algorithm.params};default:throw new Error("unknown key id "+v)}case"ENCRYPTED PRIVATE KEY":k=F.EncryptedPrivateKey.decode(k,"der"),k=D(k,H);case"PRIVATE KEY":switch(M=F.PrivateKey.decode(k,"der"),v=M.algorithm.algorithm.join("."),v){case"1.2.840.113549.1.1.1":return F.RSAPrivateKey.decode(M.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:M.algorithm.curve,privateKey:F.ECPrivateKey.decode(M.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return M.algorithm.params.priv_key=F.DSAparam.decode(M.subjectPrivateKey,"der"),{type:"dsa",params:M.algorithm.params};default:throw new Error("unknown key id "+v)}case"RSA PUBLIC KEY":return F.RSAPublicKey.decode(k,"der");case"RSA PRIVATE KEY":return F.RSAPrivateKey.decode(k,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:F.DSAPrivateKey.decode(k,"der")};case"EC PRIVATE KEY":return k=F.ECPrivateKey.decode(k,"der"),{curve:k.parameters.value,privateKey:k.privateKey};default:throw new Error("unknown key type "+R)}}B.signature=F.signature;function D(L,H){var P=L.algorithm.decrypt.kde.kdeparams.salt,R=parseInt(L.algorithm.decrypt.kde.kdeparams.iters.toString(),10),k=O[L.algorithm.decrypt.cipher.algo.join(".")],v=L.algorithm.decrypt.cipher.iv,M=L.subjectPrivateKey,w=parseInt(k.split("-")[1],10)/8,x=V.pbkdf2Sync(H,P,R,w,"sha1"),g=N.createDecipheriv(k,x,v),_=[];return _.push(g.update(M)),_.push(g.final()),C.concat(_)}}),e3=Z0((Y,q)=>{q.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"}}),cY=Z0((Y,q)=>{var F=l0().Buffer,O=N3(),Z=a5(),N=i5().ec,V=o5(),C=R7(),B=e3();function D(x,g,_,p,m){var f=C(g);if(f.curve){if(p!=="ecdsa"&&p!=="ecdsa/rsa")throw new Error("wrong private key type");return L(x,f)}else if(f.type==="dsa"){if(p!=="dsa")throw new Error("wrong private key type");return H(x,f,_)}else if(p!=="rsa"&&p!=="ecdsa/rsa")throw new Error("wrong private key type");x=F.concat([m,x]);for(var s=f.modulus.byteLength(),Q0=[0,1];x.length+Q0.length+1<s;)Q0.push(255);Q0.push(0);for(var d=-1;++d<x.length;)Q0.push(x[d]);var K0=Z(Q0,f);return K0}function L(x,g){var _=B[g.curve.join(".")];if(!_)throw new Error("unknown curve "+g.curve.join("."));var p=new N(_),m=p.keyFromPrivate(g.privateKey),f=m.sign(x);return F.from(f.toDER())}function H(x,g,_){for(var p=g.params.priv_key,m=g.params.p,f=g.params.q,s=g.params.g,Q0=new V(0),d,K0=k(x,f).mod(f),Q=!1,G=R(p,f,x,_);Q===!1;)d=M(f,G,_),Q0=w(s,d,m,f),Q=d.invm(f).imul(K0.add(p.mul(Q0))).mod(f),Q.cmpn(0)===0&&(Q=!1,Q0=new V(0));return P(Q0,Q)}function P(x,g){x=x.toArray(),g=g.toArray(),x[0]&128&&(x=[0].concat(x)),g[0]&128&&(g=[0].concat(g));var _=x.length+g.length+4,p=[48,_,2,x.length];return p=p.concat(x,[2,g.length],g),F.from(p)}function R(x,g,_,p){if(x=F.from(x.toArray()),x.length<g.byteLength()){var m=F.alloc(g.byteLength()-x.length);x=F.concat([m,x])}var f=_.length,s=v(_,g),Q0=F.alloc(f);Q0.fill(1);var d=F.alloc(f);return d=O(p,d).update(Q0).update(F.from([0])).update(x).update(s).digest(),Q0=O(p,d).update(Q0).digest(),d=O(p,d).update(Q0).update(F.from([1])).update(x).update(s).digest(),Q0=O(p,d).update(Q0).digest(),{k:d,v:Q0}}function k(x,g){var _=new V(x),p=(x.length<<3)-g.bitLength();return p>0&&_.ishrn(p),_}function v(x,g){x=k(x,g),x=x.mod(g);var _=F.from(x.toArray());if(_.length<g.byteLength()){var p=F.alloc(g.byteLength()-_.length);_=F.concat([p,_])}return _}function M(x,g,_){var p,m;do{for(p=F.alloc(0);p.length*8<x.bitLength();)g.v=O(_,g.k).update(g.v).digest(),p=F.concat([p,g.v]);m=k(p,x),g.k=O(_,g.k).update(g.v).update(F.from([0])).digest(),g.v=O(_,g.k).update(g.v).digest()}while(m.cmp(x)!==-1);return m}function w(x,g,_,p){return x.toRed(V.mont(_)).redPow(g).fromRed().mod(p)}q.exports=D,q.exports.getKey=R,q.exports.makeKey=M}),lY=Z0((Y,q)=>{var F=l0().Buffer,O=o5(),Z=i5().ec,N=R7(),V=e3();function C(H,P,R,k,v){var M=N(R);if(M.type==="ec"){if(k!=="ecdsa"&&k!=="ecdsa/rsa")throw new Error("wrong public key type");return B(H,P,M)}else if(M.type==="dsa"){if(k!=="dsa")throw new Error("wrong public key type");return D(H,P,M)}else if(k!=="rsa"&&k!=="ecdsa/rsa")throw new Error("wrong public key type");P=F.concat([v,P]);for(var w=M.modulus.byteLength(),x=[1],g=0;P.length+x.length+2<w;)x.push(255),g++;x.push(0);for(var _=-1;++_<P.length;)x.push(P[_]);x=F.from(x);var p=O.mont(M.modulus);H=new O(H).toRed(p),H=H.redPow(new O(M.publicExponent)),H=F.from(H.fromRed().toArray());var m=g<8?1:0;for(w=Math.min(H.length,x.length),H.length!==x.length&&(m=1),_=-1;++_<w;)m|=H[_]^x[_];return m===0}function B(H,P,R){var k=V[R.data.algorithm.curve.join(".")];if(!k)throw new Error("unknown curve "+R.data.algorithm.curve.join("."));var v=new Z(k),M=R.data.subjectPrivateKey.data;return v.verify(P,H,M)}function D(H,P,R){var k=R.data.p,v=R.data.q,M=R.data.g,w=R.data.pub_key,x=N.signature.decode(H,"der"),g=x.s,_=x.r;L(g,v),L(_,v);var p=O.mont(k),m=g.invm(v),f=M.toRed(p).redPow(new O(P).mul(m).mod(v)).fromRed().mul(w.toRed(p).redPow(_.mul(m).mod(v)).fromRed()).mod(k).mod(v);return f.cmp(_)===0}function L(H,P){if(H.cmpn(0)<=0)throw new Error("invalid sig");if(H.cmp(P)>=P)throw new Error("invalid sig")}q.exports=C}),uY=Z0((Y,q)=>{var F=l0().Buffer,O=w1(),Z=qY(),N=h0(),V=cY(),C=lY(),B=P3();Object.keys(B).forEach(function(R){B[R].id=F.from(B[R].id,"hex"),B[R.toLowerCase()]=B[R]});function D(R){Z.Writable.call(this);var k=B[R];if(!k)throw new Error("Unknown message digest");this._hashType=k.hash,this._hash=O(k.hash),this._tag=k.id,this._signType=k.sign}N(D,Z.Writable),D.prototype._write=function(R,k,v){this._hash.update(R),v()},D.prototype.update=function(R,k){return typeof R=="string"&&(R=F.from(R,k)),this._hash.update(R),this},D.prototype.sign=function(R,k){this.end();var v=this._hash.digest(),M=V(v,R,this._hashType,this._signType,this._tag);return k?M.toString(k):M};function L(R){Z.Writable.call(this);var k=B[R];if(!k)throw new Error("Unknown message digest");this._hash=O(k.hash),this._tag=k.id,this._signType=k.sign}N(L,Z.Writable),L.prototype._write=function(R,k,v){this._hash.update(R),v()},L.prototype.update=function(R,k){return typeof R=="string"&&(R=F.from(R,k)),this._hash.update(R),this},L.prototype.verify=function(R,k,v){typeof k=="string"&&(k=F.from(k,v)),this.end();var M=this._hash.digest();return C(k,M,R,this._signType,this._tag)};function H(R){return new D(R)}function P(R){return new L(R)}q.exports={Sign:H,Verify:P,createSign:H,createVerify:P}}),dY=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,u=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(u,U0)|0,z=Math.imul(u,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(u,C0)|0,z=z+Math.imul(u,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(u,N0)|0,z=z+Math.imul(u,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(u,L0)|0,z=z+Math.imul(u,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(u,k0)|0,z=z+Math.imul(u,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(u,R0)|0,z=z+Math.imul(u,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(u,T0)|0,z=z+Math.imul(u,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(u,A0)|0,z=z+Math.imul(u,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(u,x0)|0,z=z+Math.imul(u,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(u,E0)|0,z=z+Math.imul(u,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new d(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function d(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}d.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},d.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},d.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},d.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},d.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},d.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},d.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},d.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},d.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},d.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},d.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},d.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},d.prototype.sqr=function(Q){return this.mul(Q,Q)},d.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},d.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},d.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},d.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},d.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){d.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,d),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),fY=Z0((Y,q)=>{var F=i5(),O=dY();q.exports=function(C){return new N(C)};var Z={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}};Z.p224=Z.secp224r1,Z.p256=Z.secp256r1=Z.prime256v1,Z.p192=Z.secp192r1=Z.prime192v1,Z.p384=Z.secp384r1,Z.p521=Z.secp521r1;function N(C){this.curveType=Z[C],this.curveType||(this.curveType={name:C}),this.curve=new F.ec(this.curveType.name),this.keys=void 0}N.prototype.generateKeys=function(C,B){return this.keys=this.curve.genKeyPair(),this.getPublicKey(C,B)},N.prototype.computeSecret=function(C,B,D){B=B||"utf8",Buffer.isBuffer(C)||(C=new Buffer(C,B));var L=this.curve.keyFromPublic(C).getPublic(),H=L.mul(this.keys.getPrivate()).getX();return V(H,D,this.curveType.byteLength)},N.prototype.getPublicKey=function(C,B){var D=this.keys.getPublic(B==="compressed",!0);return B==="hybrid"&&(D[D.length-1]%2?D[0]=7:D[0]=6),V(D,C)},N.prototype.getPrivateKey=function(C){return V(this.keys.getPrivate(),C)},N.prototype.setPublicKey=function(C,B){return B=B||"utf8",Buffer.isBuffer(C)||(C=new Buffer(C,B)),this.keys._importPublic(C),this},N.prototype.setPrivateKey=function(C,B){B=B||"utf8",Buffer.isBuffer(C)||(C=new Buffer(C,B));var D=new O(C);return D=D.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(D),this};function V(C,B,D){Array.isArray(C)||(C=C.toArray());var L=new Buffer(C);if(D&&L.length<D){var H=new Buffer(D-L.length);H.fill(0),L=Buffer.concat([H,L])}return B?L.toString(B):L}}),Q2=Z0((Y,q)=>{var F=w1(),O=l0().Buffer;q.exports=function(N,V){for(var C=O.alloc(0),B=0,D;C.length<V;)D=Z(B++),C=O.concat([C,F("sha1").update(N).update(D).digest()]);return C.slice(0,V)};function Z(N){var V=O.allocUnsafe(4);return V.writeUInt32BE(N,0),V}}),W2=Z0((Y,q)=>{q.exports=function(F,O){for(var Z=F.length,N=-1;++N<Z;)F[N]^=O[N];return F}}),W9=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,u=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(u,U0)|0,z=Math.imul(u,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(u,C0)|0,z=z+Math.imul(u,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(u,N0)|0,z=z+Math.imul(u,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(u,L0)|0,z=z+Math.imul(u,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(u,k0)|0,z=z+Math.imul(u,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(u,R0)|0,z=z+Math.imul(u,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(u,T0)|0,z=z+Math.imul(u,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(u,A0)|0,z=z+Math.imul(u,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(u,x0)|0,z=z+Math.imul(u,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(u,E0)|0,z=z+Math.imul(u,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new d(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function d(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}d.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},d.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},d.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},d.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},d.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},d.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},d.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},d.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},d.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},d.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},d.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},d.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},d.prototype.sqr=function(Q){return this.mul(Q,Q)},d.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},d.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},d.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},d.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},d.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){d.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,d),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),G2=Z0((Y,q)=>{var F=W9(),O=l0().Buffer;function Z(N,V){return O.from(N.toRed(F.mont(V.modulus)).redPow(new F(V.publicExponent)).fromRed().toArray())}q.exports=Z}),oY=Z0((Y,q)=>{var F=R7(),O=t8(),Z=w1(),N=Q2(),V=W2(),C=W9(),B=G2(),D=a5(),L=l0().Buffer;q.exports=function(k,v,M){var w;k.padding?w=k.padding:M?w=1:w=4;var x=F(k),g;if(w===4)g=H(x,v);else if(w===1)g=P(x,v,M);else if(w===3){if(g=new C(v),g.cmp(x.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return M?D(g,x):B(g,x)};function H(k,v){var M=k.modulus.byteLength(),w=v.length,x=Z("sha1").update(L.alloc(0)).digest(),g=x.length,_=2*g;if(w>M-_-2)throw new Error("message too long");var p=L.alloc(M-w-_-2),m=M-g-1,f=O(g),s=V(L.concat([x,p,L.alloc(1,1),v],m),N(f,m)),Q0=V(f,N(s,g));return new C(L.concat([L.alloc(1),Q0,s],M))}function P(k,v,M){var w=v.length,x=k.modulus.byteLength();if(w>x-11)throw new Error("message too long");var g;return M?g=L.alloc(x-w-3,255):g=R(x-w-3),new C(L.concat([L.from([0,M?1:2]),g,L.alloc(1),v],x))}function R(k){for(var v=L.allocUnsafe(k),M=0,w=O(k*2),x=0,g;M<k;)x===w.length&&(w=O(k*2),x=0),g=w[x++],g&&(v[M++]=g);return v}}),aY=Z0((Y,q)=>{var F=R7(),O=Q2(),Z=W2(),N=W9(),V=a5(),C=w1(),B=G2(),D=l0().Buffer;q.exports=function(R,k,v){var M;R.padding?M=R.padding:v?M=1:M=4;var w=F(R),x=w.modulus.byteLength();if(k.length>x||new N(k).cmp(w.modulus)>=0)throw new Error("decryption error");var g;v?g=B(new N(k),w):g=V(k,w);var _=D.alloc(x-g.length);if(g=D.concat([_,g],x),M===4)return L(w,g);if(M===1)return H(w,g,v);if(M===3)return g;throw new Error("unknown padding")};function L(R,k){var v=R.modulus.byteLength(),M=C("sha1").update(D.alloc(0)).digest(),w=M.length;if(k[0]!==0)throw new Error("decryption error");var x=k.slice(1,w+1),g=k.slice(w+1),_=Z(x,O(g,w)),p=Z(g,O(_,v-w-1));if(P(M,p.slice(0,w)))throw new Error("decryption error");for(var m=w;p[m]===0;)m++;if(p[m++]!==1)throw new Error("decryption error");return p.slice(m)}function H(R,k,v){for(var M=k.slice(0,2),w=2,x=0;k[w++]!==0;)if(w>=k.length){x++;break}var g=k.slice(2,w-1);if((M.toString("hex")!=="0002"&&!v||M.toString("hex")!=="0001"&&v)&&x++,g.length<8&&x++,x)throw new Error("decryption error");return k.slice(w)}function P(R,k){R=D.from(R),k=D.from(k);var v=0,M=R.length;R.length!==k.length&&(v++,M=Math.min(R.length,k.length));for(var w=-1;++w<M;)v+=R[w]^k[w];return v}}),nY=Z0((Y)=>{Y.publicEncrypt=oY(),Y.privateDecrypt=aY(),Y.privateEncrypt=function(q,F){return Y.publicEncrypt(q,F,!0)},Y.publicDecrypt=function(q,F){return Y.privateDecrypt(q,F,!0)}}),rY=Z0((Y)=>{function q(){throw new Error(`secure random number generation not supported by this browser
|
|
5
|
-
use chrome, FireFox or Internet Explorer 11`)}var F=l0(),O=t8(),Z=F.Buffer,N=F.kMaxLength,V=window.crypto||window.msCrypto,C=Math.pow(2,32)-1;function B(R,k){if(typeof R!="number"||R!==R)throw new TypeError("offset must be a number");if(R>C||R<0)throw new TypeError("offset must be a uint32");if(R>N||R>k)throw new RangeError("offset out of range")}function D(R,k,v){if(typeof R!="number"||R!==R)throw new TypeError("size must be a number");if(R>C||R<0)throw new TypeError("size must be a uint32");if(R+k>v||R>N)throw new RangeError("buffer too small")}V&&V.getRandomValues?(Y.randomFill=L,Y.randomFillSync=P):(Y.randomFill=q,Y.randomFillSync=q);function L(R,k,v,M){if(!Z.isBuffer(R)&&!(R instanceof window.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof k=="function")M=k,k=0,v=R.length;else if(typeof v=="function")M=v,v=R.length-k;else if(typeof M!="function")throw new TypeError('"cb" argument must be a function');return B(k,R.length),D(v,k,R.length),H(R,k,v,M)}function H(R,k,v,M){var w=R.buffer,x=new Uint8Array(w,k,v);if(V.getRandomValues(x),M){process.nextTick(function(){M(null,R)});return}return R;var g}function P(R,k,v){if(typeof k>"u"&&(k=0),!Z.isBuffer(R)&&!(R instanceof window.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return B(k,R.length),v===void 0&&(v=R.length-k),D(v,k,R.length),H(R,k,v)}}),X2=Z0((Y)=>{Y.randomBytes=Y.rng=Y.pseudoRandomBytes=Y.prng=t8(),Y.createHash=Y.Hash=w1(),Y.createHmac=Y.Hmac=N3();var q=hX(),F=Object.keys(q),O=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(F);Y.getHashes=function(){return O};var Z=T3();Y.pbkdf2=Z.pbkdf2,Y.pbkdf2Sync=Z.pbkdf2Sync;var N=GY();Y.Cipher=N.Cipher,Y.createCipher=N.createCipher,Y.Cipheriv=N.Cipheriv,Y.createCipheriv=N.createCipheriv,Y.Decipher=N.Decipher,Y.createDecipher=N.createDecipher,Y.Decipheriv=N.Decipheriv,Y.createDecipheriv=N.createDecipheriv,Y.getCiphers=N.getCiphers,Y.listCiphers=N.listCiphers;var V=UY();Y.DiffieHellmanGroup=V.DiffieHellmanGroup,Y.createDiffieHellmanGroup=V.createDiffieHellmanGroup,Y.getDiffieHellman=V.getDiffieHellman,Y.createDiffieHellman=V.createDiffieHellman,Y.DiffieHellman=V.DiffieHellman;var C=
|
|
1
|
+
var s2=Object.defineProperty;var t2=(Y,q)=>{for(var F in q)s2(Y,F,{get:q[F],enumerable:!0,configurable:!0,set:(O)=>q[F]=()=>O})};function B9(Y){const q=Y.length;let F=0,O=0;while(O<q){let Z=Y.charCodeAt(O++);if((Z&4294967168)===0){F++;continue}else if((Z&4294965248)===0)F+=2;else{if(Z>=55296&&Z<=56319){if(O<q){const N=Y.charCodeAt(O);if((N&64512)===56320)++O,Z=((Z&1023)<<10)+(N&1023)+65536}}if((Z&4294901760)===0)F+=3;else F+=4}}return F}function e2(Y,q,F){const O=Y.length;let Z=F,N=0;while(N<O){let V=Y.charCodeAt(N++);if((V&4294967168)===0){q[Z++]=V;continue}else if((V&4294965248)===0)q[Z++]=V>>6&31|192;else{if(V>=55296&&V<=56319){if(N<O){const C=Y.charCodeAt(N);if((C&64512)===56320)++N,V=((V&1023)<<10)+(C&1023)+65536}}if((V&4294901760)===0)q[Z++]=V>>12&15|224,q[Z++]=V>>6&63|128;else q[Z++]=V>>18&7|240,q[Z++]=V>>12&63|128,q[Z++]=V>>6&63|128}q[Z++]=V&63|128}}function GQ(Y,q,F){QQ.encodeInto(Y,q.subarray(F))}function R9(Y,q,F){if(Y.length>WQ)GQ(Y,q,F);else e2(Y,q,F)}function n7(Y,q,F){let O=q;const Z=O+F,N=[];let V="";while(O<Z){const C=Y[O++];if((C&128)===0)N.push(C);else if((C&224)===192){const B=Y[O++]&63;N.push((C&31)<<6|B)}else if((C&240)===224){const B=Y[O++]&63,D=Y[O++]&63;N.push((C&31)<<12|B<<6|D)}else if((C&248)===240){const B=Y[O++]&63,D=Y[O++]&63,L=Y[O++]&63;let H=(C&7)<<18|B<<12|D<<6|L;if(H>65535)H-=65536,N.push(H>>>10&1023|55296),H=56320|H&1023;N.push(H)}else N.push(C);if(N.length>=XQ)V+=String.fromCharCode(...N),N.length=0}if(N.length>0)V+=String.fromCharCode(...N);return V}function JQ(Y,q,F){const O=Y.subarray(q,q+F);return YQ.decode(O)}function I9(Y,q,F){if(F>VQ)return JQ(Y,q,F);else return n7(Y,q,F)}var QQ=new TextEncoder,WQ=50,XQ=4096,YQ=new TextDecoder,VQ=200;class b8{constructor(Y,q){this.type=Y,this.data=q}}class I6 extends Error{constructor(Y){super(Y);const q=Object.create(I6.prototype);Object.setPrototypeOf(this,q),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:I6.name})}}function T9(Y,q,F){const O=F/4294967296,Z=F;Y.setUint32(q,O),Y.setUint32(q+4,Z)}function r1(Y,q,F){const O=Math.floor(F/4294967296),Z=F;Y.setUint32(q,O),Y.setUint32(q+4,Z)}function i1(Y,q){const F=Y.getInt32(q),O=Y.getUint32(q+4);return F*4294967296+O}function M9(Y,q){const F=Y.getUint32(q),O=Y.getUint32(q+4);return F*4294967296+O}var h8=4294967295;function zQ({sec:Y,nsec:q}){if(Y>=0&&q>=0&&Y<=KQ)if(q===0&&Y<=FQ){const F=new Uint8Array(4);return new DataView(F.buffer).setUint32(0,Y),F}else{const F=Y/4294967296,O=Y&4294967295,Z=new Uint8Array(8),N=new DataView(Z.buffer);return N.setUint32(0,q<<2|F&3),N.setUint32(4,O),Z}else{const F=new Uint8Array(12),O=new DataView(F.buffer);return O.setUint32(0,q),r1(O,4,Y),F}}function ZQ(Y){const q=Y.getTime(),F=Math.floor(q/1000),O=(q-F*1000)*1e6,Z=Math.floor(O/1e9);return{sec:F+Z,nsec:O-Z*1e9}}function $Q(Y){if(Y instanceof Date){const q=ZQ(Y);return zQ(q)}else return null}function qQ(Y){const q=new DataView(Y.buffer,Y.byteOffset,Y.byteLength);switch(Y.byteLength){case 4:return{sec:q.getUint32(0),nsec:0};case 8:{const F=q.getUint32(0),O=q.getUint32(4),Z=(F&3)*4294967296+O,N=F>>>2;return{sec:Z,nsec:N}}case 12:{const F=i1(q,4),O=q.getUint32(0);return{sec:F,nsec:O}}default:throw new I6(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${Y.length}`)}}function jQ(Y){const q=qQ(Y);return new Date(q.sec*1000+q.nsec/1e6)}var UQ=-1,FQ=4294967295,KQ=17179869183,A9={type:UQ,encode:$Q,decode:jQ};class L8{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(A9)}register({type:Y,encode:q,decode:F}){if(Y>=0)this.encoders[Y]=q,this.decoders[Y]=F;else{const O=-1-Y;this.builtInEncoders[O]=q,this.builtInDecoders[O]=F}}tryToEncode(Y,q){for(let F=0;F<this.builtInEncoders.length;F++){const O=this.builtInEncoders[F];if(O!=null){const Z=O(Y,q);if(Z!=null){const N=-1-F;return new b8(N,Z)}}}for(let F=0;F<this.encoders.length;F++){const O=this.encoders[F];if(O!=null){const Z=O(Y,q);if(Z!=null)return new b8(F,Z)}}if(Y instanceof b8)return Y;return null}decode(Y,q,F){const O=q<0?this.builtInDecoders[-1-q]:this.decoders[q];if(O)return O(Y,q,F);else return new b8(q,Y)}}L8.defaultCodec=new L8;var HQ=function(Y){return Y instanceof ArrayBuffer||typeof SharedArrayBuffer!=="undefined"&&Y instanceof SharedArrayBuffer};function K1(Y){if(Y instanceof Uint8Array)return Y;else if(ArrayBuffer.isView(Y))return new Uint8Array(Y.buffer,Y.byteOffset,Y.byteLength);else if(HQ(Y))return new Uint8Array(Y);else return Uint8Array.from(Y)}var CQ=100,OQ=2048;class s1{constructor(Y){this.entered=!1,this.extensionCodec=Y?.extensionCodec??L8.defaultCodec,this.context=Y?.context,this.useBigInt64=Y?.useBigInt64??!1,this.maxDepth=Y?.maxDepth??CQ,this.initialBufferSize=Y?.initialBufferSize??OQ,this.sortKeys=Y?.sortKeys??!1,this.forceFloat32=Y?.forceFloat32??!1,this.ignoreUndefined=Y?.ignoreUndefined??!1,this.forceIntegerToFloat=Y?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new s1({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(Y){if(this.entered)return this.clone().encodeSharedRef(Y);try{return this.entered=!0,this.reinitializeState(),this.doEncode(Y,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(Y){if(this.entered)return this.clone().encode(Y);try{return this.entered=!0,this.reinitializeState(),this.doEncode(Y,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(Y,q){if(q>this.maxDepth)throw new Error(`Too deep objects in depth ${q}`);if(Y==null)this.encodeNil();else if(typeof Y==="boolean")this.encodeBoolean(Y);else if(typeof Y==="number")if(!this.forceIntegerToFloat)this.encodeNumber(Y);else this.encodeNumberAsFloat(Y);else if(typeof Y==="string")this.encodeString(Y);else if(this.useBigInt64&&typeof Y==="bigint")this.encodeBigInt64(Y);else this.encodeObject(Y,q)}ensureBufferSizeToWrite(Y){const q=this.pos+Y;if(this.view.byteLength<q)this.resizeBuffer(q*2)}resizeBuffer(Y){const q=new ArrayBuffer(Y),F=new Uint8Array(q),O=new DataView(q);F.set(this.bytes),this.view=O,this.bytes=F}encodeNil(){this.writeU8(192)}encodeBoolean(Y){if(Y===!1)this.writeU8(194);else this.writeU8(195)}encodeNumber(Y){if(!this.forceIntegerToFloat&&Number.isSafeInteger(Y))if(Y>=0)if(Y<128)this.writeU8(Y);else if(Y<256)this.writeU8(204),this.writeU8(Y);else if(Y<65536)this.writeU8(205),this.writeU16(Y);else if(Y<4294967296)this.writeU8(206),this.writeU32(Y);else if(!this.useBigInt64)this.writeU8(207),this.writeU64(Y);else this.encodeNumberAsFloat(Y);else if(Y>=-32)this.writeU8(224|Y+32);else if(Y>=-128)this.writeU8(208),this.writeI8(Y);else if(Y>=-32768)this.writeU8(209),this.writeI16(Y);else if(Y>=-2147483648)this.writeU8(210),this.writeI32(Y);else if(!this.useBigInt64)this.writeU8(211),this.writeI64(Y);else this.encodeNumberAsFloat(Y);else this.encodeNumberAsFloat(Y)}encodeNumberAsFloat(Y){if(this.forceFloat32)this.writeU8(202),this.writeF32(Y);else this.writeU8(203),this.writeF64(Y)}encodeBigInt64(Y){if(Y>=BigInt(0))this.writeU8(207),this.writeBigUint64(Y);else this.writeU8(211),this.writeBigInt64(Y)}writeStringHeader(Y){if(Y<32)this.writeU8(160+Y);else if(Y<256)this.writeU8(217),this.writeU8(Y);else if(Y<65536)this.writeU8(218),this.writeU16(Y);else if(Y<4294967296)this.writeU8(219),this.writeU32(Y);else throw new Error(`Too long string: ${Y} bytes in UTF-8`)}encodeString(Y){const F=B9(Y);this.ensureBufferSizeToWrite(5+F),this.writeStringHeader(F),R9(Y,this.bytes,this.pos),this.pos+=F}encodeObject(Y,q){const F=this.extensionCodec.tryToEncode(Y,this.context);if(F!=null)this.encodeExtension(F);else if(Array.isArray(Y))this.encodeArray(Y,q);else if(ArrayBuffer.isView(Y))this.encodeBinary(Y);else if(typeof Y==="object")this.encodeMap(Y,q);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(Y)}`)}encodeBinary(Y){const q=Y.byteLength;if(q<256)this.writeU8(196),this.writeU8(q);else if(q<65536)this.writeU8(197),this.writeU16(q);else if(q<4294967296)this.writeU8(198),this.writeU32(q);else throw new Error(`Too large binary: ${q}`);const F=K1(Y);this.writeU8a(F)}encodeArray(Y,q){const F=Y.length;if(F<16)this.writeU8(144+F);else if(F<65536)this.writeU8(220),this.writeU16(F);else if(F<4294967296)this.writeU8(221),this.writeU32(F);else throw new Error(`Too large array: ${F}`);for(let O of Y)this.doEncode(O,q+1)}countWithoutUndefined(Y,q){let F=0;for(let O of q)if(Y[O]!==void 0)F++;return F}encodeMap(Y,q){const F=Object.keys(Y);if(this.sortKeys)F.sort();const O=this.ignoreUndefined?this.countWithoutUndefined(Y,F):F.length;if(O<16)this.writeU8(128+O);else if(O<65536)this.writeU8(222),this.writeU16(O);else if(O<4294967296)this.writeU8(223),this.writeU32(O);else throw new Error(`Too large map object: ${O}`);for(let Z of F){const N=Y[Z];if(!(this.ignoreUndefined&&N===void 0))this.encodeString(Z),this.doEncode(N,q+1)}}encodeExtension(Y){if(typeof Y.data==="function"){const F=Y.data(this.pos+6),O=F.length;if(O>=4294967296)throw new Error(`Too large extension object: ${O}`);this.writeU8(201),this.writeU32(O),this.writeI8(Y.type),this.writeU8a(F);return}const q=Y.data.length;if(q===1)this.writeU8(212);else if(q===2)this.writeU8(213);else if(q===4)this.writeU8(214);else if(q===8)this.writeU8(215);else if(q===16)this.writeU8(216);else if(q<256)this.writeU8(199),this.writeU8(q);else if(q<65536)this.writeU8(200),this.writeU16(q);else if(q<4294967296)this.writeU8(201),this.writeU32(q);else throw new Error(`Too large extension object: ${q}`);this.writeI8(Y.type),this.writeU8a(Y.data)}writeU8(Y){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,Y),this.pos++}writeU8a(Y){const q=Y.length;this.ensureBufferSizeToWrite(q),this.bytes.set(Y,this.pos),this.pos+=q}writeI8(Y){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,Y),this.pos++}writeU16(Y){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,Y),this.pos+=2}writeI16(Y){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,Y),this.pos+=2}writeU32(Y){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,Y),this.pos+=4}writeI32(Y){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,Y),this.pos+=4}writeF32(Y){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,Y),this.pos+=4}writeF64(Y){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,Y),this.pos+=8}writeU64(Y){this.ensureBufferSizeToWrite(8),T9(this.view,this.pos,Y),this.pos+=8}writeI64(Y){this.ensureBufferSizeToWrite(8),r1(this.view,this.pos,Y),this.pos+=8}writeBigUint64(Y){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,Y),this.pos+=8}writeBigInt64(Y){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,Y),this.pos+=8}}function J8(Y,q){return new s1(q).encodeSharedRef(Y)}function t1(Y){return`${Y<0?"-":""}0x${Math.abs(Y).toString(16).padStart(2,"0")}`}var DQ=16,LQ=16;class r7{constructor(Y=DQ,q=LQ){this.hit=0,this.miss=0,this.maxKeyLength=Y,this.maxLengthPerKey=q,this.caches=[];for(let F=0;F<this.maxKeyLength;F++)this.caches.push([])}canBeCached(Y){return Y>0&&Y<=this.maxKeyLength}find(Y,q,F){const O=this.caches[F-1];Q:for(let Z of O){const N=Z.bytes;for(let V=0;V<F;V++)if(N[V]!==Y[q+V])continue Q;return Z.str}return null}store(Y,q){const F=this.caches[Y.length-1],O={bytes:Y,str:q};if(F.length>=this.maxLengthPerKey)F[Math.random()*F.length|0]=O;else F.push(O)}decode(Y,q,F){const O=this.find(Y,q,F);if(O!=null)return this.hit++,O;this.miss++;const Z=n7(Y,q,F),N=Uint8Array.prototype.slice.call(Y,q,q+F);return this.store(N,Z),Z}}var i7="array",Z1="map_key",x9="map_value",NQ=(Y)=>{if(typeof Y==="string"||typeof Y==="number")return Y;throw new I6("The type of key must be string or number but "+typeof Y)};class S9{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(Y){const q=this.getUninitializedStateFromPool();q.type=i7,q.position=0,q.size=Y,q.array=new Array(Y)}pushMapState(Y){const q=this.getUninitializedStateFromPool();q.type=Z1,q.readCount=0,q.size=Y,q.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const Y={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(Y)}return this.stack[this.stackHeadPosition]}release(Y){if(this.stack[this.stackHeadPosition]!==Y)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(Y.type===i7){const F=Y;F.size=0,F.array=void 0,F.position=0,F.type=void 0}if(Y.type===Z1||Y.type===x9){const F=Y;F.size=0,F.map=void 0,F.readCount=0,F.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}var z1=-1,s7=new DataView(new ArrayBuffer(0)),PQ=new Uint8Array(s7.buffer);try{s7.getInt8(0)}catch(Y){if(!(Y instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var v9=new RangeError("Insufficient data"),kQ=new r7;class e1{constructor(Y){this.totalPos=0,this.pos=0,this.view=s7,this.bytes=PQ,this.headByte=z1,this.stack=new S9,this.entered=!1,this.extensionCodec=Y?.extensionCodec??L8.defaultCodec,this.context=Y?.context,this.useBigInt64=Y?.useBigInt64??!1,this.rawStrings=Y?.rawStrings??!1,this.maxStrLength=Y?.maxStrLength??h8,this.maxBinLength=Y?.maxBinLength??h8,this.maxArrayLength=Y?.maxArrayLength??h8,this.maxMapLength=Y?.maxMapLength??h8,this.maxExtLength=Y?.maxExtLength??h8,this.keyDecoder=Y?.keyDecoder!==void 0?Y.keyDecoder:kQ,this.mapKeyConverter=Y?.mapKeyConverter??NQ}clone(){return new e1({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=z1,this.stack.reset()}setBuffer(Y){const q=K1(Y);this.bytes=q,this.view=new DataView(q.buffer,q.byteOffset,q.byteLength),this.pos=0}appendBuffer(Y){if(this.headByte===z1&&!this.hasRemaining(1))this.setBuffer(Y);else{const q=this.bytes.subarray(this.pos),F=K1(Y),O=new Uint8Array(q.length+F.length);O.set(q),O.set(F,q.length),this.setBuffer(O)}}hasRemaining(Y){return this.view.byteLength-this.pos>=Y}createExtraByteError(Y){const{view:q,pos:F}=this;return new RangeError(`Extra ${q.byteLength-F} of ${q.byteLength} byte(s) found at buffer[${Y}]`)}decode(Y){if(this.entered)return this.clone().decode(Y);try{this.entered=!0,this.reinitializeState(),this.setBuffer(Y);const q=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return q}finally{this.entered=!1}}*decodeMulti(Y){if(this.entered){yield*this.clone().decodeMulti(Y);return}try{this.entered=!0,this.reinitializeState(),this.setBuffer(Y);while(this.hasRemaining(1))yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(Y){if(this.entered)return this.clone().decodeAsync(Y);try{this.entered=!0;let q=!1,F;for await(let V of Y){if(q)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(V);try{F=this.doDecodeSync(),q=!0}catch(C){if(!(C instanceof RangeError))throw C}this.totalPos+=this.pos}if(q){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return F}const{headByte:O,pos:Z,totalPos:N}=this;throw new RangeError(`Insufficient data in parsing ${t1(O)} at ${N} (${Z} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(Y){return this.decodeMultiAsync(Y,!0)}decodeStream(Y){return this.decodeMultiAsync(Y,!1)}async*decodeMultiAsync(Y,q){if(this.entered){yield*this.clone().decodeMultiAsync(Y,q);return}try{this.entered=!0;let F=q,O=-1;for await(let Z of Y){if(q&&O===0)throw this.createExtraByteError(this.totalPos);if(this.appendBuffer(Z),F)O=this.readArraySize(),F=!1,this.complete();try{while(!0)if(yield this.doDecodeSync(),--O===0)break}catch(N){if(!(N instanceof RangeError))throw N}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){Q:while(!0){const Y=this.readHeadByte();let q;if(Y>=224)q=Y-256;else if(Y<192)if(Y<128)q=Y;else if(Y<144){const O=Y-128;if(O!==0){this.pushMapState(O),this.complete();continue Q}else q={}}else if(Y<160){const O=Y-144;if(O!==0){this.pushArrayState(O),this.complete();continue Q}else q=[]}else{const O=Y-160;q=this.decodeString(O,0)}else if(Y===192)q=null;else if(Y===194)q=!1;else if(Y===195)q=!0;else if(Y===202)q=this.readF32();else if(Y===203)q=this.readF64();else if(Y===204)q=this.readU8();else if(Y===205)q=this.readU16();else if(Y===206)q=this.readU32();else if(Y===207)if(this.useBigInt64)q=this.readU64AsBigInt();else q=this.readU64();else if(Y===208)q=this.readI8();else if(Y===209)q=this.readI16();else if(Y===210)q=this.readI32();else if(Y===211)if(this.useBigInt64)q=this.readI64AsBigInt();else q=this.readI64();else if(Y===217){const O=this.lookU8();q=this.decodeString(O,1)}else if(Y===218){const O=this.lookU16();q=this.decodeString(O,2)}else if(Y===219){const O=this.lookU32();q=this.decodeString(O,4)}else if(Y===220){const O=this.readU16();if(O!==0){this.pushArrayState(O),this.complete();continue Q}else q=[]}else if(Y===221){const O=this.readU32();if(O!==0){this.pushArrayState(O),this.complete();continue Q}else q=[]}else if(Y===222){const O=this.readU16();if(O!==0){this.pushMapState(O),this.complete();continue Q}else q={}}else if(Y===223){const O=this.readU32();if(O!==0){this.pushMapState(O),this.complete();continue Q}else q={}}else if(Y===196){const O=this.lookU8();q=this.decodeBinary(O,1)}else if(Y===197){const O=this.lookU16();q=this.decodeBinary(O,2)}else if(Y===198){const O=this.lookU32();q=this.decodeBinary(O,4)}else if(Y===212)q=this.decodeExtension(1,0);else if(Y===213)q=this.decodeExtension(2,0);else if(Y===214)q=this.decodeExtension(4,0);else if(Y===215)q=this.decodeExtension(8,0);else if(Y===216)q=this.decodeExtension(16,0);else if(Y===199){const O=this.lookU8();q=this.decodeExtension(O,1)}else if(Y===200){const O=this.lookU16();q=this.decodeExtension(O,2)}else if(Y===201){const O=this.lookU32();q=this.decodeExtension(O,4)}else throw new I6(`Unrecognized type byte: ${t1(Y)}`);this.complete();const F=this.stack;while(F.length>0){const O=F.top();if(O.type===i7)if(O.array[O.position]=q,O.position++,O.position===O.size)q=O.array,F.release(O);else continue Q;else if(O.type===Z1){if(q==="__proto__")throw new I6("The key __proto__ is not allowed");O.key=this.mapKeyConverter(q),O.type=x9;continue Q}else if(O.map[O.key]=q,O.readCount++,O.readCount===O.size)q=O.map,F.release(O);else{O.key=null,O.type=Z1;continue Q}}return q}}readHeadByte(){if(this.headByte===z1)this.headByte=this.readU8();return this.headByte}complete(){this.headByte=z1}readArraySize(){const Y=this.readHeadByte();switch(Y){case 220:return this.readU16();case 221:return this.readU32();default:if(Y<160)return Y-144;else throw new I6(`Unrecognized array type byte: ${t1(Y)}`)}}pushMapState(Y){if(Y>this.maxMapLength)throw new I6(`Max length exceeded: map length (${Y}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(Y)}pushArrayState(Y){if(Y>this.maxArrayLength)throw new I6(`Max length exceeded: array length (${Y}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(Y)}decodeString(Y,q){if(!this.rawStrings||this.stateIsMapKey())return this.decodeUtf8String(Y,q);return this.decodeBinary(Y,q)}decodeUtf8String(Y,q){if(Y>this.maxStrLength)throw new I6(`Max length exceeded: UTF-8 byte length (${Y}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+q+Y)throw v9;const F=this.pos+q;let O;if(this.stateIsMapKey()&&this.keyDecoder?.canBeCached(Y))O=this.keyDecoder.decode(this.bytes,F,Y);else O=I9(this.bytes,F,Y);return this.pos+=q+Y,O}stateIsMapKey(){if(this.stack.length>0)return this.stack.top().type===Z1;return!1}decodeBinary(Y,q){if(Y>this.maxBinLength)throw new I6(`Max length exceeded: bin length (${Y}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(Y+q))throw v9;const F=this.pos+q,O=this.bytes.subarray(F,F+Y);return this.pos+=q+Y,O}decodeExtension(Y,q){if(Y>this.maxExtLength)throw new I6(`Max length exceeded: ext length (${Y}) > maxExtLength (${this.maxExtLength})`);const F=this.view.getInt8(this.pos+q),O=this.decodeBinary(Y,q+1);return this.extensionCodec.decode(O,F,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const Y=this.view.getUint8(this.pos);return this.pos++,Y}readI8(){const Y=this.view.getInt8(this.pos);return this.pos++,Y}readU16(){const Y=this.view.getUint16(this.pos);return this.pos+=2,Y}readI16(){const Y=this.view.getInt16(this.pos);return this.pos+=2,Y}readU32(){const Y=this.view.getUint32(this.pos);return this.pos+=4,Y}readI32(){const Y=this.view.getInt32(this.pos);return this.pos+=4,Y}readU64(){const Y=M9(this.view,this.pos);return this.pos+=8,Y}readI64(){const Y=i1(this.view,this.pos);return this.pos+=8,Y}readU64AsBigInt(){const Y=this.view.getBigUint64(this.pos);return this.pos+=8,Y}readI64AsBigInt(){const Y=this.view.getBigInt64(this.pos);return this.pos+=8,Y}readF32(){const Y=this.view.getFloat32(this.pos);return this.pos+=4,Y}readF64(){const Y=this.view.getFloat64(this.pos);return this.pos+=8,Y}}function Q7(Y,q){return new e1(q).decode(Y)}var o8=function(Y){let q=Y.length;while(--q>=0)Y[q]=0},e7=function(Y,q,F,O,Z){this.static_tree=Y,this.extra_bits=q,this.extra_base=F,this.elems=O,this.max_length=Z,this.has_stree=Y&&Y.length},Q5=function(Y,q){this.dyn_tree=Y,this.max_code=0,this.stat_desc=q},l6=function(Y,q,F,O,Z){this.good_length=Y,this.max_lazy=q,this.nice_length=F,this.max_chain=O,this.func=Z},RW=function(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=z7,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HW*2),this.dyn_dtree=new Uint16Array((2*qW+1)*2),this.bl_tree=new Uint16Array((2*jW+1)*2),U8(this.dyn_ltree),U8(this.dyn_dtree),U8(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(CW+1),this.heap=new Uint16Array(2*H5+1),U8(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*H5+1),U8(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0},oW=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},A1=function(Y){this.options=Z7.assign({level:tW,method:QG,chunkSize:16384,windowBits:15,memLevel:8,strategy:eW},Y||{});let q=this.options;if(q.raw&&q.windowBits>0)q.windowBits=-q.windowBits;else if(q.gzip&&q.windowBits>0&&q.windowBits<16)q.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m4,this.strm.avail_out=0;let F=C1.deflateInit2(this.strm,q.level,q.method,q.windowBits,q.memLevel,q.strategy);if(F!==F7)throw new Error(B8[F]);if(q.header)C1.deflateSetHeader(this.strm,q.header);if(q.dictionary){let O;if(typeof q.dictionary==="string")O=R1.string2buf(q.dictionary);else if(p4.call(q.dictionary)==="[object ArrayBuffer]")O=new Uint8Array(q.dictionary);else O=q.dictionary;if(F=C1.deflateSetDictionary(this.strm,O),F!==F7)throw new Error(B8[F]);this._dict_set=!0}},T5=function(Y,q){const F=new A1(q);if(F.push(Y,!0),F.err)throw F.msg||B8[F.err];return F.result},WG=function(Y,q){return q=q||{},q.raw=!0,T5(Y,q)},GG=function(Y,q){return q=q||{},q.gzip=!0,T5(Y,q)},IG=function(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},lG=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},v1=function(Y){this.options=Z7.assign({chunkSize:65536,windowBits:15,to:""},Y||{});const q=this.options;if(q.raw&&q.windowBits>=0&&q.windowBits<16){if(q.windowBits=-q.windowBits,q.windowBits===0)q.windowBits=-15}if(q.windowBits>=0&&q.windowBits<16&&!(Y&&Y.windowBits))q.windowBits+=32;if(q.windowBits>15&&q.windowBits<48){if((q.windowBits&15)===0)q.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m4,this.strm.avail_out=0;let F=t6.inflateInit2(this.strm,q.windowBits);if(F!==I1)throw new Error(B8[F]);if(this.header=new dG,t6.inflateGetHeader(this.strm,this.header),q.dictionary){if(typeof q.dictionary==="string")q.dictionary=R1.string2buf(q.dictionary);else if(i4.call(q.dictionary)==="[object ArrayBuffer]")q.dictionary=new Uint8Array(q.dictionary);if(q.raw){if(F=t6.inflateSetDictionary(this.strm,q.dictionary),F!==I1)throw new Error(B8[F])}}},M5=function(Y,q){const F=new v1(q);if(F.push(Y),F.err)throw F.msg||B8[F.err];return F.result},nG=function(Y,q){return q=q||{},q.raw=!0,M5(Y,q)};/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */var BQ=0,C4=1,RQ=2,IQ=3,TQ=258,P5=29,T1=256,D1=T1+1+P5,d8=30,k5=19,O4=2*D1+1,N8=15,t7=16,MQ=7,B5=256,D4=16,L4=17,N4=18,$5=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),J7=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),AQ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),P4=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vQ=512,s6=new Array((D1+2)*2);o8(s6);var H1=new Array(d8*2);o8(H1);var L1=new Array(vQ);o8(L1);var N1=new Array(TQ-IQ+1);o8(N1);var R5=new Array(P5);o8(R5);var U7=new Array(d8);o8(U7);var k4,B4,R4,I4=(Y)=>{return Y<256?L1[Y]:L1[256+(Y>>>7)]},P1=(Y,q)=>{Y.pending_buf[Y.pending++]=q&255,Y.pending_buf[Y.pending++]=q>>>8&255},M6=(Y,q,F)=>{if(Y.bi_valid>t7-F)Y.bi_buf|=q<<Y.bi_valid&65535,P1(Y,Y.bi_buf),Y.bi_buf=q>>t7-Y.bi_valid,Y.bi_valid+=F-t7;else Y.bi_buf|=q<<Y.bi_valid&65535,Y.bi_valid+=F},d6=(Y,q,F)=>{M6(Y,F[q*2],F[q*2+1])},T4=(Y,q)=>{let F=0;do F|=Y&1,Y>>>=1,F<<=1;while(--q>0);return F>>>1},xQ=(Y)=>{if(Y.bi_valid===16)P1(Y,Y.bi_buf),Y.bi_buf=0,Y.bi_valid=0;else if(Y.bi_valid>=8)Y.pending_buf[Y.pending++]=Y.bi_buf&255,Y.bi_buf>>=8,Y.bi_valid-=8},SQ=(Y,q)=>{const{dyn_tree:F,max_code:O}=q,Z=q.stat_desc.static_tree,N=q.stat_desc.has_stree,V=q.stat_desc.extra_bits,C=q.stat_desc.extra_base,B=q.stat_desc.max_length;let D,L,H,P,R,k,v=0;for(P=0;P<=N8;P++)Y.bl_count[P]=0;F[Y.heap[Y.heap_max]*2+1]=0;for(D=Y.heap_max+1;D<O4;D++){if(L=Y.heap[D],P=F[F[L*2+1]*2+1]+1,P>B)P=B,v++;if(F[L*2+1]=P,L>O)continue;if(Y.bl_count[P]++,R=0,L>=C)R=V[L-C];if(k=F[L*2],Y.opt_len+=k*(P+R),N)Y.static_len+=k*(Z[L*2+1]+R)}if(v===0)return;do{P=B-1;while(Y.bl_count[P]===0)P--;Y.bl_count[P]--,Y.bl_count[P+1]+=2,Y.bl_count[B]--,v-=2}while(v>0);for(P=B;P!==0;P--){L=Y.bl_count[P];while(L!==0){if(H=Y.heap[--D],H>O)continue;if(F[H*2+1]!==P)Y.opt_len+=(P-F[H*2+1])*F[H*2],F[H*2+1]=P;L--}}},M4=(Y,q,F)=>{const O=new Array(N8+1);let Z=0,N,V;for(N=1;N<=N8;N++)Z=Z+F[N-1]<<1,O[N]=Z;for(V=0;V<=q;V++){let C=Y[V*2+1];if(C===0)continue;Y[V*2]=T4(O[C]++,C)}},EQ=()=>{let Y,q,F,O,Z;const N=new Array(N8+1);F=0;for(O=0;O<P5-1;O++){R5[O]=F;for(Y=0;Y<1<<$5[O];Y++)N1[F++]=O}N1[F-1]=O,Z=0;for(O=0;O<16;O++){U7[O]=Z;for(Y=0;Y<1<<J7[O];Y++)L1[Z++]=O}Z>>=7;for(;O<d8;O++){U7[O]=Z<<7;for(Y=0;Y<1<<J7[O]-7;Y++)L1[256+Z++]=O}for(q=0;q<=N8;q++)N[q]=0;Y=0;while(Y<=143)s6[Y*2+1]=8,Y++,N[8]++;while(Y<=255)s6[Y*2+1]=9,Y++,N[9]++;while(Y<=279)s6[Y*2+1]=7,Y++,N[7]++;while(Y<=287)s6[Y*2+1]=8,Y++,N[8]++;M4(s6,D1+1,N);for(Y=0;Y<d8;Y++)H1[Y*2+1]=5,H1[Y*2]=T4(Y,5);k4=new e7(s6,$5,T1+1,D1,N8),B4=new e7(H1,J7,0,d8,N8),R4=new e7(new Array(0),AQ,0,k5,MQ)},A4=(Y)=>{let q;for(q=0;q<D1;q++)Y.dyn_ltree[q*2]=0;for(q=0;q<d8;q++)Y.dyn_dtree[q*2]=0;for(q=0;q<k5;q++)Y.bl_tree[q*2]=0;Y.dyn_ltree[B5*2]=1,Y.opt_len=Y.static_len=0,Y.sym_next=Y.matches=0},v4=(Y)=>{if(Y.bi_valid>8)P1(Y,Y.bi_buf);else if(Y.bi_valid>0)Y.pending_buf[Y.pending++]=Y.bi_buf;Y.bi_buf=0,Y.bi_valid=0},E9=(Y,q,F,O)=>{const Z=q*2,N=F*2;return Y[Z]<Y[N]||Y[Z]===Y[N]&&O[q]<=O[F]},W5=(Y,q,F)=>{const O=Y.heap[F];let Z=F<<1;while(Z<=Y.heap_len){if(Z<Y.heap_len&&E9(q,Y.heap[Z+1],Y.heap[Z],Y.depth))Z++;if(E9(q,O,Y.heap[Z],Y.depth))break;Y.heap[F]=Y.heap[Z],F=Z,Z<<=1}Y.heap[F]=O},w9=(Y,q,F)=>{let O,Z,N=0,V,C;if(Y.sym_next!==0)do if(O=Y.pending_buf[Y.sym_buf+N++]&255,O+=(Y.pending_buf[Y.sym_buf+N++]&255)<<8,Z=Y.pending_buf[Y.sym_buf+N++],O===0)d6(Y,Z,q);else{if(V=N1[Z],d6(Y,V+T1+1,q),C=$5[V],C!==0)Z-=R5[V],M6(Y,Z,C);if(O--,V=I4(O),d6(Y,V,F),C=J7[V],C!==0)O-=U7[V],M6(Y,O,C)}while(N<Y.sym_next);d6(Y,B5,q)},q5=(Y,q)=>{const F=q.dyn_tree,O=q.stat_desc.static_tree,Z=q.stat_desc.has_stree,N=q.stat_desc.elems;let V,C,B=-1,D;Y.heap_len=0,Y.heap_max=O4;for(V=0;V<N;V++)if(F[V*2]!==0)Y.heap[++Y.heap_len]=B=V,Y.depth[V]=0;else F[V*2+1]=0;while(Y.heap_len<2)if(D=Y.heap[++Y.heap_len]=B<2?++B:0,F[D*2]=1,Y.depth[D]=0,Y.opt_len--,Z)Y.static_len-=O[D*2+1];q.max_code=B;for(V=Y.heap_len>>1;V>=1;V--)W5(Y,F,V);D=N;do V=Y.heap[1],Y.heap[1]=Y.heap[Y.heap_len--],W5(Y,F,1),C=Y.heap[1],Y.heap[--Y.heap_max]=V,Y.heap[--Y.heap_max]=C,F[D*2]=F[V*2]+F[C*2],Y.depth[D]=(Y.depth[V]>=Y.depth[C]?Y.depth[V]:Y.depth[C])+1,F[V*2+1]=F[C*2+1]=D,Y.heap[1]=D++,W5(Y,F,1);while(Y.heap_len>=2);Y.heap[--Y.heap_max]=Y.heap[1],SQ(Y,q),M4(F,B,Y.bl_count)},g9=(Y,q,F)=>{let O,Z=-1,N,V=q[1],C=0,B=7,D=4;if(V===0)B=138,D=3;q[(F+1)*2+1]=65535;for(O=0;O<=F;O++){if(N=V,V=q[(O+1)*2+1],++C<B&&N===V)continue;else if(C<D)Y.bl_tree[N*2]+=C;else if(N!==0){if(N!==Z)Y.bl_tree[N*2]++;Y.bl_tree[D4*2]++}else if(C<=10)Y.bl_tree[L4*2]++;else Y.bl_tree[N4*2]++;if(C=0,Z=N,V===0)B=138,D=3;else if(N===V)B=6,D=3;else B=7,D=4}},y9=(Y,q,F)=>{let O,Z=-1,N,V=q[1],C=0,B=7,D=4;if(V===0)B=138,D=3;for(O=0;O<=F;O++){if(N=V,V=q[(O+1)*2+1],++C<B&&N===V)continue;else if(C<D)do d6(Y,N,Y.bl_tree);while(--C!==0);else if(N!==0){if(N!==Z)d6(Y,N,Y.bl_tree),C--;d6(Y,D4,Y.bl_tree),M6(Y,C-3,2)}else if(C<=10)d6(Y,L4,Y.bl_tree),M6(Y,C-3,3);else d6(Y,N4,Y.bl_tree),M6(Y,C-11,7);if(C=0,Z=N,V===0)B=138,D=3;else if(N===V)B=6,D=3;else B=7,D=4}},wQ=(Y)=>{let q;g9(Y,Y.dyn_ltree,Y.l_desc.max_code),g9(Y,Y.dyn_dtree,Y.d_desc.max_code),q5(Y,Y.bl_desc);for(q=k5-1;q>=3;q--)if(Y.bl_tree[P4[q]*2+1]!==0)break;return Y.opt_len+=3*(q+1)+5+5+4,q},gQ=(Y,q,F,O)=>{let Z;M6(Y,q-257,5),M6(Y,F-1,5),M6(Y,O-4,4);for(Z=0;Z<O;Z++)M6(Y,Y.bl_tree[P4[Z]*2+1],3);y9(Y,Y.dyn_ltree,q-1),y9(Y,Y.dyn_dtree,F-1)},yQ=(Y)=>{let q=4093624447,F;for(F=0;F<=31;F++,q>>>=1)if(q&1&&Y.dyn_ltree[F*2]!==0)return 0;if(Y.dyn_ltree[18]!==0||Y.dyn_ltree[20]!==0||Y.dyn_ltree[26]!==0)return 1;for(F=32;F<T1;F++)if(Y.dyn_ltree[F*2]!==0)return 1;return 0},_9=!1,_Q=(Y)=>{if(!_9)EQ(),_9=!0;Y.l_desc=new Q5(Y.dyn_ltree,k4),Y.d_desc=new Q5(Y.dyn_dtree,B4),Y.bl_desc=new Q5(Y.bl_tree,R4),Y.bi_buf=0,Y.bi_valid=0,A4(Y)},x4=(Y,q,F,O)=>{if(M6(Y,(BQ<<1)+(O?1:0),3),v4(Y),P1(Y,F),P1(Y,~F),F)Y.pending_buf.set(Y.window.subarray(q,q+F),Y.pending);Y.pending+=F},mQ=(Y)=>{M6(Y,C4<<1,3),d6(Y,B5,s6),xQ(Y)},pQ=(Y,q,F,O)=>{let Z,N,V=0;if(Y.level>0){if(Y.strm.data_type===2)Y.strm.data_type=yQ(Y);if(q5(Y,Y.l_desc),q5(Y,Y.d_desc),V=wQ(Y),Z=Y.opt_len+3+7>>>3,N=Y.static_len+3+7>>>3,N<=Z)Z=N}else Z=N=F+5;if(F+4<=Z&&q!==-1)x4(Y,q,F,O);else if(Y.strategy===4||N===Z)M6(Y,(C4<<1)+(O?1:0),3),w9(Y,s6,H1);else M6(Y,(RQ<<1)+(O?1:0),3),gQ(Y,Y.l_desc.max_code+1,Y.d_desc.max_code+1,V+1),w9(Y,Y.dyn_ltree,Y.dyn_dtree);if(A4(Y),O)v4(Y)},bQ=(Y,q,F)=>{if(Y.pending_buf[Y.sym_buf+Y.sym_next++]=q,Y.pending_buf[Y.sym_buf+Y.sym_next++]=q>>8,Y.pending_buf[Y.sym_buf+Y.sym_next++]=F,q===0)Y.dyn_ltree[F*2]++;else Y.matches++,q--,Y.dyn_ltree[(N1[F]+T1+1)*2]++,Y.dyn_dtree[I4(q)*2]++;return Y.sym_next===Y.sym_end},hQ=_Q,cQ=x4,lQ=pQ,dQ=bQ,uQ=mQ,fQ={_tr_init:hQ,_tr_stored_block:cQ,_tr_flush_block:lQ,_tr_tally:dQ,_tr_align:uQ},oQ=(Y,q,F,O)=>{let Z=Y&65535|0,N=Y>>>16&65535|0,V=0;while(F!==0){V=F>2000?2000:F,F-=V;do Z=Z+q[O++]|0,N=N+Z|0;while(--V);Z%=65521,N%=65521}return Z|N<<16|0},k1=oQ,aQ=()=>{let Y,q=[];for(var F=0;F<256;F++){Y=F;for(var O=0;O<8;O++)Y=Y&1?3988292384^Y>>>1:Y>>>1;q[F]=Y}return q},nQ=new Uint32Array(aQ()),rQ=(Y,q,F,O)=>{const Z=nQ,N=O+F;Y^=-1;for(let V=O;V<N;V++)Y=Y>>>8^Z[(Y^q[V])&255];return Y^-1},k6=rQ,B8={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},T8={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:iQ,_tr_stored_block:j5,_tr_flush_block:sQ,_tr_tally:K8,_tr_align:tQ}=fQ,{Z_NO_FLUSH:z8,Z_PARTIAL_FLUSH:eQ,Z_FULL_FLUSH:QW,Z_FINISH:E6,Z_BLOCK:m9,Z_OK:B6,Z_STREAM_END:p9,Z_STREAM_ERROR:u6,Z_DATA_ERROR:WW,Z_BUF_ERROR:G5,Z_DEFAULT_COMPRESSION:GW,Z_FILTERED:XW,Z_HUFFMAN_ONLY:W7,Z_RLE:YW,Z_FIXED:VW,Z_DEFAULT_STRATEGY:JW,Z_UNKNOWN:UW,Z_DEFLATED:z7}=T8,FW=9,KW=15,zW=8,ZW=29,$W=256,H5=$W+1+ZW,qW=30,jW=19,HW=2*H5+1,CW=15,d0=3,F8=258,f6=F8+d0+1,OW=32,u8=42,I5=57,C5=69,O5=73,D5=91,L5=103,P8=113,q1=666,T6=1,a8=2,R8=3,n8=4,DW=3,k8=(Y,q)=>{return Y.msg=B8[q],q},b9=(Y)=>{return Y*2-(Y>4?9:0)},U8=(Y)=>{let q=Y.length;while(--q>=0)Y[q]=0},LW=(Y)=>{let q,F,O,Z=Y.w_size;q=Y.hash_size,O=q;do F=Y.head[--O],Y.head[O]=F>=Z?F-Z:0;while(--q);q=Z,O=q;do F=Y.prev[--O],Y.prev[O]=F>=Z?F-Z:0;while(--q)},NW=(Y,q,F)=>(q<<Y.hash_shift^F)&Y.hash_mask,Z8=NW,v6=(Y)=>{const q=Y.state;let F=q.pending;if(F>Y.avail_out)F=Y.avail_out;if(F===0)return;if(Y.output.set(q.pending_buf.subarray(q.pending_out,q.pending_out+F),Y.next_out),Y.next_out+=F,q.pending_out+=F,Y.total_out+=F,Y.avail_out-=F,q.pending-=F,q.pending===0)q.pending_out=0},x6=(Y,q)=>{sQ(Y,Y.block_start>=0?Y.block_start:-1,Y.strstart-Y.block_start,q),Y.block_start=Y.strstart,v6(Y.strm)},f0=(Y,q)=>{Y.pending_buf[Y.pending++]=q},$1=(Y,q)=>{Y.pending_buf[Y.pending++]=q>>>8&255,Y.pending_buf[Y.pending++]=q&255},N5=(Y,q,F,O)=>{let Z=Y.avail_in;if(Z>O)Z=O;if(Z===0)return 0;if(Y.avail_in-=Z,q.set(Y.input.subarray(Y.next_in,Y.next_in+Z),F),Y.state.wrap===1)Y.adler=k1(Y.adler,q,Z,F);else if(Y.state.wrap===2)Y.adler=k6(Y.adler,q,Z,F);return Y.next_in+=Z,Y.total_in+=Z,Z},S4=(Y,q)=>{let{max_chain_length:F,strstart:O}=Y,Z,N,V=Y.prev_length,C=Y.nice_match;const B=Y.strstart>Y.w_size-f6?Y.strstart-(Y.w_size-f6):0,D=Y.window,L=Y.w_mask,H=Y.prev,P=Y.strstart+F8;let R=D[O+V-1],k=D[O+V];if(Y.prev_length>=Y.good_match)F>>=2;if(C>Y.lookahead)C=Y.lookahead;do{if(Z=q,D[Z+V]!==k||D[Z+V-1]!==R||D[Z]!==D[O]||D[++Z]!==D[O+1])continue;O+=2,Z++;do;while(D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&D[++O]===D[++Z]&&O<P);if(N=F8-(P-O),O=P-F8,N>V){if(Y.match_start=q,V=N,N>=C)break;R=D[O+V-1],k=D[O+V]}}while((q=H[q&L])>B&&--F!==0);if(V<=Y.lookahead)return V;return Y.lookahead},f8=(Y)=>{const q=Y.w_size;let F,O,Z;do{if(O=Y.window_size-Y.lookahead-Y.strstart,Y.strstart>=q+(q-f6)){if(Y.window.set(Y.window.subarray(q,q+q-O),0),Y.match_start-=q,Y.strstart-=q,Y.block_start-=q,Y.insert>Y.strstart)Y.insert=Y.strstart;LW(Y),O+=q}if(Y.strm.avail_in===0)break;if(F=N5(Y.strm,Y.window,Y.strstart+Y.lookahead,O),Y.lookahead+=F,Y.lookahead+Y.insert>=d0){Z=Y.strstart-Y.insert,Y.ins_h=Y.window[Z],Y.ins_h=Z8(Y,Y.ins_h,Y.window[Z+1]);while(Y.insert)if(Y.ins_h=Z8(Y,Y.ins_h,Y.window[Z+d0-1]),Y.prev[Z&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Z,Z++,Y.insert--,Y.lookahead+Y.insert<d0)break}}while(Y.lookahead<f6&&Y.strm.avail_in!==0)},E4=(Y,q)=>{let F=Y.pending_buf_size-5>Y.w_size?Y.w_size:Y.pending_buf_size-5,O,Z,N,V=0,C=Y.strm.avail_in;do{if(O=65535,N=Y.bi_valid+42>>3,Y.strm.avail_out<N)break;if(N=Y.strm.avail_out-N,Z=Y.strstart-Y.block_start,O>Z+Y.strm.avail_in)O=Z+Y.strm.avail_in;if(O>N)O=N;if(O<F&&(O===0&&q!==E6||q===z8||O!==Z+Y.strm.avail_in))break;if(V=q===E6&&O===Z+Y.strm.avail_in?1:0,j5(Y,0,0,V),Y.pending_buf[Y.pending-4]=O,Y.pending_buf[Y.pending-3]=O>>8,Y.pending_buf[Y.pending-2]=~O,Y.pending_buf[Y.pending-1]=~O>>8,v6(Y.strm),Z){if(Z>O)Z=O;Y.strm.output.set(Y.window.subarray(Y.block_start,Y.block_start+Z),Y.strm.next_out),Y.strm.next_out+=Z,Y.strm.avail_out-=Z,Y.strm.total_out+=Z,Y.block_start+=Z,O-=Z}if(O)N5(Y.strm,Y.strm.output,Y.strm.next_out,O),Y.strm.next_out+=O,Y.strm.avail_out-=O,Y.strm.total_out+=O}while(V===0);if(C-=Y.strm.avail_in,C){if(C>=Y.w_size)Y.matches=2,Y.window.set(Y.strm.input.subarray(Y.strm.next_in-Y.w_size,Y.strm.next_in),0),Y.strstart=Y.w_size,Y.insert=Y.strstart;else{if(Y.window_size-Y.strstart<=C){if(Y.strstart-=Y.w_size,Y.window.set(Y.window.subarray(Y.w_size,Y.w_size+Y.strstart),0),Y.matches<2)Y.matches++;if(Y.insert>Y.strstart)Y.insert=Y.strstart}Y.window.set(Y.strm.input.subarray(Y.strm.next_in-C,Y.strm.next_in),Y.strstart),Y.strstart+=C,Y.insert+=C>Y.w_size-Y.insert?Y.w_size-Y.insert:C}Y.block_start=Y.strstart}if(Y.high_water<Y.strstart)Y.high_water=Y.strstart;if(V)return n8;if(q!==z8&&q!==E6&&Y.strm.avail_in===0&&Y.strstart===Y.block_start)return a8;if(N=Y.window_size-Y.strstart,Y.strm.avail_in>N&&Y.block_start>=Y.w_size){if(Y.block_start-=Y.w_size,Y.strstart-=Y.w_size,Y.window.set(Y.window.subarray(Y.w_size,Y.w_size+Y.strstart),0),Y.matches<2)Y.matches++;if(N+=Y.w_size,Y.insert>Y.strstart)Y.insert=Y.strstart}if(N>Y.strm.avail_in)N=Y.strm.avail_in;if(N)N5(Y.strm,Y.window,Y.strstart,N),Y.strstart+=N,Y.insert+=N>Y.w_size-Y.insert?Y.w_size-Y.insert:N;if(Y.high_water<Y.strstart)Y.high_water=Y.strstart;if(N=Y.bi_valid+42>>3,N=Y.pending_buf_size-N>65535?65535:Y.pending_buf_size-N,F=N>Y.w_size?Y.w_size:N,Z=Y.strstart-Y.block_start,Z>=F||(Z||q===E6)&&q!==z8&&Y.strm.avail_in===0&&Z<=N)O=Z>N?N:Z,V=q===E6&&Y.strm.avail_in===0&&O===Z?1:0,j5(Y,Y.block_start,O,V),Y.block_start+=O,v6(Y.strm);return V?R8:T6},X5=(Y,q)=>{let F,O;for(;;){if(Y.lookahead<f6){if(f8(Y),Y.lookahead<f6&&q===z8)return T6;if(Y.lookahead===0)break}if(F=0,Y.lookahead>=d0)Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+d0-1]),F=Y.prev[Y.strstart&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Y.strstart;if(F!==0&&Y.strstart-F<=Y.w_size-f6)Y.match_length=S4(Y,F);if(Y.match_length>=d0)if(O=K8(Y,Y.strstart-Y.match_start,Y.match_length-d0),Y.lookahead-=Y.match_length,Y.match_length<=Y.max_lazy_match&&Y.lookahead>=d0){Y.match_length--;do Y.strstart++,Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+d0-1]),F=Y.prev[Y.strstart&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Y.strstart;while(--Y.match_length!==0);Y.strstart++}else Y.strstart+=Y.match_length,Y.match_length=0,Y.ins_h=Y.window[Y.strstart],Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+1]);else O=K8(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++;if(O){if(x6(Y,!1),Y.strm.avail_out===0)return T6}}if(Y.insert=Y.strstart<d0-1?Y.strstart:d0-1,q===E6){if(x6(Y,!0),Y.strm.avail_out===0)return R8;return n8}if(Y.sym_next){if(x6(Y,!1),Y.strm.avail_out===0)return T6}return a8},c8=(Y,q)=>{let F,O,Z;for(;;){if(Y.lookahead<f6){if(f8(Y),Y.lookahead<f6&&q===z8)return T6;if(Y.lookahead===0)break}if(F=0,Y.lookahead>=d0)Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+d0-1]),F=Y.prev[Y.strstart&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Y.strstart;if(Y.prev_length=Y.match_length,Y.prev_match=Y.match_start,Y.match_length=d0-1,F!==0&&Y.prev_length<Y.max_lazy_match&&Y.strstart-F<=Y.w_size-f6){if(Y.match_length=S4(Y,F),Y.match_length<=5&&(Y.strategy===XW||Y.match_length===d0&&Y.strstart-Y.match_start>4096))Y.match_length=d0-1}if(Y.prev_length>=d0&&Y.match_length<=Y.prev_length){Z=Y.strstart+Y.lookahead-d0,O=K8(Y,Y.strstart-1-Y.prev_match,Y.prev_length-d0),Y.lookahead-=Y.prev_length-1,Y.prev_length-=2;do if(++Y.strstart<=Z)Y.ins_h=Z8(Y,Y.ins_h,Y.window[Y.strstart+d0-1]),F=Y.prev[Y.strstart&Y.w_mask]=Y.head[Y.ins_h],Y.head[Y.ins_h]=Y.strstart;while(--Y.prev_length!==0);if(Y.match_available=0,Y.match_length=d0-1,Y.strstart++,O){if(x6(Y,!1),Y.strm.avail_out===0)return T6}}else if(Y.match_available){if(O=K8(Y,0,Y.window[Y.strstart-1]),O)x6(Y,!1);if(Y.strstart++,Y.lookahead--,Y.strm.avail_out===0)return T6}else Y.match_available=1,Y.strstart++,Y.lookahead--}if(Y.match_available)O=K8(Y,0,Y.window[Y.strstart-1]),Y.match_available=0;if(Y.insert=Y.strstart<d0-1?Y.strstart:d0-1,q===E6){if(x6(Y,!0),Y.strm.avail_out===0)return R8;return n8}if(Y.sym_next){if(x6(Y,!1),Y.strm.avail_out===0)return T6}return a8},PW=(Y,q)=>{let F,O,Z,N;const V=Y.window;for(;;){if(Y.lookahead<=F8){if(f8(Y),Y.lookahead<=F8&&q===z8)return T6;if(Y.lookahead===0)break}if(Y.match_length=0,Y.lookahead>=d0&&Y.strstart>0){if(Z=Y.strstart-1,O=V[Z],O===V[++Z]&&O===V[++Z]&&O===V[++Z]){N=Y.strstart+F8;do;while(O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&O===V[++Z]&&Z<N);if(Y.match_length=F8-(N-Z),Y.match_length>Y.lookahead)Y.match_length=Y.lookahead}}if(Y.match_length>=d0)F=K8(Y,1,Y.match_length-d0),Y.lookahead-=Y.match_length,Y.strstart+=Y.match_length,Y.match_length=0;else F=K8(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++;if(F){if(x6(Y,!1),Y.strm.avail_out===0)return T6}}if(Y.insert=0,q===E6){if(x6(Y,!0),Y.strm.avail_out===0)return R8;return n8}if(Y.sym_next){if(x6(Y,!1),Y.strm.avail_out===0)return T6}return a8},kW=(Y,q)=>{let F;for(;;){if(Y.lookahead===0){if(f8(Y),Y.lookahead===0){if(q===z8)return T6;break}}if(Y.match_length=0,F=K8(Y,0,Y.window[Y.strstart]),Y.lookahead--,Y.strstart++,F){if(x6(Y,!1),Y.strm.avail_out===0)return T6}}if(Y.insert=0,q===E6){if(x6(Y,!0),Y.strm.avail_out===0)return R8;return n8}if(Y.sym_next){if(x6(Y,!1),Y.strm.avail_out===0)return T6}return a8},j1=[new l6(0,0,0,0,E4),new l6(4,4,8,4,X5),new l6(4,5,16,8,X5),new l6(4,6,32,32,X5),new l6(4,4,16,16,c8),new l6(8,16,32,32,c8),new l6(8,16,128,128,c8),new l6(8,32,128,256,c8),new l6(32,128,258,1024,c8),new l6(32,258,258,4096,c8)],BW=(Y)=>{Y.window_size=2*Y.w_size,U8(Y.head),Y.max_lazy_match=j1[Y.level].max_lazy,Y.good_match=j1[Y.level].good_length,Y.nice_match=j1[Y.level].nice_length,Y.max_chain_length=j1[Y.level].max_chain,Y.strstart=0,Y.block_start=0,Y.lookahead=0,Y.insert=0,Y.match_length=Y.prev_length=d0-1,Y.match_available=0,Y.ins_h=0},M1=(Y)=>{if(!Y)return 1;const q=Y.state;if(!q||q.strm!==Y||q.status!==u8&&q.status!==I5&&q.status!==C5&&q.status!==O5&&q.status!==D5&&q.status!==L5&&q.status!==P8&&q.status!==q1)return 1;return 0},w4=(Y)=>{if(M1(Y))return k8(Y,u6);Y.total_in=Y.total_out=0,Y.data_type=UW;const q=Y.state;if(q.pending=0,q.pending_out=0,q.wrap<0)q.wrap=-q.wrap;return q.status=q.wrap===2?I5:q.wrap?u8:P8,Y.adler=q.wrap===2?0:1,q.last_flush=-2,iQ(q),B6},g4=(Y)=>{const q=w4(Y);if(q===B6)BW(Y.state);return q},IW=(Y,q)=>{if(M1(Y)||Y.state.wrap!==2)return u6;return Y.state.gzhead=q,B6},y4=(Y,q,F,O,Z,N)=>{if(!Y)return u6;let V=1;if(q===GW)q=6;if(O<0)V=0,O=-O;else if(O>15)V=2,O-=16;if(Z<1||Z>FW||F!==z7||O<8||O>15||q<0||q>9||N<0||N>VW||O===8&&V!==1)return k8(Y,u6);if(O===8)O=9;const C=new RW;return Y.state=C,C.strm=Y,C.status=u8,C.wrap=V,C.gzhead=null,C.w_bits=O,C.w_size=1<<C.w_bits,C.w_mask=C.w_size-1,C.hash_bits=Z+7,C.hash_size=1<<C.hash_bits,C.hash_mask=C.hash_size-1,C.hash_shift=~~((C.hash_bits+d0-1)/d0),C.window=new Uint8Array(C.w_size*2),C.head=new Uint16Array(C.hash_size),C.prev=new Uint16Array(C.w_size),C.lit_bufsize=1<<Z+6,C.pending_buf_size=C.lit_bufsize*4,C.pending_buf=new Uint8Array(C.pending_buf_size),C.sym_buf=C.lit_bufsize,C.sym_end=(C.lit_bufsize-1)*3,C.level=q,C.strategy=N,C.method=F,g4(Y)},TW=(Y,q)=>{return y4(Y,q,z7,KW,zW,JW)},MW=(Y,q)=>{if(M1(Y)||q>m9||q<0)return Y?k8(Y,u6):u6;const F=Y.state;if(!Y.output||Y.avail_in!==0&&!Y.input||F.status===q1&&q!==E6)return k8(Y,Y.avail_out===0?G5:u6);const O=F.last_flush;if(F.last_flush=q,F.pending!==0){if(v6(Y),Y.avail_out===0)return F.last_flush=-1,B6}else if(Y.avail_in===0&&b9(q)<=b9(O)&&q!==E6)return k8(Y,G5);if(F.status===q1&&Y.avail_in!==0)return k8(Y,G5);if(F.status===u8&&F.wrap===0)F.status=P8;if(F.status===u8){let Z=z7+(F.w_bits-8<<4)<<8,N=-1;if(F.strategy>=W7||F.level<2)N=0;else if(F.level<6)N=1;else if(F.level===6)N=2;else N=3;if(Z|=N<<6,F.strstart!==0)Z|=OW;if(Z+=31-Z%31,$1(F,Z),F.strstart!==0)$1(F,Y.adler>>>16),$1(F,Y.adler&65535);if(Y.adler=1,F.status=P8,v6(Y),F.pending!==0)return F.last_flush=-1,B6}if(F.status===I5)if(Y.adler=0,f0(F,31),f0(F,139),f0(F,8),!F.gzhead){if(f0(F,0),f0(F,0),f0(F,0),f0(F,0),f0(F,0),f0(F,F.level===9?2:F.strategy>=W7||F.level<2?4:0),f0(F,DW),F.status=P8,v6(Y),F.pending!==0)return F.last_flush=-1,B6}else{if(f0(F,(F.gzhead.text?1:0)+(F.gzhead.hcrc?2:0)+(!F.gzhead.extra?0:4)+(!F.gzhead.name?0:8)+(!F.gzhead.comment?0:16)),f0(F,F.gzhead.time&255),f0(F,F.gzhead.time>>8&255),f0(F,F.gzhead.time>>16&255),f0(F,F.gzhead.time>>24&255),f0(F,F.level===9?2:F.strategy>=W7||F.level<2?4:0),f0(F,F.gzhead.os&255),F.gzhead.extra&&F.gzhead.extra.length)f0(F,F.gzhead.extra.length&255),f0(F,F.gzhead.extra.length>>8&255);if(F.gzhead.hcrc)Y.adler=k6(Y.adler,F.pending_buf,F.pending,0);F.gzindex=0,F.status=C5}if(F.status===C5){if(F.gzhead.extra){let Z=F.pending,N=(F.gzhead.extra.length&65535)-F.gzindex;while(F.pending+N>F.pending_buf_size){let C=F.pending_buf_size-F.pending;if(F.pending_buf.set(F.gzhead.extra.subarray(F.gzindex,F.gzindex+C),F.pending),F.pending=F.pending_buf_size,F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);if(F.gzindex+=C,v6(Y),F.pending!==0)return F.last_flush=-1,B6;Z=0,N-=C}let V=new Uint8Array(F.gzhead.extra);if(F.pending_buf.set(V.subarray(F.gzindex,F.gzindex+N),F.pending),F.pending+=N,F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);F.gzindex=0}F.status=O5}if(F.status===O5){if(F.gzhead.name){let Z=F.pending,N;do{if(F.pending===F.pending_buf_size){if(F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);if(v6(Y),F.pending!==0)return F.last_flush=-1,B6;Z=0}if(F.gzindex<F.gzhead.name.length)N=F.gzhead.name.charCodeAt(F.gzindex++)&255;else N=0;f0(F,N)}while(N!==0);if(F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);F.gzindex=0}F.status=D5}if(F.status===D5){if(F.gzhead.comment){let Z=F.pending,N;do{if(F.pending===F.pending_buf_size){if(F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z);if(v6(Y),F.pending!==0)return F.last_flush=-1,B6;Z=0}if(F.gzindex<F.gzhead.comment.length)N=F.gzhead.comment.charCodeAt(F.gzindex++)&255;else N=0;f0(F,N)}while(N!==0);if(F.gzhead.hcrc&&F.pending>Z)Y.adler=k6(Y.adler,F.pending_buf,F.pending-Z,Z)}F.status=L5}if(F.status===L5){if(F.gzhead.hcrc){if(F.pending+2>F.pending_buf_size){if(v6(Y),F.pending!==0)return F.last_flush=-1,B6}f0(F,Y.adler&255),f0(F,Y.adler>>8&255),Y.adler=0}if(F.status=P8,v6(Y),F.pending!==0)return F.last_flush=-1,B6}if(Y.avail_in!==0||F.lookahead!==0||q!==z8&&F.status!==q1){let Z=F.level===0?E4(F,q):F.strategy===W7?kW(F,q):F.strategy===YW?PW(F,q):j1[F.level].func(F,q);if(Z===R8||Z===n8)F.status=q1;if(Z===T6||Z===R8){if(Y.avail_out===0)F.last_flush=-1;return B6}if(Z===a8){if(q===eQ)tQ(F);else if(q!==m9){if(j5(F,0,0,!1),q===QW){if(U8(F.head),F.lookahead===0)F.strstart=0,F.block_start=0,F.insert=0}}if(v6(Y),Y.avail_out===0)return F.last_flush=-1,B6}}if(q!==E6)return B6;if(F.wrap<=0)return p9;if(F.wrap===2)f0(F,Y.adler&255),f0(F,Y.adler>>8&255),f0(F,Y.adler>>16&255),f0(F,Y.adler>>24&255),f0(F,Y.total_in&255),f0(F,Y.total_in>>8&255),f0(F,Y.total_in>>16&255),f0(F,Y.total_in>>24&255);else $1(F,Y.adler>>>16),$1(F,Y.adler&65535);if(v6(Y),F.wrap>0)F.wrap=-F.wrap;return F.pending!==0?B6:p9},AW=(Y)=>{if(M1(Y))return u6;const q=Y.state.status;return Y.state=null,q===P8?k8(Y,WW):B6},vW=(Y,q)=>{let F=q.length;if(M1(Y))return u6;const O=Y.state,Z=O.wrap;if(Z===2||Z===1&&O.status!==u8||O.lookahead)return u6;if(Z===1)Y.adler=k1(Y.adler,q,F,0);if(O.wrap=0,F>=O.w_size){if(Z===0)U8(O.head),O.strstart=0,O.block_start=0,O.insert=0;let B=new Uint8Array(O.w_size);B.set(q.subarray(F-O.w_size,F),0),q=B,F=O.w_size}const{avail_in:N,next_in:V,input:C}=Y;Y.avail_in=F,Y.next_in=0,Y.input=q,f8(O);while(O.lookahead>=d0){let B=O.strstart,D=O.lookahead-(d0-1);do O.ins_h=Z8(O,O.ins_h,O.window[B+d0-1]),O.prev[B&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=B,B++;while(--D);O.strstart=B,O.lookahead=d0-1,f8(O)}return O.strstart+=O.lookahead,O.block_start=O.strstart,O.insert=O.lookahead,O.lookahead=0,O.match_length=O.prev_length=d0-1,O.match_available=0,Y.next_in=V,Y.input=C,Y.avail_in=N,O.wrap=Z,B6},xW=TW,SW=y4,EW=g4,wW=w4,gW=IW,yW=MW,_W=AW,mW=vW,pW="pako deflate (from Nodeca project)",C1={deflateInit:xW,deflateInit2:SW,deflateReset:EW,deflateResetKeep:wW,deflateSetHeader:gW,deflate:yW,deflateEnd:_W,deflateSetDictionary:mW,deflateInfo:pW},bW=(Y,q)=>{return Object.prototype.hasOwnProperty.call(Y,q)},hW=function(Y){const q=Array.prototype.slice.call(arguments,1);while(q.length){const F=q.shift();if(!F)continue;if(typeof F!=="object")throw new TypeError(F+"must be non-object");for(let O in F)if(bW(F,O))Y[O]=F[O]}return Y},cW=(Y)=>{let q=0;for(let O=0,Z=Y.length;O<Z;O++)q+=Y[O].length;const F=new Uint8Array(q);for(let O=0,Z=0,N=Y.length;O<N;O++){let V=Y[O];F.set(V,Z),Z+=V.length}return F},Z7={assign:hW,flattenChunks:cW},_4=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Y){_4=!1}var B1=new Uint8Array(256);for(let Y=0;Y<256;Y++)B1[Y]=Y>=252?6:Y>=248?5:Y>=240?4:Y>=224?3:Y>=192?2:1;B1[254]=B1[254]=1;var lW=(Y)=>{if(typeof TextEncoder==="function"&&TextEncoder.prototype.encode)return(new TextEncoder()).encode(Y);let q,F,O,Z,N,V=Y.length,C=0;for(Z=0;Z<V;Z++){if(F=Y.charCodeAt(Z),(F&64512)===55296&&Z+1<V){if(O=Y.charCodeAt(Z+1),(O&64512)===56320)F=65536+(F-55296<<10)+(O-56320),Z++}C+=F<128?1:F<2048?2:F<65536?3:4}q=new Uint8Array(C);for(N=0,Z=0;N<C;Z++){if(F=Y.charCodeAt(Z),(F&64512)===55296&&Z+1<V){if(O=Y.charCodeAt(Z+1),(O&64512)===56320)F=65536+(F-55296<<10)+(O-56320),Z++}if(F<128)q[N++]=F;else if(F<2048)q[N++]=192|F>>>6,q[N++]=128|F&63;else if(F<65536)q[N++]=224|F>>>12,q[N++]=128|F>>>6&63,q[N++]=128|F&63;else q[N++]=240|F>>>18,q[N++]=128|F>>>12&63,q[N++]=128|F>>>6&63,q[N++]=128|F&63}return q},dW=(Y,q)=>{if(q<65534){if(Y.subarray&&_4)return String.fromCharCode.apply(null,Y.length===q?Y:Y.subarray(0,q))}let F="";for(let O=0;O<q;O++)F+=String.fromCharCode(Y[O]);return F},uW=(Y,q)=>{const F=q||Y.length;if(typeof TextDecoder==="function"&&TextDecoder.prototype.decode)return(new TextDecoder()).decode(Y.subarray(0,q));let O,Z;const N=new Array(F*2);for(Z=0,O=0;O<F;){let V=Y[O++];if(V<128){N[Z++]=V;continue}let C=B1[V];if(C>4){N[Z++]=65533,O+=C-1;continue}V&=C===2?31:C===3?15:7;while(C>1&&O<F)V=V<<6|Y[O++]&63,C--;if(C>1){N[Z++]=65533;continue}if(V<65536)N[Z++]=V;else V-=65536,N[Z++]=55296|V>>10&1023,N[Z++]=56320|V&1023}return dW(N,Z)},fW=(Y,q)=>{if(q=q||Y.length,q>Y.length)q=Y.length;let F=q-1;while(F>=0&&(Y[F]&192)===128)F--;if(F<0)return q;if(F===0)return q;return F+B1[Y[F]]>q?F:q},R1={string2buf:lW,buf2string:uW,utf8border:fW},m4=oW,p4=Object.prototype.toString,{Z_NO_FLUSH:aW,Z_SYNC_FLUSH:nW,Z_FULL_FLUSH:rW,Z_FINISH:iW,Z_OK:F7,Z_STREAM_END:sW,Z_DEFAULT_COMPRESSION:tW,Z_DEFAULT_STRATEGY:eW,Z_DEFLATED:QG}=T8;A1.prototype.push=function(Y,q){const F=this.strm,O=this.options.chunkSize;let Z,N;if(this.ended)return!1;if(q===~~q)N=q;else N=q===!0?iW:aW;if(typeof Y==="string")F.input=R1.string2buf(Y);else if(p4.call(Y)==="[object ArrayBuffer]")F.input=new Uint8Array(Y);else F.input=Y;F.next_in=0,F.avail_in=F.input.length;for(;;){if(F.avail_out===0)F.output=new Uint8Array(O),F.next_out=0,F.avail_out=O;if((N===nW||N===rW)&&F.avail_out<=6){this.onData(F.output.subarray(0,F.next_out)),F.avail_out=0;continue}if(Z=C1.deflate(F,N),Z===sW){if(F.next_out>0)this.onData(F.output.subarray(0,F.next_out));return Z=C1.deflateEnd(this.strm),this.onEnd(Z),this.ended=!0,Z===F7}if(F.avail_out===0){this.onData(F.output);continue}if(N>0&&F.next_out>0){this.onData(F.output.subarray(0,F.next_out)),F.avail_out=0;continue}if(F.avail_in===0)break}return!0};A1.prototype.onData=function(Y){this.chunks.push(Y)};A1.prototype.onEnd=function(Y){if(Y===F7)this.result=Z7.flattenChunks(this.chunks);this.chunks=[],this.err=Y,this.msg=this.strm.msg};var XG=A1,YG=T5,VG=WG,JG=GG,UG=T8,FG={Deflate:XG,deflate:YG,deflateRaw:VG,gzip:JG,constants:UG},G7=16209,KG=16191,zG=function Y(q,F){let O,Z,N,V,C,B,D,L,H,P,R,k,v,M,w,x,g,_,p,m,f,s,Q0,u;const K0=q.state;O=q.next_in,Q0=q.input,Z=O+(q.avail_in-5),N=q.next_out,u=q.output,V=N-(F-q.avail_out),C=N+(q.avail_out-257),B=K0.dmax,D=K0.wsize,L=K0.whave,H=K0.wnext,P=K0.window,R=K0.hold,k=K0.bits,v=K0.lencode,M=K0.distcode,w=(1<<K0.lenbits)-1,x=(1<<K0.distbits)-1;Q:do{if(k<15)R+=Q0[O++]<<k,k+=8,R+=Q0[O++]<<k,k+=8;g=v[R&w];W:for(;;){if(_=g>>>24,R>>>=_,k-=_,_=g>>>16&255,_===0)u[N++]=g&65535;else if(_&16){if(p=g&65535,_&=15,_){if(k<_)R+=Q0[O++]<<k,k+=8;p+=R&(1<<_)-1,R>>>=_,k-=_}if(k<15)R+=Q0[O++]<<k,k+=8,R+=Q0[O++]<<k,k+=8;g=M[R&x];G:for(;;){if(_=g>>>24,R>>>=_,k-=_,_=g>>>16&255,_&16){if(m=g&65535,_&=15,k<_){if(R+=Q0[O++]<<k,k+=8,k<_)R+=Q0[O++]<<k,k+=8}if(m+=R&(1<<_)-1,m>B){q.msg="invalid distance too far back",K0.mode=G7;break Q}if(R>>>=_,k-=_,_=N-V,m>_){if(_=m-_,_>L){if(K0.sane){q.msg="invalid distance too far back",K0.mode=G7;break Q}}if(f=0,s=P,H===0){if(f+=D-_,_<p){p-=_;do u[N++]=P[f++];while(--_);f=N-m,s=u}}else if(H<_){if(f+=D+H-_,_-=H,_<p){p-=_;do u[N++]=P[f++];while(--_);if(f=0,H<p){_=H,p-=_;do u[N++]=P[f++];while(--_);f=N-m,s=u}}}else if(f+=H-_,_<p){p-=_;do u[N++]=P[f++];while(--_);f=N-m,s=u}while(p>2)u[N++]=s[f++],u[N++]=s[f++],u[N++]=s[f++],p-=3;if(p){if(u[N++]=s[f++],p>1)u[N++]=s[f++]}}else{f=N-m;do u[N++]=u[f++],u[N++]=u[f++],u[N++]=u[f++],p-=3;while(p>2);if(p){if(u[N++]=u[f++],p>1)u[N++]=u[f++]}}}else if((_&64)===0){g=M[(g&65535)+(R&(1<<_)-1)];continue G}else{q.msg="invalid distance code",K0.mode=G7;break Q}break}}else if((_&64)===0){g=v[(g&65535)+(R&(1<<_)-1)];continue W}else if(_&32){K0.mode=KG;break Q}else{q.msg="invalid literal/length code",K0.mode=G7;break Q}break}}while(O<Z&&N<C);p=k>>3,O-=p,k-=p<<3,R&=(1<<k)-1,q.next_in=O,q.next_out=N,q.avail_in=O<Z?5+(Z-O):5-(O-Z),q.avail_out=N<C?257+(C-N):257-(N-C),K0.hold=R,K0.bits=k;return},l8=15,h9=852,c9=592,l9=0,Y5=1,d9=2,ZG=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),$G=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),qG=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),jG=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),HG=(Y,q,F,O,Z,N,V,C)=>{const B=C.bits;let D=0,L=0,H=0,P=0,R=0,k=0,v=0,M=0,w=0,x=0,g,_,p,m,f,s=null,Q0;const u=new Uint16Array(l8+1),K0=new Uint16Array(l8+1);let Q=null,G,J,X;for(D=0;D<=l8;D++)u[D]=0;for(L=0;L<O;L++)u[q[F+L]]++;R=B;for(P=l8;P>=1;P--)if(u[P]!==0)break;if(R>P)R=P;if(P===0)return Z[N++]=1<<24|64<<16|0,Z[N++]=1<<24|64<<16|0,C.bits=1,0;for(H=1;H<P;H++)if(u[H]!==0)break;if(R<H)R=H;M=1;for(D=1;D<=l8;D++)if(M<<=1,M-=u[D],M<0)return-1;if(M>0&&(Y===l9||P!==1))return-1;K0[1]=0;for(D=1;D<l8;D++)K0[D+1]=K0[D]+u[D];for(L=0;L<O;L++)if(q[F+L]!==0)V[K0[q[F+L]]++]=L;if(Y===l9)s=Q=V,Q0=20;else if(Y===Y5)s=ZG,Q=$G,Q0=257;else s=qG,Q=jG,Q0=0;if(x=0,L=0,D=H,f=N,k=R,v=0,p=-1,w=1<<R,m=w-1,Y===Y5&&w>h9||Y===d9&&w>c9)return 1;for(;;){if(G=D-v,V[L]+1<Q0)J=0,X=V[L];else if(V[L]>=Q0)J=Q[V[L]-Q0],X=s[V[L]-Q0];else J=96,X=0;g=1<<D-v,_=1<<k,H=_;do _-=g,Z[f+(x>>v)+_]=G<<24|J<<16|X|0;while(_!==0);g=1<<D-1;while(x&g)g>>=1;if(g!==0)x&=g-1,x+=g;else x=0;if(L++,--u[D]===0){if(D===P)break;D=q[F+V[L]]}if(D>R&&(x&m)!==p){if(v===0)v=R;f+=H,k=D-v,M=1<<k;while(k+v<P){if(M-=u[k+v],M<=0)break;k++,M<<=1}if(w+=1<<k,Y===Y5&&w>h9||Y===d9&&w>c9)return 1;p=x&m,Z[p]=R<<24|k<<16|f-N|0}}if(x!==0)Z[f+x]=D-v<<24|64<<16|0;return C.bits=R,0},O1=HG,CG=0,b4=1,h4=2,{Z_FINISH:u9,Z_BLOCK:OG,Z_TREES:X7,Z_OK:I8,Z_STREAM_END:DG,Z_NEED_DICT:LG,Z_STREAM_ERROR:w6,Z_DATA_ERROR:c4,Z_MEM_ERROR:l4,Z_BUF_ERROR:NG,Z_DEFLATED:f9}=T8,$7=16180,o9=16181,a9=16182,n9=16183,r9=16184,i9=16185,s9=16186,t9=16187,e9=16188,Q4=16189,K7=16190,i6=16191,V5=16192,W4=16193,J5=16194,G4=16195,X4=16196,Y4=16197,V4=16198,Y7=16199,V7=16200,J4=16201,U4=16202,F4=16203,K4=16204,z4=16205,U5=16206,Z4=16207,$4=16208,q6=16209,d4=16210,u4=16211,PG=852,kG=592,BG=15,RG=BG,q4=(Y)=>{return(Y>>>24&255)+(Y>>>8&65280)+((Y&65280)<<8)+((Y&255)<<24)},M8=(Y)=>{if(!Y)return 1;const q=Y.state;if(!q||q.strm!==Y||q.mode<$7||q.mode>u4)return 1;return 0},f4=(Y)=>{if(M8(Y))return w6;const q=Y.state;if(Y.total_in=Y.total_out=q.total=0,Y.msg="",q.wrap)Y.adler=q.wrap&1;return q.mode=$7,q.last=0,q.havedict=0,q.flags=-1,q.dmax=32768,q.head=null,q.hold=0,q.bits=0,q.lencode=q.lendyn=new Int32Array(PG),q.distcode=q.distdyn=new Int32Array(kG),q.sane=1,q.back=-1,I8},o4=(Y)=>{if(M8(Y))return w6;const q=Y.state;return q.wsize=0,q.whave=0,q.wnext=0,f4(Y)},a4=(Y,q)=>{let F;if(M8(Y))return w6;const O=Y.state;if(q<0)F=0,q=-q;else if(F=(q>>4)+5,q<48)q&=15;if(q&&(q<8||q>15))return w6;if(O.window!==null&&O.wbits!==q)O.window=null;return O.wrap=F,O.wbits=q,o4(Y)},n4=(Y,q)=>{if(!Y)return w6;const F=new IG;Y.state=F,F.strm=Y,F.window=null,F.mode=$7;const O=a4(Y,q);if(O!==I8)Y.state=null;return O},TG=(Y)=>{return n4(Y,RG)},j4=!0,F5,K5,MG=(Y)=>{if(j4){F5=new Int32Array(512),K5=new Int32Array(32);let q=0;while(q<144)Y.lens[q++]=8;while(q<256)Y.lens[q++]=9;while(q<280)Y.lens[q++]=7;while(q<288)Y.lens[q++]=8;O1(b4,Y.lens,0,288,F5,0,Y.work,{bits:9}),q=0;while(q<32)Y.lens[q++]=5;O1(h4,Y.lens,0,32,K5,0,Y.work,{bits:5}),j4=!1}Y.lencode=F5,Y.lenbits=9,Y.distcode=K5,Y.distbits=5},r4=(Y,q,F,O)=>{let Z;const N=Y.state;if(N.window===null)N.wsize=1<<N.wbits,N.wnext=0,N.whave=0,N.window=new Uint8Array(N.wsize);if(O>=N.wsize)N.window.set(q.subarray(F-N.wsize,F),0),N.wnext=0,N.whave=N.wsize;else{if(Z=N.wsize-N.wnext,Z>O)Z=O;if(N.window.set(q.subarray(F-O,F-O+Z),N.wnext),O-=Z,O)N.window.set(q.subarray(F-O,F),0),N.wnext=O,N.whave=N.wsize;else{if(N.wnext+=Z,N.wnext===N.wsize)N.wnext=0;if(N.whave<N.wsize)N.whave+=Z}}return 0},AG=(Y,q)=>{let F,O,Z,N,V,C,B,D,L,H,P,R,k,v,M=0,w,x,g,_,p,m,f,s;const Q0=new Uint8Array(4);let u,K0;const Q=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(M8(Y)||!Y.output||!Y.input&&Y.avail_in!==0)return w6;if(F=Y.state,F.mode===i6)F.mode=V5;V=Y.next_out,Z=Y.output,B=Y.avail_out,N=Y.next_in,O=Y.input,C=Y.avail_in,D=F.hold,L=F.bits,H=C,P=B,s=I8;Q:for(;;)switch(F.mode){case $7:if(F.wrap===0){F.mode=V5;break}while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.wrap&2&&D===35615){if(F.wbits===0)F.wbits=15;F.check=0,Q0[0]=D&255,Q0[1]=D>>>8&255,F.check=k6(F.check,Q0,2,0),D=0,L=0,F.mode=o9;break}if(F.head)F.head.done=!1;if(!(F.wrap&1)||(((D&255)<<8)+(D>>8))%31){Y.msg="incorrect header check",F.mode=q6;break}if((D&15)!==f9){Y.msg="unknown compression method",F.mode=q6;break}if(D>>>=4,L-=4,f=(D&15)+8,F.wbits===0)F.wbits=f;if(f>15||f>F.wbits){Y.msg="invalid window size",F.mode=q6;break}F.dmax=1<<F.wbits,F.flags=0,Y.adler=F.check=1,F.mode=D&512?Q4:i6,D=0,L=0;break;case o9:while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.flags=D,(F.flags&255)!==f9){Y.msg="unknown compression method",F.mode=q6;break}if(F.flags&57344){Y.msg="unknown header flags set",F.mode=q6;break}if(F.head)F.head.text=D>>8&1;if(F.flags&512&&F.wrap&4)Q0[0]=D&255,Q0[1]=D>>>8&255,F.check=k6(F.check,Q0,2,0);D=0,L=0,F.mode=a9;case a9:while(L<32){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.head)F.head.time=D;if(F.flags&512&&F.wrap&4)Q0[0]=D&255,Q0[1]=D>>>8&255,Q0[2]=D>>>16&255,Q0[3]=D>>>24&255,F.check=k6(F.check,Q0,4,0);D=0,L=0,F.mode=n9;case n9:while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.head)F.head.xflags=D&255,F.head.os=D>>8;if(F.flags&512&&F.wrap&4)Q0[0]=D&255,Q0[1]=D>>>8&255,F.check=k6(F.check,Q0,2,0);D=0,L=0,F.mode=r9;case r9:if(F.flags&1024){while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.length=D,F.head)F.head.extra_len=D;if(F.flags&512&&F.wrap&4)Q0[0]=D&255,Q0[1]=D>>>8&255,F.check=k6(F.check,Q0,2,0);D=0,L=0}else if(F.head)F.head.extra=null;F.mode=i9;case i9:if(F.flags&1024){if(R=F.length,R>C)R=C;if(R){if(F.head){if(f=F.head.extra_len-F.length,!F.head.extra)F.head.extra=new Uint8Array(F.head.extra_len);F.head.extra.set(O.subarray(N,N+R),f)}if(F.flags&512&&F.wrap&4)F.check=k6(F.check,O,R,N);C-=R,N+=R,F.length-=R}if(F.length)break Q}F.length=0,F.mode=s9;case s9:if(F.flags&2048){if(C===0)break Q;R=0;do if(f=O[N+R++],F.head&&f&&F.length<65536)F.head.name+=String.fromCharCode(f);while(f&&R<C);if(F.flags&512&&F.wrap&4)F.check=k6(F.check,O,R,N);if(C-=R,N+=R,f)break Q}else if(F.head)F.head.name=null;F.length=0,F.mode=t9;case t9:if(F.flags&4096){if(C===0)break Q;R=0;do if(f=O[N+R++],F.head&&f&&F.length<65536)F.head.comment+=String.fromCharCode(f);while(f&&R<C);if(F.flags&512&&F.wrap&4)F.check=k6(F.check,O,R,N);if(C-=R,N+=R,f)break Q}else if(F.head)F.head.comment=null;F.mode=e9;case e9:if(F.flags&512){while(L<16){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.wrap&4&&D!==(F.check&65535)){Y.msg="header crc mismatch",F.mode=q6;break}D=0,L=0}if(F.head)F.head.hcrc=F.flags>>9&1,F.head.done=!0;Y.adler=F.check=0,F.mode=i6;break;case Q4:while(L<32){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}Y.adler=F.check=q4(D),D=0,L=0,F.mode=K7;case K7:if(F.havedict===0)return Y.next_out=V,Y.avail_out=B,Y.next_in=N,Y.avail_in=C,F.hold=D,F.bits=L,LG;Y.adler=F.check=1,F.mode=i6;case i6:if(q===OG||q===X7)break Q;case V5:if(F.last){D>>>=L&7,L-=L&7,F.mode=U5;break}while(L<3){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}switch(F.last=D&1,D>>>=1,L-=1,D&3){case 0:F.mode=W4;break;case 1:if(MG(F),F.mode=Y7,q===X7){D>>>=2,L-=2;break Q}break;case 2:F.mode=X4;break;case 3:Y.msg="invalid block type",F.mode=q6}D>>>=2,L-=2;break;case W4:D>>>=L&7,L-=L&7;while(L<32){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if((D&65535)!==(D>>>16^65535)){Y.msg="invalid stored block lengths",F.mode=q6;break}if(F.length=D&65535,D=0,L=0,F.mode=J5,q===X7)break Q;case J5:F.mode=G4;case G4:if(R=F.length,R){if(R>C)R=C;if(R>B)R=B;if(R===0)break Q;Z.set(O.subarray(N,N+R),V),C-=R,N+=R,B-=R,V+=R,F.length-=R;break}F.mode=i6;break;case X4:while(L<14){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.nlen=(D&31)+257,D>>>=5,L-=5,F.ndist=(D&31)+1,D>>>=5,L-=5,F.ncode=(D&15)+4,D>>>=4,L-=4,F.nlen>286||F.ndist>30){Y.msg="too many length or distance symbols",F.mode=q6;break}F.have=0,F.mode=Y4;case Y4:while(F.have<F.ncode){while(L<3){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}F.lens[Q[F.have++]]=D&7,D>>>=3,L-=3}while(F.have<19)F.lens[Q[F.have++]]=0;if(F.lencode=F.lendyn,F.lenbits=7,u={bits:F.lenbits},s=O1(CG,F.lens,0,19,F.lencode,0,F.work,u),F.lenbits=u.bits,s){Y.msg="invalid code lengths set",F.mode=q6;break}F.have=0,F.mode=V4;case V4:while(F.have<F.nlen+F.ndist){for(;;){if(M=F.lencode[D&(1<<F.lenbits)-1],w=M>>>24,x=M>>>16&255,g=M&65535,w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(g<16)D>>>=w,L-=w,F.lens[F.have++]=g;else{if(g===16){K0=w+2;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(D>>>=w,L-=w,F.have===0){Y.msg="invalid bit length repeat",F.mode=q6;break}f=F.lens[F.have-1],R=3+(D&3),D>>>=2,L-=2}else if(g===17){K0=w+3;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}D>>>=w,L-=w,f=0,R=3+(D&7),D>>>=3,L-=3}else{K0=w+7;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}D>>>=w,L-=w,f=0,R=11+(D&127),D>>>=7,L-=7}if(F.have+R>F.nlen+F.ndist){Y.msg="invalid bit length repeat",F.mode=q6;break}while(R--)F.lens[F.have++]=f}}if(F.mode===q6)break;if(F.lens[256]===0){Y.msg="invalid code -- missing end-of-block",F.mode=q6;break}if(F.lenbits=9,u={bits:F.lenbits},s=O1(b4,F.lens,0,F.nlen,F.lencode,0,F.work,u),F.lenbits=u.bits,s){Y.msg="invalid literal/lengths set",F.mode=q6;break}if(F.distbits=6,F.distcode=F.distdyn,u={bits:F.distbits},s=O1(h4,F.lens,F.nlen,F.ndist,F.distcode,0,F.work,u),F.distbits=u.bits,s){Y.msg="invalid distances set",F.mode=q6;break}if(F.mode=Y7,q===X7)break Q;case Y7:F.mode=V7;case V7:if(C>=6&&B>=258){if(Y.next_out=V,Y.avail_out=B,Y.next_in=N,Y.avail_in=C,F.hold=D,F.bits=L,zG(Y,P),V=Y.next_out,Z=Y.output,B=Y.avail_out,N=Y.next_in,O=Y.input,C=Y.avail_in,D=F.hold,L=F.bits,F.mode===i6)F.back=-1;break}F.back=0;for(;;){if(M=F.lencode[D&(1<<F.lenbits)-1],w=M>>>24,x=M>>>16&255,g=M&65535,w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(x&&(x&240)===0){_=w,p=x,m=g;for(;;){if(M=F.lencode[m+((D&(1<<_+p)-1)>>_)],w=M>>>24,x=M>>>16&255,g=M&65535,_+w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}D>>>=_,L-=_,F.back+=_}if(D>>>=w,L-=w,F.back+=w,F.length=g,x===0){F.mode=z4;break}if(x&32){F.back=-1,F.mode=i6;break}if(x&64){Y.msg="invalid literal/length code",F.mode=q6;break}F.extra=x&15,F.mode=J4;case J4:if(F.extra){K0=F.extra;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}F.length+=D&(1<<F.extra)-1,D>>>=F.extra,L-=F.extra,F.back+=F.extra}F.was=F.length,F.mode=U4;case U4:for(;;){if(M=F.distcode[D&(1<<F.distbits)-1],w=M>>>24,x=M>>>16&255,g=M&65535,w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if((x&240)===0){_=w,p=x,m=g;for(;;){if(M=F.distcode[m+((D&(1<<_+p)-1)>>_)],w=M>>>24,x=M>>>16&255,g=M&65535,_+w<=L)break;if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}D>>>=_,L-=_,F.back+=_}if(D>>>=w,L-=w,F.back+=w,x&64){Y.msg="invalid distance code",F.mode=q6;break}F.offset=g,F.extra=x&15,F.mode=F4;case F4:if(F.extra){K0=F.extra;while(L<K0){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}F.offset+=D&(1<<F.extra)-1,D>>>=F.extra,L-=F.extra,F.back+=F.extra}if(F.offset>F.dmax){Y.msg="invalid distance too far back",F.mode=q6;break}F.mode=K4;case K4:if(B===0)break Q;if(R=P-B,F.offset>R){if(R=F.offset-R,R>F.whave){if(F.sane){Y.msg="invalid distance too far back",F.mode=q6;break}}if(R>F.wnext)R-=F.wnext,k=F.wsize-R;else k=F.wnext-R;if(R>F.length)R=F.length;v=F.window}else v=Z,k=V-F.offset,R=F.length;if(R>B)R=B;B-=R,F.length-=R;do Z[V++]=v[k++];while(--R);if(F.length===0)F.mode=V7;break;case z4:if(B===0)break Q;Z[V++]=F.length,B--,F.mode=V7;break;case U5:if(F.wrap){while(L<32){if(C===0)break Q;C--,D|=O[N++]<<L,L+=8}if(P-=B,Y.total_out+=P,F.total+=P,F.wrap&4&&P)Y.adler=F.check=F.flags?k6(F.check,Z,P,V-P):k1(F.check,Z,P,V-P);if(P=B,F.wrap&4&&(F.flags?D:q4(D))!==F.check){Y.msg="incorrect data check",F.mode=q6;break}D=0,L=0}F.mode=Z4;case Z4:if(F.wrap&&F.flags){while(L<32){if(C===0)break Q;C--,D+=O[N++]<<L,L+=8}if(F.wrap&4&&D!==(F.total&4294967295)){Y.msg="incorrect length check",F.mode=q6;break}D=0,L=0}F.mode=$4;case $4:s=DG;break Q;case q6:s=c4;break Q;case d4:return l4;case u4:default:return w6}if(Y.next_out=V,Y.avail_out=B,Y.next_in=N,Y.avail_in=C,F.hold=D,F.bits=L,F.wsize||P!==Y.avail_out&&F.mode<q6&&(F.mode<U5||q!==u9)){if(r4(Y,Y.output,Y.next_out,P-Y.avail_out));}if(H-=Y.avail_in,P-=Y.avail_out,Y.total_in+=H,Y.total_out+=P,F.total+=P,F.wrap&4&&P)Y.adler=F.check=F.flags?k6(F.check,Z,P,Y.next_out-P):k1(F.check,Z,P,Y.next_out-P);if(Y.data_type=F.bits+(F.last?64:0)+(F.mode===i6?128:0)+(F.mode===Y7||F.mode===J5?256:0),(H===0&&P===0||q===u9)&&s===I8)s=NG;return s},vG=(Y)=>{if(M8(Y))return w6;let q=Y.state;if(q.window)q.window=null;return Y.state=null,I8},xG=(Y,q)=>{if(M8(Y))return w6;const F=Y.state;if((F.wrap&2)===0)return w6;return F.head=q,q.done=!1,I8},SG=(Y,q)=>{const F=q.length;let O,Z,N;if(M8(Y))return w6;if(O=Y.state,O.wrap!==0&&O.mode!==K7)return w6;if(O.mode===K7){if(Z=1,Z=k1(Z,q,F,0),Z!==O.check)return c4}if(N=r4(Y,q,F,F),N)return O.mode=d4,l4;return O.havedict=1,I8},EG=o4,wG=a4,gG=f4,yG=TG,_G=n4,mG=AG,pG=vG,bG=xG,hG=SG,cG="pako inflate (from Nodeca project)",t6={inflateReset:EG,inflateReset2:wG,inflateResetKeep:gG,inflateInit:yG,inflateInit2:_G,inflate:mG,inflateEnd:pG,inflateGetHeader:bG,inflateSetDictionary:hG,inflateInfo:cG},dG=lG,i4=Object.prototype.toString,{Z_NO_FLUSH:uG,Z_FINISH:fG,Z_OK:I1,Z_STREAM_END:z5,Z_NEED_DICT:Z5,Z_STREAM_ERROR:oG,Z_DATA_ERROR:H4,Z_MEM_ERROR:aG}=T8;v1.prototype.push=function(Y,q){const F=this.strm,O=this.options.chunkSize,Z=this.options.dictionary;let N,V,C;if(this.ended)return!1;if(q===~~q)V=q;else V=q===!0?fG:uG;if(i4.call(Y)==="[object ArrayBuffer]")F.input=new Uint8Array(Y);else F.input=Y;F.next_in=0,F.avail_in=F.input.length;for(;;){if(F.avail_out===0)F.output=new Uint8Array(O),F.next_out=0,F.avail_out=O;if(N=t6.inflate(F,V),N===Z5&&Z){if(N=t6.inflateSetDictionary(F,Z),N===I1)N=t6.inflate(F,V);else if(N===H4)N=Z5}while(F.avail_in>0&&N===z5&&F.state.wrap>0&&Y[F.next_in]!==0)t6.inflateReset(F),N=t6.inflate(F,V);switch(N){case oG:case H4:case Z5:case aG:return this.onEnd(N),this.ended=!0,!1}if(C=F.avail_out,F.next_out){if(F.avail_out===0||N===z5)if(this.options.to==="string"){let B=R1.utf8border(F.output,F.next_out),D=F.next_out-B,L=R1.buf2string(F.output,B);if(F.next_out=D,F.avail_out=O-D,D)F.output.set(F.output.subarray(B,B+D),0);this.onData(L)}else this.onData(F.output.length===F.next_out?F.output:F.output.subarray(0,F.next_out))}if(N===I1&&C===0)continue;if(N===z5)return N=t6.inflateEnd(this.strm),this.onEnd(N),this.ended=!0,!0;if(F.avail_in===0)break}return!0};v1.prototype.onData=function(Y){this.chunks.push(Y)};v1.prototype.onEnd=function(Y){if(Y===I1)if(this.options.to==="string")this.result=this.chunks.join("");else this.result=Z7.flattenChunks(this.chunks);this.chunks=[],this.err=Y,this.msg=this.strm.msg};var rG=v1,iG=M5,sG=nG,tG=M5,eG=T8,QX={Inflate:rG,inflate:iG,inflateRaw:sG,ungzip:tG,constants:eG},{Deflate:WX,deflate:GX,deflateRaw:XX,gzip:YX}=FG,{Inflate:VX,inflate:JX,inflateRaw:UX,ungzip:FX}=QX,KX=WX,zX=GX,ZX=XX,$X=YX,qX=VX,jX=JX,HX=UX,CX=FX,OX=T8,A8={Deflate:KX,deflate:zX,deflateRaw:ZX,gzip:$X,Inflate:qX,inflate:jX,inflateRaw:HX,ungzip:CX,constants:OX};var J9={};t2(J9,{webcrypto:()=>{{return V9}},timingSafeEqual:()=>{{return E1}},scryptSync:()=>{{return I7}},scrypt:()=>{{return T7}},randomUUID:()=>{{return X9}},getRandomValues:()=>{{return G9}},getCurves:()=>{{return Y9}},default:()=>{{return V2}},DEFAULT_ENCODING:()=>{{return s8}}});var Y9=function(){return sY},DX=Object.create,H7=Object.defineProperty,LX=Object.getOwnPropertyDescriptor,NX=Object.getOwnPropertyNames,PX=Object.getPrototypeOf,kX=Object.prototype.hasOwnProperty,v5=(Y,q)=>()=>(Y&&(q=Y(Y=0)),q),Z0=(Y,q)=>()=>(q||Y((q={exports:{}}).exports,q),q.exports),C7=(Y,q)=>{for(var F in q)H7(Y,F,{get:q[F],enumerable:!0})},q7=(Y,q,F,O)=>{if(q&&typeof q=="object"||typeof q=="function")for(let Z of NX(q))!kX.call(Y,Z)&&Z!==F&&H7(Y,Z,{get:()=>q[Z],enumerable:!(O=LX(q,Z))||O.enumerable});return Y},x5=(Y,q,F)=>(q7(Y,q,"default"),F&&q7(F,q,"default")),v8=(Y,q,F)=>(F=Y!=null?DX(PX(Y)):{},q7(q||!Y||!Y.__esModule?H7(F,"default",{value:Y,enumerable:!0}):F,Y)),g6=(Y)=>q7(H7({},"__esModule",{value:!0}),Y),BX=Z0((Y)=>{Y.byteLength=B,Y.toByteArray=L,Y.fromByteArray=R;var q=[],F=[],O=typeof Uint8Array<"u"?Uint8Array:Array,Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(N=0,V=Z.length;N<V;++N)q[N]=Z[N],F[Z.charCodeAt(N)]=N;var N,V;F["-".charCodeAt(0)]=62,F["_".charCodeAt(0)]=63;function C(k){var v=k.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var M=k.indexOf("=");M===-1&&(M=v);var w=M===v?0:4-M%4;return[M,w]}function B(k){var v=C(k),M=v[0],w=v[1];return(M+w)*3/4-w}function D(k,v,M){return(v+M)*3/4-M}function L(k){var v,M=C(k),w=M[0],x=M[1],g=new O(D(k,w,x)),_=0,p=x>0?w-4:w,m;for(m=0;m<p;m+=4)v=F[k.charCodeAt(m)]<<18|F[k.charCodeAt(m+1)]<<12|F[k.charCodeAt(m+2)]<<6|F[k.charCodeAt(m+3)],g[_++]=v>>16&255,g[_++]=v>>8&255,g[_++]=v&255;return x===2&&(v=F[k.charCodeAt(m)]<<2|F[k.charCodeAt(m+1)]>>4,g[_++]=v&255),x===1&&(v=F[k.charCodeAt(m)]<<10|F[k.charCodeAt(m+1)]<<4|F[k.charCodeAt(m+2)]>>2,g[_++]=v>>8&255,g[_++]=v&255),g}function H(k){return q[k>>18&63]+q[k>>12&63]+q[k>>6&63]+q[k&63]}function P(k,v,M){for(var w,x=[],g=v;g<M;g+=3)w=(k[g]<<16&16711680)+(k[g+1]<<8&65280)+(k[g+2]&255),x.push(H(w));return x.join("")}function R(k){for(var v,M=k.length,w=M%3,x=[],g=16383,_=0,p=M-w;_<p;_+=g)x.push(P(k,_,_+g>p?p:_+g));return w===1?(v=k[M-1],x.push(q[v>>2]+q[v<<4&63]+"==")):w===2&&(v=(k[M-2]<<8)+k[M-1],x.push(q[v>>10]+q[v>>4&63]+q[v<<2&63]+"=")),x.join("")}}),RX=Z0((Y)=>{Y.read=function(q,F,O,Z,N){var V,C,B=N*8-Z-1,D=(1<<B)-1,L=D>>1,H=-7,P=O?N-1:0,R=O?-1:1,k=q[F+P];for(P+=R,V=k&(1<<-H)-1,k>>=-H,H+=B;H>0;V=V*256+q[F+P],P+=R,H-=8);for(C=V&(1<<-H)-1,V>>=-H,H+=Z;H>0;C=C*256+q[F+P],P+=R,H-=8);if(V===0)V=1-L;else{if(V===D)return C?NaN:(k?-1:1)*Infinity;C=C+Math.pow(2,Z),V=V-L}return(k?-1:1)*C*Math.pow(2,V-Z)},Y.write=function(q,F,O,Z,N,V){var C,B,D,L=V*8-N-1,H=(1<<L)-1,P=H>>1,R=N===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=Z?0:V-1,v=Z?1:-1,M=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===Infinity?(B=isNaN(F)?1:0,C=H):(C=Math.floor(Math.log(F)/Math.LN2),F*(D=Math.pow(2,-C))<1&&(C--,D*=2),C+P>=1?F+=R/D:F+=R*Math.pow(2,1-P),F*D>=2&&(C++,D/=2),C+P>=H?(B=0,C=H):C+P>=1?(B=(F*D-1)*Math.pow(2,N),C=C+P):(B=F*Math.pow(2,P-1)*Math.pow(2,N),C=0));N>=8;q[O+k]=B&255,k+=v,B/=256,N-=8);for(C=C<<N|B,L+=N;L>0;q[O+k]=C&255,k+=v,C/=256,L-=8);q[O+k-v]|=M*128}}),R6=Z0((Y)=>{var q=BX(),F=RX(),O=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Y.Buffer=C,Y.SlowBuffer=x,Y.INSPECT_MAX_BYTES=50;var Z=2147483647;Y.kMaxLength=Z,C.TYPED_ARRAY_SUPPORT=N(),!C.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 N(){try{let I=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(I,S),I.foo()===42}catch{return!1}}Object.defineProperty(C.prototype,"parent",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.buffer}}),Object.defineProperty(C.prototype,"offset",{enumerable:!0,get:function(){if(C.isBuffer(this))return this.byteOffset}});function V(I){if(I>Z)throw new RangeError('The value "'+I+'" is invalid for option "size"');let S=new Uint8Array(I);return Object.setPrototypeOf(S,C.prototype),S}function C(I,S,c){if(typeof I=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return H(I)}return B(I,S,c)}C.poolSize=8192;function B(I,S,c){if(typeof I=="string")return P(I,S);if(ArrayBuffer.isView(I))return k(I);if(I==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I);if(X0(I,ArrayBuffer)||I&&X0(I.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(X0(I,SharedArrayBuffer)||I&&X0(I.buffer,SharedArrayBuffer)))return v(I,S,c);if(typeof I=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=I.valueOf&&I.valueOf();if(o!=null&&o!==I)return C.from(o,S,c);let i=M(I);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof I[Symbol.toPrimitive]=="function")return C.from(I[Symbol.toPrimitive]("string"),S,c);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof I)}C.from=function(I,S,c){return B(I,S,c)},Object.setPrototypeOf(C.prototype,Uint8Array.prototype),Object.setPrototypeOf(C,Uint8Array);function D(I){if(typeof I!="number")throw new TypeError('"size" argument must be of type number');if(I<0)throw new RangeError('The value "'+I+'" is invalid for option "size"')}function L(I,S,c){return D(I),I<=0?V(I):S!==void 0?typeof c=="string"?V(I).fill(S,c):V(I).fill(S):V(I)}C.alloc=function(I,S,c){return L(I,S,c)};function H(I){return D(I),V(I<0?0:w(I)|0)}C.allocUnsafe=function(I){return H(I)},C.allocUnsafeSlow=function(I){return H(I)};function P(I,S){if((typeof S!="string"||S==="")&&(S="utf8"),!C.isEncoding(S))throw new TypeError("Unknown encoding: "+S);let c=g(I,S)|0,o=V(c),i=o.write(I,S);return i!==c&&(o=o.slice(0,i)),o}function R(I){let S=I.length<0?0:w(I.length)|0,c=V(S);for(let o=0;o<S;o+=1)c[o]=I[o]&255;return c}function k(I){if(X0(I,Uint8Array)){let S=new Uint8Array(I);return v(S.buffer,S.byteOffset,S.byteLength)}return R(I)}function v(I,S,c){if(S<0||I.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(I.byteLength<S+(c||0))throw new RangeError('"length" is outside of buffer bounds');let o;return S===void 0&&c===void 0?o=new Uint8Array(I):c===void 0?o=new Uint8Array(I,S):o=new Uint8Array(I,S,c),Object.setPrototypeOf(o,C.prototype),o}function M(I){if(C.isBuffer(I)){let S=w(I.length)|0,c=V(S);return c.length===0||I.copy(c,0,0,S),c}if(I.length!==void 0)return typeof I.length!="number"||g0(I.length)?V(0):R(I);if(I.type==="Buffer"&&Array.isArray(I.data))return R(I.data)}function w(I){if(I>=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return I|0}function x(I){return+I!=I&&(I=0),C.alloc(+I)}C.isBuffer=function(I){return I!=null&&I._isBuffer===!0&&I!==C.prototype},C.compare=function(I,S){if(X0(I,Uint8Array)&&(I=C.from(I,I.offset,I.byteLength)),X0(S,Uint8Array)&&(S=C.from(S,S.offset,S.byteLength)),!C.isBuffer(I)||!C.isBuffer(S))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(I===S)return 0;let c=I.length,o=S.length;for(let i=0,O0=Math.min(c,o);i<O0;++i)if(I[i]!==S[i]){c=I[i],o=S[i];break}return c<o?-1:o<c?1:0},C.isEncoding=function(I){switch(String(I).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}},C.concat=function(I,S){if(!Array.isArray(I))throw new TypeError('"list" argument must be an Array of Buffers');if(I.length===0)return C.alloc(0);let c;if(S===void 0)for(S=0,c=0;c<I.length;++c)S+=I[c].length;let o=C.allocUnsafe(S),i=0;for(c=0;c<I.length;++c){let O0=I[c];if(X0(O0,Uint8Array))i+O0.length>o.length?(C.isBuffer(O0)||(O0=C.from(O0)),O0.copy(o,i)):Uint8Array.prototype.set.call(o,O0,i);else if(C.isBuffer(O0))O0.copy(o,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=O0.length}return o};function g(I,S){if(C.isBuffer(I))return I.length;if(ArrayBuffer.isView(I)||X0(I,ArrayBuffer))return I.byteLength;if(typeof I!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof I);let c=I.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&c===0)return 0;let i=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return c;case"utf8":case"utf-8":return e(I).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c*2;case"hex":return c>>>1;case"base64":return J0(I).length;default:if(i)return o?-1:e(I).length;S=(""+S).toLowerCase(),i=!0}}C.byteLength=g;function _(I,S,c){let o=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((c===void 0||c>this.length)&&(c=this.length),c<=0)||(c>>>=0,S>>>=0,c<=S))return"";for(I||(I="utf8");;)switch(I){case"hex":return K(this,S,c);case"utf8":case"utf-8":return J(this,S,c);case"ascii":return $(this,S,c);case"latin1":case"binary":return j(this,S,c);case"base64":return G(this,S,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,S,c);default:if(o)throw new TypeError("Unknown encoding: "+I);I=(I+"").toLowerCase(),o=!0}}C.prototype._isBuffer=!0;function p(I,S,c){let o=I[S];I[S]=I[c],I[c]=o}C.prototype.swap16=function(){let I=this.length;if(I%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let S=0;S<I;S+=2)p(this,S,S+1);return this},C.prototype.swap32=function(){let I=this.length;if(I%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let S=0;S<I;S+=4)p(this,S,S+3),p(this,S+1,S+2);return this},C.prototype.swap64=function(){let I=this.length;if(I%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let S=0;S<I;S+=8)p(this,S,S+7),p(this,S+1,S+6),p(this,S+2,S+5),p(this,S+3,S+4);return this},C.prototype.toString=function(){let I=this.length;return I===0?"":arguments.length===0?J(this,0,I):_.apply(this,arguments)},C.prototype.toLocaleString=C.prototype.toString,C.prototype.equals=function(I){if(!C.isBuffer(I))throw new TypeError("Argument must be a Buffer");return this===I?!0:C.compare(this,I)===0},C.prototype.inspect=function(){let I="",S=Y.INSPECT_MAX_BYTES;return I=this.toString("hex",0,S).replace(/(.{2})/g,"$1 ").trim(),this.length>S&&(I+=" ... "),"<Buffer "+I+">"},O&&(C.prototype[O]=C.prototype.inspect),C.prototype.compare=function(I,S,c,o,i){if(X0(I,Uint8Array)&&(I=C.from(I,I.offset,I.byteLength)),!C.isBuffer(I))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof I);if(S===void 0&&(S=0),c===void 0&&(c=I?I.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),S<0||c>I.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&S>=c)return 0;if(o>=i)return-1;if(S>=c)return 1;if(S>>>=0,c>>>=0,o>>>=0,i>>>=0,this===I)return 0;let O0=i-o,U0=c-S,j0=Math.min(O0,U0),c0=this.slice(o,i),C0=I.slice(S,c);for(let H0=0;H0<j0;++H0)if(c0[H0]!==C0[H0]){O0=c0[H0],U0=C0[H0];break}return O0<U0?-1:U0<O0?1:0};function m(I,S,c,o,i){if(I.length===0)return-1;if(typeof c=="string"?(o=c,c=0):c>2147483647?c=2147483647:c<-2147483648&&(c=-2147483648),c=+c,g0(c)&&(c=i?0:I.length-1),c<0&&(c=I.length+c),c>=I.length){if(i)return-1;c=I.length-1}else if(c<0)if(i)c=0;else return-1;if(typeof S=="string"&&(S=C.from(S,o)),C.isBuffer(S))return S.length===0?-1:f(I,S,c,o,i);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(I,S,c):Uint8Array.prototype.lastIndexOf.call(I,S,c):f(I,[S],c,o,i);throw new TypeError("val must be string, number or Buffer")}function f(I,S,c,o,i){let O0=1,U0=I.length,j0=S.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(I.length<2||S.length<2)return-1;O0=2,U0/=2,j0/=2,c/=2}function c0(H0,m0){return O0===1?H0[m0]:H0.readUInt16BE(m0*O0)}let C0;if(i){let H0=-1;for(C0=c;C0<U0;C0++)if(c0(I,C0)===c0(S,H0===-1?0:C0-H0)){if(H0===-1&&(H0=C0),C0-H0+1===j0)return H0*O0}else H0!==-1&&(C0-=C0-H0),H0=-1}else for(c+j0>U0&&(c=U0-j0),C0=c;C0>=0;C0--){let H0=!0;for(let m0=0;m0<j0;m0++)if(c0(I,C0+m0)!==c0(S,m0)){H0=!1;break}if(H0)return C0}return-1}C.prototype.includes=function(I,S,c){return this.indexOf(I,S,c)!==-1},C.prototype.indexOf=function(I,S,c){return m(this,I,S,c,!0)},C.prototype.lastIndexOf=function(I,S,c){return m(this,I,S,c,!1)};function s(I,S,c,o){c=Number(c)||0;let i=I.length-c;o?(o=Number(o),o>i&&(o=i)):o=i;let O0=S.length;o>O0/2&&(o=O0/2);let U0;for(U0=0;U0<o;++U0){let j0=parseInt(S.substr(U0*2,2),16);if(g0(j0))return U0;I[c+U0]=j0}return U0}function Q0(I,S,c,o){return Y0(e(S,I.length-c),I,c,o)}function u(I,S,c,o){return Y0(V0(S),I,c,o)}function K0(I,S,c,o){return Y0(J0(S),I,c,o)}function Q(I,S,c,o){return Y0(W0(S,I.length-c),I,c,o)}C.prototype.write=function(I,S,c,o){if(S===void 0)o="utf8",c=this.length,S=0;else if(c===void 0&&typeof S=="string")o=S,c=this.length,S=0;else if(isFinite(S))S=S>>>0,isFinite(c)?(c=c>>>0,o===void 0&&(o="utf8")):(o=c,c=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-S;if((c===void 0||c>i)&&(c=i),I.length>0&&(c<0||S<0)||S>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let O0=!1;for(;;)switch(o){case"hex":return s(this,I,S,c);case"utf8":case"utf-8":return Q0(this,I,S,c);case"ascii":case"latin1":case"binary":return u(this,I,S,c);case"base64":return K0(this,I,S,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,I,S,c);default:if(O0)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),O0=!0}},C.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(I,S,c){return S===0&&c===I.length?q.fromByteArray(I):q.fromByteArray(I.slice(S,c))}function J(I,S,c){c=Math.min(I.length,c);let o=[],i=S;for(;i<c;){let O0=I[i],U0=null,j0=O0>239?4:O0>223?3:O0>191?2:1;if(i+j0<=c){let c0,C0,H0,m0;switch(j0){case 1:O0<128&&(U0=O0);break;case 2:c0=I[i+1],(c0&192)===128&&(m0=(O0&31)<<6|c0&63,m0>127&&(U0=m0));break;case 3:c0=I[i+1],C0=I[i+2],(c0&192)===128&&(C0&192)===128&&(m0=(O0&15)<<12|(c0&63)<<6|C0&63,m0>2047&&(m0<55296||m0>57343)&&(U0=m0));break;case 4:c0=I[i+1],C0=I[i+2],H0=I[i+3],(c0&192)===128&&(C0&192)===128&&(H0&192)===128&&(m0=(O0&15)<<18|(c0&63)<<12|(C0&63)<<6|H0&63,m0>65535&&m0<1114112&&(U0=m0))}}U0===null?(U0=65533,j0=1):U0>65535&&(U0-=65536,o.push(U0>>>10&1023|55296),U0=56320|U0&1023),o.push(U0),i+=j0}return U(o)}var X=4096;function U(I){let S=I.length;if(S<=X)return String.fromCharCode.apply(String,I);let c="",o=0;for(;o<S;)c+=String.fromCharCode.apply(String,I.slice(o,o+=X));return c}function $(I,S,c){let o="";c=Math.min(I.length,c);for(let i=S;i<c;++i)o+=String.fromCharCode(I[i]&127);return o}function j(I,S,c){let o="";c=Math.min(I.length,c);for(let i=S;i<c;++i)o+=String.fromCharCode(I[i]);return o}function K(I,S,c){let o=I.length;(!S||S<0)&&(S=0),(!c||c<0||c>o)&&(c=o);let i="";for(let O0=S;O0<c;++O0)i+=$0[I[O0]];return i}function W(I,S,c){let o=I.slice(S,c),i="";for(let O0=0;O0<o.length-1;O0+=2)i+=String.fromCharCode(o[O0]+o[O0+1]*256);return i}C.prototype.slice=function(I,S){let c=this.length;I=~~I,S=S===void 0?c:~~S,I<0?(I+=c,I<0&&(I=0)):I>c&&(I=c),S<0?(S+=c,S<0&&(S=0)):S>c&&(S=c),S<I&&(S=I);let o=this.subarray(I,S);return Object.setPrototypeOf(o,C.prototype),o};function z(I,S,c){if(I%1!==0||I<0)throw new RangeError("offset is not uint");if(I+S>c)throw new RangeError("Trying to access beyond buffer length")}C.prototype.readUintLE=C.prototype.readUIntLE=function(I,S,c){I=I>>>0,S=S>>>0,c||z(I,S,this.length);let o=this[I],i=1,O0=0;for(;++O0<S&&(i*=256);)o+=this[I+O0]*i;return o},C.prototype.readUintBE=C.prototype.readUIntBE=function(I,S,c){I=I>>>0,S=S>>>0,c||z(I,S,this.length);let o=this[I+--S],i=1;for(;S>0&&(i*=256);)o+=this[I+--S]*i;return o},C.prototype.readUint8=C.prototype.readUInt8=function(I,S){return I=I>>>0,S||z(I,1,this.length),this[I]},C.prototype.readUint16LE=C.prototype.readUInt16LE=function(I,S){return I=I>>>0,S||z(I,2,this.length),this[I]|this[I+1]<<8},C.prototype.readUint16BE=C.prototype.readUInt16BE=function(I,S){return I=I>>>0,S||z(I,2,this.length),this[I]<<8|this[I+1]},C.prototype.readUint32LE=C.prototype.readUInt32LE=function(I,S){return I=I>>>0,S||z(I,4,this.length),(this[I]|this[I+1]<<8|this[I+2]<<16)+this[I+3]*16777216},C.prototype.readUint32BE=C.prototype.readUInt32BE=function(I,S){return I=I>>>0,S||z(I,4,this.length),this[I]*16777216+(this[I+1]<<16|this[I+2]<<8|this[I+3])},C.prototype.readBigUInt64LE=z0(function(I){I=I>>>0,F0(I,"offset");let S=this[I],c=this[I+7];(S===void 0||c===void 0)&&b(I,this.length-8);let o=S+this[++I]*256+this[++I]*65536+this[++I]*16777216,i=this[++I]+this[++I]*256+this[++I]*65536+c*16777216;return BigInt(o)+(BigInt(i)<<BigInt(32))}),C.prototype.readBigUInt64BE=z0(function(I){I=I>>>0,F0(I,"offset");let S=this[I],c=this[I+7];(S===void 0||c===void 0)&&b(I,this.length-8);let o=S*16777216+this[++I]*65536+this[++I]*256+this[++I],i=this[++I]*16777216+this[++I]*65536+this[++I]*256+c;return(BigInt(o)<<BigInt(32))+BigInt(i)}),C.prototype.readIntLE=function(I,S,c){I=I>>>0,S=S>>>0,c||z(I,S,this.length);let o=this[I],i=1,O0=0;for(;++O0<S&&(i*=256);)o+=this[I+O0]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*S)),o},C.prototype.readIntBE=function(I,S,c){I=I>>>0,S=S>>>0,c||z(I,S,this.length);let o=S,i=1,O0=this[I+--o];for(;o>0&&(i*=256);)O0+=this[I+--o]*i;return i*=128,O0>=i&&(O0-=Math.pow(2,8*S)),O0},C.prototype.readInt8=function(I,S){return I=I>>>0,S||z(I,1,this.length),this[I]&128?(255-this[I]+1)*-1:this[I]},C.prototype.readInt16LE=function(I,S){I=I>>>0,S||z(I,2,this.length);let c=this[I]|this[I+1]<<8;return c&32768?c|4294901760:c},C.prototype.readInt16BE=function(I,S){I=I>>>0,S||z(I,2,this.length);let c=this[I+1]|this[I]<<8;return c&32768?c|4294901760:c},C.prototype.readInt32LE=function(I,S){return I=I>>>0,S||z(I,4,this.length),this[I]|this[I+1]<<8|this[I+2]<<16|this[I+3]<<24},C.prototype.readInt32BE=function(I,S){return I=I>>>0,S||z(I,4,this.length),this[I]<<24|this[I+1]<<16|this[I+2]<<8|this[I+3]},C.prototype.readBigInt64LE=z0(function(I){I=I>>>0,F0(I,"offset");let S=this[I],c=this[I+7];(S===void 0||c===void 0)&&b(I,this.length-8);let o=this[I+4]+this[I+5]*256+this[I+6]*65536+(c<<24);return(BigInt(o)<<BigInt(32))+BigInt(S+this[++I]*256+this[++I]*65536+this[++I]*16777216)}),C.prototype.readBigInt64BE=z0(function(I){I=I>>>0,F0(I,"offset");let S=this[I],c=this[I+7];(S===void 0||c===void 0)&&b(I,this.length-8);let o=(S<<24)+this[++I]*65536+this[++I]*256+this[++I];return(BigInt(o)<<BigInt(32))+BigInt(this[++I]*16777216+this[++I]*65536+this[++I]*256+c)}),C.prototype.readFloatLE=function(I,S){return I=I>>>0,S||z(I,4,this.length),F.read(this,I,!0,23,4)},C.prototype.readFloatBE=function(I,S){return I=I>>>0,S||z(I,4,this.length),F.read(this,I,!1,23,4)},C.prototype.readDoubleLE=function(I,S){return I=I>>>0,S||z(I,8,this.length),F.read(this,I,!0,52,8)},C.prototype.readDoubleBE=function(I,S){return I=I>>>0,S||z(I,8,this.length),F.read(this,I,!1,52,8)};function A(I,S,c,o,i,O0){if(!C.isBuffer(I))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>i||S<O0)throw new RangeError('"value" argument is out of bounds');if(c+o>I.length)throw new RangeError("Index out of range")}C.prototype.writeUintLE=C.prototype.writeUIntLE=function(I,S,c,o){if(I=+I,S=S>>>0,c=c>>>0,!o){let U0=Math.pow(2,8*c)-1;A(this,I,S,c,U0,0)}let i=1,O0=0;for(this[S]=I&255;++O0<c&&(i*=256);)this[S+O0]=I/i&255;return S+c},C.prototype.writeUintBE=C.prototype.writeUIntBE=function(I,S,c,o){if(I=+I,S=S>>>0,c=c>>>0,!o){let U0=Math.pow(2,8*c)-1;A(this,I,S,c,U0,0)}let i=c-1,O0=1;for(this[S+i]=I&255;--i>=0&&(O0*=256);)this[S+i]=I/O0&255;return S+c},C.prototype.writeUint8=C.prototype.writeUInt8=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,1,255,0),this[S]=I&255,S+1},C.prototype.writeUint16LE=C.prototype.writeUInt16LE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,2,65535,0),this[S]=I&255,this[S+1]=I>>>8,S+2},C.prototype.writeUint16BE=C.prototype.writeUInt16BE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,2,65535,0),this[S]=I>>>8,this[S+1]=I&255,S+2},C.prototype.writeUint32LE=C.prototype.writeUInt32LE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,4,4294967295,0),this[S+3]=I>>>24,this[S+2]=I>>>16,this[S+1]=I>>>8,this[S]=I&255,S+4},C.prototype.writeUint32BE=C.prototype.writeUInt32BE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,4,4294967295,0),this[S]=I>>>24,this[S+1]=I>>>16,this[S+2]=I>>>8,this[S+3]=I&255,S+4};function T(I,S,c,o,i){G0(S,o,i,I,c,7);let O0=Number(S&BigInt(4294967295));I[c++]=O0,O0=O0>>8,I[c++]=O0,O0=O0>>8,I[c++]=O0,O0=O0>>8,I[c++]=O0;let U0=Number(S>>BigInt(32)&BigInt(4294967295));return I[c++]=U0,U0=U0>>8,I[c++]=U0,U0=U0>>8,I[c++]=U0,U0=U0>>8,I[c++]=U0,c}function y(I,S,c,o,i){G0(S,o,i,I,c,7);let O0=Number(S&BigInt(4294967295));I[c+7]=O0,O0=O0>>8,I[c+6]=O0,O0=O0>>8,I[c+5]=O0,O0=O0>>8,I[c+4]=O0;let U0=Number(S>>BigInt(32)&BigInt(4294967295));return I[c+3]=U0,U0=U0>>8,I[c+2]=U0,U0=U0>>8,I[c+1]=U0,U0=U0>>8,I[c]=U0,c+8}C.prototype.writeBigUInt64LE=z0(function(I,S=0){return T(this,I,S,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeBigUInt64BE=z0(function(I,S=0){return y(this,I,S,BigInt(0),BigInt("0xffffffffffffffff"))}),C.prototype.writeIntLE=function(I,S,c,o){if(I=+I,S=S>>>0,!o){let j0=Math.pow(2,8*c-1);A(this,I,S,c,j0-1,-j0)}let i=0,O0=1,U0=0;for(this[S]=I&255;++i<c&&(O0*=256);)I<0&&U0===0&&this[S+i-1]!==0&&(U0=1),this[S+i]=(I/O0>>0)-U0&255;return S+c},C.prototype.writeIntBE=function(I,S,c,o){if(I=+I,S=S>>>0,!o){let j0=Math.pow(2,8*c-1);A(this,I,S,c,j0-1,-j0)}let i=c-1,O0=1,U0=0;for(this[S+i]=I&255;--i>=0&&(O0*=256);)I<0&&U0===0&&this[S+i+1]!==0&&(U0=1),this[S+i]=(I/O0>>0)-U0&255;return S+c},C.prototype.writeInt8=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,1,127,-128),I<0&&(I=255+I+1),this[S]=I&255,S+1},C.prototype.writeInt16LE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,2,32767,-32768),this[S]=I&255,this[S+1]=I>>>8,S+2},C.prototype.writeInt16BE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,2,32767,-32768),this[S]=I>>>8,this[S+1]=I&255,S+2},C.prototype.writeInt32LE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,4,2147483647,-2147483648),this[S]=I&255,this[S+1]=I>>>8,this[S+2]=I>>>16,this[S+3]=I>>>24,S+4},C.prototype.writeInt32BE=function(I,S,c){return I=+I,S=S>>>0,c||A(this,I,S,4,2147483647,-2147483648),I<0&&(I=4294967295+I+1),this[S]=I>>>24,this[S+1]=I>>>16,this[S+2]=I>>>8,this[S+3]=I&255,S+4},C.prototype.writeBigInt64LE=z0(function(I,S=0){return T(this,I,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),C.prototype.writeBigInt64BE=z0(function(I,S=0){return y(this,I,S,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function r(I,S,c,o,i,O0){if(c+o>I.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("Index out of range")}function a(I,S,c,o,i){return S=+S,c=c>>>0,i||r(I,S,c,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),F.write(I,S,c,o,23,4),c+4}C.prototype.writeFloatLE=function(I,S,c){return a(this,I,S,!0,c)},C.prototype.writeFloatBE=function(I,S,c){return a(this,I,S,!1,c)};function t(I,S,c,o,i){return S=+S,c=c>>>0,i||r(I,S,c,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),F.write(I,S,c,o,52,8),c+8}C.prototype.writeDoubleLE=function(I,S,c){return t(this,I,S,!0,c)},C.prototype.writeDoubleBE=function(I,S,c){return t(this,I,S,!1,c)},C.prototype.copy=function(I,S,c,o){if(!C.isBuffer(I))throw new TypeError("argument should be a Buffer");if(c||(c=0),!o&&o!==0&&(o=this.length),S>=I.length&&(S=I.length),S||(S=0),o>0&&o<c&&(o=c),o===c||I.length===0||this.length===0)return 0;if(S<0)throw new RangeError("targetStart out of bounds");if(c<0||c>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),I.length-S<o-c&&(o=I.length-S+c);let i=o-c;return this===I&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(S,c,o):Uint8Array.prototype.set.call(I,this.subarray(c,o),S),i},C.prototype.fill=function(I,S,c,o){if(typeof I=="string"){if(typeof S=="string"?(o=S,S=0,c=this.length):typeof c=="string"&&(o=c,c=this.length),o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!C.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(I.length===1){let O0=I.charCodeAt(0);(o==="utf8"&&O0<128||o==="latin1")&&(I=O0)}}else typeof I=="number"?I=I&255:typeof I=="boolean"&&(I=Number(I));if(S<0||this.length<S||this.length<c)throw new RangeError("Out of range index");if(c<=S)return this;S=S>>>0,c=c===void 0?this.length:c>>>0,I||(I=0);let i;if(typeof I=="number")for(i=S;i<c;++i)this[i]=I;else{let O0=C.isBuffer(I)?I:C.from(I,o),U0=O0.length;if(U0===0)throw new TypeError('The value "'+I+'" is invalid for argument "value"');for(i=0;i<c-S;++i)this[i+S]=O0[i%U0]}return this};var l={};function h(I,S,c){l[I]=class extends c{constructor(){super(),Object.defineProperty(this,"message",{value:S.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${I}]`,this.stack,delete this.name}get code(){return I}set code(o){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:o,writable:!0})}toString(){return`${this.name} [${I}]: ${this.message}`}}}h("ERR_BUFFER_OUT_OF_BOUNDS",function(I){return I?`${I} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),h("ERR_INVALID_ARG_TYPE",function(I,S){return`The "${I}" argument must be of type number. Received type ${typeof S}`},TypeError),h("ERR_OUT_OF_RANGE",function(I,S,c){let o=`The value of "${I}" is out of range.`,i=c;return Number.isInteger(c)&&Math.abs(c)>4294967296?i=n(String(c)):typeof c=="bigint"&&(i=String(c),(c>BigInt(2)**BigInt(32)||c<-(BigInt(2)**BigInt(32)))&&(i=n(i)),i+="n"),o+=` It must be ${S}. Received ${i}`,o},RangeError);function n(I){let S="",c=I.length,o=I[0]==="-"?1:0;for(;c>=o+4;c-=3)S=`_${I.slice(c-3,c)}${S}`;return`${I.slice(0,c)}${S}`}function q0(I,S,c){F0(S,"offset"),(I[S]===void 0||I[S+c]===void 0)&&b(S,I.length-(c+1))}function G0(I,S,c,o,i,O0){if(I>c||I<S){let U0=typeof S=="bigint"?"n":"",j0;throw O0>3?S===0||S===BigInt(0)?j0=`>= 0${U0} and < 2${U0} ** ${(O0+1)*8}${U0}`:j0=`>= -(2${U0} ** ${(O0+1)*8-1}${U0}) and < 2 ** ${(O0+1)*8-1}${U0}`:j0=`>= ${S}${U0} and <= ${c}${U0}`,new l.ERR_OUT_OF_RANGE("value",j0,I)}q0(o,i,O0)}function F0(I,S){if(typeof I!="number")throw new l.ERR_INVALID_ARG_TYPE(S,"number",I)}function b(I,S,c){throw Math.floor(I)!==I?(F0(I,c),new l.ERR_OUT_OF_RANGE(c||"offset","an integer",I)):S<0?new l.ERR_BUFFER_OUT_OF_BOUNDS:new l.ERR_OUT_OF_RANGE(c||"offset",`>= ${c?1:0} and <= ${S}`,I)}var E=/[^+/0-9A-Za-z-_]/g;function d(I){if(I=I.split("=")[0],I=I.trim().replace(E,""),I.length<2)return"";for(;I.length%4!==0;)I=I+"=";return I}function e(I,S){S=S||Infinity;let c,o=I.length,i=null,O0=[];for(let U0=0;U0<o;++U0){if(c=I.charCodeAt(U0),c>55295&&c<57344){if(!i){if(c>56319){(S-=3)>-1&&O0.push(239,191,189);continue}else if(U0+1===o){(S-=3)>-1&&O0.push(239,191,189);continue}i=c;continue}if(c<56320){(S-=3)>-1&&O0.push(239,191,189),i=c;continue}c=(i-55296<<10|c-56320)+65536}else i&&(S-=3)>-1&&O0.push(239,191,189);if(i=null,c<128){if((S-=1)<0)break;O0.push(c)}else if(c<2048){if((S-=2)<0)break;O0.push(c>>6|192,c&63|128)}else if(c<65536){if((S-=3)<0)break;O0.push(c>>12|224,c>>6&63|128,c&63|128)}else if(c<1114112){if((S-=4)<0)break;O0.push(c>>18|240,c>>12&63|128,c>>6&63|128,c&63|128)}else throw new Error("Invalid code point")}return O0}function V0(I){let S=[];for(let c=0;c<I.length;++c)S.push(I.charCodeAt(c)&255);return S}function W0(I,S){let c,o,i,O0=[];for(let U0=0;U0<I.length&&!((S-=2)<0);++U0)c=I.charCodeAt(U0),o=c>>8,i=c%256,O0.push(i),O0.push(o);return O0}function J0(I){return q.toByteArray(d(I))}function Y0(I,S,c,o){let i;for(i=0;i<o&&!(i+c>=S.length||i>=I.length);++i)S[i+c]=I[i];return i}function X0(I,S){return I instanceof S||I!=null&&I.constructor!=null&&I.constructor.name!=null&&I.constructor.name===S.name}function g0(I){return I!==I}var $0=function(){let I="0123456789abcdef",S=new Array(256);for(let c=0;c<16;++c){let o=c*16;for(let i=0;i<16;++i)S[o+i]=I[c]+I[i]}return S}();function z0(I){return typeof BigInt>"u"?_0:I}function _0(){throw new Error("BigInt not supported")}}),l0=Z0((Y,q)=>{var F=R6(),O=F.Buffer;function Z(V,C){for(var B in V)C[B]=V[B]}O.from&&O.alloc&&O.allocUnsafe&&O.allocUnsafeSlow?q.exports=F:(Z(F,Y),Y.Buffer=N);function N(V,C,B){return O(V,C,B)}N.prototype=Object.create(O.prototype),Z(O,N),N.from=function(V,C,B){if(typeof V=="number")throw new TypeError("Argument must not be a number");return O(V,C,B)},N.alloc=function(V,C,B){if(typeof V!="number")throw new TypeError("Argument must be a number");var D=O(V);return C!==void 0?typeof B=="string"?D.fill(C,B):D.fill(C):D.fill(0),D},N.allocUnsafe=function(V){if(typeof V!="number")throw new TypeError("Argument must be a number");return O(V)},N.allocUnsafeSlow=function(V){if(typeof V!="number")throw new TypeError("Argument must be a number");return F.SlowBuffer(V)}}),t8=Z0((Y,q)=>{var F=65536,O=4294967295;function Z(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
2
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var N=l0().Buffer,V=window.crypto||window.msCrypto;V&&V.getRandomValues?q.exports=C:q.exports=Z;function C(B,D){if(B>O)throw new RangeError("requested too many random bytes");var L=N.allocUnsafe(B);if(B>0)if(B>F)for(var H=0;H<B;H+=F)V.getRandomValues(L.slice(H,H+F));else V.getRandomValues(L);return typeof D=="function"?process.nextTick(function(){D(null,L)}):L}}),h0=Z0((Y,q)=>{typeof Object.create=="function"?q.exports=function(F,O){O&&(F.super_=O,F.prototype=Object.create(O.prototype,{constructor:{value:F,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(F,O){if(O){F.super_=O;var Z=function(){};Z.prototype=O.prototype,F.prototype=new Z,F.prototype.constructor=F}}}),x8=Z0((Y,q)=>{var F=typeof Reflect=="object"?Reflect:null,O=F&&typeof F.apply=="function"?F.apply:function(m,f,s){return Function.prototype.apply.call(m,f,s)},Z;F&&typeof F.ownKeys=="function"?Z=F.ownKeys:Object.getOwnPropertySymbols?Z=function(m){return Object.getOwnPropertyNames(m).concat(Object.getOwnPropertySymbols(m))}:Z=function(m){return Object.getOwnPropertyNames(m)};function N(m){console&&console.warn&&console.warn(m)}var V=Number.isNaN||function(m){return m!==m};function C(){C.init.call(this)}q.exports=C,q.exports.once=g,C.EventEmitter=C,C.prototype._events=void 0,C.prototype._eventsCount=0,C.prototype._maxListeners=void 0;var B=10;function D(m){if(typeof m!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof m)}Object.defineProperty(C,"defaultMaxListeners",{enumerable:!0,get:function(){return B},set:function(m){if(typeof m!="number"||m<0||V(m))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+m+".");B=m}}),C.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},C.prototype.setMaxListeners=function(m){if(typeof m!="number"||m<0||V(m))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+m+".");return this._maxListeners=m,this};function L(m){return m._maxListeners===void 0?C.defaultMaxListeners:m._maxListeners}C.prototype.getMaxListeners=function(){return L(this)},C.prototype.emit=function(m){for(var f=[],s=1;s<arguments.length;s++)f.push(arguments[s]);var Q0=m==="error",u=this._events;if(u!==void 0)Q0=Q0&&u.error===void 0;else if(!Q0)return!1;if(Q0){var K0;if(f.length>0&&(K0=f[0]),K0 instanceof Error)throw K0;var Q=new Error("Unhandled error."+(K0?" ("+K0.message+")":""));throw Q.context=K0,Q}var G=u[m];if(G===void 0)return!1;if(typeof G=="function")O(G,this,f);else for(var J=G.length,X=M(G,J),s=0;s<J;++s)O(X[s],this,f);return!0};function H(m,f,s,Q0){var u,K0,Q;if(D(s),K0=m._events,K0===void 0?(K0=m._events=Object.create(null),m._eventsCount=0):(K0.newListener!==void 0&&(m.emit("newListener",f,s.listener?s.listener:s),K0=m._events),Q=K0[f]),Q===void 0)Q=K0[f]=s,++m._eventsCount;else if(typeof Q=="function"?Q=K0[f]=Q0?[s,Q]:[Q,s]:Q0?Q.unshift(s):Q.push(s),u=L(m),u>0&&Q.length>u&&!Q.warned){Q.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+Q.length+" "+String(f)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=m,G.type=f,G.count=Q.length,N(G)}return m}C.prototype.addListener=function(m,f){return H(this,m,f,!1)},C.prototype.on=C.prototype.addListener,C.prototype.prependListener=function(m,f){return H(this,m,f,!0)};function P(){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 R(m,f,s){var Q0={fired:!1,wrapFn:void 0,target:m,type:f,listener:s},u=P.bind(Q0);return u.listener=s,Q0.wrapFn=u,u}C.prototype.once=function(m,f){return D(f),this.on(m,R(this,m,f)),this},C.prototype.prependOnceListener=function(m,f){return D(f),this.prependListener(m,R(this,m,f)),this},C.prototype.removeListener=function(m,f){var s,Q0,u,K0,Q;if(D(f),Q0=this._events,Q0===void 0)return this;if(s=Q0[m],s===void 0)return this;if(s===f||s.listener===f)--this._eventsCount===0?this._events=Object.create(null):(delete Q0[m],Q0.removeListener&&this.emit("removeListener",m,s.listener||f));else if(typeof s!="function"){for(u=-1,K0=s.length-1;K0>=0;K0--)if(s[K0]===f||s[K0].listener===f){Q=s[K0].listener,u=K0;break}if(u<0)return this;u===0?s.shift():w(s,u),s.length===1&&(Q0[m]=s[0]),Q0.removeListener!==void 0&&this.emit("removeListener",m,Q||f)}return this},C.prototype.off=C.prototype.removeListener,C.prototype.removeAllListeners=function(m){var f,s,Q0;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[m]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[m]),this;if(arguments.length===0){var u=Object.keys(s),K0;for(Q0=0;Q0<u.length;++Q0)K0=u[Q0],K0!=="removeListener"&&this.removeAllListeners(K0);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(f=s[m],typeof f=="function")this.removeListener(m,f);else if(f!==void 0)for(Q0=f.length-1;Q0>=0;Q0--)this.removeListener(m,f[Q0]);return this};function k(m,f,s){var Q0=m._events;if(Q0===void 0)return[];var u=Q0[f];return u===void 0?[]:typeof u=="function"?s?[u.listener||u]:[u]:s?x(u):M(u,u.length)}C.prototype.listeners=function(m){return k(this,m,!0)},C.prototype.rawListeners=function(m){return k(this,m,!1)},C.listenerCount=function(m,f){return typeof m.listenerCount=="function"?m.listenerCount(f):v.call(m,f)},C.prototype.listenerCount=v;function v(m){var f=this._events;if(f!==void 0){var s=f[m];if(typeof s=="function")return 1;if(s!==void 0)return s.length}return 0}C.prototype.eventNames=function(){return this._eventsCount>0?Z(this._events):[]};function M(m,f){for(var s=new Array(f),Q0=0;Q0<f;++Q0)s[Q0]=m[Q0];return s}function w(m,f){for(;f+1<m.length;f++)m[f]=m[f+1];m.pop()}function x(m){for(var f=new Array(m.length),s=0;s<f.length;++s)f[s]=m[s].listener||m[s];return f}function g(m,f){return new Promise(function(s,Q0){function u(Q){m.removeListener(f,K0),Q0(Q)}function K0(){typeof m.removeListener=="function"&&m.removeListener("error",u),s([].slice.call(arguments))}p(m,f,K0,{once:!0}),f!=="error"&&_(m,u,{once:!0})})}function _(m,f,s){typeof m.on=="function"&&p(m,"error",f,s)}function p(m,f,s,Q0){if(typeof m.on=="function")Q0.once?m.once(f,s):m.on(f,s);else if(typeof m.addEventListener=="function")m.addEventListener(f,function u(K0){Q0.once&&m.removeEventListener(f,u),s(K0)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof m)}}),Q3=Z0((Y,q)=>{q.exports=x8().EventEmitter}),O7=Z0(()=>{}),IX=Z0((Y,q)=>{function F(M,w){var x=Object.keys(M);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(M);w&&(g=g.filter(function(_){return Object.getOwnPropertyDescriptor(M,_).enumerable})),x.push.apply(x,g)}return x}function O(M){for(var w=1;w<arguments.length;w++){var x=arguments[w]!=null?arguments[w]:{};w%2?F(Object(x),!0).forEach(function(g){Z(M,g,x[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(x)):F(Object(x)).forEach(function(g){Object.defineProperty(M,g,Object.getOwnPropertyDescriptor(x,g))})}return M}function Z(M,w,x){return w=B(w),(w in M)?Object.defineProperty(M,w,{value:x,enumerable:!0,configurable:!0,writable:!0}):M[w]=x,M}function N(M,w){if(!(M instanceof w))throw new TypeError("Cannot call a class as a function")}function V(M,w){for(var x=0;x<w.length;x++){var g=w[x];g.enumerable=g.enumerable||!1,g.configurable=!0,("value"in g)&&(g.writable=!0),Object.defineProperty(M,B(g.key),g)}}function C(M,w,x){return w&&V(M.prototype,w),x&&V(M,x),Object.defineProperty(M,"prototype",{writable:!1}),M}function B(M){var w=D(M,"string");return typeof w=="symbol"?w:String(w)}function D(M,w){if(typeof M!="object"||M===null)return M;var x=M[Symbol.toPrimitive];if(x!==void 0){var g=x.call(M,w||"default");if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(M)}var L=R6(),H=L.Buffer,P=O7(),R=P.inspect,k=R&&R.custom||"inspect";function v(M,w,x){H.prototype.copy.call(M,w,x)}q.exports=function(){function M(){N(this,M),this.head=null,this.tail=null,this.length=0}return C(M,[{key:"push",value:function(w){var x={data:w,next:null};this.length>0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(w){var x={data:w,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(w){if(this.length===0)return"";for(var x=this.head,g=""+x.data;x=x.next;)g+=w+x.data;return g}},{key:"concat",value:function(w){if(this.length===0)return H.alloc(0);for(var x=H.allocUnsafe(w>>>0),g=this.head,_=0;g;)v(g.data,x,_),_+=g.data.length,g=g.next;return x}},{key:"consume",value:function(w,x){var g;return w<this.head.data.length?(g=this.head.data.slice(0,w),this.head.data=this.head.data.slice(w)):w===this.head.data.length?g=this.shift():g=x?this._getString(w):this._getBuffer(w),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(w){var x=this.head,g=1,_=x.data;for(w-=_.length;x=x.next;){var p=x.data,m=w>p.length?p.length:w;if(m===p.length?_+=p:_+=p.slice(0,w),w-=m,w===0){m===p.length?(++g,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=p.slice(m));break}++g}return this.length-=g,_}},{key:"_getBuffer",value:function(w){var x=H.allocUnsafe(w),g=this.head,_=1;for(g.data.copy(x),w-=g.data.length;g=g.next;){var p=g.data,m=w>p.length?p.length:w;if(p.copy(x,x.length-w,0,m),w-=m,w===0){m===p.length?(++_,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=p.slice(m));break}++_}return this.length-=_,x}},{key:k,value:function(w,x){return R(this,O(O({},x),{},{depth:0,customInspect:!1}))}}]),M}()}),W3=Z0((Y,q)=>{function F(B,D){var L=this,H=this._readableState&&this._readableState.destroyed,P=this._writableState&&this._writableState.destroyed;return H||P?(D?D(B):B&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(V,this,B)):process.nextTick(V,this,B)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(B||null,function(R){!D&&R?L._writableState?L._writableState.errorEmitted?process.nextTick(Z,L):(L._writableState.errorEmitted=!0,process.nextTick(O,L,R)):process.nextTick(O,L,R):D?(process.nextTick(Z,L),D(R)):process.nextTick(Z,L)}),this)}function O(B,D){V(B,D),Z(B)}function Z(B){B._writableState&&!B._writableState.emitClose||B._readableState&&!B._readableState.emitClose||B.emit("close")}function N(){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 V(B,D){B.emit("error",D)}function C(B,D){var{_readableState:L,_writableState:H}=B;L&&L.autoDestroy||H&&H.autoDestroy?B.destroy(D):B.emit("error",D)}q.exports={destroy:F,undestroy:N,errorOrDestroy:C}}),e8=Z0((Y,q)=>{function F(D,L){D.prototype=Object.create(L.prototype),D.prototype.constructor=D,D.__proto__=L}var O={};function Z(D,L,H){H||(H=Error);function P(k,v,M){return typeof L=="string"?L:L(k,v,M)}var R=function(k){F(v,k);function v(M,w,x){return k.call(this,P(M,w,x))||this}return v}(H);R.prototype.name=H.name,R.prototype.code=D,O[D]=R}function N(D,L){if(Array.isArray(D)){var H=D.length;return D=D.map(function(P){return String(P)}),H>2?"one of ".concat(L," ").concat(D.slice(0,H-1).join(", "),", or ")+D[H-1]:H===2?"one of ".concat(L," ").concat(D[0]," or ").concat(D[1]):"of ".concat(L," ").concat(D[0])}else return"of ".concat(L," ").concat(String(D))}function V(D,L,H){return D.substr(!H||H<0?0:+H,L.length)===L}function C(D,L,H){return(H===void 0||H>D.length)&&(H=D.length),D.substring(H-L.length,H)===L}function B(D,L,H){return typeof H!="number"&&(H=0),H+L.length>D.length?!1:D.indexOf(L,H)!==-1}Z("ERR_INVALID_OPT_VALUE",function(D,L){return'The value "'+L+'" is invalid for option "'+D+'"'},TypeError),Z("ERR_INVALID_ARG_TYPE",function(D,L,H){var P;typeof L=="string"&&V(L,"not ")?(P="must not be",L=L.replace(/^not /,"")):P="must be";var R;if(C(D," argument"))R="The ".concat(D," ").concat(P," ").concat(N(L,"type"));else{var k=B(D,".")?"property":"argument";R='The "'.concat(D,'" ').concat(k," ").concat(P," ").concat(N(L,"type"))}return R+=". Received type ".concat(typeof H),R},TypeError),Z("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Z("ERR_METHOD_NOT_IMPLEMENTED",function(D){return"The "+D+" method is not implemented"}),Z("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Z("ERR_STREAM_DESTROYED",function(D){return"Cannot call "+D+" after a stream was destroyed"}),Z("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Z("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Z("ERR_STREAM_WRITE_AFTER_END","write after end"),Z("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Z("ERR_UNKNOWN_ENCODING",function(D){return"Unknown encoding: "+D},TypeError),Z("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),q.exports.codes=O}),G3=Z0((Y,q)=>{var F=e8().codes.ERR_INVALID_OPT_VALUE;function O(N,V,C){return N.highWaterMark!=null?N.highWaterMark:V?N[C]:null}function Z(N,V,C,B){var D=O(V,B,C);if(D!=null){if(!(isFinite(D)&&Math.floor(D)===D)||D<0){var L=B?C:"highWaterMark";throw new F(L,D)}return Math.floor(D)}return N.objectMode?16:16384}q.exports={getHighWaterMark:Z}}),X3=Z0((Y,q)=>{q.exports=F;function F(Z,N){if(O("noDeprecation"))return Z;var V=!1;function C(){if(!V){if(O("throwDeprecation"))throw new Error(N);O("traceDeprecation")?console.trace(N):console.warn(N),V=!0}return Z.apply(this,arguments)}return C}function O(Z){try{if(!window.localStorage)return!1}catch{return!1}var N=window.localStorage[Z];return N==null?!1:String(N).toLowerCase()==="true"}}),Y3=Z0((Y,q)=>{q.exports=u;function F(l){var h=this;this.next=null,this.entry=null,this.finish=function(){t(h,l)}}var O;u.WritableState=s;var Z={deprecate:X3()},N=Q3(),V=R6().Buffer,C=(typeof window<"u"?window:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B(l){return V.from(l)}function D(l){return V.isBuffer(l)||l instanceof C}var L=W3(),H=G3(),P=H.getHighWaterMark,R=e8().codes,k=R.ERR_INVALID_ARG_TYPE,v=R.ERR_METHOD_NOT_IMPLEMENTED,M=R.ERR_MULTIPLE_CALLBACK,w=R.ERR_STREAM_CANNOT_PIPE,x=R.ERR_STREAM_DESTROYED,g=R.ERR_STREAM_NULL_VALUES,_=R.ERR_STREAM_WRITE_AFTER_END,p=R.ERR_UNKNOWN_ENCODING,m=L.errorOrDestroy;h0()(u,N);function f(){}function s(l,h,n){O=O||r8(),l=l||{},typeof n!="boolean"&&(n=h instanceof O),this.objectMode=!!l.objectMode,n&&(this.objectMode=this.objectMode||!!l.writableObjectMode),this.highWaterMark=P(this,l,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q0=l.decodeStrings===!1;this.decodeStrings=!q0,this.defaultEncoding=l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G0){j(h,G0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=l.emitClose!==!1,this.autoDestroy=!!l.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new F(this)}s.prototype.getBuffer=function(){for(var l=this.bufferedRequest,h=[];l;)h.push(l),l=l.next;return h},function(){try{Object.defineProperty(s.prototype,"buffer",{get:Z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Q0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Q0=Function.prototype[Symbol.hasInstance],Object.defineProperty(u,Symbol.hasInstance,{value:function(l){return Q0.call(this,l)?!0:this!==u?!1:l&&l._writableState instanceof s}})):Q0=function(l){return l instanceof this};function u(l){O=O||r8();var h=this instanceof O;if(!h&&!Q0.call(u,this))return new u(l);this._writableState=new s(l,this,h),this.writable=!0,l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final)),N.call(this)}u.prototype.pipe=function(){m(this,new w)};function K0(l,h){var n=new _;m(l,n),process.nextTick(h,n)}function Q(l,h,n,q0){var G0;return n===null?G0=new g:typeof n!="string"&&!h.objectMode&&(G0=new k("chunk",["string","Buffer"],n)),G0?(m(l,G0),process.nextTick(q0,G0),!1):!0}u.prototype.write=function(l,h,n){var q0=this._writableState,G0=!1,F0=!q0.objectMode&&D(l);return F0&&!V.isBuffer(l)&&(l=B(l)),typeof h=="function"&&(n=h,h=null),F0?h="buffer":h||(h=q0.defaultEncoding),typeof n!="function"&&(n=f),q0.ending?K0(this,n):(F0||Q(this,q0,l,n))&&(q0.pendingcb++,G0=J(this,q0,F0,l,h,n)),G0},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){var l=this._writableState;l.corked&&(l.corked--,!l.writing&&!l.corked&&!l.bufferProcessing&&l.bufferedRequest&&z(this,l))},u.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new p(l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(l,h,n){return!l.objectMode&&l.decodeStrings!==!1&&typeof h=="string"&&(h=V.from(h,n)),h}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J(l,h,n,q0,G0,F0){if(!n){var b=G(h,q0,G0);q0!==b&&(n=!0,G0="buffer",q0=b)}var E=h.objectMode?1:q0.length;h.length+=E;var d=h.length<h.highWaterMark;if(d||(h.needDrain=!0),h.writing||h.corked){var e=h.lastBufferedRequest;h.lastBufferedRequest={chunk:q0,encoding:G0,isBuf:n,callback:F0,next:null},e?e.next=h.lastBufferedRequest:h.bufferedRequest=h.lastBufferedRequest,h.bufferedRequestCount+=1}else X(l,h,!1,E,q0,G0,F0);return d}function X(l,h,n,q0,G0,F0,b){h.writelen=q0,h.writecb=b,h.writing=!0,h.sync=!0,h.destroyed?h.onwrite(new x("write")):n?l._writev(G0,h.onwrite):l._write(G0,F0,h.onwrite),h.sync=!1}function U(l,h,n,q0,G0){--h.pendingcb,n?(process.nextTick(G0,q0),process.nextTick(r,l,h),l._writableState.errorEmitted=!0,m(l,q0)):(G0(q0),l._writableState.errorEmitted=!0,m(l,q0),r(l,h))}function $(l){l.writing=!1,l.writecb=null,l.length-=l.writelen,l.writelen=0}function j(l,h){var n=l._writableState,q0=n.sync,G0=n.writecb;if(typeof G0!="function")throw new M;if($(n),h)U(l,n,q0,h,G0);else{var F0=A(n)||l.destroyed;!F0&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&z(l,n),q0?process.nextTick(K,l,n,F0,G0):K(l,n,F0,G0)}}function K(l,h,n,q0){n||W(l,h),h.pendingcb--,q0(),r(l,h)}function W(l,h){h.length===0&&h.needDrain&&(h.needDrain=!1,l.emit("drain"))}function z(l,h){h.bufferProcessing=!0;var n=h.bufferedRequest;if(l._writev&&n&&n.next){var q0=h.bufferedRequestCount,G0=new Array(q0),F0=h.corkedRequestsFree;F0.entry=n;for(var b=0,E=!0;n;)G0[b]=n,n.isBuf||(E=!1),n=n.next,b+=1;G0.allBuffers=E,X(l,h,!0,h.length,G0,"",F0.finish),h.pendingcb++,h.lastBufferedRequest=null,F0.next?(h.corkedRequestsFree=F0.next,F0.next=null):h.corkedRequestsFree=new F(h),h.bufferedRequestCount=0}else{for(;n;){var{chunk:d,encoding:e,callback:V0}=n,W0=h.objectMode?1:d.length;if(X(l,h,!1,W0,d,e,V0),n=n.next,h.bufferedRequestCount--,h.writing)break}n===null&&(h.lastBufferedRequest=null)}h.bufferedRequest=n,h.bufferProcessing=!1}u.prototype._write=function(l,h,n){n(new v("_write()"))},u.prototype._writev=null,u.prototype.end=function(l,h,n){var q0=this._writableState;return typeof l=="function"?(n=l,l=null,h=null):typeof h=="function"&&(n=h,h=null),l!=null&&this.write(l,h),q0.corked&&(q0.corked=1,this.uncork()),q0.ending||a(this,q0,n),this},Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A(l){return l.ending&&l.length===0&&l.bufferedRequest===null&&!l.finished&&!l.writing}function T(l,h){l._final(function(n){h.pendingcb--,n&&m(l,n),h.prefinished=!0,l.emit("prefinish"),r(l,h)})}function y(l,h){!h.prefinished&&!h.finalCalled&&(typeof l._final=="function"&&!h.destroyed?(h.pendingcb++,h.finalCalled=!0,process.nextTick(T,l,h)):(h.prefinished=!0,l.emit("prefinish")))}function r(l,h){var n=A(h);if(n&&(y(l,h),h.pendingcb===0&&(h.finished=!0,l.emit("finish"),h.autoDestroy))){var q0=l._readableState;(!q0||q0.autoDestroy&&q0.endEmitted)&&l.destroy()}return n}function a(l,h,n){h.ending=!0,r(l,h),n&&(h.finished?process.nextTick(n):l.once("finish",n)),h.ended=!0,l.writable=!1}function t(l,h,n){var q0=l.entry;for(l.entry=null;q0;){var G0=q0.callback;h.pendingcb--,G0(n),q0=q0.next}h.corkedRequestsFree.next=l}Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(l){!this._writableState||(this._writableState.destroyed=l)}}),u.prototype.destroy=L.destroy,u.prototype._undestroy=L.undestroy,u.prototype._destroy=function(l,h){h(l)}}),r8=Z0((Y,q)=>{var F=Object.keys||function(H){var P=[];for(var R in H)P.push(R);return P};q.exports=B;var O=V3(),Z=Y3();h0()(B,O);for(N=F(Z.prototype),C=0;C<N.length;C++)V=N[C],B.prototype[V]||(B.prototype[V]=Z.prototype[V]);var N,V,C;function B(H){if(!(this instanceof B))return new B(H);O.call(this,H),Z.call(this,H),this.allowHalfOpen=!0,H&&(H.readable===!1&&(this.readable=!1),H.writable===!1&&(this.writable=!1),H.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",D)))}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function D(){this._writableState.ended||process.nextTick(L,this)}function L(H){H.end()}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(H){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=H,this._writableState.destroyed=H)}})}),S5=Z0((Y)=>{var q=l0().Buffer,F=q.isEncoding||function(x){switch(x=""+x,x&&x.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 O(x){if(!x)return"utf8";for(var g;;)switch(x){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 x;default:if(g)return;x=(""+x).toLowerCase(),g=!0}}function Z(x){var g=O(x);if(typeof g!="string"&&(q.isEncoding===F||!F(x)))throw new Error("Unknown encoding: "+x);return g||x}Y.StringDecoder=N;function N(x){this.encoding=Z(x);var g;switch(this.encoding){case"utf16le":this.text=P,this.end=R,g=4;break;case"utf8":this.fillLast=D,g=4;break;case"base64":this.text=k,this.end=v,g=3;break;default:this.write=M,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=q.allocUnsafe(g)}N.prototype.write=function(x){if(x.length===0)return"";var g,_;if(this.lastNeed){if(g=this.fillLast(x),g===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<x.length?g?g+this.text(x,_):this.text(x,_):g||""},N.prototype.end=H,N.prototype.text=L,N.prototype.fillLast=function(x){if(this.lastNeed<=x.length)return x.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);x.copy(this.lastChar,this.lastTotal-this.lastNeed,0,x.length),this.lastNeed-=x.length};function V(x){return x<=127?0:x>>5===6?2:x>>4===14?3:x>>3===30?4:x>>6===2?-1:-2}function C(x,g,_){var p=g.length-1;if(p<_)return 0;var m=V(g[p]);return m>=0?(m>0&&(x.lastNeed=m-1),m):--p<_||m===-2?0:(m=V(g[p]),m>=0?(m>0&&(x.lastNeed=m-2),m):--p<_||m===-2?0:(m=V(g[p]),m>=0?(m>0&&(m===2?m=0:x.lastNeed=m-3),m):0))}function B(x,g,_){if((g[0]&192)!==128)return x.lastNeed=0,"\uFFFD";if(x.lastNeed>1&&g.length>1){if((g[1]&192)!==128)return x.lastNeed=1,"\uFFFD";if(x.lastNeed>2&&g.length>2&&(g[2]&192)!==128)return x.lastNeed=2,"\uFFFD"}}function D(x){var g=this.lastTotal-this.lastNeed,_=B(this,x,g);if(_!==void 0)return _;if(this.lastNeed<=x.length)return x.copy(this.lastChar,g,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);x.copy(this.lastChar,g,0,x.length),this.lastNeed-=x.length}function L(x,g){var _=C(this,x,g);if(!this.lastNeed)return x.toString("utf8",g);this.lastTotal=_;var p=x.length-(_-this.lastNeed);return x.copy(this.lastChar,0,p),x.toString("utf8",g,p)}function H(x){var g=x&&x.length?this.write(x):"";return this.lastNeed?g+"\uFFFD":g}function P(x,g){if((x.length-g)%2===0){var _=x.toString("utf16le",g);if(_){var p=_.charCodeAt(_.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=x[x.length-1],x.toString("utf16le",g,x.length-1)}function R(x){var g=x&&x.length?this.write(x):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return g+this.lastChar.toString("utf16le",0,_)}return g}function k(x,g){var _=(x.length-g)%3;return _===0?x.toString("base64",g):(this.lastNeed=3-_,this.lastTotal=3,_===1?this.lastChar[0]=x[x.length-1]:(this.lastChar[0]=x[x.length-2],this.lastChar[1]=x[x.length-1]),x.toString("base64",g,x.length-_))}function v(x){var g=x&&x.length?this.write(x):"";return this.lastNeed?g+this.lastChar.toString("base64",0,3-this.lastNeed):g}function M(x){return x.toString(this.encoding)}function w(x){return x&&x.length?this.write(x):""}}),x1={};C7(x1,{StringDecoder:()=>A5.StringDecoder,default:()=>A5.StringDecoder});var A5,j7=v5(()=>{A5=v8(S5())}),E5=Z0((Y,q)=>{var F=e8().codes.ERR_STREAM_PREMATURE_CLOSE;function O(C){var B=!1;return function(){if(!B){B=!0;for(var D=arguments.length,L=new Array(D),H=0;H<D;H++)L[H]=arguments[H];C.apply(this,L)}}}function Z(){}function N(C){return C.setHeader&&typeof C.abort=="function"}function V(C,B,D){if(typeof B=="function")return V(C,null,B);B||(B={}),D=O(D||Z);var L=B.readable||B.readable!==!1&&C.readable,H=B.writable||B.writable!==!1&&C.writable,P=function(){C.writable||k()},R=C._writableState&&C._writableState.finished,k=function(){H=!1,R=!0,L||D.call(C)},v=C._readableState&&C._readableState.endEmitted,M=function(){L=!1,v=!0,H||D.call(C)},w=function(_){D.call(C,_)},x=function(){var _;if(L&&!v)return(!C._readableState||!C._readableState.ended)&&(_=new F),D.call(C,_);if(H&&!R)return(!C._writableState||!C._writableState.ended)&&(_=new F),D.call(C,_)},g=function(){C.req.on("finish",k)};return N(C)?(C.on("complete",k),C.on("abort",x),C.req?g():C.on("request",g)):H&&!C._writableState&&(C.on("end",P),C.on("close",P)),C.on("end",M),C.on("finish",k),B.error!==!1&&C.on("error",w),C.on("close",x),function(){C.removeListener("complete",k),C.removeListener("abort",x),C.removeListener("request",g),C.req&&C.req.removeListener("finish",k),C.removeListener("end",P),C.removeListener("close",P),C.removeListener("finish",k),C.removeListener("end",M),C.removeListener("error",w),C.removeListener("close",x)}}q.exports=V}),TX=Z0((Y,q)=>{var F;function O(p,m,f){return m=Z(m),(m in p)?Object.defineProperty(p,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):p[m]=f,p}function Z(p){var m=N(p,"string");return typeof m=="symbol"?m:String(m)}function N(p,m){if(typeof p!="object"||p===null)return p;var f=p[Symbol.toPrimitive];if(f!==void 0){var s=f.call(p,m||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var V=E5(),C=Symbol("lastResolve"),B=Symbol("lastReject"),D=Symbol("error"),L=Symbol("ended"),H=Symbol("lastPromise"),P=Symbol("handlePromise"),R=Symbol("stream");function k(p,m){return{value:p,done:m}}function v(p){var m=p[C];if(m!==null){var f=p[R].read();f!==null&&(p[H]=null,p[C]=null,p[B]=null,m(k(f,!1)))}}function M(p){process.nextTick(v,p)}function w(p,m){return function(f,s){p.then(function(){if(m[L]){f(k(void 0,!0));return}m[P](f,s)},s)}}var x=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((F={get stream(){return this[R]},next:function(){var p=this,m=this[D];if(m!==null)return Promise.reject(m);if(this[L])return Promise.resolve(k(void 0,!0));if(this[R].destroyed)return new Promise(function(u,K0){process.nextTick(function(){p[D]?K0(p[D]):u(k(void 0,!0))})});var f=this[H],s;if(f)s=new Promise(w(f,this));else{var Q0=this[R].read();if(Q0!==null)return Promise.resolve(k(Q0,!1));s=new Promise(this[P])}return this[H]=s,s}},O(F,Symbol.asyncIterator,function(){return this}),O(F,"return",function(){var p=this;return new Promise(function(m,f){p[R].destroy(null,function(s){if(s){f(s);return}m(k(void 0,!0))})})}),F),x),_=function(p){var m,f=Object.create(g,(m={},O(m,R,{value:p,writable:!0}),O(m,C,{value:null,writable:!0}),O(m,B,{value:null,writable:!0}),O(m,D,{value:null,writable:!0}),O(m,L,{value:p._readableState.endEmitted,writable:!0}),O(m,P,{value:function(s,Q0){var u=f[R].read();u?(f[H]=null,f[C]=null,f[B]=null,s(k(u,!1))):(f[C]=s,f[B]=Q0)},writable:!0}),m));return f[H]=null,V(p,function(s){if(s&&s.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q0=f[B];Q0!==null&&(f[H]=null,f[C]=null,f[B]=null,Q0(s)),f[D]=s;return}var u=f[C];u!==null&&(f[H]=null,f[C]=null,f[B]=null,u(k(void 0,!0))),f[L]=!0}),p.on("readable",M.bind(null,f)),f};q.exports=_}),MX=Z0((Y,q)=>{q.exports=function(){throw new Error("Readable.from is not available in the browser")}}),V3=Z0((Y,q)=>{q.exports=Q;var F;Q.ReadableState=K0;var O=x8().EventEmitter,Z=function(b,E){return b.listeners(E).length},N=Q3(),V=R6().Buffer,C=(typeof window<"u"?window:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B(b){return V.from(b)}function D(b){return V.isBuffer(b)||b instanceof C}var L=O7(),H;L&&L.debuglog?H=L.debuglog("stream"):H=function(){};var P=IX(),R=W3(),k=G3(),v=k.getHighWaterMark,M=e8().codes,w=M.ERR_INVALID_ARG_TYPE,x=M.ERR_STREAM_PUSH_AFTER_EOF,g=M.ERR_METHOD_NOT_IMPLEMENTED,_=M.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,p,m,f;h0()(Q,N);var s=R.errorOrDestroy,Q0=["error","close","destroy","pause","resume"];function u(b,E,d){if(typeof b.prependListener=="function")return b.prependListener(E,d);!b._events||!b._events[E]?b.on(E,d):Array.isArray(b._events[E])?b._events[E].unshift(d):b._events[E]=[d,b._events[E]]}function K0(b,E,d){F=F||r8(),b=b||{},typeof d!="boolean"&&(d=E instanceof F),this.objectMode=!!b.objectMode,d&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.highWaterMark=v(this,b,"readableHighWaterMark",d),this.buffer=new P,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=b.emitClose!==!1,this.autoDestroy=!!b.autoDestroy,this.destroyed=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(p||(p=(j7(),g6(x1)).StringDecoder),this.decoder=new p(b.encoding),this.encoding=b.encoding)}function Q(b){if(F=F||r8(),!(this instanceof Q))return new Q(b);var E=this instanceof F;this._readableState=new K0(b,this,E),this.readable=!0,b&&(typeof b.read=="function"&&(this._read=b.read),typeof b.destroy=="function"&&(this._destroy=b.destroy)),N.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(b){!this._readableState||(this._readableState.destroyed=b)}}),Q.prototype.destroy=R.destroy,Q.prototype._undestroy=R.undestroy,Q.prototype._destroy=function(b,E){E(b)},Q.prototype.push=function(b,E){var d=this._readableState,e;return d.objectMode?e=!0:typeof b=="string"&&(E=E||d.defaultEncoding,E!==d.encoding&&(b=V.from(b,E),E=""),e=!0),G(this,b,E,!1,e)},Q.prototype.unshift=function(b){return G(this,b,null,!0,!1)};function G(b,E,d,e,V0){H("readableAddChunk",E);var W0=b._readableState;if(E===null)W0.reading=!1,K(b,W0);else{var J0;if(V0||(J0=X(W0,E)),J0)s(b,J0);else if(W0.objectMode||E&&E.length>0)if(typeof E!="string"&&!W0.objectMode&&Object.getPrototypeOf(E)!==V.prototype&&(E=B(E)),e)W0.endEmitted?s(b,new _):J(b,W0,E,!0);else if(W0.ended)s(b,new x);else{if(W0.destroyed)return!1;W0.reading=!1,W0.decoder&&!d?(E=W0.decoder.write(E),W0.objectMode||E.length!==0?J(b,W0,E,!1):A(b,W0)):J(b,W0,E,!1)}else e||(W0.reading=!1,A(b,W0))}return!W0.ended&&(W0.length<W0.highWaterMark||W0.length===0)}function J(b,E,d,e){E.flowing&&E.length===0&&!E.sync?(E.awaitDrain=0,b.emit("data",d)):(E.length+=E.objectMode?1:d.length,e?E.buffer.unshift(d):E.buffer.push(d),E.needReadable&&W(b)),A(b,E)}function X(b,E){var d;return!D(E)&&typeof E!="string"&&E!==void 0&&!b.objectMode&&(d=new w("chunk",["string","Buffer","Uint8Array"],E)),d}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(b){p||(p=(j7(),g6(x1)).StringDecoder);var E=new p(b);this._readableState.decoder=E,this._readableState.encoding=this._readableState.decoder.encoding;for(var d=this._readableState.buffer.head,e="";d!==null;)e+=E.write(d.data),d=d.next;return this._readableState.buffer.clear(),e!==""&&this._readableState.buffer.push(e),this._readableState.length=e.length,this};var U=1073741824;function $(b){return b>=U?b=U:(b--,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,b|=b>>>16,b++),b}function j(b,E){return b<=0||E.length===0&&E.ended?0:E.objectMode?1:b!==b?E.flowing&&E.length?E.buffer.head.data.length:E.length:(b>E.highWaterMark&&(E.highWaterMark=$(b)),b<=E.length?b:E.ended?E.length:(E.needReadable=!0,0))}Q.prototype.read=function(b){H("read",b),b=parseInt(b,10);var E=this._readableState,d=b;if(b!==0&&(E.emittedReadable=!1),b===0&&E.needReadable&&((E.highWaterMark!==0?E.length>=E.highWaterMark:E.length>0)||E.ended))return H("read: emitReadable",E.length,E.ended),E.length===0&&E.ended?q0(this):W(this),null;if(b=j(b,E),b===0&&E.ended)return E.length===0&&q0(this),null;var e=E.needReadable;H("need readable",e),(E.length===0||E.length-b<E.highWaterMark)&&(e=!0,H("length less than watermark",e)),E.ended||E.reading?(e=!1,H("reading or ended",e)):e&&(H("do read"),E.reading=!0,E.sync=!0,E.length===0&&(E.needReadable=!0),this._read(E.highWaterMark),E.sync=!1,E.reading||(b=j(d,E)));var V0;return b>0?V0=n(b,E):V0=null,V0===null?(E.needReadable=E.length<=E.highWaterMark,b=0):(E.length-=b,E.awaitDrain=0),E.length===0&&(E.ended||(E.needReadable=!0),d!==b&&E.ended&&q0(this)),V0!==null&&this.emit("data",V0),V0};function K(b,E){if(H("onEofChunk"),!E.ended){if(E.decoder){var d=E.decoder.end();d&&d.length&&(E.buffer.push(d),E.length+=E.objectMode?1:d.length)}E.ended=!0,E.sync?W(b):(E.needReadable=!1,E.emittedReadable||(E.emittedReadable=!0,z(b)))}}function W(b){var E=b._readableState;H("emitReadable",E.needReadable,E.emittedReadable),E.needReadable=!1,E.emittedReadable||(H("emitReadable",E.flowing),E.emittedReadable=!0,process.nextTick(z,b))}function z(b){var E=b._readableState;H("emitReadable_",E.destroyed,E.length,E.ended),!E.destroyed&&(E.length||E.ended)&&(b.emit("readable"),E.emittedReadable=!1),E.needReadable=!E.flowing&&!E.ended&&E.length<=E.highWaterMark,h(b)}function A(b,E){E.readingMore||(E.readingMore=!0,process.nextTick(T,b,E))}function T(b,E){for(;!E.reading&&!E.ended&&(E.length<E.highWaterMark||E.flowing&&E.length===0);){var d=E.length;if(H("maybeReadMore read 0"),b.read(0),d===E.length)break}E.readingMore=!1}Q.prototype._read=function(b){s(this,new g("_read()"))},Q.prototype.pipe=function(b,E){var d=this,e=this._readableState;switch(e.pipesCount){case 0:e.pipes=b;break;case 1:e.pipes=[e.pipes,b];break;default:e.pipes.push(b);break}e.pipesCount+=1,H("pipe count=%d opts=%j",e.pipesCount,E);var V0=(!E||E.end!==!1)&&b!==process.stdout&&b!==process.stderr,W0=V0?Y0:c;e.endEmitted?process.nextTick(W0):d.once("end",W0),b.on("unpipe",J0);function J0(o,i){H("onunpipe"),o===d&&i&&i.hasUnpiped===!1&&(i.hasUnpiped=!0,$0())}function Y0(){H("onend"),b.end()}var X0=y(d);b.on("drain",X0);var g0=!1;function $0(){H("cleanup"),b.removeListener("close",I),b.removeListener("finish",S),b.removeListener("drain",X0),b.removeListener("error",_0),b.removeListener("unpipe",J0),d.removeListener("end",Y0),d.removeListener("end",c),d.removeListener("data",z0),g0=!0,e.awaitDrain&&(!b._writableState||b._writableState.needDrain)&&X0()}d.on("data",z0);function z0(o){H("ondata");var i=b.write(o);H("dest.write",i),i===!1&&((e.pipesCount===1&&e.pipes===b||e.pipesCount>1&&F0(e.pipes,b)!==-1)&&!g0&&(H("false write response, pause",e.awaitDrain),e.awaitDrain++),d.pause())}function _0(o){H("onerror",o),c(),b.removeListener("error",_0),Z(b,"error")===0&&s(b,o)}u(b,"error",_0);function I(){b.removeListener("finish",S),c()}b.once("close",I);function S(){H("onfinish"),b.removeListener("close",I),c()}b.once("finish",S);function c(){H("unpipe"),d.unpipe(b)}return b.emit("pipe",d),e.flowing||(H("pipe resume"),d.resume()),b};function y(b){return function(){var E=b._readableState;H("pipeOnDrain",E.awaitDrain),E.awaitDrain&&E.awaitDrain--,E.awaitDrain===0&&Z(b,"data")&&(E.flowing=!0,h(b))}}Q.prototype.unpipe=function(b){var E=this._readableState,d={hasUnpiped:!1};if(E.pipesCount===0)return this;if(E.pipesCount===1)return b&&b!==E.pipes?this:(b||(b=E.pipes),E.pipes=null,E.pipesCount=0,E.flowing=!1,b&&b.emit("unpipe",this,d),this);if(!b){var{pipes:e,pipesCount:V0}=E;E.pipes=null,E.pipesCount=0,E.flowing=!1;for(var W0=0;W0<V0;W0++)e[W0].emit("unpipe",this,{hasUnpiped:!1});return this}var J0=F0(E.pipes,b);return J0===-1?this:(E.pipes.splice(J0,1),E.pipesCount-=1,E.pipesCount===1&&(E.pipes=E.pipes[0]),b.emit("unpipe",this,d),this)},Q.prototype.on=function(b,E){var d=N.prototype.on.call(this,b,E),e=this._readableState;return b==="data"?(e.readableListening=this.listenerCount("readable")>0,e.flowing!==!1&&this.resume()):b==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,H("on readable",e.length,e.reading),e.length?W(this):e.reading||process.nextTick(a,this)),d},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(b,E){var d=N.prototype.removeListener.call(this,b,E);return b==="readable"&&process.nextTick(r,this),d},Q.prototype.removeAllListeners=function(b){var E=N.prototype.removeAllListeners.apply(this,arguments);return(b==="readable"||b===void 0)&&process.nextTick(r,this),E};function r(b){var E=b._readableState;E.readableListening=b.listenerCount("readable")>0,E.resumeScheduled&&!E.paused?E.flowing=!0:b.listenerCount("data")>0&&b.resume()}function a(b){H("readable nexttick read 0"),b.read(0)}Q.prototype.resume=function(){var b=this._readableState;return b.flowing||(H("resume"),b.flowing=!b.readableListening,t(this,b)),b.paused=!1,this};function t(b,E){E.resumeScheduled||(E.resumeScheduled=!0,process.nextTick(l,b,E))}function l(b,E){H("resume",E.reading),E.reading||b.read(0),E.resumeScheduled=!1,b.emit("resume"),h(b),E.flowing&&!E.reading&&b.read(0)}Q.prototype.pause=function(){return H("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(H("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function h(b){var E=b._readableState;for(H("flow",E.flowing);E.flowing&&b.read()!==null;);}Q.prototype.wrap=function(b){var E=this,d=this._readableState,e=!1;b.on("end",function(){if(H("wrapped end"),d.decoder&&!d.ended){var J0=d.decoder.end();J0&&J0.length&&E.push(J0)}E.push(null)}),b.on("data",function(J0){if(H("wrapped data"),d.decoder&&(J0=d.decoder.write(J0)),!(d.objectMode&&J0==null)&&!(!d.objectMode&&(!J0||!J0.length))){var Y0=E.push(J0);Y0||(e=!0,b.pause())}});for(var V0 in b)this[V0]===void 0&&typeof b[V0]=="function"&&(this[V0]=function(J0){return function(){return b[J0].apply(b,arguments)}}(V0));for(var W0=0;W0<Q0.length;W0++)b.on(Q0[W0],this.emit.bind(this,Q0[W0]));return this._read=function(J0){H("wrapped _read",J0),e&&(e=!1,b.resume())},this},typeof Symbol=="function"&&(Q.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=TX()),m(this)}),Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(b){this._readableState&&(this._readableState.flowing=b)}}),Q._fromList=n,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function n(b,E){if(E.length===0)return null;var d;return E.objectMode?d=E.buffer.shift():!b||b>=E.length?(E.decoder?d=E.buffer.join(""):E.buffer.length===1?d=E.buffer.first():d=E.buffer.concat(E.length),E.buffer.clear()):d=E.buffer.consume(b,E.decoder),d}function q0(b){var E=b._readableState;H("endReadable",E.endEmitted),E.endEmitted||(E.ended=!0,process.nextTick(G0,E,b))}function G0(b,E){if(H("endReadableNT",b.endEmitted,b.length),!b.endEmitted&&b.length===0&&(b.endEmitted=!0,E.readable=!1,E.emit("end"),b.autoDestroy)){var d=E._writableState;(!d||d.autoDestroy&&d.finished)&&E.destroy()}}typeof Symbol=="function"&&(Q.from=function(b,E){return f===void 0&&(f=MX()),f(Q,b,E)});function F0(b,E){for(var d=0,e=b.length;d<e;d++)if(b[d]===E)return d;return-1}}),J3=Z0((Y,q)=>{q.exports=D;var F=e8().codes,O=F.ERR_METHOD_NOT_IMPLEMENTED,Z=F.ERR_MULTIPLE_CALLBACK,N=F.ERR_TRANSFORM_ALREADY_TRANSFORMING,V=F.ERR_TRANSFORM_WITH_LENGTH_0,C=r8();h0()(D,C);function B(P,R){var k=this._transformState;k.transforming=!1;var v=k.writecb;if(v===null)return this.emit("error",new Z);k.writechunk=null,k.writecb=null,R!=null&&this.push(R),v(P);var M=this._readableState;M.reading=!1,(M.needReadable||M.length<M.highWaterMark)&&this._read(M.highWaterMark)}function D(P){if(!(this instanceof D))return new D(P);C.call(this,P),this._transformState={afterTransform:B.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,P&&(typeof P.transform=="function"&&(this._transform=P.transform),typeof P.flush=="function"&&(this._flush=P.flush)),this.on("prefinish",L)}function L(){var P=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(R,k){H(P,R,k)}):H(this,null,null)}D.prototype.push=function(P,R){return this._transformState.needTransform=!1,C.prototype.push.call(this,P,R)},D.prototype._transform=function(P,R,k){k(new O("_transform()"))},D.prototype._write=function(P,R,k){var v=this._transformState;if(v.writecb=k,v.writechunk=P,v.writeencoding=R,!v.transforming){var M=this._readableState;(v.needTransform||M.needReadable||M.length<M.highWaterMark)&&this._read(M.highWaterMark)}},D.prototype._read=function(P){var R=this._transformState;R.writechunk!==null&&!R.transforming?(R.transforming=!0,this._transform(R.writechunk,R.writeencoding,R.afterTransform)):R.needTransform=!0},D.prototype._destroy=function(P,R){C.prototype._destroy.call(this,P,function(k){R(k)})};function H(P,R,k){if(R)return P.emit("error",R);if(k!=null&&P.push(k),P._writableState.length)throw new V;if(P._transformState.transforming)throw new N;return P.push(null)}}),AX=Z0((Y,q)=>{q.exports=O;var F=J3();h0()(O,F);function O(Z){if(!(this instanceof O))return new O(Z);F.call(this,Z)}O.prototype._transform=function(Z,N,V){V(null,Z)}}),vX=Z0((Y,q)=>{var F;function O(k){var v=!1;return function(){v||(v=!0,k.apply(void 0,arguments))}}var Z=e8().codes,N=Z.ERR_MISSING_ARGS,V=Z.ERR_STREAM_DESTROYED;function C(k){if(k)throw k}function B(k){return k.setHeader&&typeof k.abort=="function"}function D(k,v,M,w){w=O(w);var x=!1;k.on("close",function(){x=!0}),F===void 0&&(F=E5()),F(k,{readable:v,writable:M},function(_){if(_)return w(_);x=!0,w()});var g=!1;return function(_){if(!x&&!g){if(g=!0,B(k))return k.abort();if(typeof k.destroy=="function")return k.destroy();w(_||new V("pipe"))}}}function L(k){k()}function H(k,v){return k.pipe(v)}function P(k){return!k.length||typeof k[k.length-1]!="function"?C:k.pop()}function R(){for(var k=arguments.length,v=new Array(k),M=0;M<k;M++)v[M]=arguments[M];var w=P(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new N("streams");var x,g=v.map(function(_,p){var m=p<v.length-1,f=p>0;return D(_,m,f,function(s){x||(x=s),s&&g.forEach(L),!m&&(g.forEach(L),w(x))})});return v.reduce(H)}q.exports=R}),xX=Z0((Y,q)=>{Y=q.exports=V3(),Y.Stream=Y,Y.Readable=Y,Y.Writable=Y3(),Y.Duplex=r8(),Y.Transform=J3(),Y.PassThrough=AX(),Y.finished=E5(),Y.pipeline=vX()}),U3=Z0((Y,q)=>{var F=l0().Buffer,O=xX().Transform,Z=h0();function N(C,B){if(!F.isBuffer(C)&&typeof C!="string")throw new TypeError(B+" must be a string or a buffer")}function V(C){O.call(this),this._block=F.allocUnsafe(C),this._blockSize=C,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Z(V,O),V.prototype._transform=function(C,B,D){var L=null;try{this.update(C,B)}catch(H){L=H}D(L)},V.prototype._flush=function(C){var B=null;try{this.push(this.digest())}catch(D){B=D}C(B)},V.prototype.update=function(C,B){if(N(C,"Data"),this._finalized)throw new Error("Digest already called");F.isBuffer(C)||(C=F.from(C,B));for(var D=this._block,L=0;this._blockOffset+C.length-L>=this._blockSize;){for(var H=this._blockOffset;H<this._blockSize;)D[H++]=C[L++];this._update(),this._blockOffset=0}for(;L<C.length;)D[this._blockOffset++]=C[L++];for(var P=0,R=C.length*8;R>0;++P)this._length[P]+=R,R=this._length[P]/4294967296|0,R>0&&(this._length[P]-=4294967296*R);return this},V.prototype._update=function(){throw new Error("_update is not implemented")},V.prototype.digest=function(C){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var B=this._digest();C!==void 0&&(B=B.toString(C)),this._block.fill(0),this._blockOffset=0;for(var D=0;D<4;++D)this._length[D]=0;return B},V.prototype._digest=function(){throw new Error("_digest is not implemented")},q.exports=V}),w5=Z0((Y,q)=>{var F=h0(),O=U3(),Z=l0().Buffer,N=new Array(16);function V(){O.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}F(V,O),V.prototype._update=function(){for(var P=N,R=0;R<16;++R)P[R]=this._block.readInt32LE(R*4);var k=this._a,v=this._b,M=this._c,w=this._d;k=B(k,v,M,w,P[0],3614090360,7),w=B(w,k,v,M,P[1],3905402710,12),M=B(M,w,k,v,P[2],606105819,17),v=B(v,M,w,k,P[3],3250441966,22),k=B(k,v,M,w,P[4],4118548399,7),w=B(w,k,v,M,P[5],1200080426,12),M=B(M,w,k,v,P[6],2821735955,17),v=B(v,M,w,k,P[7],4249261313,22),k=B(k,v,M,w,P[8],1770035416,7),w=B(w,k,v,M,P[9],2336552879,12),M=B(M,w,k,v,P[10],4294925233,17),v=B(v,M,w,k,P[11],2304563134,22),k=B(k,v,M,w,P[12],1804603682,7),w=B(w,k,v,M,P[13],4254626195,12),M=B(M,w,k,v,P[14],2792965006,17),v=B(v,M,w,k,P[15],1236535329,22),k=D(k,v,M,w,P[1],4129170786,5),w=D(w,k,v,M,P[6],3225465664,9),M=D(M,w,k,v,P[11],643717713,14),v=D(v,M,w,k,P[0],3921069994,20),k=D(k,v,M,w,P[5],3593408605,5),w=D(w,k,v,M,P[10],38016083,9),M=D(M,w,k,v,P[15],3634488961,14),v=D(v,M,w,k,P[4],3889429448,20),k=D(k,v,M,w,P[9],568446438,5),w=D(w,k,v,M,P[14],3275163606,9),M=D(M,w,k,v,P[3],4107603335,14),v=D(v,M,w,k,P[8],1163531501,20),k=D(k,v,M,w,P[13],2850285829,5),w=D(w,k,v,M,P[2],4243563512,9),M=D(M,w,k,v,P[7],1735328473,14),v=D(v,M,w,k,P[12],2368359562,20),k=L(k,v,M,w,P[5],4294588738,4),w=L(w,k,v,M,P[8],2272392833,11),M=L(M,w,k,v,P[11],1839030562,16),v=L(v,M,w,k,P[14],4259657740,23),k=L(k,v,M,w,P[1],2763975236,4),w=L(w,k,v,M,P[4],1272893353,11),M=L(M,w,k,v,P[7],4139469664,16),v=L(v,M,w,k,P[10],3200236656,23),k=L(k,v,M,w,P[13],681279174,4),w=L(w,k,v,M,P[0],3936430074,11),M=L(M,w,k,v,P[3],3572445317,16),v=L(v,M,w,k,P[6],76029189,23),k=L(k,v,M,w,P[9],3654602809,4),w=L(w,k,v,M,P[12],3873151461,11),M=L(M,w,k,v,P[15],530742520,16),v=L(v,M,w,k,P[2],3299628645,23),k=H(k,v,M,w,P[0],4096336452,6),w=H(w,k,v,M,P[7],1126891415,10),M=H(M,w,k,v,P[14],2878612391,15),v=H(v,M,w,k,P[5],4237533241,21),k=H(k,v,M,w,P[12],1700485571,6),w=H(w,k,v,M,P[3],2399980690,10),M=H(M,w,k,v,P[10],4293915773,15),v=H(v,M,w,k,P[1],2240044497,21),k=H(k,v,M,w,P[8],1873313359,6),w=H(w,k,v,M,P[15],4264355552,10),M=H(M,w,k,v,P[6],2734768916,15),v=H(v,M,w,k,P[13],1309151649,21),k=H(k,v,M,w,P[4],4149444226,6),w=H(w,k,v,M,P[11],3174756917,10),M=H(M,w,k,v,P[2],718787259,15),v=H(v,M,w,k,P[9],3951481745,21),this._a=this._a+k|0,this._b=this._b+v|0,this._c=this._c+M|0,this._d=this._d+w|0},V.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 P=Z.allocUnsafe(16);return P.writeInt32LE(this._a,0),P.writeInt32LE(this._b,4),P.writeInt32LE(this._c,8),P.writeInt32LE(this._d,12),P};function C(P,R){return P<<R|P>>>32-R}function B(P,R,k,v,M,w,x){return C(P+(R&k|~R&v)+M+w|0,x)+R|0}function D(P,R,k,v,M,w,x){return C(P+(R&v|k&~v)+M+w|0,x)+R|0}function L(P,R,k,v,M,w,x){return C(P+(R^k^v)+M+w|0,x)+R|0}function H(P,R,k,v,M,w,x){return C(P+(k^(R|~v))+M+w|0,x)+R|0}q.exports=V}),g5=Z0((Y,q)=>{var F=R6().Buffer,O=h0(),Z=U3(),N=new Array(16),V=[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],C=[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],B=[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],D=[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],L=[0,1518500249,1859775393,2400959708,2840853838],H=[1352829926,1548603684,1836072691,2053994217,0];function P(){Z.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}O(P,Z),P.prototype._update=function(){for(var g=N,_=0;_<16;++_)g[_]=this._block.readInt32LE(_*4);for(var p=this._a|0,m=this._b|0,f=this._c|0,s=this._d|0,Q0=this._e|0,u=this._a|0,K0=this._b|0,Q=this._c|0,G=this._d|0,J=this._e|0,X=0;X<80;X+=1){var U,$;X<16?(U=k(p,m,f,s,Q0,g[V[X]],L[0],B[X]),$=x(u,K0,Q,G,J,g[C[X]],H[0],D[X])):X<32?(U=v(p,m,f,s,Q0,g[V[X]],L[1],B[X]),$=w(u,K0,Q,G,J,g[C[X]],H[1],D[X])):X<48?(U=M(p,m,f,s,Q0,g[V[X]],L[2],B[X]),$=M(u,K0,Q,G,J,g[C[X]],H[2],D[X])):X<64?(U=w(p,m,f,s,Q0,g[V[X]],L[3],B[X]),$=v(u,K0,Q,G,J,g[C[X]],H[3],D[X])):(U=x(p,m,f,s,Q0,g[V[X]],L[4],B[X]),$=k(u,K0,Q,G,J,g[C[X]],H[4],D[X])),p=Q0,Q0=s,s=R(f,10),f=m,m=U,u=J,J=G,G=R(Q,10),Q=K0,K0=$}var j=this._b+f+G|0;this._b=this._c+s+J|0,this._c=this._d+Q0+u|0,this._d=this._e+p+K0|0,this._e=this._a+m+Q|0,this._a=j},P.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 g=F.alloc?F.alloc(20):new F(20);return g.writeInt32LE(this._a,0),g.writeInt32LE(this._b,4),g.writeInt32LE(this._c,8),g.writeInt32LE(this._d,12),g.writeInt32LE(this._e,16),g};function R(g,_){return g<<_|g>>>32-_}function k(g,_,p,m,f,s,Q0,u){return R(g+(_^p^m)+s+Q0|0,u)+f|0}function v(g,_,p,m,f,s,Q0,u){return R(g+(_&p|~_&m)+s+Q0|0,u)+f|0}function M(g,_,p,m,f,s,Q0,u){return R(g+((_|~p)^m)+s+Q0|0,u)+f|0}function w(g,_,p,m,f,s,Q0,u){return R(g+(_&m|p&~m)+s+Q0|0,u)+f|0}function x(g,_,p,m,f,s,Q0,u){return R(g+(_^(p|~m))+s+Q0|0,u)+f|0}q.exports=P}),Q1=Z0((Y,q)=>{var F=l0().Buffer;function O(Z,N){this._block=F.alloc(Z),this._finalSize=N,this._blockSize=Z,this._len=0}O.prototype.update=function(Z,N){typeof Z=="string"&&(N=N||"utf8",Z=F.from(Z,N));for(var V=this._block,C=this._blockSize,B=Z.length,D=this._len,L=0;L<B;){for(var H=D%C,P=Math.min(B-L,C-H),R=0;R<P;R++)V[H+R]=Z[L+R];D+=P,L+=P,D%C===0&&this._update(V)}return this._len+=B,this},O.prototype.digest=function(Z){var N=this._len%this._blockSize;this._block[N]=128,this._block.fill(0,N+1),N>=this._finalSize&&(this._update(this._block),this._block.fill(0));var V=this._len*8;if(V<=4294967295)this._block.writeUInt32BE(V,this._blockSize-4);else{var C=(V&4294967295)>>>0,B=(V-C)/4294967296;this._block.writeUInt32BE(B,this._blockSize-8),this._block.writeUInt32BE(C,this._blockSize-4)}this._update(this._block);var D=this._hash();return Z?D.toString(Z):D},O.prototype._update=function(){throw new Error("_update must be implemented by subclass")},q.exports=O}),SX=Z0((Y,q)=>{var F=h0(),O=Q1(),Z=l0().Buffer,N=[1518500249,1859775393,-1894007588,-899497514],V=new Array(80);function C(){this.init(),this._w=V,O.call(this,64,56)}F(C,O),C.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function B(H){return H<<5|H>>>27}function D(H){return H<<30|H>>>2}function L(H,P,R,k){return H===0?P&R|~P&k:H===2?P&R|P&k|R&k:P^R^k}C.prototype._update=function(H){for(var P=this._w,R=this._a|0,k=this._b|0,v=this._c|0,M=this._d|0,w=this._e|0,x=0;x<16;++x)P[x]=H.readInt32BE(x*4);for(;x<80;++x)P[x]=P[x-3]^P[x-8]^P[x-14]^P[x-16];for(var g=0;g<80;++g){var _=~~(g/20),p=B(R)+L(_,k,v,M)+w+P[g]+N[_]|0;w=M,M=v,v=D(k),k=R,R=p}this._a=R+this._a|0,this._b=k+this._b|0,this._c=v+this._c|0,this._d=M+this._d|0,this._e=w+this._e|0},C.prototype._hash=function(){var H=Z.allocUnsafe(20);return H.writeInt32BE(this._a|0,0),H.writeInt32BE(this._b|0,4),H.writeInt32BE(this._c|0,8),H.writeInt32BE(this._d|0,12),H.writeInt32BE(this._e|0,16),H},q.exports=C}),EX=Z0((Y,q)=>{var F=h0(),O=Q1(),Z=l0().Buffer,N=[1518500249,1859775393,-1894007588,-899497514],V=new Array(80);function C(){this.init(),this._w=V,O.call(this,64,56)}F(C,O),C.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function B(P){return P<<1|P>>>31}function D(P){return P<<5|P>>>27}function L(P){return P<<30|P>>>2}function H(P,R,k,v){return P===0?R&k|~R&v:P===2?R&k|R&v|k&v:R^k^v}C.prototype._update=function(P){for(var R=this._w,k=this._a|0,v=this._b|0,M=this._c|0,w=this._d|0,x=this._e|0,g=0;g<16;++g)R[g]=P.readInt32BE(g*4);for(;g<80;++g)R[g]=B(R[g-3]^R[g-8]^R[g-14]^R[g-16]);for(var _=0;_<80;++_){var p=~~(_/20),m=D(k)+H(p,v,M,w)+x+R[_]+N[p]|0;x=w,w=M,M=L(v),v=k,k=m}this._a=k+this._a|0,this._b=v+this._b|0,this._c=M+this._c|0,this._d=w+this._d|0,this._e=x+this._e|0},C.prototype._hash=function(){var P=Z.allocUnsafe(20);return P.writeInt32BE(this._a|0,0),P.writeInt32BE(this._b|0,4),P.writeInt32BE(this._c|0,8),P.writeInt32BE(this._d|0,12),P.writeInt32BE(this._e|0,16),P},q.exports=C}),F3=Z0((Y,q)=>{var F=h0(),O=Q1(),Z=l0().Buffer,N=[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],V=new Array(64);function C(){this.init(),this._w=V,O.call(this,64,56)}F(C,O),C.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 B(k,v,M){return M^k&(v^M)}function D(k,v,M){return k&v|M&(k|v)}function L(k){return(k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10)}function H(k){return(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7)}function P(k){return(k>>>7|k<<25)^(k>>>18|k<<14)^k>>>3}function R(k){return(k>>>17|k<<15)^(k>>>19|k<<13)^k>>>10}C.prototype._update=function(k){for(var v=this._w,M=this._a|0,w=this._b|0,x=this._c|0,g=this._d|0,_=this._e|0,p=this._f|0,m=this._g|0,f=this._h|0,s=0;s<16;++s)v[s]=k.readInt32BE(s*4);for(;s<64;++s)v[s]=R(v[s-2])+v[s-7]+P(v[s-15])+v[s-16]|0;for(var Q0=0;Q0<64;++Q0){var u=f+H(_)+B(_,p,m)+N[Q0]+v[Q0]|0,K0=L(M)+D(M,w,x)|0;f=m,m=p,p=_,_=g+u|0,g=x,x=w,w=M,M=u+K0|0}this._a=M+this._a|0,this._b=w+this._b|0,this._c=x+this._c|0,this._d=g+this._d|0,this._e=_+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=f+this._h|0},C.prototype._hash=function(){var k=Z.allocUnsafe(32);return k.writeInt32BE(this._a,0),k.writeInt32BE(this._b,4),k.writeInt32BE(this._c,8),k.writeInt32BE(this._d,12),k.writeInt32BE(this._e,16),k.writeInt32BE(this._f,20),k.writeInt32BE(this._g,24),k.writeInt32BE(this._h,28),k},q.exports=C}),wX=Z0((Y,q)=>{var F=h0(),O=F3(),Z=Q1(),N=l0().Buffer,V=new Array(64);function C(){this.init(),this._w=V,Z.call(this,64,56)}F(C,O),C.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},C.prototype._hash=function(){var B=N.allocUnsafe(28);return B.writeInt32BE(this._a,0),B.writeInt32BE(this._b,4),B.writeInt32BE(this._c,8),B.writeInt32BE(this._d,12),B.writeInt32BE(this._e,16),B.writeInt32BE(this._f,20),B.writeInt32BE(this._g,24),B},q.exports=C}),K3=Z0((Y,q)=>{var F=h0(),O=Q1(),Z=l0().Buffer,N=[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],V=new Array(160);function C(){this.init(),this._w=V,O.call(this,128,112)}F(C,O),C.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 B(w,x,g){return g^w&(x^g)}function D(w,x,g){return w&x|g&(w|x)}function L(w,x){return(w>>>28|x<<4)^(x>>>2|w<<30)^(x>>>7|w<<25)}function H(w,x){return(w>>>14|x<<18)^(w>>>18|x<<14)^(x>>>9|w<<23)}function P(w,x){return(w>>>1|x<<31)^(w>>>8|x<<24)^w>>>7}function R(w,x){return(w>>>1|x<<31)^(w>>>8|x<<24)^(w>>>7|x<<25)}function k(w,x){return(w>>>19|x<<13)^(x>>>29|w<<3)^w>>>6}function v(w,x){return(w>>>19|x<<13)^(x>>>29|w<<3)^(w>>>6|x<<26)}function M(w,x){return w>>>0<x>>>0?1:0}C.prototype._update=function(w){for(var x=this._w,g=this._ah|0,_=this._bh|0,p=this._ch|0,m=this._dh|0,f=this._eh|0,s=this._fh|0,Q0=this._gh|0,u=this._hh|0,K0=this._al|0,Q=this._bl|0,G=this._cl|0,J=this._dl|0,X=this._el|0,U=this._fl|0,$=this._gl|0,j=this._hl|0,K=0;K<32;K+=2)x[K]=w.readInt32BE(K*4),x[K+1]=w.readInt32BE(K*4+4);for(;K<160;K+=2){var W=x[K-30],z=x[K-30+1],A=P(W,z),T=R(z,W);W=x[K-4],z=x[K-4+1];var y=k(W,z),r=v(z,W),a=x[K-14],t=x[K-14+1],l=x[K-32],h=x[K-32+1],n=T+t|0,q0=A+a+M(n,T)|0;n=n+r|0,q0=q0+y+M(n,r)|0,n=n+h|0,q0=q0+l+M(n,h)|0,x[K]=q0,x[K+1]=n}for(var G0=0;G0<160;G0+=2){q0=x[G0],n=x[G0+1];var F0=D(g,_,p),b=D(K0,Q,G),E=L(g,K0),d=L(K0,g),e=H(f,X),V0=H(X,f),W0=N[G0],J0=N[G0+1],Y0=B(f,s,Q0),X0=B(X,U,$),g0=j+V0|0,$0=u+e+M(g0,j)|0;g0=g0+X0|0,$0=$0+Y0+M(g0,X0)|0,g0=g0+J0|0,$0=$0+W0+M(g0,J0)|0,g0=g0+n|0,$0=$0+q0+M(g0,n)|0;var z0=d+b|0,_0=E+F0+M(z0,d)|0;u=Q0,j=$,Q0=s,$=U,s=f,U=X,X=J+g0|0,f=m+$0+M(X,J)|0,m=p,J=G,p=_,G=Q,_=g,Q=K0,K0=g0+z0|0,g=$0+_0+M(K0,g0)|0}this._al=this._al+K0|0,this._bl=this._bl+Q|0,this._cl=this._cl+G|0,this._dl=this._dl+J|0,this._el=this._el+X|0,this._fl=this._fl+U|0,this._gl=this._gl+$|0,this._hl=this._hl+j|0,this._ah=this._ah+g+M(this._al,K0)|0,this._bh=this._bh+_+M(this._bl,Q)|0,this._ch=this._ch+p+M(this._cl,G)|0,this._dh=this._dh+m+M(this._dl,J)|0,this._eh=this._eh+f+M(this._el,X)|0,this._fh=this._fh+s+M(this._fl,U)|0,this._gh=this._gh+Q0+M(this._gl,$)|0,this._hh=this._hh+u+M(this._hl,j)|0},C.prototype._hash=function(){var w=Z.allocUnsafe(64);function x(g,_,p){w.writeInt32BE(g,p),w.writeInt32BE(_,p+4)}return x(this._ah,this._al,0),x(this._bh,this._bl,8),x(this._ch,this._cl,16),x(this._dh,this._dl,24),x(this._eh,this._el,32),x(this._fh,this._fl,40),x(this._gh,this._gl,48),x(this._hh,this._hl,56),w},q.exports=C}),gX=Z0((Y,q)=>{var F=h0(),O=K3(),Z=Q1(),N=l0().Buffer,V=new Array(160);function C(){this.init(),this._w=V,Z.call(this,128,112)}F(C,O),C.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},C.prototype._hash=function(){var B=N.allocUnsafe(48);function D(L,H,P){B.writeInt32BE(L,P),B.writeInt32BE(H,P+4)}return D(this._ah,this._al,0),D(this._bh,this._bl,8),D(this._ch,this._cl,16),D(this._dh,this._dl,24),D(this._eh,this._el,32),D(this._fh,this._fl,40),B},q.exports=C}),y5=Z0((F,q)=>{var F=q.exports=function(O){O=O.toLowerCase();var Z=F[O];if(!Z)throw new Error(O+" is not supported (we accept pull requests)");return new Z};F.sha=SX(),F.sha1=EX(),F.sha224=wX(),F.sha256=F3(),F.sha384=gX(),F.sha512=K3()}),P6=Z0((Y,q)=>{q.exports={ArrayIsArray(F){return Array.isArray(F)},ArrayPrototypeIncludes(F,O){return F.includes(O)},ArrayPrototypeIndexOf(F,O){return F.indexOf(O)},ArrayPrototypeJoin(F,O){return F.join(O)},ArrayPrototypeMap(F,O){return F.map(O)},ArrayPrototypePop(F,O){return F.pop(O)},ArrayPrototypePush(F,O){return F.push(O)},ArrayPrototypeSlice(F,O,Z){return F.slice(O,Z)},Error,FunctionPrototypeCall(F,O,...Z){return F.call(O,...Z)},FunctionPrototypeSymbolHasInstance(F,O){return Function.prototype[Symbol.hasInstance].call(F,O)},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(F,O){return Object.defineProperties(F,O)},ObjectDefineProperty(F,O,Z){return Object.defineProperty(F,O,Z)},ObjectGetOwnPropertyDescriptor(F,O){return Object.getOwnPropertyDescriptor(F,O)},ObjectKeys(F){return Object.keys(F)},ObjectSetPrototypeOf(F,O){return Object.setPrototypeOf(F,O)},Promise,PromisePrototypeCatch(F,O){return F.catch(O)},PromisePrototypeThen(F,O,Z){return F.then(O,Z)},PromiseReject(F){return Promise.reject(F)},ReflectApply:Reflect.apply,RegExpPrototypeTest(F,O){return F.test(O)},SafeSet:Set,String,StringPrototypeSlice(F,O,Z){return F.slice(O,Z)},StringPrototypeToLowerCase(F){return F.toLowerCase()},StringPrototypeToUpperCase(F){return F.toUpperCase()},StringPrototypeTrim(F){return F.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(F,O,Z){return F.set(O,Z)},Uint8Array}}),e6=Z0((Y,q)=>{var F=R6(),O=Object.getPrototypeOf(async function(){}).constructor,Z=globalThis.Blob||F.Blob,N=typeof Z<"u"?function(C){return C instanceof Z}:function(C){return!1},V=class extends Error{constructor(C){if(!Array.isArray(C))throw new TypeError(`Expected input to be an Array, got ${typeof C}`);let B="";for(let D=0;D<C.length;D++)B+=` ${C[D].stack}
|
|
3
|
+
`;super(B),this.name="AggregateError",this.errors=C}};q.exports={AggregateError:V,kEmptyObject:Object.freeze({}),once(C){let B=!1;return function(...D){B||(B=!0,C.apply(this,D))}},createDeferredPromise:function(){let C,B;return{promise:new Promise((D,L)=>{C=D,B=L}),resolve:C,reject:B}},promisify(C){return new Promise((B,D)=>{C((L,...H)=>L?D(L):B(...H))})},debuglog(){return function(){}},format(C,...B){return C.replace(/%([sdifj])/g,function(...[D,L]){let H=B.shift();return L==="f"?H.toFixed(6):L==="j"?JSON.stringify(H):L==="s"&&typeof H=="object"?`${H.constructor!==Object?H.constructor.name:""} {}`.trim():H.toString()})},inspect(C){switch(typeof C){case"string":if(C.includes("'"))if(C.includes('"')){if(!C.includes("`")&&!C.includes("${"))return`\`${C}\``}else return`"${C}"`;return`'${C}'`;case"number":return isNaN(C)?"NaN":Object.is(C,-0)?String(C):C;case"bigint":return`${String(C)}n`;case"boolean":case"undefined":return String(C);case"object":return"{}"}},types:{isAsyncFunction(C){return C instanceof O},isArrayBufferView(C){return ArrayBuffer.isView(C)}},isBlob:N},q.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),_5=Z0((Y,q)=>{var{AbortController:F,AbortSignal:O}=typeof self<"u"?self:typeof window<"u"?window:void 0;q.exports=F,q.exports.AbortSignal=O,q.exports.default=F}),A6=Z0((Y,q)=>{var{format:F,inspect:O,AggregateError:Z}=e6(),N=globalThis.AggregateError||Z,V=Symbol("kIsNodeError"),C=["string","function","number","object","Function","Object","boolean","bigint","symbol"],B=/^([A-Z][a-z0-9]*)+$/,D="__node_internal_",L={};function H(x,g){if(!x)throw new L.ERR_INTERNAL_ASSERTION(g)}function P(x){let g="",_=x.length,p=x[0]==="-"?1:0;for(;_>=p+4;_-=3)g=`_${x.slice(_-3,_)}${g}`;return`${x.slice(0,_)}${g}`}function R(x,g,_){if(typeof g=="function")return H(g.length<=_.length,`Code: ${x}; The provided arguments length (${_.length}) does not match the required ones (${g.length}).`),g(..._);let p=(g.match(/%[dfijoOs]/g)||[]).length;return H(p===_.length,`Code: ${x}; The provided arguments length (${_.length}) does not match the required ones (${p}).`),_.length===0?g:F(g,..._)}function k(x,g,_){_||(_=Error);class p extends _{constructor(...m){super(R(x,g,m))}toString(){return`${this.name} [${x}]: ${this.message}`}}Object.defineProperties(p.prototype,{name:{value:_.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${x}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),p.prototype.code=x,p.prototype[V]=!0,L[x]=p}function v(x){let g=D+x.name;return Object.defineProperty(x,"name",{value:g}),x}function M(x,g){if(x&&g&&x!==g){if(Array.isArray(g.errors))return g.errors.push(x),g;let _=new N([g,x],g.message);return _.code=g.code,_}return x||g}var w=class extends Error{constructor(x="The operation was aborted",g=void 0){if(g!==void 0&&typeof g!="object")throw new L.ERR_INVALID_ARG_TYPE("options","Object",g);super(x,g),this.code="ABORT_ERR",this.name="AbortError"}};k("ERR_ASSERTION","%s",Error),k("ERR_INVALID_ARG_TYPE",(x,g,_)=>{H(typeof x=="string","'name' must be a string"),Array.isArray(g)||(g=[g]);let p="The ";x.endsWith(" argument")?p+=`${x} `:p+=`"${x}" ${x.includes(".")?"property":"argument"} `,p+="must be ";let m=[],f=[],s=[];for(let u of g)H(typeof u=="string","All expected entries have to be of type string"),C.includes(u)?m.push(u.toLowerCase()):B.test(u)?f.push(u):(H(u!=="object",'The value "object" should be written as "Object"'),s.push(u));if(f.length>0){let u=m.indexOf("object");u!==-1&&(m.splice(m,u,1),f.push("Object"))}if(m.length>0){switch(m.length){case 1:p+=`of type ${m[0]}`;break;case 2:p+=`one of type ${m[0]} or ${m[1]}`;break;default:{let u=m.pop();p+=`one of type ${m.join(", ")}, or ${u}`}}(f.length>0||s.length>0)&&(p+=" or ")}if(f.length>0){switch(f.length){case 1:p+=`an instance of ${f[0]}`;break;case 2:p+=`an instance of ${f[0]} or ${f[1]}`;break;default:{let u=f.pop();p+=`an instance of ${f.join(", ")}, or ${u}`}}s.length>0&&(p+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(p+="an "),p+=`${s[0]}`;break;case 2:p+=`one of ${s[0]} or ${s[1]}`;break;default:{let u=s.pop();p+=`one of ${s.join(", ")}, or ${u}`}}if(_==null)p+=`. Received ${_}`;else if(typeof _=="function"&&_.name)p+=`. Received function ${_.name}`;else if(typeof _=="object"){var Q0;(Q0=_.constructor)!==null&&Q0!==void 0&&Q0.name?p+=`. Received an instance of ${_.constructor.name}`:p+=`. Received ${O(_,{depth:-1})}`}else{let u=O(_,{colors:!1});u.length>25&&(u=`${u.slice(0,25)}...`),p+=`. Received type ${typeof _} (${u})`}return p},TypeError),k("ERR_INVALID_ARG_VALUE",(x,g,_="is invalid")=>{let p=O(g);return p.length>128&&(p=p.slice(0,128)+"..."),`The ${x.includes(".")?"property":"argument"} '${x}' ${_}. Received ${p}`},TypeError),k("ERR_INVALID_RETURN_VALUE",(x,g,_)=>{var p;let m=_!=null&&(p=_.constructor)!==null&&p!==void 0&&p.name?`instance of ${_.constructor.name}`:`type ${typeof _}`;return`Expected ${x} to be returned from the "${g}" function but got ${m}.`},TypeError),k("ERR_MISSING_ARGS",(...x)=>{H(x.length>0,"At least one arg needs to be specified");let g,_=x.length;switch(x=(Array.isArray(x)?x:[x]).map((p)=>`"${p}"`).join(" or "),_){case 1:g+=`The ${x[0]} argument`;break;case 2:g+=`The ${x[0]} and ${x[1]} arguments`;break;default:{let p=x.pop();g+=`The ${x.join(", ")}, and ${p} arguments`}break}return`${g} must be specified`},TypeError),k("ERR_OUT_OF_RANGE",(x,g,_)=>{H(g,'Missing "range" argument');let p;return Number.isInteger(_)&&Math.abs(_)>4294967296?p=P(String(_)):typeof _=="bigint"?(p=String(_),(_>2n**32n||_<-(2n**32n))&&(p=P(p)),p+="n"):p=O(_),`The value of "${x}" is out of range. It must be ${g}. Received ${p}`},RangeError),k("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),k("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),k("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),k("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),k("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),k("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),k("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),k("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),k("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),k("ERR_STREAM_WRITE_AFTER_END","write after end",Error),k("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),q.exports={AbortError:w,aggregateTwoErrors:v(M),hideStackFrames:v,codes:L}}),D7=Z0((Y,q)=>{var{ArrayIsArray:F,ArrayPrototypeIncludes:O,ArrayPrototypeJoin:Z,ArrayPrototypeMap:N,NumberIsInteger:V,NumberIsNaN:C,NumberMAX_SAFE_INTEGER:B,NumberMIN_SAFE_INTEGER:D,NumberParseInt:L,ObjectPrototypeHasOwnProperty:H,RegExpPrototypeExec:P,String:R,StringPrototypeToUpperCase:k,StringPrototypeTrim:v}=P6(),{hideStackFrames:M,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:x,ERR_INVALID_ARG_VALUE:g,ERR_OUT_OF_RANGE:_,ERR_UNKNOWN_SIGNAL:p}}=A6(),{normalizeEncoding:m}=e6(),{isAsyncFunction:f,isArrayBufferView:s}=e6().types,Q0={};function u(J0){return J0===(J0|0)}function K0(J0){return J0===J0>>>0}var Q=/^[0-7]+$/,G="must be a 32-bit unsigned integer or an octal string";function J(J0,Y0,X0){if(typeof J0>"u"&&(J0=X0),typeof J0=="string"){if(P(Q,J0)===null)throw new g(Y0,J0,G);J0=L(J0,8)}return $(J0,Y0),J0}var X=M((J0,Y0,X0=D,g0=B)=>{if(typeof J0!="number")throw new x(Y0,"number",J0);if(!V(J0))throw new _(Y0,"an integer",J0);if(J0<X0||J0>g0)throw new _(Y0,`>= ${X0} && <= ${g0}`,J0)}),U=M((J0,Y0,X0=-2147483648,g0=2147483647)=>{if(typeof J0!="number")throw new x(Y0,"number",J0);if(!V(J0))throw new _(Y0,"an integer",J0);if(J0<X0||J0>g0)throw new _(Y0,`>= ${X0} && <= ${g0}`,J0)}),$=M((J0,Y0,X0=!1)=>{if(typeof J0!="number")throw new x(Y0,"number",J0);if(!V(J0))throw new _(Y0,"an integer",J0);let g0=X0?1:0,$0=4294967295;if(J0<g0||J0>$0)throw new _(Y0,`>= ${g0} && <= ${$0}`,J0)});function j(J0,Y0){if(typeof J0!="string")throw new x(Y0,"string",J0)}function K(J0,Y0,X0=void 0,g0){if(typeof J0!="number")throw new x(Y0,"number",J0);if(X0!=null&&J0<X0||g0!=null&&J0>g0||(X0!=null||g0!=null)&&C(J0))throw new _(Y0,`${X0!=null?`>= ${X0}`:""}${X0!=null&&g0!=null?" && ":""}${g0!=null?`<= ${g0}`:""}`,J0)}var W=M((J0,Y0,X0)=>{if(!O(X0,J0)){let g0=Z(N(X0,(z0)=>typeof z0=="string"?`'${z0}'`:R(z0)),", "),$0="must be one of: "+g0;throw new g(Y0,J0,$0)}});function z(J0,Y0){if(typeof J0!="boolean")throw new x(Y0,"boolean",J0)}function A(J0,Y0,X0){return J0==null||!H(J0,Y0)?X0:J0[Y0]}var T=M((J0,Y0,X0=null)=>{let g0=A(X0,"allowArray",!1),$0=A(X0,"allowFunction",!1);if(!A(X0,"nullable",!1)&&J0===null||!g0&&F(J0)||typeof J0!="object"&&(!$0||typeof J0!="function"))throw new x(Y0,"Object",J0)}),y=M((J0,Y0)=>{if(J0!=null&&typeof J0!="object"&&typeof J0!="function")throw new x(Y0,"a dictionary",J0)}),r=M((J0,Y0,X0=0)=>{if(!F(J0))throw new x(Y0,"Array",J0);if(J0.length<X0){let g0=`must be longer than ${X0}`;throw new g(Y0,J0,g0)}});function a(J0,Y0){r(J0,Y0);for(let X0=0;X0<J0.length;X0++)j(J0[X0],`${Y0}[${X0}]`)}function t(J0,Y0){r(J0,Y0);for(let X0=0;X0<J0.length;X0++)z(J0[X0],`${Y0}[${X0}]`)}function l(J0,Y0="signal"){if(j(J0,Y0),Q0[J0]===void 0)throw Q0[k(J0)]!==void 0?new p(J0+" (signals must use all capital letters)"):new p(J0)}var h=M((J0,Y0="buffer")=>{if(!s(J0))throw new x(Y0,["Buffer","TypedArray","DataView"],J0)});function n(J0,Y0){let X0=m(Y0),g0=J0.length;if(X0==="hex"&&g0%2!==0)throw new g("encoding",Y0,`is invalid for data of length ${g0}`)}function q0(J0,Y0="Port",X0=!0){if(typeof J0!="number"&&typeof J0!="string"||typeof J0=="string"&&v(J0).length===0||+J0!==+J0>>>0||J0>65535||J0===0&&!X0)throw new w(Y0,J0,X0);return J0|0}var G0=M((J0,Y0)=>{if(J0!==void 0&&(J0===null||typeof J0!="object"||!("aborted"in J0)))throw new x(Y0,"AbortSignal",J0)}),F0=M((J0,Y0)=>{if(typeof J0!="function")throw new x(Y0,"Function",J0)}),b=M((J0,Y0)=>{if(typeof J0!="function"||f(J0))throw new x(Y0,"Function",J0)}),E=M((J0,Y0)=>{if(J0!==void 0)throw new x(Y0,"undefined",J0)});function d(J0,Y0,X0){if(!O(X0,J0))throw new x(Y0,`('${Z(X0,"|")}')`,J0)}var e=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function V0(J0,Y0){if(typeof J0>"u"||!P(e,J0))throw new g(Y0,J0,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function W0(J0){if(typeof J0=="string")return V0(J0,"hints"),J0;if(F(J0)){let Y0=J0.length,X0="";if(Y0===0)return X0;for(let g0=0;g0<Y0;g0++){let $0=J0[g0];V0($0,"hints"),X0+=$0,g0!==Y0-1&&(X0+=", ")}return X0}throw new g("hints",J0,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}q.exports={isInt32:u,isUint32:K0,parseFileMode:J,validateArray:r,validateStringArray:a,validateBooleanArray:t,validateBoolean:z,validateBuffer:h,validateDictionary:y,validateEncoding:n,validateFunction:F0,validateInt32:U,validateInteger:X,validateNumber:K,validateObject:T,validateOneOf:W,validatePlainFunction:b,validatePort:q0,validateSignalName:l,validateString:j,validateUint32:$,validateUndefined:E,validateUnion:d,validateAbortSignal:G0,validateLinkHeaderValue:W0}}),s4=Z0((Y,q)=>{var F=q.exports={},O,Z;function N(){throw new Error("setTimeout has not been defined")}function V(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?O=setTimeout:O=N}catch{O=N}try{typeof clearTimeout=="function"?Z=clearTimeout:Z=V}catch{Z=V}})();function C(w){if(O===setTimeout)return setTimeout(w,0);if((O===N||!O)&&setTimeout)return O=setTimeout,setTimeout(w,0);try{return O(w,0)}catch{try{return O.call(null,w,0)}catch{return O.call(this,w,0)}}}function B(w){if(Z===clearTimeout)return clearTimeout(w);if((Z===V||!Z)&&clearTimeout)return Z=clearTimeout,clearTimeout(w);try{return Z(w)}catch{try{return Z.call(null,w)}catch{return Z.call(this,w)}}}var D=[],L=!1,H,P=-1;function R(){!L||!H||(L=!1,H.length?D=H.concat(D):P=-1,D.length&&k())}function k(){if(!L){var w=C(R);L=!0;for(var x=D.length;x;){for(H=D,D=[];++P<x;)H&&H[P].run();P=-1,x=D.length}H=null,L=!1,B(w)}}F.nextTick=function(w){var x=new Array(arguments.length-1);if(arguments.length>1)for(var g=1;g<arguments.length;g++)x[g-1]=arguments[g];D.push(new v(w,x)),D.length===1&&!L&&C(k)};function v(w,x){this.fun=w,this.array=x}v.prototype.run=function(){this.fun.apply(null,this.array)},F.title="browser",F.browser=!0,F.env={},F.argv=[],F.version="",F.versions={};function M(){}F.on=M,F.addListener=M,F.once=M,F.off=M,F.removeListener=M,F.removeAllListeners=M,F.emit=M,F.prependListener=M,F.prependOnceListener=M,F.listeners=function(w){return[]},F.binding=function(w){throw new Error("process.binding is not supported")},F.cwd=function(){return"/"},F.chdir=function(w){throw new Error("process.chdir is not supported")},F.umask=function(){return 0}}),W8={};C7(W8,{default:()=>z3});var z3,S8=v5(()=>{x5(W8,v8(s4())),z3=v8(s4())}),G8=Z0((Y,q)=>{var{Symbol:F,SymbolAsyncIterator:O,SymbolIterator:Z,SymbolFor:N}=P6(),V=F("kDestroyed"),C=F("kIsErrored"),B=F("kIsReadable"),D=F("kIsDisturbed"),L=N("nodejs.webstream.isClosedPromise"),H=N("nodejs.webstream.controllerErrorFunction");function P(A,T=!1){var y;return!!(A&&typeof A.pipe=="function"&&typeof A.on=="function"&&(!T||typeof A.pause=="function"&&typeof A.resume=="function")&&(!A._writableState||((y=A._readableState)===null||y===void 0?void 0:y.readable)!==!1)&&(!A._writableState||A._readableState))}function R(A){var T;return!!(A&&typeof A.write=="function"&&typeof A.on=="function"&&(!A._readableState||((T=A._writableState)===null||T===void 0?void 0:T.writable)!==!1))}function k(A){return!!(A&&typeof A.pipe=="function"&&A._readableState&&typeof A.on=="function"&&typeof A.write=="function")}function v(A){return A&&(A._readableState||A._writableState||typeof A.write=="function"&&typeof A.on=="function"||typeof A.pipe=="function"&&typeof A.on=="function")}function M(A){return!!(A&&!v(A)&&typeof A.pipeThrough=="function"&&typeof A.getReader=="function"&&typeof A.cancel=="function")}function w(A){return!!(A&&!v(A)&&typeof A.getWriter=="function"&&typeof A.abort=="function")}function x(A){return!!(A&&!v(A)&&typeof A.readable=="object"&&typeof A.writable=="object")}function g(A){return M(A)||w(A)||x(A)}function _(A,T){return A==null?!1:T===!0?typeof A[O]=="function":T===!1?typeof A[Z]=="function":typeof A[O]=="function"||typeof A[Z]=="function"}function p(A){if(!v(A))return null;let{_writableState:T,_readableState:y}=A,r=T||y;return!!(A.destroyed||A[V]||r!=null&&r.destroyed)}function m(A){if(!R(A))return null;if(A.writableEnded===!0)return!0;let T=A._writableState;return T!=null&&T.errored?!1:typeof T?.ended!="boolean"?null:T.ended}function f(A,T){if(!R(A))return null;if(A.writableFinished===!0)return!0;let y=A._writableState;return y!=null&&y.errored?!1:typeof y?.finished!="boolean"?null:!!(y.finished||T===!1&&y.ended===!0&&y.length===0)}function s(A){if(!P(A))return null;if(A.readableEnded===!0)return!0;let T=A._readableState;return!T||T.errored?!1:typeof T?.ended!="boolean"?null:T.ended}function Q0(A,T){if(!P(A))return null;let y=A._readableState;return y!=null&&y.errored?!1:typeof y?.endEmitted!="boolean"?null:!!(y.endEmitted||T===!1&&y.ended===!0&&y.length===0)}function u(A){return A&&A[B]!=null?A[B]:typeof A?.readable!="boolean"?null:p(A)?!1:P(A)&&A.readable&&!Q0(A)}function K0(A){return typeof A?.writable!="boolean"?null:p(A)?!1:R(A)&&A.writable&&!m(A)}function Q(A,T){return v(A)?p(A)?!0:!(T?.readable!==!1&&u(A)||T?.writable!==!1&&K0(A)):null}function G(A){var T,y;return v(A)?A.writableErrored?A.writableErrored:(T=(y=A._writableState)===null||y===void 0?void 0:y.errored)!==null&&T!==void 0?T:null:null}function J(A){var T,y;return v(A)?A.readableErrored?A.readableErrored:(T=(y=A._readableState)===null||y===void 0?void 0:y.errored)!==null&&T!==void 0?T:null:null}function X(A){if(!v(A))return null;if(typeof A.closed=="boolean")return A.closed;let{_writableState:T,_readableState:y}=A;return typeof T?.closed=="boolean"||typeof y?.closed=="boolean"?T?.closed||y?.closed:typeof A._closed=="boolean"&&U(A)?A._closed:null}function U(A){return typeof A._closed=="boolean"&&typeof A._defaultKeepAlive=="boolean"&&typeof A._removedConnection=="boolean"&&typeof A._removedContLen=="boolean"}function $(A){return typeof A._sent100=="boolean"&&U(A)}function j(A){var T;return typeof A._consuming=="boolean"&&typeof A._dumped=="boolean"&&((T=A.req)===null||T===void 0?void 0:T.upgradeOrConnect)===void 0}function K(A){if(!v(A))return null;let{_writableState:T,_readableState:y}=A,r=T||y;return!r&&$(A)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function W(A){var T;return!!(A&&((T=A[D])!==null&&T!==void 0?T:A.readableDidRead||A.readableAborted))}function z(A){var T,y,r,a,t,l,h,n,q0,G0;return!!(A&&((T=(y=(r=(a=(t=(l=A[C])!==null&&l!==void 0?l:A.readableErrored)!==null&&t!==void 0?t:A.writableErrored)!==null&&a!==void 0?a:(h=A._readableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&r!==void 0?r:(n=A._writableState)===null||n===void 0?void 0:n.errorEmitted)!==null&&y!==void 0?y:(q0=A._readableState)===null||q0===void 0?void 0:q0.errored)!==null&&T!==void 0?T:(G0=A._writableState)===null||G0===void 0?void 0:G0.errored))}q.exports={kDestroyed:V,isDisturbed:W,kIsDisturbed:D,isErrored:z,kIsErrored:C,isReadable:u,kIsReadable:B,kIsClosedPromise:L,kControllerErrorFunction:H,isClosed:X,isDestroyed:p,isDuplexNodeStream:k,isFinished:Q,isIterable:_,isReadableNodeStream:P,isReadableStream:M,isReadableEnded:s,isReadableFinished:Q0,isReadableErrored:J,isNodeStream:v,isWebStream:g,isWritable:K0,isWritableNodeStream:R,isWritableStream:w,isWritableEnded:m,isWritableFinished:f,isWritableErrored:G,isServerRequest:j,isServerResponse:$,willEmitClose:K,isTransformStream:x}}),$8=Z0((Y,q)=>{var F=(S8(),g6(W8)),{AbortError:O,codes:Z}=A6(),{ERR_INVALID_ARG_TYPE:N,ERR_STREAM_PREMATURE_CLOSE:V}=Z,{kEmptyObject:C,once:B}=e6(),{validateAbortSignal:D,validateFunction:L,validateObject:H,validateBoolean:P}=D7(),{Promise:R,PromisePrototypeThen:k}=P6(),{isClosed:v,isReadable:M,isReadableNodeStream:w,isReadableStream:x,isReadableFinished:g,isReadableErrored:_,isWritable:p,isWritableNodeStream:m,isWritableStream:f,isWritableFinished:s,isWritableErrored:Q0,isNodeStream:u,willEmitClose:K0,kIsClosedPromise:Q}=G8();function G(j){return j.setHeader&&typeof j.abort=="function"}var J=()=>{};function X(j,K,W){var z,A;if(arguments.length===2?(W=K,K=C):K==null?K=C:H(K,"options"),L(W,"callback"),D(K.signal,"options.signal"),W=B(W),x(j)||f(j))return U(j,K,W);if(!u(j))throw new N("stream",["ReadableStream","WritableStream","Stream"],j);let T=(z=K.readable)!==null&&z!==void 0?z:w(j),y=(A=K.writable)!==null&&A!==void 0?A:m(j),r=j._writableState,a=j._readableState,t=()=>{j.writable||n()},l=K0(j)&&w(j)===T&&m(j)===y,h=s(j,!1),n=()=>{h=!0,j.destroyed&&(l=!1),!(l&&(!j.readable||T))&&(!T||q0)&&W.call(j)},q0=g(j,!1),G0=()=>{q0=!0,j.destroyed&&(l=!1),!(l&&(!j.writable||y))&&(!y||h)&&W.call(j)},F0=(W0)=>{W.call(j,W0)},b=v(j),E=()=>{b=!0;let W0=Q0(j)||_(j);if(W0&&typeof W0!="boolean")return W.call(j,W0);if(T&&!q0&&w(j,!0)&&!g(j,!1))return W.call(j,new V);if(y&&!h&&!s(j,!1))return W.call(j,new V);W.call(j)},d=()=>{b=!0;let W0=Q0(j)||_(j);if(W0&&typeof W0!="boolean")return W.call(j,W0);W.call(j)},e=()=>{j.req.on("finish",n)};G(j)?(j.on("complete",n),l||j.on("abort",E),j.req?e():j.on("request",e)):y&&!r&&(j.on("end",t),j.on("close",t)),!l&&typeof j.aborted=="boolean"&&j.on("aborted",E),j.on("end",G0),j.on("finish",n),K.error!==!1&&j.on("error",F0),j.on("close",E),b?F.nextTick(E):r!=null&&r.errorEmitted||a!=null&&a.errorEmitted?l||F.nextTick(d):(!T&&(!l||M(j))&&(h||p(j)===!1)||!y&&(!l||p(j))&&(q0||M(j)===!1)||a&&j.req&&j.aborted)&&F.nextTick(d);let V0=()=>{W=J,j.removeListener("aborted",E),j.removeListener("complete",n),j.removeListener("abort",E),j.removeListener("request",e),j.req&&j.req.removeListener("finish",n),j.removeListener("end",t),j.removeListener("close",t),j.removeListener("finish",n),j.removeListener("end",G0),j.removeListener("error",F0),j.removeListener("close",E)};if(K.signal&&!b){let W0=()=>{let J0=W;V0(),J0.call(j,new O(void 0,{cause:K.signal.reason}))};if(K.signal.aborted)F.nextTick(W0);else{let J0=W;W=B((...Y0)=>{K.signal.removeEventListener("abort",W0),J0.apply(j,Y0)}),K.signal.addEventListener("abort",W0)}}return V0}function U(j,K,W){let z=!1,A=J;if(K.signal)if(A=()=>{z=!0,W.call(j,new O(void 0,{cause:K.signal.reason}))},K.signal.aborted)F.nextTick(A);else{let y=W;W=B((...r)=>{K.signal.removeEventListener("abort",A),y.apply(j,r)}),K.signal.addEventListener("abort",A)}let T=(...y)=>{z||F.nextTick(()=>W.apply(j,y))};return k(j[Q].promise,T,T),J}function $(j,K){var W;let z=!1;return K===null&&(K=C),(W=K)!==null&&W!==void 0&&W.cleanup&&(P(K.cleanup,"cleanup"),z=K.cleanup),new R((A,T)=>{let y=X(j,K,(r)=>{z&&y(),r?T(r):A()})})}q.exports=X,q.exports.finished=$}),W1=Z0((Y,q)=>{var F=(S8(),g6(W8)),{aggregateTwoErrors:O,codes:{ERR_MULTIPLE_CALLBACK:Z},AbortError:N}=A6(),{Symbol:V}=P6(),{kDestroyed:C,isDestroyed:B,isFinished:D,isServerRequest:L}=G8(),H=V("kDestroy"),P=V("kConstruct");function R(Q,G,J){Q&&(Q.stack,G&&!G.errored&&(G.errored=Q),J&&!J.errored&&(J.errored=Q))}function k(Q,G){let J=this._readableState,X=this._writableState,U=X||J;return X!=null&&X.destroyed||J!=null&&J.destroyed?(typeof G=="function"&&G(),this):(R(Q,X,J),X&&(X.destroyed=!0),J&&(J.destroyed=!0),U.constructed?v(this,Q,G):this.once(H,function($){v(this,O($,Q),G)}),this)}function v(Q,G,J){let X=!1;function U($){if(X)return;X=!0;let{_readableState:j,_writableState:K}=Q;R($,K,j),K&&(K.closed=!0),j&&(j.closed=!0),typeof J=="function"&&J($),$?F.nextTick(M,Q,$):F.nextTick(w,Q)}try{Q._destroy(G||null,U)}catch($){U($)}}function M(Q,G){x(Q,G),w(Q)}function w(Q){let{_readableState:G,_writableState:J}=Q;J&&(J.closeEmitted=!0),G&&(G.closeEmitted=!0),(J!=null&&J.emitClose||G!=null&&G.emitClose)&&Q.emit("close")}function x(Q,G){let{_readableState:J,_writableState:X}=Q;X!=null&&X.errorEmitted||J!=null&&J.errorEmitted||(X&&(X.errorEmitted=!0),J&&(J.errorEmitted=!0),Q.emit("error",G))}function g(){let Q=this._readableState,G=this._writableState;Q&&(Q.constructed=!0,Q.closed=!1,Q.closeEmitted=!1,Q.destroyed=!1,Q.errored=null,Q.errorEmitted=!1,Q.reading=!1,Q.ended=Q.readable===!1,Q.endEmitted=Q.readable===!1),G&&(G.constructed=!0,G.destroyed=!1,G.closed=!1,G.closeEmitted=!1,G.errored=null,G.errorEmitted=!1,G.finalCalled=!1,G.prefinished=!1,G.ended=G.writable===!1,G.ending=G.writable===!1,G.finished=G.writable===!1)}function _(Q,G,J){let{_readableState:X,_writableState:U}=Q;if(U!=null&&U.destroyed||X!=null&&X.destroyed)return this;X!=null&&X.autoDestroy||U!=null&&U.autoDestroy?Q.destroy(G):G&&(G.stack,U&&!U.errored&&(U.errored=G),X&&!X.errored&&(X.errored=G),J?F.nextTick(x,Q,G):x(Q,G))}function p(Q,G){if(typeof Q._construct!="function")return;let{_readableState:J,_writableState:X}=Q;J&&(J.constructed=!1),X&&(X.constructed=!1),Q.once(P,G),!(Q.listenerCount(P)>1)&&F.nextTick(m,Q)}function m(Q){let G=!1;function J(X){if(G){_(Q,X??new Z);return}G=!0;let{_readableState:U,_writableState:$}=Q,j=$||U;U&&(U.constructed=!0),$&&($.constructed=!0),j.destroyed?Q.emit(H,X):X?_(Q,X,!0):F.nextTick(f,Q)}try{Q._construct((X)=>{F.nextTick(J,X)})}catch(X){F.nextTick(J,X)}}function f(Q){Q.emit(P)}function s(Q){return Q?.setHeader&&typeof Q.abort=="function"}function Q0(Q){Q.emit("close")}function u(Q,G){Q.emit("error",G),F.nextTick(Q0,Q)}function K0(Q,G){!Q||B(Q)||(!G&&!D(Q)&&(G=new N),L(Q)?(Q.socket=null,Q.destroy(G)):s(Q)?Q.abort():s(Q.req)?Q.req.abort():typeof Q.destroy=="function"?Q.destroy(G):typeof Q.close=="function"?Q.close():G?F.nextTick(u,Q,G):F.nextTick(Q0,Q),Q.destroyed||(Q[C]=!0))}q.exports={construct:p,destroyer:K0,destroy:k,undestroy:g,errorOrDestroy:_}}),m5=Z0((Y,q)=>{var{ArrayIsArray:F,ObjectSetPrototypeOf:O}=P6(),{EventEmitter:Z}=x8();function N(C){Z.call(this,C)}O(N.prototype,Z.prototype),O(N,Z),N.prototype.pipe=function(C,B){let D=this;function L(w){C.writable&&C.write(w)===!1&&D.pause&&D.pause()}D.on("data",L);function H(){D.readable&&D.resume&&D.resume()}C.on("drain",H),!C._isStdio&&(!B||B.end!==!1)&&(D.on("end",R),D.on("close",k));let P=!1;function R(){P||(P=!0,C.end())}function k(){P||(P=!0,typeof C.destroy=="function"&&C.destroy())}function v(w){M(),Z.listenerCount(this,"error")===0&&this.emit("error",w)}V(D,"error",v),V(C,"error",v);function M(){D.removeListener("data",L),C.removeListener("drain",H),D.removeListener("end",R),D.removeListener("close",k),D.removeListener("error",v),C.removeListener("error",v),D.removeListener("end",M),D.removeListener("close",M),C.removeListener("close",M)}return D.on("end",M),D.on("close",M),C.on("close",M),C.emit("pipe",D),C};function V(C,B,D){if(typeof C.prependListener=="function")return C.prependListener(B,D);!C._events||!C._events[B]?C.on(B,D):F(C._events[B])?C._events[B].unshift(D):C._events[B]=[D,C._events[B]]}q.exports={Stream:N,prependListener:V}}),L7=Z0((Y,q)=>{var{AbortError:F,codes:O}=A6(),{isNodeStream:Z,isWebStream:N,kControllerErrorFunction:V}=G8(),C=$8(),{ERR_INVALID_ARG_TYPE:B}=O,D=(L,H)=>{if(typeof L!="object"||!("aborted"in L))throw new B(H,"AbortSignal",L)};q.exports.addAbortSignal=function(L,H){if(D(L,"signal"),!Z(H)&&!N(H))throw new B("stream",["ReadableStream","WritableStream","Stream"],H);return q.exports.addAbortSignalNoValidate(L,H)},q.exports.addAbortSignalNoValidate=function(L,H){if(typeof L!="object"||!("aborted"in L))return H;let P=Z(H)?()=>{H.destroy(new F(void 0,{cause:L.reason}))}:()=>{H[V](new F(void 0,{cause:L.reason}))};return L.aborted?P():(L.addEventListener("abort",P),C(H,()=>L.removeEventListener("abort",P))),H}}),yX=Z0((Y,q)=>{var{StringPrototypeSlice:F,SymbolIterator:O,TypedArrayPrototypeSet:Z,Uint8Array:N}=P6(),{Buffer:V}=R6(),{inspect:C}=e6();q.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(B){let D={data:B,next:null};this.length>0?this.tail.next=D:this.head=D,this.tail=D,++this.length}unshift(B){let D={data:B,next:this.head};this.length===0&&(this.tail=D),this.head=D,++this.length}shift(){if(this.length===0)return;let B=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,B}clear(){this.head=this.tail=null,this.length=0}join(B){if(this.length===0)return"";let D=this.head,L=""+D.data;for(;(D=D.next)!==null;)L+=B+D.data;return L}concat(B){if(this.length===0)return V.alloc(0);let D=V.allocUnsafe(B>>>0),L=this.head,H=0;for(;L;)Z(D,L.data,H),H+=L.data.length,L=L.next;return D}consume(B,D){let L=this.head.data;if(B<L.length){let H=L.slice(0,B);return this.head.data=L.slice(B),H}return B===L.length?this.shift():D?this._getString(B):this._getBuffer(B)}first(){return this.head.data}*[O](){for(let B=this.head;B;B=B.next)yield B.data}_getString(B){let D="",L=this.head,H=0;do{let P=L.data;if(B>P.length)D+=P,B-=P.length;else{B===P.length?(D+=P,++H,L.next?this.head=L.next:this.head=this.tail=null):(D+=F(P,0,B),this.head=L,L.data=F(P,B));break}++H}while((L=L.next)!==null);return this.length-=H,D}_getBuffer(B){let D=V.allocUnsafe(B),L=B,H=this.head,P=0;do{let R=H.data;if(B>R.length)Z(D,R,L-B),B-=R.length;else{B===R.length?(Z(D,R,L-B),++P,H.next?this.head=H.next:this.head=this.tail=null):(Z(D,new N(R.buffer,R.byteOffset,B),L-B),this.head=H,H.data=R.slice(B));break}++P}while((H=H.next)!==null);return this.length-=P,D}[Symbol.for("nodejs.util.inspect.custom")](B,D){return C(this,{...D,depth:0,customInspect:!1})}}}),p5=Z0((Y,q)=>{var{MathFloor:F,NumberIsInteger:O}=P6(),{ERR_INVALID_ARG_VALUE:Z}=A6().codes;function N(B,D,L){return B.highWaterMark!=null?B.highWaterMark:D?B[L]:null}function V(B){return B?16:16384}function C(B,D,L,H){let P=N(D,H,L);if(P!=null){if(!O(P)||P<0){let R=H?`options.${L}`:"options.highWaterMark";throw new Z(R,P)}return F(P)}return V(B.objectMode)}q.exports={getHighWaterMark:C,getDefaultHighWaterMark:V}}),Z3=Z0((Y,q)=>{var F=(S8(),g6(W8)),{PromisePrototypeThen:O,SymbolAsyncIterator:Z,SymbolIterator:N}=P6(),{Buffer:V}=R6(),{ERR_INVALID_ARG_TYPE:C,ERR_STREAM_NULL_VALUES:B}=A6().codes;function D(L,H,P){let R;if(typeof H=="string"||H instanceof V)return new L({objectMode:!0,...P,read(){this.push(H),this.push(null)}});let k;if(H&&H[Z])k=!0,R=H[Z]();else if(H&&H[N])k=!1,R=H[N]();else throw new C("iterable",["Iterable"],H);let v=new L({objectMode:!0,highWaterMark:1,...P}),M=!1;v._read=function(){M||(M=!0,x())},v._destroy=function(g,_){O(w(g),()=>F.nextTick(_,g),(p)=>F.nextTick(_,p||g))};async function w(g){let _=g!=null,p=typeof R.throw=="function";if(_&&p){let{value:m,done:f}=await R.throw(g);if(await m,f)return}if(typeof R.return=="function"){let{value:m}=await R.return();await m}}async function x(){for(;;){try{let{value:g,done:_}=k?await R.next():R.next();if(_)v.push(null);else{let p=g&&typeof g.then=="function"?await g:g;if(p===null)throw M=!1,new B;if(v.push(p))continue;M=!1}}catch(g){v.destroy(g)}break}}return v}q.exports=D}),N7=Z0((Y,q)=>{var F=(S8(),g6(W8)),{ArrayPrototypeIndexOf:O,NumberIsInteger:Z,NumberIsNaN:N,NumberParseInt:V,ObjectDefineProperties:C,ObjectKeys:B,ObjectSetPrototypeOf:D,Promise:L,SafeSet:H,SymbolAsyncIterator:P,Symbol:R}=P6();q.exports=A,A.ReadableState=z;var{EventEmitter:k}=x8(),{Stream:v,prependListener:M}=m5(),{Buffer:w}=R6(),{addAbortSignal:x}=L7(),g=$8(),_=e6().debuglog("stream",(I)=>{_=I}),p=yX(),m=W1(),{getHighWaterMark:f,getDefaultHighWaterMark:s}=p5(),{aggregateTwoErrors:Q0,codes:{ERR_INVALID_ARG_TYPE:u,ERR_METHOD_NOT_IMPLEMENTED:K0,ERR_OUT_OF_RANGE:Q,ERR_STREAM_PUSH_AFTER_EOF:G,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:J}}=A6(),{validateObject:X}=D7(),U=R("kPaused"),{StringDecoder:$}=S5(),j=Z3();D(A.prototype,v.prototype),D(A,v);var K=()=>{},{errorOrDestroy:W}=m;function z(I,S,c){typeof c!="boolean"&&(c=S instanceof Q8()),this.objectMode=!!(I&&I.objectMode),c&&(this.objectMode=this.objectMode||!!(I&&I.readableObjectMode)),this.highWaterMark=I?f(this,I,"readableHighWaterMark",c):s(!1),this.buffer=new p,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[U]=null,this.errorEmitted=!1,this.emitClose=!I||I.emitClose!==!1,this.autoDestroy=!I||I.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=I&&I.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,I&&I.encoding&&(this.decoder=new $(I.encoding),this.encoding=I.encoding)}function A(I){if(!(this instanceof A))return new A(I);let S=this instanceof Q8();this._readableState=new z(I,this,S),I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy),typeof I.construct=="function"&&(this._construct=I.construct),I.signal&&!S&&x(I.signal,this)),v.call(this,I),m.construct(this,()=>{this._readableState.needReadable&&q0(this,this._readableState)})}A.prototype.destroy=m.destroy,A.prototype._undestroy=m.undestroy,A.prototype._destroy=function(I,S){S(I)},A.prototype[k.captureRejectionSymbol]=function(I){this.destroy(I)},A.prototype.push=function(I,S){return T(this,I,S,!1)},A.prototype.unshift=function(I,S){return T(this,I,S,!0)};function T(I,S,c,o){_("readableAddChunk",S);let i=I._readableState,O0;if(i.objectMode||(typeof S=="string"?(c=c||i.defaultEncoding,i.encoding!==c&&(o&&i.encoding?S=w.from(S,c).toString(i.encoding):(S=w.from(S,c),c=""))):S instanceof w?c="":v._isUint8Array(S)?(S=v._uint8ArrayToBuffer(S),c=""):S!=null&&(O0=new u("chunk",["string","Buffer","Uint8Array"],S))),O0)W(I,O0);else if(S===null)i.reading=!1,l(I,i);else if(i.objectMode||S&&S.length>0)if(o)if(i.endEmitted)W(I,new J);else{if(i.destroyed||i.errored)return!1;y(I,i,S,!0)}else if(i.ended)W(I,new G);else{if(i.destroyed||i.errored)return!1;i.reading=!1,i.decoder&&!c?(S=i.decoder.write(S),i.objectMode||S.length!==0?y(I,i,S,!1):q0(I,i)):y(I,i,S,!1)}else o||(i.reading=!1,q0(I,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function y(I,S,c,o){S.flowing&&S.length===0&&!S.sync&&I.listenerCount("data")>0?(S.multiAwaitDrain?S.awaitDrainWriters.clear():S.awaitDrainWriters=null,S.dataEmitted=!0,I.emit("data",c)):(S.length+=S.objectMode?1:c.length,o?S.buffer.unshift(c):S.buffer.push(c),S.needReadable&&h(I)),q0(I,S)}A.prototype.isPaused=function(){let I=this._readableState;return I[U]===!0||I.flowing===!1},A.prototype.setEncoding=function(I){let S=new $(I);this._readableState.decoder=S,this._readableState.encoding=this._readableState.decoder.encoding;let c=this._readableState.buffer,o="";for(let i of c)o+=S.write(i);return c.clear(),o!==""&&c.push(o),this._readableState.length=o.length,this};var r=1073741824;function a(I){if(I>r)throw new Q("size","<= 1GiB",I);return I--,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I++,I}function t(I,S){return I<=0||S.length===0&&S.ended?0:S.objectMode?1:N(I)?S.flowing&&S.length?S.buffer.first().length:S.length:I<=S.length?I:S.ended?S.length:0}A.prototype.read=function(I){_("read",I),I===void 0?I=NaN:Z(I)||(I=V(I,10));let S=this._readableState,c=I;if(I>S.highWaterMark&&(S.highWaterMark=a(I)),I!==0&&(S.emittedReadable=!1),I===0&&S.needReadable&&((S.highWaterMark!==0?S.length>=S.highWaterMark:S.length>0)||S.ended))return _("read: emitReadable",S.length,S.ended),S.length===0&&S.ended?X0(this):h(this),null;if(I=t(I,S),I===0&&S.ended)return S.length===0&&X0(this),null;let o=S.needReadable;if(_("need readable",o),(S.length===0||S.length-I<S.highWaterMark)&&(o=!0,_("length less than watermark",o)),S.ended||S.reading||S.destroyed||S.errored||!S.constructed)o=!1,_("reading, ended or constructing",o);else if(o){_("do read"),S.reading=!0,S.sync=!0,S.length===0&&(S.needReadable=!0);try{this._read(S.highWaterMark)}catch(O0){W(this,O0)}S.sync=!1,S.reading||(I=t(c,S))}let i;return I>0?i=Y0(I,S):i=null,i===null?(S.needReadable=S.length<=S.highWaterMark,I=0):(S.length-=I,S.multiAwaitDrain?S.awaitDrainWriters.clear():S.awaitDrainWriters=null),S.length===0&&(S.ended||(S.needReadable=!0),c!==I&&S.ended&&X0(this)),i!==null&&!S.errorEmitted&&!S.closeEmitted&&(S.dataEmitted=!0,this.emit("data",i)),i};function l(I,S){if(_("onEofChunk"),!S.ended){if(S.decoder){let c=S.decoder.end();c&&c.length&&(S.buffer.push(c),S.length+=S.objectMode?1:c.length)}S.ended=!0,S.sync?h(I):(S.needReadable=!1,S.emittedReadable=!0,n(I))}}function h(I){let S=I._readableState;_("emitReadable",S.needReadable,S.emittedReadable),S.needReadable=!1,S.emittedReadable||(_("emitReadable",S.flowing),S.emittedReadable=!0,F.nextTick(n,I))}function n(I){let S=I._readableState;_("emitReadable_",S.destroyed,S.length,S.ended),!S.destroyed&&!S.errored&&(S.length||S.ended)&&(I.emit("readable"),S.emittedReadable=!1),S.needReadable=!S.flowing&&!S.ended&&S.length<=S.highWaterMark,V0(I)}function q0(I,S){!S.readingMore&&S.constructed&&(S.readingMore=!0,F.nextTick(G0,I,S))}function G0(I,S){for(;!S.reading&&!S.ended&&(S.length<S.highWaterMark||S.flowing&&S.length===0);){let c=S.length;if(_("maybeReadMore read 0"),I.read(0),c===S.length)break}S.readingMore=!1}A.prototype._read=function(I){throw new K0("_read()")},A.prototype.pipe=function(I,S){let c=this,o=this._readableState;o.pipes.length===1&&(o.multiAwaitDrain||(o.multiAwaitDrain=!0,o.awaitDrainWriters=new H(o.awaitDrainWriters?[o.awaitDrainWriters]:[]))),o.pipes.push(I),_("pipe count=%d opts=%j",o.pipes.length,S);let i=(!S||S.end!==!1)&&I!==F.stdout&&I!==F.stderr?U0:L0;o.endEmitted?F.nextTick(i):c.once("end",i),I.on("unpipe",O0);function O0(D0,a0){_("onunpipe"),D0===c&&a0&&a0.hasUnpiped===!1&&(a0.hasUnpiped=!0,C0())}function U0(){_("onend"),I.end()}let j0,c0=!1;function C0(){_("cleanup"),I.removeListener("close",P0),I.removeListener("finish",$6),j0&&I.removeListener("drain",j0),I.removeListener("error",N0),I.removeListener("unpipe",O0),c.removeListener("end",U0),c.removeListener("end",L0),c.removeListener("data",m0),c0=!0,j0&&o.awaitDrainWriters&&(!I._writableState||I._writableState.needDrain)&&j0()}function H0(){c0||(o.pipes.length===1&&o.pipes[0]===I?(_("false write response, pause",0),o.awaitDrainWriters=I,o.multiAwaitDrain=!1):o.pipes.length>1&&o.pipes.includes(I)&&(_("false write response, pause",o.awaitDrainWriters.size),o.awaitDrainWriters.add(I)),c.pause()),j0||(j0=F0(c,I),I.on("drain",j0))}c.on("data",m0);function m0(D0){_("ondata");let a0=I.write(D0);_("dest.write",a0),a0===!1&&H0()}function N0(D0){if(_("onerror",D0),L0(),I.removeListener("error",N0),I.listenerCount("error")===0){let a0=I._writableState||I._readableState;a0&&!a0.errorEmitted?W(I,D0):I.emit("error",D0)}}M(I,"error",N0);function P0(){I.removeListener("finish",$6),L0()}I.once("close",P0);function $6(){_("onfinish"),I.removeListener("close",P0),L0()}I.once("finish",$6);function L0(){_("unpipe"),c.unpipe(I)}return I.emit("pipe",c),I.writableNeedDrain===!0?o.flowing&&H0():o.flowing||(_("pipe resume"),c.resume()),I};function F0(I,S){return function(){let c=I._readableState;c.awaitDrainWriters===S?(_("pipeOnDrain",1),c.awaitDrainWriters=null):c.multiAwaitDrain&&(_("pipeOnDrain",c.awaitDrainWriters.size),c.awaitDrainWriters.delete(S)),(!c.awaitDrainWriters||c.awaitDrainWriters.size===0)&&I.listenerCount("data")&&I.resume()}}A.prototype.unpipe=function(I){let S=this._readableState,c={hasUnpiped:!1};if(S.pipes.length===0)return this;if(!I){let i=S.pipes;S.pipes=[],this.pause();for(let O0=0;O0<i.length;O0++)i[O0].emit("unpipe",this,{hasUnpiped:!1});return this}let o=O(S.pipes,I);return o===-1?this:(S.pipes.splice(o,1),S.pipes.length===0&&this.pause(),I.emit("unpipe",this,c),this)},A.prototype.on=function(I,S){let c=v.prototype.on.call(this,I,S),o=this._readableState;return I==="data"?(o.readableListening=this.listenerCount("readable")>0,o.flowing!==!1&&this.resume()):I==="readable"&&!o.endEmitted&&!o.readableListening&&(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,_("on readable",o.length,o.reading),o.length?h(this):o.reading||F.nextTick(E,this)),c},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(I,S){let c=v.prototype.removeListener.call(this,I,S);return I==="readable"&&F.nextTick(b,this),c},A.prototype.off=A.prototype.removeListener,A.prototype.removeAllListeners=function(I){let S=v.prototype.removeAllListeners.apply(this,arguments);return(I==="readable"||I===void 0)&&F.nextTick(b,this),S};function b(I){let S=I._readableState;S.readableListening=I.listenerCount("readable")>0,S.resumeScheduled&&S[U]===!1?S.flowing=!0:I.listenerCount("data")>0?I.resume():S.readableListening||(S.flowing=null)}function E(I){_("readable nexttick read 0"),I.read(0)}A.prototype.resume=function(){let I=this._readableState;return I.flowing||(_("resume"),I.flowing=!I.readableListening,d(this,I)),I[U]=!1,this};function d(I,S){S.resumeScheduled||(S.resumeScheduled=!0,F.nextTick(e,I,S))}function e(I,S){_("resume",S.reading),S.reading||I.read(0),S.resumeScheduled=!1,I.emit("resume"),V0(I),S.flowing&&!S.reading&&I.read(0)}A.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[U]=!0,this};function V0(I){let S=I._readableState;for(_("flow",S.flowing);S.flowing&&I.read()!==null;);}A.prototype.wrap=function(I){let S=!1;I.on("data",(o)=>{!this.push(o)&&I.pause&&(S=!0,I.pause())}),I.on("end",()=>{this.push(null)}),I.on("error",(o)=>{W(this,o)}),I.on("close",()=>{this.destroy()}),I.on("destroy",()=>{this.destroy()}),this._read=()=>{S&&I.resume&&(S=!1,I.resume())};let c=B(I);for(let o=1;o<c.length;o++){let i=c[o];this[i]===void 0&&typeof I[i]=="function"&&(this[i]=I[i].bind(I))}return this},A.prototype[P]=function(){return W0(this)},A.prototype.iterator=function(I){return I!==void 0&&X(I,"options"),W0(this,I)};function W0(I,S){typeof I.read!="function"&&(I=A.wrap(I,{objectMode:!0}));let c=J0(I,S);return c.stream=I,c}async function*J0(I,S){let c=K;function o(U0){this===I?(c(),c=K):c=U0}I.on("readable",o);let i,O0=g(I,{writable:!1},(U0)=>{i=U0?Q0(i,U0):null,c(),c=K});try{for(;;){let U0=I.destroyed?null:I.read();if(U0!==null)yield U0;else{if(i)throw i;if(i===null)return;await new L(o)}}}catch(U0){throw i=Q0(i,U0),i}finally{(i||S?.destroyOnReturn!==!1)&&(i===void 0||I._readableState.autoDestroy)?m.destroyer(I,null):(I.off("readable",o),O0())}}C(A.prototype,{readable:{__proto__:null,get(){let I=this._readableState;return!!I&&I.readable!==!1&&!I.destroyed&&!I.errorEmitted&&!I.endEmitted},set(I){this._readableState&&(this._readableState.readable=!!I)}},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(I){this._readableState&&(this._readableState.flowing=I)}},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(I){!this._readableState||(this._readableState.destroyed=I)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),C(z.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[U]!==!1},set(I){this[U]=!!I}}}),A._fromList=Y0;function Y0(I,S){if(S.length===0)return null;let c;return S.objectMode?c=S.buffer.shift():!I||I>=S.length?(S.decoder?c=S.buffer.join(""):S.buffer.length===1?c=S.buffer.first():c=S.buffer.concat(S.length),S.buffer.clear()):c=S.buffer.consume(I,S.decoder),c}function X0(I){let S=I._readableState;_("endReadable",S.endEmitted),S.endEmitted||(S.ended=!0,F.nextTick(g0,S,I))}function g0(I,S){if(_("endReadableNT",I.endEmitted,I.length),!I.errored&&!I.closeEmitted&&!I.endEmitted&&I.length===0){if(I.endEmitted=!0,S.emit("end"),S.writable&&S.allowHalfOpen===!1)F.nextTick($0,S);else if(I.autoDestroy){let c=S._writableState;(!c||c.autoDestroy&&(c.finished||c.writable===!1))&&S.destroy()}}}function $0(I){I.writable&&!I.writableEnded&&!I.destroyed&&I.end()}A.from=function(I,S){return j(A,I,S)};var z0;function _0(){return z0===void 0&&(z0={}),z0}A.fromWeb=function(I,S){return _0().newStreamReadableFromReadableStream(I,S)},A.toWeb=function(I,S){return _0().newReadableStreamFromStreamReadable(I,S)},A.wrap=function(I,S){var c,o;return new A({objectMode:(c=(o=I.readableObjectMode)!==null&&o!==void 0?o:I.objectMode)!==null&&c!==void 0?c:!0,...S,destroy(i,O0){m.destroyer(I,i),O0(i)}}).wrap(I)}}),$3=Z0((Y,q)=>{var F=(S8(),g6(W8)),{ArrayPrototypeSlice:O,Error:Z,FunctionPrototypeSymbolHasInstance:N,ObjectDefineProperty:V,ObjectDefineProperties:C,ObjectSetPrototypeOf:B,StringPrototypeToLowerCase:D,Symbol:L,SymbolHasInstance:H}=P6();q.exports=$,$.WritableState=X;var{EventEmitter:P}=x8(),R=m5().Stream,{Buffer:k}=R6(),v=W1(),{addAbortSignal:M}=L7(),{getHighWaterMark:w,getDefaultHighWaterMark:x}=p5(),{ERR_INVALID_ARG_TYPE:g,ERR_METHOD_NOT_IMPLEMENTED:_,ERR_MULTIPLE_CALLBACK:p,ERR_STREAM_CANNOT_PIPE:m,ERR_STREAM_DESTROYED:f,ERR_STREAM_ALREADY_FINISHED:s,ERR_STREAM_NULL_VALUES:Q0,ERR_STREAM_WRITE_AFTER_END:u,ERR_UNKNOWN_ENCODING:K0}=A6().codes,{errorOrDestroy:Q}=v;B($.prototype,R.prototype),B($,R);function G(){}var J=L("kOnFinished");function X(E,d,e){typeof e!="boolean"&&(e=d instanceof Q8()),this.objectMode=!!(E&&E.objectMode),e&&(this.objectMode=this.objectMode||!!(E&&E.writableObjectMode)),this.highWaterMark=E?w(this,E,"writableHighWaterMark",e):x(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let V0=!!(E&&E.decodeStrings===!1);this.decodeStrings=!V0,this.defaultEncoding=E&&E.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=A.bind(void 0,d),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,U(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!E||E.emitClose!==!1,this.autoDestroy=!E||E.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[J]=[]}function U(E){E.buffered=[],E.bufferedIndex=0,E.allBuffers=!0,E.allNoop=!0}X.prototype.getBuffer=function(){return O(this.buffered,this.bufferedIndex)},V(X.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function $(E){let d=this instanceof Q8();if(!d&&!N($,this))return new $(E);this._writableState=new X(E,this,d),E&&(typeof E.write=="function"&&(this._write=E.write),typeof E.writev=="function"&&(this._writev=E.writev),typeof E.destroy=="function"&&(this._destroy=E.destroy),typeof E.final=="function"&&(this._final=E.final),typeof E.construct=="function"&&(this._construct=E.construct),E.signal&&M(E.signal,this)),R.call(this,E),v.construct(this,()=>{let e=this._writableState;e.writing||a(this,e),n(this,e)})}V($,H,{__proto__:null,value:function(E){return N(this,E)?!0:this!==$?!1:E&&E._writableState instanceof X}}),$.prototype.pipe=function(){Q(this,new m)};function j(E,d,e,V0){let W0=E._writableState;if(typeof e=="function")V0=e,e=W0.defaultEncoding;else{if(!e)e=W0.defaultEncoding;else if(e!=="buffer"&&!k.isEncoding(e))throw new K0(e);typeof V0!="function"&&(V0=G)}if(d===null)throw new Q0;if(!W0.objectMode)if(typeof d=="string")W0.decodeStrings!==!1&&(d=k.from(d,e),e="buffer");else if(d instanceof k)e="buffer";else if(R._isUint8Array(d))d=R._uint8ArrayToBuffer(d),e="buffer";else throw new g("chunk",["string","Buffer","Uint8Array"],d);let J0;return W0.ending?J0=new u:W0.destroyed&&(J0=new f("write")),J0?(F.nextTick(V0,J0),Q(E,J0,!0),J0):(W0.pendingcb++,K(E,W0,d,e,V0))}$.prototype.write=function(E,d,e){return j(this,E,d,e)===!0},$.prototype.cork=function(){this._writableState.corked++},$.prototype.uncork=function(){let E=this._writableState;E.corked&&(E.corked--,E.writing||a(this,E))},$.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=D(E)),!k.isEncoding(E))throw new K0(E);return this._writableState.defaultEncoding=E,this};function K(E,d,e,V0,W0){let J0=d.objectMode?1:e.length;d.length+=J0;let Y0=d.length<d.highWaterMark;return Y0||(d.needDrain=!0),d.writing||d.corked||d.errored||!d.constructed?(d.buffered.push({chunk:e,encoding:V0,callback:W0}),d.allBuffers&&V0!=="buffer"&&(d.allBuffers=!1),d.allNoop&&W0!==G&&(d.allNoop=!1)):(d.writelen=J0,d.writecb=W0,d.writing=!0,d.sync=!0,E._write(e,V0,d.onwrite),d.sync=!1),Y0&&!d.errored&&!d.destroyed}function W(E,d,e,V0,W0,J0,Y0){d.writelen=V0,d.writecb=Y0,d.writing=!0,d.sync=!0,d.destroyed?d.onwrite(new f("write")):e?E._writev(W0,d.onwrite):E._write(W0,J0,d.onwrite),d.sync=!1}function z(E,d,e,V0){--d.pendingcb,V0(e),r(d),Q(E,e)}function A(E,d){let e=E._writableState,V0=e.sync,W0=e.writecb;if(typeof W0!="function"){Q(E,new p);return}e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0,d?(d.stack,e.errored||(e.errored=d),E._readableState&&!E._readableState.errored&&(E._readableState.errored=d),V0?F.nextTick(z,E,e,d,W0):z(E,e,d,W0)):(e.buffered.length>e.bufferedIndex&&a(E,e),V0?e.afterWriteTickInfo!==null&&e.afterWriteTickInfo.cb===W0?e.afterWriteTickInfo.count++:(e.afterWriteTickInfo={count:1,cb:W0,stream:E,state:e},F.nextTick(T,e.afterWriteTickInfo)):y(E,e,1,W0))}function T({stream:E,state:d,count:e,cb:V0}){return d.afterWriteTickInfo=null,y(E,d,e,V0)}function y(E,d,e,V0){for(!d.ending&&!E.destroyed&&d.length===0&&d.needDrain&&(d.needDrain=!1,E.emit("drain"));e-- >0;)d.pendingcb--,V0();d.destroyed&&r(d),n(E,d)}function r(E){if(E.writing)return;for(let W0=E.bufferedIndex;W0<E.buffered.length;++W0){var d;let{chunk:J0,callback:Y0}=E.buffered[W0],X0=E.objectMode?1:J0.length;E.length-=X0,Y0((d=E.errored)!==null&&d!==void 0?d:new f("write"))}let e=E[J].splice(0);for(let W0=0;W0<e.length;W0++){var V0;e[W0]((V0=E.errored)!==null&&V0!==void 0?V0:new f("end"))}U(E)}function a(E,d){if(d.corked||d.bufferProcessing||d.destroyed||!d.constructed)return;let{buffered:e,bufferedIndex:V0,objectMode:W0}=d,J0=e.length-V0;if(!J0)return;let Y0=V0;if(d.bufferProcessing=!0,J0>1&&E._writev){d.pendingcb-=J0-1;let X0=d.allNoop?G:($0)=>{for(let z0=Y0;z0<e.length;++z0)e[z0].callback($0)},g0=d.allNoop&&Y0===0?e:O(e,Y0);g0.allBuffers=d.allBuffers,W(E,d,!0,d.length,g0,"",X0),U(d)}else{do{let{chunk:X0,encoding:g0,callback:$0}=e[Y0];e[Y0++]=null;let z0=W0?1:X0.length;W(E,d,!1,z0,X0,g0,$0)}while(Y0<e.length&&!d.writing);Y0===e.length?U(d):Y0>256?(e.splice(0,Y0),d.bufferedIndex=0):d.bufferedIndex=Y0}d.bufferProcessing=!1}$.prototype._write=function(E,d,e){if(this._writev)this._writev([{chunk:E,encoding:d}],e);else throw new _("_write()")},$.prototype._writev=null,$.prototype.end=function(E,d,e){let V0=this._writableState;typeof E=="function"?(e=E,E=null,d=null):typeof d=="function"&&(e=d,d=null);let W0;if(E!=null){let J0=j(this,E,d);J0 instanceof Z&&(W0=J0)}return V0.corked&&(V0.corked=1,this.uncork()),W0||(!V0.errored&&!V0.ending?(V0.ending=!0,n(this,V0,!0),V0.ended=!0):V0.finished?W0=new s("end"):V0.destroyed&&(W0=new f("end"))),typeof e=="function"&&(W0||V0.finished?F.nextTick(e,W0):V0[J].push(e)),this};function t(E){return E.ending&&!E.destroyed&&E.constructed&&E.length===0&&!E.errored&&E.buffered.length===0&&!E.finished&&!E.writing&&!E.errorEmitted&&!E.closeEmitted}function l(E,d){let e=!1;function V0(W0){if(e){Q(E,W0??p());return}if(e=!0,d.pendingcb--,W0){let J0=d[J].splice(0);for(let Y0=0;Y0<J0.length;Y0++)J0[Y0](W0);Q(E,W0,d.sync)}else t(d)&&(d.prefinished=!0,E.emit("prefinish"),d.pendingcb++,F.nextTick(q0,E,d))}d.sync=!0,d.pendingcb++;try{E._final(V0)}catch(W0){V0(W0)}d.sync=!1}function h(E,d){!d.prefinished&&!d.finalCalled&&(typeof E._final=="function"&&!d.destroyed?(d.finalCalled=!0,l(E,d)):(d.prefinished=!0,E.emit("prefinish")))}function n(E,d,e){t(d)&&(h(E,d),d.pendingcb===0&&(e?(d.pendingcb++,F.nextTick((V0,W0)=>{t(W0)?q0(V0,W0):W0.pendingcb--},E,d)):t(d)&&(d.pendingcb++,q0(E,d))))}function q0(E,d){d.pendingcb--,d.finished=!0;let e=d[J].splice(0);for(let V0=0;V0<e.length;V0++)e[V0]();if(E.emit("finish"),d.autoDestroy){let V0=E._readableState;(!V0||V0.autoDestroy&&(V0.endEmitted||V0.readable===!1))&&E.destroy()}}C($.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(E){this._writableState&&(this._writableState.destroyed=E)}},writable:{__proto__:null,get(){let E=this._writableState;return!!E&&E.writable!==!1&&!E.destroyed&&!E.errored&&!E.ending&&!E.ended},set(E){this._writableState&&(this._writableState.writable=!!E)}},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 E=this._writableState;return E?!E.destroyed&&!E.ending&&E.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 G0=v.destroy;$.prototype.destroy=function(E,d){let e=this._writableState;return!e.destroyed&&(e.bufferedIndex<e.buffered.length||e[J].length)&&F.nextTick(r,e),G0.call(this,E,d),this},$.prototype._undestroy=v.undestroy,$.prototype._destroy=function(E,d){d(E)},$.prototype[P.captureRejectionSymbol]=function(E){this.destroy(E)};var F0;function b(){return F0===void 0&&(F0={}),F0}$.fromWeb=function(E,d){return b().newStreamWritableFromWritableStream(E,d)},$.toWeb=function(E){return b().newWritableStreamFromStreamWritable(E)}}),_X=Z0((Y,q)=>{var F=(S8(),g6(W8)),O=R6(),{isReadable:Z,isWritable:N,isIterable:V,isNodeStream:C,isReadableNodeStream:B,isWritableNodeStream:D,isDuplexNodeStream:L}=G8(),H=$8(),{AbortError:P,codes:{ERR_INVALID_ARG_TYPE:R,ERR_INVALID_RETURN_VALUE:k}}=A6(),{destroyer:v}=W1(),M=Q8(),w=N7(),{createDeferredPromise:x}=e6(),g=Z3(),_=globalThis.Blob||O.Blob,p=typeof _<"u"?function(K0){return K0 instanceof _}:function(K0){return!1},m=globalThis.AbortController||_5().AbortController,{FunctionPrototypeCall:f}=P6(),s=class extends M{constructor(K0){super(K0),K0?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),K0?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};q.exports=function K0(Q,G){if(L(Q))return Q;if(B(Q))return u({readable:Q});if(D(Q))return u({writable:Q});if(C(Q))return u({writable:!1,readable:!1});if(typeof Q=="function"){let{value:X,write:U,final:$,destroy:j}=Q0(Q);if(V(X))return g(s,X,{objectMode:!0,write:U,final:$,destroy:j});let K=X?.then;if(typeof K=="function"){let W,z=f(K,X,(A)=>{if(A!=null)throw new k("nully","body",A)},(A)=>{v(W,A)});return W=new s({objectMode:!0,readable:!1,write:U,final(A){$(async()=>{try{await z,F.nextTick(A,null)}catch(T){F.nextTick(A,T)}})},destroy:j})}throw new k("Iterable, AsyncIterable or AsyncFunction",G,X)}if(p(Q))return K0(Q.arrayBuffer());if(V(Q))return g(s,Q,{objectMode:!0,writable:!1});if(typeof Q?.writable=="object"||typeof Q?.readable=="object"){let X=Q!=null&&Q.readable?B(Q?.readable)?Q?.readable:K0(Q.readable):void 0,U=Q!=null&&Q.writable?D(Q?.writable)?Q?.writable:K0(Q.writable):void 0;return u({readable:X,writable:U})}let J=Q?.then;if(typeof J=="function"){let X;return f(J,Q,(U)=>{U!=null&&X.push(U),X.push(null)},(U)=>{v(X,U)}),X=new s({objectMode:!0,writable:!1,read(){}})}throw new R(G,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],Q)};function Q0(K0){let{promise:Q,resolve:G}=x(),J=new m,X=J.signal;return{value:K0(async function*(){for(;;){let U=Q;Q=null;let{chunk:$,done:j,cb:K}=await U;if(F.nextTick(K),j)return;if(X.aborted)throw new P(void 0,{cause:X.reason});({promise:Q,resolve:G}=x()),yield $}}(),{signal:X}),write(U,$,j){let K=G;G=null,K({chunk:U,done:!1,cb:j})},final(U){let $=G;G=null,$({done:!0,cb:U})},destroy(U,$){J.abort(),$(U)}}}function u(K0){let Q=K0.readable&&typeof K0.readable.read!="function"?w.wrap(K0.readable):K0.readable,G=K0.writable,J=!!Z(Q),X=!!N(G),U,$,j,K,W;function z(A){let T=K;K=null,T?T(A):A&&W.destroy(A)}return W=new s({readableObjectMode:!!(Q!=null&&Q.readableObjectMode),writableObjectMode:!!(G!=null&&G.writableObjectMode),readable:J,writable:X}),X&&(H(G,(A)=>{X=!1,A&&v(Q,A),z(A)}),W._write=function(A,T,y){G.write(A,T)?y():U=y},W._final=function(A){G.end(),$=A},G.on("drain",function(){if(U){let A=U;U=null,A()}}),G.on("finish",function(){if($){let A=$;$=null,A()}})),J&&(H(Q,(A)=>{J=!1,A&&v(Q,A),z(A)}),Q.on("readable",function(){if(j){let A=j;j=null,A()}}),Q.on("end",function(){W.push(null)}),W._read=function(){for(;;){let A=Q.read();if(A===null){j=W._read;return}if(!W.push(A))return}}),W._destroy=function(A,T){!A&&K!==null&&(A=new P),j=null,U=null,$=null,K===null?T(A):(K=T,v(G,A),v(Q,A))},W}}),Q8=Z0((Y,q)=>{var{ObjectDefineProperties:F,ObjectGetOwnPropertyDescriptor:O,ObjectKeys:Z,ObjectSetPrototypeOf:N}=P6();q.exports=B;var V=N7(),C=$3();N(B.prototype,V.prototype),N(B,V);{let P=Z(C.prototype);for(let R=0;R<P.length;R++){let k=P[R];B.prototype[k]||(B.prototype[k]=C.prototype[k])}}function B(P){if(!(this instanceof B))return new B(P);V.call(this,P),C.call(this,P),P?(this.allowHalfOpen=P.allowHalfOpen!==!1,P.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),P.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}F(B.prototype,{writable:{__proto__:null,...O(C.prototype,"writable")},writableHighWaterMark:{__proto__:null,...O(C.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...O(C.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...O(C.prototype,"writableBuffer")},writableLength:{__proto__:null,...O(C.prototype,"writableLength")},writableFinished:{__proto__:null,...O(C.prototype,"writableFinished")},writableCorked:{__proto__:null,...O(C.prototype,"writableCorked")},writableEnded:{__proto__:null,...O(C.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...O(C.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(P){this._readableState&&this._writableState&&(this._readableState.destroyed=P,this._writableState.destroyed=P)}}});var D;function L(){return D===void 0&&(D={}),D}B.fromWeb=function(P,R){return L().newStreamDuplexFromReadableWritablePair(P,R)},B.toWeb=function(P){return L().newReadableWritablePairFromDuplex(P)};var H;B.from=function(P){return H||(H=_X()),H(P,"body")}}),q3=Z0((Y,q)=>{var{ObjectSetPrototypeOf:F,Symbol:O}=P6();q.exports=B;var{ERR_METHOD_NOT_IMPLEMENTED:Z}=A6().codes,N=Q8(),{getHighWaterMark:V}=p5();F(B.prototype,N.prototype),F(B,N);var C=O("kCallback");function B(H){if(!(this instanceof B))return new B(H);let P=H?V(this,H,"readableHighWaterMark",!0):null;P===0&&(H={...H,highWaterMark:null,readableHighWaterMark:P,writableHighWaterMark:H.writableHighWaterMark||0}),N.call(this,H),this._readableState.sync=!1,this[C]=null,H&&(typeof H.transform=="function"&&(this._transform=H.transform),typeof H.flush=="function"&&(this._flush=H.flush)),this.on("prefinish",L)}function D(H){typeof this._flush=="function"&&!this.destroyed?this._flush((P,R)=>{if(P){H?H(P):this.destroy(P);return}R!=null&&this.push(R),this.push(null),H&&H()}):(this.push(null),H&&H())}function L(){this._final!==D&&D.call(this)}B.prototype._final=D,B.prototype._transform=function(H,P,R){throw new Z("_transform()")},B.prototype._write=function(H,P,R){let k=this._readableState,v=this._writableState,M=k.length;this._transform(H,P,(w,x)=>{if(w){R(w);return}x!=null&&this.push(x),v.ended||M===k.length||k.length<k.highWaterMark?R():this[C]=R})},B.prototype._read=function(){if(this[C]){let H=this[C];this[C]=null,H()}}}),j3=Z0((Y,q)=>{var{ObjectSetPrototypeOf:F}=P6();q.exports=Z;var O=q3();F(Z.prototype,O.prototype),F(Z,O);function Z(N){if(!(this instanceof Z))return new Z(N);O.call(this,N)}Z.prototype._transform=function(N,V,C){C(null,N)}}),b5=Z0((Y,q)=>{var F=(S8(),g6(W8)),{ArrayIsArray:O,Promise:Z,SymbolAsyncIterator:N}=P6(),V=$8(),{once:C}=e6(),B=W1(),D=Q8(),{aggregateTwoErrors:L,codes:{ERR_INVALID_ARG_TYPE:H,ERR_INVALID_RETURN_VALUE:P,ERR_MISSING_ARGS:R,ERR_STREAM_DESTROYED:k,ERR_STREAM_PREMATURE_CLOSE:v},AbortError:M}=A6(),{validateFunction:w,validateAbortSignal:x}=D7(),{isIterable:g,isReadable:_,isReadableNodeStream:p,isNodeStream:m,isTransformStream:f,isWebStream:s,isReadableStream:Q0,isReadableEnded:u}=G8(),K0=globalThis.AbortController||_5().AbortController,Q,G;function J(T,y,r){let a=!1;T.on("close",()=>{a=!0});let t=V(T,{readable:y,writable:r},(l)=>{a=!l});return{destroy:(l)=>{a||(a=!0,B.destroyer(T,l||new k("pipe")))},cleanup:t}}function X(T){return w(T[T.length-1],"streams[stream.length - 1]"),T.pop()}function U(T){if(g(T))return T;if(p(T))return $(T);throw new H("val",["Readable","Iterable","AsyncIterable"],T)}async function*$(T){G||(G=N7()),yield*G.prototype[N].call(T)}async function j(T,y,r,{end:a}){let t,l=null,h=(G0)=>{if(G0&&(t=G0),l){let F0=l;l=null,F0()}},n=()=>new Z((G0,F0)=>{t?F0(t):l=()=>{t?F0(t):G0()}});y.on("drain",h);let q0=V(y,{readable:!1},h);try{y.writableNeedDrain&&await n();for await(let G0 of T)y.write(G0)||await n();a&&y.end(),await n(),r()}catch(G0){r(t!==G0?L(t,G0):G0)}finally{q0(),y.off("drain",h)}}async function K(T,y,r,{end:a}){f(y)&&(y=y.writable);let t=y.getWriter();try{for await(let l of T)await t.ready,t.write(l).catch(()=>{});await t.ready,a&&await t.close(),r()}catch(l){try{await t.abort(l),r(l)}catch(h){r(h)}}}function W(...T){return z(T,C(X(T)))}function z(T,y,r){if(T.length===1&&O(T[0])&&(T=T[0]),T.length<2)throw new R("streams");let a=new K0,t=a.signal,l=r?.signal,h=[];x(l,"options.signal");function n(){d(new M)}l?.addEventListener("abort",n);let q0,G0,F0=[],b=0;function E(Y0){d(Y0,--b===0)}function d(Y0,X0){if(Y0&&(!q0||q0.code==="ERR_STREAM_PREMATURE_CLOSE")&&(q0=Y0),!(!q0&&!X0)){for(;F0.length;)F0.shift()(q0);l?.removeEventListener("abort",n),a.abort(),X0&&(q0||h.forEach((g0)=>g0()),F.nextTick(y,q0,G0))}}let e;for(let Y0=0;Y0<T.length;Y0++){let X0=T[Y0],g0=Y0<T.length-1,$0=Y0>0,z0=g0||r?.end!==!1,_0=Y0===T.length-1;if(m(X0)){let I=function(S){S&&S.name!=="AbortError"&&S.code!=="ERR_STREAM_PREMATURE_CLOSE"&&E(S)};var V0=I;if(z0){let{destroy:S,cleanup:c}=J(X0,g0,$0);F0.push(S),_(X0)&&_0&&h.push(c)}X0.on("error",I),_(X0)&&_0&&h.push(()=>{X0.removeListener("error",I)})}if(Y0===0)if(typeof X0=="function"){if(e=X0({signal:t}),!g(e))throw new P("Iterable, AsyncIterable or Stream","source",e)}else g(X0)||p(X0)||f(X0)?e=X0:e=D.from(X0);else if(typeof X0=="function"){if(f(e)){var W0;e=U((W0=e)===null||W0===void 0?void 0:W0.readable)}else e=U(e);if(e=X0(e,{signal:t}),g0){if(!g(e,!0))throw new P("AsyncIterable",`transform[${Y0-1}]`,e)}else{var J0;Q||(Q=j3());let I=new Q({objectMode:!0}),S=(J0=e)===null||J0===void 0?void 0:J0.then;if(typeof S=="function")b++,S.call(e,(i)=>{G0=i,i!=null&&I.write(i),z0&&I.end(),F.nextTick(E)},(i)=>{I.destroy(i),F.nextTick(E,i)});else if(g(e,!0))b++,j(e,I,E,{end:z0});else if(Q0(e)||f(e)){let i=e.readable||e;b++,j(i,I,E,{end:z0})}else throw new P("AsyncIterable or Promise","destination",e);e=I;let{destroy:c,cleanup:o}=J(e,!1,!0);F0.push(c),_0&&h.push(o)}}else if(m(X0)){if(p(e)){b+=2;let I=A(e,X0,E,{end:z0});_(X0)&&_0&&h.push(I)}else if(f(e)||Q0(e)){let I=e.readable||e;b++,j(I,X0,E,{end:z0})}else if(g(e))b++,j(e,X0,E,{end:z0});else throw new H("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],e);e=X0}else if(s(X0)){if(p(e))b++,K(U(e),X0,E,{end:z0});else if(Q0(e)||g(e))b++,K(e,X0,E,{end:z0});else if(f(e))b++,K(e.readable,X0,E,{end:z0});else throw new H("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],e);e=X0}else e=D.from(X0)}return(t!=null&&t.aborted||l!=null&&l.aborted)&&F.nextTick(n),e}function A(T,y,r,{end:a}){let t=!1;if(y.on("close",()=>{t||r(new v)}),T.pipe(y,{end:!1}),a){let h=function(){t=!0,y.end()};var l=h;u(T)?F.nextTick(h):T.once("end",h)}else r();return V(T,{readable:!0,writable:!1},(h)=>{let n=T._readableState;h&&h.code==="ERR_STREAM_PREMATURE_CLOSE"&&n&&n.ended&&!n.errored&&!n.errorEmitted?T.once("end",r).once("error",r):r(h)}),V(y,{readable:!1,writable:!0},r)}q.exports={pipelineImpl:z,pipeline:W}}),H3=Z0((Y,q)=>{var{pipeline:F}=b5(),O=Q8(),{destroyer:Z}=W1(),{isNodeStream:N,isReadable:V,isWritable:C,isWebStream:B,isTransformStream:D,isWritableStream:L,isReadableStream:H}=G8(),{AbortError:P,codes:{ERR_INVALID_ARG_VALUE:R,ERR_MISSING_ARGS:k}}=A6(),v=$8();q.exports=function(...M){if(M.length===0)throw new k("streams");if(M.length===1)return O.from(M[0]);let w=[...M];if(typeof M[0]=="function"&&(M[0]=O.from(M[0])),typeof M[M.length-1]=="function"){let Q=M.length-1;M[Q]=O.from(M[Q])}for(let Q=0;Q<M.length;++Q)if(!(!N(M[Q])&&!B(M[Q]))){if(Q<M.length-1&&!(V(M[Q])||H(M[Q])||D(M[Q])))throw new R(`streams[${Q}]`,w[Q],"must be readable");if(Q>0&&!(C(M[Q])||L(M[Q])||D(M[Q])))throw new R(`streams[${Q}]`,w[Q],"must be writable")}let x,g,_,p,m;function f(Q){let G=p;p=null,G?G(Q):Q?m.destroy(Q):!K0&&!u&&m.destroy()}let s=M[0],Q0=F(M,f),u=!!(C(s)||L(s)||D(s)),K0=!!(V(Q0)||H(Q0)||D(Q0));if(m=new O({writableObjectMode:!!(s!=null&&s.writableObjectMode),readableObjectMode:!!(Q0!=null&&Q0.writableObjectMode),writable:u,readable:K0}),u){if(N(s))m._write=function(G,J,X){s.write(G,J)?X():x=X},m._final=function(G){s.end(),g=G},s.on("drain",function(){if(x){let G=x;x=null,G()}});else if(B(s)){let G=(D(s)?s.writable:s).getWriter();m._write=async function(J,X,U){try{await G.ready,G.write(J).catch(()=>{}),U()}catch($){U($)}},m._final=async function(J){try{await G.ready,G.close().catch(()=>{}),g=J}catch(X){J(X)}}}let Q=D(Q0)?Q0.readable:Q0;v(Q,()=>{if(g){let G=g;g=null,G()}})}if(K0){if(N(Q0))Q0.on("readable",function(){if(_){let Q=_;_=null,Q()}}),Q0.on("end",function(){m.push(null)}),m._read=function(){for(;;){let Q=Q0.read();if(Q===null){_=m._read;return}if(!m.push(Q))return}};else if(B(Q0)){let Q=(D(Q0)?Q0.readable:Q0).getReader();m._read=async function(){for(;;)try{let{value:G,done:J}=await Q.read();if(!m.push(G))return;if(J){m.push(null);return}}catch{return}}}}return m._destroy=function(Q,G){!Q&&p!==null&&(Q=new P),_=null,x=null,g=null,p===null?G(Q):(p=G,N(Q0)&&Z(Q0,Q))},m}}),mX=Z0((Y,q)=>{var F=globalThis.AbortController||_5().AbortController,{codes:{ERR_INVALID_ARG_VALUE:O,ERR_INVALID_ARG_TYPE:Z,ERR_MISSING_ARGS:N,ERR_OUT_OF_RANGE:V},AbortError:C}=A6(),{validateAbortSignal:B,validateInteger:D,validateObject:L}=D7(),H=P6().Symbol("kWeak"),{finished:P}=$8(),R=H3(),{addAbortSignalNoValidate:k}=L7(),{isWritable:v,isNodeStream:M}=G8(),{ArrayPrototypePush:w,MathFloor:x,Number:g,NumberIsNaN:_,Promise:p,PromiseReject:m,PromisePrototypeThen:f,Symbol:s}=P6(),Q0=s("kEmpty"),u=s("kEof");function K0(a,t){if(t!=null&&L(t,"options"),t?.signal!=null&&B(t.signal,"options.signal"),M(a)&&!v(a))throw new O("stream",a,"must be writable");let l=R(this,a);return t!=null&&t.signal&&k(t.signal,l),l}function Q(a,t){if(typeof a!="function")throw new Z("fn",["Function","AsyncFunction"],a);t!=null&&L(t,"options"),t?.signal!=null&&B(t.signal,"options.signal");let l=1;return t?.concurrency!=null&&(l=x(t.concurrency)),D(l,"concurrency",1),async function*(){var h,n;let q0=new F,G0=this,F0=[],b=q0.signal,E={signal:b},d=()=>q0.abort();t!=null&&(h=t.signal)!==null&&h!==void 0&&h.aborted&&d(),t==null||(n=t.signal)===null||n===void 0||n.addEventListener("abort",d);let e,V0,W0=!1;function J0(){W0=!0}async function Y0(){try{for await(let $0 of G0){var X0;if(W0)return;if(b.aborted)throw new C;try{$0=a($0,E)}catch(z0){$0=m(z0)}$0!==Q0&&(typeof((X0=$0)===null||X0===void 0?void 0:X0.catch)=="function"&&$0.catch(J0),F0.push($0),e&&(e(),e=null),!W0&&F0.length&&F0.length>=l&&await new p((z0)=>{V0=z0}))}F0.push(u)}catch($0){let z0=m($0);f(z0,void 0,J0),F0.push(z0)}finally{var g0;W0=!0,e&&(e(),e=null),t==null||(g0=t.signal)===null||g0===void 0||g0.removeEventListener("abort",d)}}Y0();try{for(;;){for(;F0.length>0;){let X0=await F0[0];if(X0===u)return;if(b.aborted)throw new C;X0!==Q0&&(yield X0),F0.shift(),V0&&(V0(),V0=null)}await new p((X0)=>{e=X0})}}finally{q0.abort(),W0=!0,V0&&(V0(),V0=null)}}.call(this)}function G(a=void 0){return a!=null&&L(a,"options"),a?.signal!=null&&B(a.signal,"options.signal"),async function*(){let t=0;for await(let h of this){var l;if(a!=null&&(l=a.signal)!==null&&l!==void 0&&l.aborted)throw new C({cause:a.signal.reason});yield[t++,h]}}.call(this)}async function J(a,t=void 0){for await(let l of j.call(this,a,t))return!0;return!1}async function X(a,t=void 0){if(typeof a!="function")throw new Z("fn",["Function","AsyncFunction"],a);return!await J.call(this,async(...l)=>!await a(...l),t)}async function U(a,t){for await(let l of j.call(this,a,t))return l}async function $(a,t){if(typeof a!="function")throw new Z("fn",["Function","AsyncFunction"],a);async function l(h,n){return await a(h,n),Q0}for await(let h of Q.call(this,l,t));}function j(a,t){if(typeof a!="function")throw new Z("fn",["Function","AsyncFunction"],a);async function l(h,n){return await a(h,n)?h:Q0}return Q.call(this,l,t)}var K=class extends N{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function W(a,t,l){var h;if(typeof a!="function")throw new Z("reducer",["Function","AsyncFunction"],a);l!=null&&L(l,"options"),l?.signal!=null&&B(l.signal,"options.signal");let n=arguments.length>1;if(l!=null&&(h=l.signal)!==null&&h!==void 0&&h.aborted){let E=new C(void 0,{cause:l.signal.reason});throw this.once("error",()=>{}),await P(this.destroy(E)),E}let q0=new F,G0=q0.signal;if(l!=null&&l.signal){let E={once:!0,[H]:this};l.signal.addEventListener("abort",()=>q0.abort(),E)}let F0=!1;try{for await(let E of this){var b;if(F0=!0,l!=null&&(b=l.signal)!==null&&b!==void 0&&b.aborted)throw new C;n?t=await a(t,E,{signal:G0}):(t=E,n=!0)}if(!F0&&!n)throw new K}finally{q0.abort()}return t}async function z(a){a!=null&&L(a,"options"),a?.signal!=null&&B(a.signal,"options.signal");let t=[];for await(let h of this){var l;if(a!=null&&(l=a.signal)!==null&&l!==void 0&&l.aborted)throw new C(void 0,{cause:a.signal.reason});w(t,h)}return t}function A(a,t){let l=Q.call(this,a,t);return async function*(){for await(let h of l)yield*h}.call(this)}function T(a){if(a=g(a),_(a))return 0;if(a<0)throw new V("number",">= 0",a);return a}function y(a,t=void 0){return t!=null&&L(t,"options"),t?.signal!=null&&B(t.signal,"options.signal"),a=T(a),async function*(){var l;if(t!=null&&(l=t.signal)!==null&&l!==void 0&&l.aborted)throw new C;for await(let n of this){var h;if(t!=null&&(h=t.signal)!==null&&h!==void 0&&h.aborted)throw new C;a--<=0&&(yield n)}}.call(this)}function r(a,t=void 0){return t!=null&&L(t,"options"),t?.signal!=null&&B(t.signal,"options.signal"),a=T(a),async function*(){var l;if(t!=null&&(l=t.signal)!==null&&l!==void 0&&l.aborted)throw new C;for await(let n of this){var h;if(t!=null&&(h=t.signal)!==null&&h!==void 0&&h.aborted)throw new C;if(a-- >0)yield n;else return}}.call(this)}q.exports.streamReturningOperators={asIndexedPairs:G,drop:y,filter:j,flatMap:A,map:Q,take:r,compose:K0},q.exports.promiseReturningOperators={every:X,forEach:$,reduce:W,toArray:z,some:J,find:U}}),C3=Z0((Y,q)=>{var{ArrayPrototypePop:F,Promise:O}=P6(),{isIterable:Z,isNodeStream:N,isWebStream:V}=G8(),{pipelineImpl:C}=b5(),{finished:B}=$8();O3();function D(...L){return new O((H,P)=>{let R,k,v=L[L.length-1];if(v&&typeof v=="object"&&!N(v)&&!Z(v)&&!V(v)){let M=F(L);R=M.signal,k=M.end}C(L,(M,w)=>{M?P(M):H(w)},{signal:R,end:k})})}q.exports={finished:B,pipeline:D}}),O3=Z0((Y,q)=>{var{Buffer:F}=R6(),{ObjectDefineProperty:O,ObjectKeys:Z,ReflectApply:N}=P6(),{promisify:{custom:V}}=e6(),{streamReturningOperators:C,promiseReturningOperators:B}=mX(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:D}}=A6(),L=H3(),{pipeline:H}=b5(),{destroyer:P}=W1(),R=$8(),k=C3(),v=G8(),M=q.exports=m5().Stream;M.isDisturbed=v.isDisturbed,M.isErrored=v.isErrored,M.isReadable=v.isReadable,M.Readable=N7();for(let g of Z(C)){let _=function(...m){if(new.target)throw D();return M.Readable.from(N(p,this,m))};w=_;let p=C[g];O(_,"name",{__proto__:null,value:p.name}),O(_,"length",{__proto__:null,value:p.length}),O(M.Readable.prototype,g,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}var w;for(let g of Z(B)){let _=function(...m){if(new.target)throw D();return N(p,this,m)};w=_;let p=B[g];O(_,"name",{__proto__:null,value:p.name}),O(_,"length",{__proto__:null,value:p.length}),O(M.Readable.prototype,g,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}var w;M.Writable=$3(),M.Duplex=Q8(),M.Transform=q3(),M.PassThrough=j3(),M.pipeline=H;var{addAbortSignal:x}=L7();M.addAbortSignal=x,M.finished=R,M.destroy=P,M.compose=L,O(M,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return k}}),O(H,V,{__proto__:null,enumerable:!0,get(){return k.pipeline}}),O(R,V,{__proto__:null,enumerable:!0,get(){return k.finished}}),M.Stream=M,M._isUint8Array=function(g){return g instanceof Uint8Array},M._uint8ArrayToBuffer=function(g){return F.from(g.buffer,g.byteOffset,g.byteLength)}}),t4=Z0((Y,q)=>{var F=O3(),O=C3(),Z=F.Readable.destroy;q.exports=F.Readable,q.exports._uint8ArrayToBuffer=F._uint8ArrayToBuffer,q.exports._isUint8Array=F._isUint8Array,q.exports.isDisturbed=F.isDisturbed,q.exports.isErrored=F.isErrored,q.exports.isReadable=F.isReadable,q.exports.Readable=F.Readable,q.exports.Writable=F.Writable,q.exports.Duplex=F.Duplex,q.exports.Transform=F.Transform,q.exports.PassThrough=F.PassThrough,q.exports.addAbortSignal=F.addAbortSignal,q.exports.finished=F.finished,q.exports.destroy=F.destroy,q.exports.destroy=Z,q.exports.pipeline=F.pipeline,q.exports.compose=F.compose,Object.defineProperty(F,"promises",{configurable:!0,enumerable:!0,get(){return O}}),q.exports.Stream=F.Stream,q.exports.default=q.exports}),h5={};C7(h5,{default:()=>D3});var D3,pX=v5(()=>{x5(h5,v8(t4())),D3=v8(t4())}),q8=Z0((Y,q)=>{var F=l0().Buffer,O=(pX(),g6(h5)).Transform,Z=S5().StringDecoder,N=h0();function V(C){O.call(this),this.hashMode=typeof C=="string",this.hashMode?this[C]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}N(V,O),V.prototype.update=function(C,B,D){typeof C=="string"&&(C=F.from(C,B));var L=this._update(C);return this.hashMode?this:(D&&(L=this._toString(L,D)),L)},V.prototype.setAutoPadding=function(){},V.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},V.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},V.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},V.prototype._transform=function(C,B,D){var L;try{this.hashMode?this._update(C):this.push(this._update(C))}catch(H){L=H}finally{D(L)}},V.prototype._flush=function(C){var B;try{this.push(this.__final())}catch(D){B=D}C(B)},V.prototype._finalOrDigest=function(C){var B=this.__final()||F.alloc(0);return C&&(B=this._toString(B,C,!0)),B},V.prototype._toString=function(C,B,D){if(this._decoder||(this._decoder=new Z(B),this._encoding=B),this._encoding!==B)throw new Error("can't switch encodings");var L=this._decoder.write(C);return D&&(L+=this._decoder.end()),L},q.exports=V}),w1=Z0((Y,q)=>{var F=h0(),O=w5(),Z=g5(),N=y5(),V=q8();function C(B){V.call(this,"digest"),this._hash=B}F(C,V),C.prototype._update=function(B){this._hash.update(B)},C.prototype._final=function(){return this._hash.digest()},q.exports=function(B){return B=B.toLowerCase(),B==="md5"?new O:B==="rmd160"||B==="ripemd160"?new Z:new C(N(B))}}),bX=Z0((Y,q)=>{var F=h0(),O=l0().Buffer,Z=q8(),N=O.alloc(128),V=64;function C(B,D){Z.call(this,"digest"),typeof D=="string"&&(D=O.from(D)),this._alg=B,this._key=D,D.length>V?D=B(D):D.length<V&&(D=O.concat([D,N],V));for(var L=this._ipad=O.allocUnsafe(V),H=this._opad=O.allocUnsafe(V),P=0;P<V;P++)L[P]=D[P]^54,H[P]=D[P]^92;this._hash=[L]}F(C,Z),C.prototype._update=function(B){this._hash.push(B)},C.prototype._final=function(){var B=this._alg(O.concat(this._hash));return this._alg(O.concat([this._opad,B]))},q.exports=C}),L3=Z0((Y,q)=>{var F=w5();q.exports=function(O){return new F().update(O).digest()}}),N3=Z0((Y,q)=>{var F=h0(),O=bX(),Z=q8(),N=l0().Buffer,V=L3(),C=g5(),B=y5(),D=N.alloc(128);function L(H,P){Z.call(this,"digest"),typeof P=="string"&&(P=N.from(P));var R=H==="sha512"||H==="sha384"?128:64;if(this._alg=H,this._key=P,P.length>R){var k=H==="rmd160"?new C:B(H);P=k.update(P).digest()}else P.length<R&&(P=N.concat([P,D],R));for(var v=this._ipad=N.allocUnsafe(R),M=this._opad=N.allocUnsafe(R),w=0;w<R;w++)v[w]=P[w]^54,M[w]=P[w]^92;this._hash=H==="rmd160"?new C:B(H),this._hash.update(v)}F(L,Z),L.prototype._update=function(H){this._hash.update(H)},L.prototype._final=function(){var H=this._hash.digest(),P=this._alg==="rmd160"?new C:B(this._alg);return P.update(this._opad).update(H).digest()},q.exports=function(H,P){return H=H.toLowerCase(),H==="rmd160"||H==="ripemd160"?new L("rmd160",P):H==="md5"?new O(V,P):new L(H,P)}}),P3=Z0((Y,q)=>{q.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"}}}),hX=Z0((Y,q)=>{q.exports=P3()}),k3=Z0((Y,q)=>{var F=Math.pow(2,30)-1;q.exports=function(O,Z){if(typeof O!="number")throw new TypeError("Iterations not a number");if(O<0)throw new TypeError("Bad iterations");if(typeof Z!="number")throw new TypeError("Key length not a number");if(Z<0||Z>F||Z!==Z)throw new TypeError("Bad key length")}}),B3=Z0((Y,q)=>{var F;window.process&&window.process.browser?F="utf-8":window.process&&window.process.version?(O=parseInt(process.version.split(".")[0].slice(1),10),F=O>=6?"utf-8":"binary"):F="utf-8";var O;q.exports=F}),R3=Z0((Y,q)=>{var F=l0().Buffer;q.exports=function(O,Z,N){if(F.isBuffer(O))return O;if(typeof O=="string")return F.from(O,Z);if(ArrayBuffer.isView(O))return F.from(O.buffer);throw new TypeError(N+" must be a string, a Buffer, a typed array or a DataView")}}),I3=Z0((Y,q)=>{var F=L3(),O=g5(),Z=y5(),N=l0().Buffer,V=k3(),C=B3(),B=R3(),D=N.alloc(128),L={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function H(k,v,M){var w=P(k),x=k==="sha512"||k==="sha384"?128:64;v.length>x?v=w(v):v.length<x&&(v=N.concat([v,D],x));for(var g=N.allocUnsafe(x+L[k]),_=N.allocUnsafe(x+L[k]),p=0;p<x;p++)g[p]=v[p]^54,_[p]=v[p]^92;var m=N.allocUnsafe(x+M+4);g.copy(m,0,0,x),this.ipad1=m,this.ipad2=g,this.opad=_,this.alg=k,this.blocksize=x,this.hash=w,this.size=L[k]}H.prototype.run=function(k,v){k.copy(v,this.blocksize);var M=this.hash(v);return M.copy(this.opad,this.blocksize),this.hash(this.opad)};function P(k){function v(w){return Z(k).update(w).digest()}function M(w){return new O().update(w).digest()}return k==="rmd160"||k==="ripemd160"?M:k==="md5"?F:v}function R(k,v,M,w,x){V(M,w),k=B(k,C,"Password"),v=B(v,C,"Salt"),x=x||"sha1";var g=new H(x,k,v.length),_=N.allocUnsafe(w),p=N.allocUnsafe(v.length+4);v.copy(p,0,0,v.length);for(var m=0,f=L[x],s=Math.ceil(w/f),Q0=1;Q0<=s;Q0++){p.writeUInt32BE(Q0,v.length);for(var u=g.run(p,g.ipad1),K0=u,Q=1;Q<M;Q++){K0=g.run(K0,g.ipad2);for(var G=0;G<f;G++)u[G]^=K0[G]}u.copy(_,m),m+=f}return _}q.exports=R}),cX=Z0((Y,q)=>{var F=l0().Buffer,O=k3(),Z=B3(),N=I3(),V=R3(),C,B=window.crypto&&window.crypto.subtle,D={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"},L=[];function H(M){if(window.process&&!window.process.browser||!B||!B.importKey||!B.deriveBits)return Promise.resolve(!1);if(L[M]!==void 0)return L[M];C=C||F.alloc(8);var w=k(C,C,10,128,M).then(function(){return!0}).catch(function(){return!1});return L[M]=w,w}var P;function R(){return P||(window.process&&window.process.nextTick?P=window.process.nextTick:window.queueMicrotask?P=window.queueMicrotask:window.setImmediate?P=window.setImmediate:P=window.setTimeout,P)}function k(M,w,x,g,_){return B.importKey("raw",M,{name:"PBKDF2"},!1,["deriveBits"]).then(function(p){return B.deriveBits({name:"PBKDF2",salt:w,iterations:x,hash:{name:_}},p,g<<3)}).then(function(p){return F.from(p)})}function v(M,w){M.then(function(x){R()(function(){w(null,x)})},function(x){R()(function(){w(x)})})}q.exports=function(M,w,x,g,_,p){typeof _=="function"&&(p=_,_=void 0),_=_||"sha1";var m=D[_.toLowerCase()];if(!m||typeof window.Promise!="function"){R()(function(){var f;try{f=N(M,w,x,g,_)}catch(s){return p(s)}p(null,f)});return}if(O(x,g),M=V(M,Z,"Password"),w=V(w,Z,"Salt"),typeof p!="function")throw new Error("No callback provided to pbkdf2");v(H(m).then(function(f){return f?k(M,w,x,g,m):N(M,w,x,g,_)}),p)}}),T3=Z0((Y)=>{Y.pbkdf2=cX(),Y.pbkdf2Sync=I3()}),M3=Z0((Y)=>{Y.readUInt32BE=function(Z,N){var V=Z[0+N]<<24|Z[1+N]<<16|Z[2+N]<<8|Z[3+N];return V>>>0},Y.writeUInt32BE=function(Z,N,V){Z[0+V]=N>>>24,Z[1+V]=N>>>16&255,Z[2+V]=N>>>8&255,Z[3+V]=N&255},Y.ip=function(Z,N,V,C){for(var B=0,D=0,L=6;L>=0;L-=2){for(var H=0;H<=24;H+=8)B<<=1,B|=N>>>H+L&1;for(var H=0;H<=24;H+=8)B<<=1,B|=Z>>>H+L&1}for(var L=6;L>=0;L-=2){for(var H=1;H<=25;H+=8)D<<=1,D|=N>>>H+L&1;for(var H=1;H<=25;H+=8)D<<=1,D|=Z>>>H+L&1}V[C+0]=B>>>0,V[C+1]=D>>>0},Y.rip=function(Z,N,V,C){for(var B=0,D=0,L=0;L<4;L++)for(var H=24;H>=0;H-=8)B<<=1,B|=N>>>H+L&1,B<<=1,B|=Z>>>H+L&1;for(var L=4;L<8;L++)for(var H=24;H>=0;H-=8)D<<=1,D|=N>>>H+L&1,D<<=1,D|=Z>>>H+L&1;V[C+0]=B>>>0,V[C+1]=D>>>0},Y.pc1=function(Z,N,V,C){for(var B=0,D=0,L=7;L>=5;L--){for(var H=0;H<=24;H+=8)B<<=1,B|=N>>H+L&1;for(var H=0;H<=24;H+=8)B<<=1,B|=Z>>H+L&1}for(var H=0;H<=24;H+=8)B<<=1,B|=N>>H+L&1;for(var L=1;L<=3;L++){for(var H=0;H<=24;H+=8)D<<=1,D|=N>>H+L&1;for(var H=0;H<=24;H+=8)D<<=1,D|=Z>>H+L&1}for(var H=0;H<=24;H+=8)D<<=1,D|=Z>>H+L&1;V[C+0]=B>>>0,V[C+1]=D>>>0},Y.r28shl=function(Z,N){return Z<<N&268435455|Z>>>28-N};var q=[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];Y.pc2=function(Z,N,V,C){for(var B=0,D=0,L=q.length>>>1,H=0;H<L;H++)B<<=1,B|=Z>>>q[H]&1;for(var H=L;H<q.length;H++)D<<=1,D|=N>>>q[H]&1;V[C+0]=B>>>0,V[C+1]=D>>>0},Y.expand=function(Z,N,V){var C=0,B=0;C=(Z&1)<<5|Z>>>27;for(var D=23;D>=15;D-=4)C<<=6,C|=Z>>>D&63;for(var D=11;D>=3;D-=4)B|=Z>>>D&63,B<<=6;B|=(Z&31)<<1|Z>>>31,N[V+0]=C>>>0,N[V+1]=B>>>0};var F=[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];Y.substitute=function(Z,N){for(var V=0,C=0;C<4;C++){var B=Z>>>18-C*6&63,D=F[C*64+B];V<<=4,V|=D}for(var C=0;C<4;C++){var B=N>>>18-C*6&63,D=F[256+C*64+B];V<<=4,V|=D}return V>>>0};var O=[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];Y.permute=function(Z){for(var N=0,V=0;V<O.length;V++)N<<=1,N|=Z>>>O[V]&1;return N>>>0},Y.padSplit=function(Z,N,V){for(var C=Z.toString(2);C.length<N;)C="0"+C;for(var B=[],D=0;D<N;D+=V)B.push(C.slice(D,D+V));return B.join(" ")}}),y6=Z0((Y,q)=>{q.exports=F;function F(O,Z){if(!O)throw new Error(Z||"Assertion failed")}F.equal=function(O,Z,N){if(O!=Z)throw new Error(N||"Assertion failed: "+O+" != "+Z)}}),c5=Z0((Y,q)=>{var F=y6();function O(Z){this.options=Z,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=Z.padding!==!1}q.exports=O,O.prototype._init=function(){},O.prototype.update=function(Z){return Z.length===0?[]:this.type==="decrypt"?this._updateDecrypt(Z):this._updateEncrypt(Z)},O.prototype._buffer=function(Z,N){for(var V=Math.min(this.buffer.length-this.bufferOff,Z.length-N),C=0;C<V;C++)this.buffer[this.bufferOff+C]=Z[N+C];return this.bufferOff+=V,V},O.prototype._flushBuffer=function(Z,N){return this._update(this.buffer,0,Z,N),this.bufferOff=0,this.blockSize},O.prototype._updateEncrypt=function(Z){var N=0,V=0,C=(this.bufferOff+Z.length)/this.blockSize|0,B=new Array(C*this.blockSize);this.bufferOff!==0&&(N+=this._buffer(Z,N),this.bufferOff===this.buffer.length&&(V+=this._flushBuffer(B,V)));for(var D=Z.length-(Z.length-N)%this.blockSize;N<D;N+=this.blockSize)this._update(Z,N,B,V),V+=this.blockSize;for(;N<Z.length;N++,this.bufferOff++)this.buffer[this.bufferOff]=Z[N];return B},O.prototype._updateDecrypt=function(Z){for(var N=0,V=0,C=Math.ceil((this.bufferOff+Z.length)/this.blockSize)-1,B=new Array(C*this.blockSize);C>0;C--)N+=this._buffer(Z,N),V+=this._flushBuffer(B,V);return N+=this._buffer(Z,N),B},O.prototype.final=function(Z){var N;Z&&(N=this.update(Z));var V;return this.type==="encrypt"?V=this._finalEncrypt():V=this._finalDecrypt(),N?N.concat(V):V},O.prototype._pad=function(Z,N){if(N===0)return!1;for(;N<Z.length;)Z[N++]=0;return!0},O.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var Z=new Array(this.blockSize);return this._update(this.buffer,0,Z,0),Z},O.prototype._unpad=function(Z){return Z},O.prototype._finalDecrypt=function(){F.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var Z=new Array(this.blockSize);return this._flushBuffer(Z,0),this._unpad(Z)}}),A3=Z0((Y,q)=>{var F=y6(),O=h0(),Z=M3(),N=c5();function V(){this.tmp=new Array(2),this.keys=null}function C(D){N.call(this,D);var L=new V;this._desState=L,this.deriveKeys(L,D.key)}O(C,N),q.exports=C,C.create=function(D){return new C(D)};var B=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];C.prototype.deriveKeys=function(D,L){D.keys=new Array(32),F.equal(L.length,this.blockSize,"Invalid key length");var H=Z.readUInt32BE(L,0),P=Z.readUInt32BE(L,4);Z.pc1(H,P,D.tmp,0),H=D.tmp[0],P=D.tmp[1];for(var R=0;R<D.keys.length;R+=2){var k=B[R>>>1];H=Z.r28shl(H,k),P=Z.r28shl(P,k),Z.pc2(H,P,D.keys,R)}},C.prototype._update=function(D,L,H,P){var R=this._desState,k=Z.readUInt32BE(D,L),v=Z.readUInt32BE(D,L+4);Z.ip(k,v,R.tmp,0),k=R.tmp[0],v=R.tmp[1],this.type==="encrypt"?this._encrypt(R,k,v,R.tmp,0):this._decrypt(R,k,v,R.tmp,0),k=R.tmp[0],v=R.tmp[1],Z.writeUInt32BE(H,k,P),Z.writeUInt32BE(H,v,P+4)},C.prototype._pad=function(D,L){if(this.padding===!1)return!1;for(var H=D.length-L,P=L;P<D.length;P++)D[P]=H;return!0},C.prototype._unpad=function(D){if(this.padding===!1)return D;for(var L=D[D.length-1],H=D.length-L;H<D.length;H++)F.equal(D[H],L);return D.slice(0,D.length-L)},C.prototype._encrypt=function(D,L,H,P,R){for(var k=L,v=H,M=0;M<D.keys.length;M+=2){var w=D.keys[M],x=D.keys[M+1];Z.expand(v,D.tmp,0),w^=D.tmp[0],x^=D.tmp[1];var g=Z.substitute(w,x),_=Z.permute(g),p=v;v=(k^_)>>>0,k=p}Z.rip(v,k,P,R)},C.prototype._decrypt=function(D,L,H,P,R){for(var k=H,v=L,M=D.keys.length-2;M>=0;M-=2){var w=D.keys[M],x=D.keys[M+1];Z.expand(k,D.tmp,0),w^=D.tmp[0],x^=D.tmp[1];var g=Z.substitute(w,x),_=Z.permute(g),p=k;k=(v^_)>>>0,v=p}Z.rip(k,v,P,R)}}),lX=Z0((Y)=>{var q=y6(),F=h0(),O={};function Z(V){q.equal(V.length,8,"Invalid IV length"),this.iv=new Array(8);for(var C=0;C<this.iv.length;C++)this.iv[C]=V[C]}function N(V){function C(H){V.call(this,H),this._cbcInit()}F(C,V);for(var B=Object.keys(O),D=0;D<B.length;D++){var L=B[D];C.prototype[L]=O[L]}return C.create=function(H){return new C(H)},C}Y.instantiate=N,O._cbcInit=function(){var V=new Z(this.options.iv);this._cbcState=V},O._update=function(V,C,B,D){var L=this._cbcState,H=this.constructor.super_.prototype,P=L.iv;if(this.type==="encrypt"){for(var R=0;R<this.blockSize;R++)P[R]^=V[C+R];H._update.call(this,P,0,B,D);for(var R=0;R<this.blockSize;R++)P[R]=B[D+R]}else{H._update.call(this,V,C,B,D);for(var R=0;R<this.blockSize;R++)B[D+R]^=P[R];for(var R=0;R<this.blockSize;R++)P[R]=V[C+R]}}}),dX=Z0((Y,q)=>{var F=y6(),O=h0(),Z=c5(),N=A3();function V(B,D){F.equal(D.length,24,"Invalid key length");var L=D.slice(0,8),H=D.slice(8,16),P=D.slice(16,24);B==="encrypt"?this.ciphers=[N.create({type:"encrypt",key:L}),N.create({type:"decrypt",key:H}),N.create({type:"encrypt",key:P})]:this.ciphers=[N.create({type:"decrypt",key:P}),N.create({type:"encrypt",key:H}),N.create({type:"decrypt",key:L})]}function C(B){Z.call(this,B);var D=new V(this.type,this.options.key);this._edeState=D}O(C,Z),q.exports=C,C.create=function(B){return new C(B)},C.prototype._update=function(B,D,L,H){var P=this._edeState;P.ciphers[0]._update(B,D,L,H),P.ciphers[1]._update(L,H,L,H),P.ciphers[2]._update(L,H,L,H)},C.prototype._pad=N.prototype._pad,C.prototype._unpad=N.prototype._unpad}),uX=Z0((Y)=>{Y.utils=M3(),Y.Cipher=c5(),Y.DES=A3(),Y.CBC=lX(),Y.EDE=dX()}),fX=Z0((Y,q)=>{var F=q8(),O=uX(),Z=h0(),N=l0().Buffer,V={"des-ede3-cbc":O.CBC.instantiate(O.EDE),"des-ede3":O.EDE,"des-ede-cbc":O.CBC.instantiate(O.EDE),"des-ede":O.EDE,"des-cbc":O.CBC.instantiate(O.DES),"des-ecb":O.DES};V.des=V["des-cbc"],V.des3=V["des-ede3-cbc"],q.exports=C,Z(C,F);function C(B){F.call(this);var D=B.mode.toLowerCase(),L=V[D],H;B.decrypt?H="decrypt":H="encrypt";var P=B.key;N.isBuffer(P)||(P=N.from(P)),(D==="des-ede"||D==="des-ede-cbc")&&(P=N.concat([P,P.slice(0,8)]));var R=B.iv;N.isBuffer(R)||(R=N.from(R)),this._des=L.create({key:P,iv:R,type:H})}C.prototype._update=function(B){return N.from(this._des.update(B))},C.prototype._final=function(){return N.from(this._des.final())}}),oX=Z0((Y)=>{Y.encrypt=function(q,F){return q._cipher.encryptBlock(F)},Y.decrypt=function(q,F){return q._cipher.decryptBlock(F)}}),g1=Z0((Y,q)=>{q.exports=function(F,O){for(var Z=Math.min(F.length,O.length),N=new Buffer(Z),V=0;V<Z;++V)N[V]=F[V]^O[V];return N}}),aX=Z0((Y)=>{var q=g1();Y.encrypt=function(F,O){var Z=q(O,F._prev);return F._prev=F._cipher.encryptBlock(Z),F._prev},Y.decrypt=function(F,O){var Z=F._prev;F._prev=O;var N=F._cipher.decryptBlock(O);return q(N,Z)}}),nX=Z0((Y)=>{var q=l0().Buffer,F=g1();function O(Z,N,V){var C=N.length,B=F(N,Z._cache);return Z._cache=Z._cache.slice(C),Z._prev=q.concat([Z._prev,V?N:B]),B}Y.encrypt=function(Z,N,V){for(var C=q.allocUnsafe(0),B;N.length;)if(Z._cache.length===0&&(Z._cache=Z._cipher.encryptBlock(Z._prev),Z._prev=q.allocUnsafe(0)),Z._cache.length<=N.length)B=Z._cache.length,C=q.concat([C,O(Z,N.slice(0,B),V)]),N=N.slice(B);else{C=q.concat([C,O(Z,N,V)]);break}return C}}),rX=Z0((Y)=>{var q=l0().Buffer;function F(O,Z,N){var V=O._cipher.encryptBlock(O._prev),C=V[0]^Z;return O._prev=q.concat([O._prev.slice(1),q.from([N?Z:C])]),C}Y.encrypt=function(O,Z,N){for(var V=Z.length,C=q.allocUnsafe(V),B=-1;++B<V;)C[B]=F(O,Z[B],N);return C}}),iX=Z0((Y)=>{var q=l0().Buffer;function F(Z,N,V){for(var C,B=-1,D=8,L=0,H,P;++B<D;)C=Z._cipher.encryptBlock(Z._prev),H=N&1<<7-B?128:0,P=C[0]^H,L+=(P&128)>>B%8,Z._prev=O(Z._prev,V?H:P);return L}function O(Z,N){var V=Z.length,C=-1,B=q.allocUnsafe(Z.length);for(Z=q.concat([Z,q.from([N])]);++C<V;)B[C]=Z[C]<<1|Z[C+1]>>7;return B}Y.encrypt=function(Z,N,V){for(var C=N.length,B=q.allocUnsafe(C),D=-1;++D<C;)B[D]=F(Z,N[D],V);return B}}),sX=Z0((Y)=>{var q=g1();function F(O){return O._prev=O._cipher.encryptBlock(O._prev),O._prev}Y.encrypt=function(O,Z){for(;O._cache.length<Z.length;)O._cache=Buffer.concat([O._cache,F(O)]);var N=O._cache.slice(0,Z.length);return O._cache=O._cache.slice(Z.length),q(Z,N)}}),v3=Z0((Y,q)=>{function F(O){for(var Z=O.length,N;Z--;)if(N=O.readUInt8(Z),N===255)O.writeUInt8(0,Z);else{N++,O.writeUInt8(N,Z);break}}q.exports=F}),e4=Z0((Y)=>{var q=g1(),F=l0().Buffer,O=v3();function Z(V){var C=V._cipher.encryptBlockRaw(V._prev);return O(V._prev),C}var N=16;Y.encrypt=function(V,C){var B=Math.ceil(C.length/N),D=V._cache.length;V._cache=F.concat([V._cache,F.allocUnsafe(B*N)]);for(var L=0;L<B;L++){var H=Z(V),P=D+L*N;V._cache.writeUInt32BE(H[0],P+0),V._cache.writeUInt32BE(H[1],P+4),V._cache.writeUInt32BE(H[2],P+8),V._cache.writeUInt32BE(H[3],P+12)}var R=V._cache.slice(0,C.length);return V._cache=V._cache.slice(C.length),q(C,R)}}),x3=Z0((Y,q)=>{q.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"}}}),l5=Z0((Y,q)=>{var F={ECB:oX(),CBC:aX(),CFB:nX(),CFB8:rX(),CFB1:iX(),OFB:sX(),CTR:e4(),GCM:e4()},O=x3();for(Z in O)O[Z].module=F[O[Z].mode];var Z;q.exports=O}),P7=Z0((Y,q)=>{var F=l0().Buffer;function O(D){F.isBuffer(D)||(D=F.from(D));for(var L=D.length/4|0,H=new Array(L),P=0;P<L;P++)H[P]=D.readUInt32BE(P*4);return H}function Z(D){for(var L=0;L<D.length;D++)D[L]=0}function N(D,L,H,P,R){for(var k=H[0],v=H[1],M=H[2],w=H[3],x=D[0]^L[0],g=D[1]^L[1],_=D[2]^L[2],p=D[3]^L[3],m,f,s,Q0,u=4,K0=1;K0<R;K0++)m=k[x>>>24]^v[g>>>16&255]^M[_>>>8&255]^w[p&255]^L[u++],f=k[g>>>24]^v[_>>>16&255]^M[p>>>8&255]^w[x&255]^L[u++],s=k[_>>>24]^v[p>>>16&255]^M[x>>>8&255]^w[g&255]^L[u++],Q0=k[p>>>24]^v[x>>>16&255]^M[g>>>8&255]^w[_&255]^L[u++],x=m,g=f,_=s,p=Q0;return m=(P[x>>>24]<<24|P[g>>>16&255]<<16|P[_>>>8&255]<<8|P[p&255])^L[u++],f=(P[g>>>24]<<24|P[_>>>16&255]<<16|P[p>>>8&255]<<8|P[x&255])^L[u++],s=(P[_>>>24]<<24|P[p>>>16&255]<<16|P[x>>>8&255]<<8|P[g&255])^L[u++],Q0=(P[p>>>24]<<24|P[x>>>16&255]<<16|P[g>>>8&255]<<8|P[_&255])^L[u++],m=m>>>0,f=f>>>0,s=s>>>0,Q0=Q0>>>0,[m,f,s,Q0]}var V=[0,1,2,4,8,16,32,64,128,27,54],C=function(){for(var D=new Array(256),L=0;L<256;L++)L<128?D[L]=L<<1:D[L]=L<<1^283;for(var H=[],P=[],R=[[],[],[],[]],k=[[],[],[],[]],v=0,M=0,w=0;w<256;++w){var x=M^M<<1^M<<2^M<<3^M<<4;x=x>>>8^x&255^99,H[v]=x,P[x]=v;var g=D[v],_=D[g],p=D[_],m=D[x]*257^x*16843008;R[0][v]=m<<24|m>>>8,R[1][v]=m<<16|m>>>16,R[2][v]=m<<8|m>>>24,R[3][v]=m,m=p*16843009^_*65537^g*257^v*16843008,k[0][x]=m<<24|m>>>8,k[1][x]=m<<16|m>>>16,k[2][x]=m<<8|m>>>24,k[3][x]=m,v===0?v=M=1:(v=g^D[D[D[p^g]]],M^=D[D[M]])}return{SBOX:H,INV_SBOX:P,SUB_MIX:R,INV_SUB_MIX:k}}();function B(D){this._key=O(D),this._reset()}B.blockSize=16,B.keySize=32,B.prototype.blockSize=B.blockSize,B.prototype.keySize=B.keySize,B.prototype._reset=function(){for(var D=this._key,L=D.length,H=L+6,P=(H+1)*4,R=[],k=0;k<L;k++)R[k]=D[k];for(k=L;k<P;k++){var v=R[k-1];k%L===0?(v=v<<8|v>>>24,v=C.SBOX[v>>>24]<<24|C.SBOX[v>>>16&255]<<16|C.SBOX[v>>>8&255]<<8|C.SBOX[v&255],v^=V[k/L|0]<<24):L>6&&k%L===4&&(v=C.SBOX[v>>>24]<<24|C.SBOX[v>>>16&255]<<16|C.SBOX[v>>>8&255]<<8|C.SBOX[v&255]),R[k]=R[k-L]^v}for(var M=[],w=0;w<P;w++){var x=P-w,g=R[x-(w%4?0:4)];w<4||x<=4?M[w]=g:M[w]=C.INV_SUB_MIX[0][C.SBOX[g>>>24]]^C.INV_SUB_MIX[1][C.SBOX[g>>>16&255]]^C.INV_SUB_MIX[2][C.SBOX[g>>>8&255]]^C.INV_SUB_MIX[3][C.SBOX[g&255]]}this._nRounds=H,this._keySchedule=R,this._invKeySchedule=M},B.prototype.encryptBlockRaw=function(D){return D=O(D),N(D,this._keySchedule,C.SUB_MIX,C.SBOX,this._nRounds)},B.prototype.encryptBlock=function(D){var L=this.encryptBlockRaw(D),H=F.allocUnsafe(16);return H.writeUInt32BE(L[0],0),H.writeUInt32BE(L[1],4),H.writeUInt32BE(L[2],8),H.writeUInt32BE(L[3],12),H},B.prototype.decryptBlock=function(D){D=O(D);var L=D[1];D[1]=D[3],D[3]=L;var H=N(D,this._invKeySchedule,C.INV_SUB_MIX,C.INV_SBOX,this._nRounds),P=F.allocUnsafe(16);return P.writeUInt32BE(H[0],0),P.writeUInt32BE(H[3],4),P.writeUInt32BE(H[2],8),P.writeUInt32BE(H[1],12),P},B.prototype.scrub=function(){Z(this._keySchedule),Z(this._invKeySchedule),Z(this._key)},q.exports.AES=B}),tX=Z0((Y,q)=>{var F=l0().Buffer,O=F.alloc(16,0);function Z(C){return[C.readUInt32BE(0),C.readUInt32BE(4),C.readUInt32BE(8),C.readUInt32BE(12)]}function N(C){var B=F.allocUnsafe(16);return B.writeUInt32BE(C[0]>>>0,0),B.writeUInt32BE(C[1]>>>0,4),B.writeUInt32BE(C[2]>>>0,8),B.writeUInt32BE(C[3]>>>0,12),B}function V(C){this.h=C,this.state=F.alloc(16,0),this.cache=F.allocUnsafe(0)}V.prototype.ghash=function(C){for(var B=-1;++B<C.length;)this.state[B]^=C[B];this._multiply()},V.prototype._multiply=function(){for(var C=Z(this.h),B=[0,0,0,0],D,L,H,P=-1;++P<128;){for(L=(this.state[~~(P/8)]&1<<7-P%8)!==0,L&&(B[0]^=C[0],B[1]^=C[1],B[2]^=C[2],B[3]^=C[3]),H=(C[3]&1)!==0,D=3;D>0;D--)C[D]=C[D]>>>1|(C[D-1]&1)<<31;C[0]=C[0]>>>1,H&&(C[0]=C[0]^225<<24)}this.state=N(B)},V.prototype.update=function(C){this.cache=F.concat([this.cache,C]);for(var B;this.cache.length>=16;)B=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(B)},V.prototype.final=function(C,B){return this.cache.length&&this.ghash(F.concat([this.cache,O],16)),this.ghash(N([0,C,0,B])),this.state},q.exports=V}),S3=Z0((Y,q)=>{var F=P7(),O=l0().Buffer,Z=q8(),N=h0(),V=tX(),C=g1(),B=v3();function D(P,R){var k=0;P.length!==R.length&&k++;for(var v=Math.min(P.length,R.length),M=0;M<v;++M)k+=P[M]^R[M];return k}function L(P,R,k){if(R.length===12)return P._finID=O.concat([R,O.from([0,0,0,1])]),O.concat([R,O.from([0,0,0,2])]);var v=new V(k),M=R.length,w=M%16;v.update(R),w&&(w=16-w,v.update(O.alloc(w,0))),v.update(O.alloc(8,0));var x=M*8,g=O.alloc(8);g.writeUIntBE(x,0,8),v.update(g),P._finID=v.state;var _=O.from(P._finID);return B(_),_}function H(P,R,k,v){Z.call(this);var M=O.alloc(4,0);this._cipher=new F.AES(R);var w=this._cipher.encryptBlock(M);this._ghash=new V(w),k=L(this,k,w),this._prev=O.from(k),this._cache=O.allocUnsafe(0),this._secCache=O.allocUnsafe(0),this._decrypt=v,this._alen=0,this._len=0,this._mode=P,this._authTag=null,this._called=!1}N(H,Z),H.prototype._update=function(P){if(!this._called&&this._alen){var R=16-this._alen%16;R<16&&(R=O.alloc(R,0),this._ghash.update(R))}this._called=!0;var k=this._mode.encrypt(this,P);return this._decrypt?this._ghash.update(P):this._ghash.update(k),this._len+=P.length,k},H.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var P=C(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&D(P,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=P,this._cipher.scrub()},H.prototype.getAuthTag=function(){if(this._decrypt||!O.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},H.prototype.setAuthTag=function(P){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=P},H.prototype.setAAD=function(P){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(P),this._alen+=P.length},q.exports=H}),E3=Z0((Y,q)=>{var F=P7(),O=l0().Buffer,Z=q8(),N=h0();function V(C,B,D,L){Z.call(this),this._cipher=new F.AES(B),this._prev=O.from(D),this._cache=O.allocUnsafe(0),this._secCache=O.allocUnsafe(0),this._decrypt=L,this._mode=C}N(V,Z),V.prototype._update=function(C){return this._mode.encrypt(this,C,this._decrypt)},V.prototype._final=function(){this._cipher.scrub()},q.exports=V}),k7=Z0((Y,q)=>{var F=l0().Buffer,O=w5();function Z(N,V,C,B){if(F.isBuffer(N)||(N=F.from(N,"binary")),V&&(F.isBuffer(V)||(V=F.from(V,"binary")),V.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var D=C/8,L=F.alloc(D),H=F.alloc(B||0),P=F.alloc(0);D>0||B>0;){var R=new O;R.update(P),R.update(N),V&&R.update(V),P=R.digest();var k=0;if(D>0){var v=L.length-D;k=Math.min(D,P.length),P.copy(L,v,0,k),D-=k}if(k<P.length&&B>0){var M=H.length-B,w=Math.min(B,P.length-k);P.copy(H,M,k,k+w),B-=w}}return P.fill(0),{key:L,iv:H}}q.exports=Z}),eX=Z0((Y)=>{var q=l5(),F=S3(),O=l0().Buffer,Z=E3(),N=q8(),V=P7(),C=k7(),B=h0();function D(k,v,M){N.call(this),this._cache=new H,this._cipher=new V.AES(v),this._prev=O.from(M),this._mode=k,this._autopadding=!0}B(D,N),D.prototype._update=function(k){this._cache.add(k);for(var v,M,w=[];v=this._cache.get();)M=this._mode.encrypt(this,v),w.push(M);return O.concat(w)};var L=O.alloc(16,16);D.prototype._final=function(){var k=this._cache.flush();if(this._autopadding)return k=this._mode.encrypt(this,k),this._cipher.scrub(),k;if(!k.equals(L))throw this._cipher.scrub(),new Error("data not multiple of block length")},D.prototype.setAutoPadding=function(k){return this._autopadding=!!k,this};function H(){this.cache=O.allocUnsafe(0)}H.prototype.add=function(k){this.cache=O.concat([this.cache,k])},H.prototype.get=function(){if(this.cache.length>15){var k=this.cache.slice(0,16);return this.cache=this.cache.slice(16),k}return null},H.prototype.flush=function(){for(var k=16-this.cache.length,v=O.allocUnsafe(k),M=-1;++M<k;)v.writeUInt8(k,M);return O.concat([this.cache,v])};function P(k,v,M){var w=q[k.toLowerCase()];if(!w)throw new TypeError("invalid suite type");if(typeof v=="string"&&(v=O.from(v)),v.length!==w.key/8)throw new TypeError("invalid key length "+v.length);if(typeof M=="string"&&(M=O.from(M)),w.mode!=="GCM"&&M.length!==w.iv)throw new TypeError("invalid iv length "+M.length);return w.type==="stream"?new Z(w.module,v,M):w.type==="auth"?new F(w.module,v,M):new D(w.module,v,M)}function R(k,v){var M=q[k.toLowerCase()];if(!M)throw new TypeError("invalid suite type");var w=C(v,!1,M.key,M.iv);return P(k,w.key,w.iv)}Y.createCipheriv=P,Y.createCipher=R}),QY=Z0((Y)=>{var q=S3(),F=l0().Buffer,O=l5(),Z=E3(),N=q8(),V=P7(),C=k7(),B=h0();function D(k,v,M){N.call(this),this._cache=new L,this._last=void 0,this._cipher=new V.AES(v),this._prev=F.from(M),this._mode=k,this._autopadding=!0}B(D,N),D.prototype._update=function(k){this._cache.add(k);for(var v,M,w=[];v=this._cache.get(this._autopadding);)M=this._mode.decrypt(this,v),w.push(M);return F.concat(w)},D.prototype._final=function(){var k=this._cache.flush();if(this._autopadding)return H(this._mode.decrypt(this,k));if(k)throw new Error("data not multiple of block length")},D.prototype.setAutoPadding=function(k){return this._autopadding=!!k,this};function L(){this.cache=F.allocUnsafe(0)}L.prototype.add=function(k){this.cache=F.concat([this.cache,k])},L.prototype.get=function(k){var v;if(k){if(this.cache.length>16)return v=this.cache.slice(0,16),this.cache=this.cache.slice(16),v}else if(this.cache.length>=16)return v=this.cache.slice(0,16),this.cache=this.cache.slice(16),v;return null},L.prototype.flush=function(){if(this.cache.length)return this.cache};function H(k){var v=k[15];if(v<1||v>16)throw new Error("unable to decrypt data");for(var M=-1;++M<v;)if(k[M+(16-v)]!==v)throw new Error("unable to decrypt data");if(v!==16)return k.slice(0,16-v)}function P(k,v,M){var w=O[k.toLowerCase()];if(!w)throw new TypeError("invalid suite type");if(typeof M=="string"&&(M=F.from(M)),w.mode!=="GCM"&&M.length!==w.iv)throw new TypeError("invalid iv length "+M.length);if(typeof v=="string"&&(v=F.from(v)),v.length!==w.key/8)throw new TypeError("invalid key length "+v.length);return w.type==="stream"?new Z(w.module,v,M,!0):w.type==="auth"?new q(w.module,v,M,!0):new D(w.module,v,M)}function R(k,v){var M=O[k.toLowerCase()];if(!M)throw new TypeError("invalid suite type");var w=C(v,!1,M.key,M.iv);return P(k,w.key,w.iv)}Y.createDecipher=R,Y.createDecipheriv=P}),d5=Z0((Y)=>{var q=eX(),F=QY(),O=x3();function Z(){return Object.keys(O)}Y.createCipher=Y.Cipher=q.createCipher,Y.createCipheriv=Y.Cipheriv=q.createCipheriv,Y.createDecipher=Y.Decipher=F.createDecipher,Y.createDecipheriv=Y.Decipheriv=F.createDecipheriv,Y.listCiphers=Y.getCiphers=Z}),WY=Z0((Y)=>{Y["des-ecb"]={key:8,iv:0},Y["des-cbc"]=Y.des={key:8,iv:8},Y["des-ede3-cbc"]=Y.des3={key:24,iv:8},Y["des-ede3"]={key:24,iv:0},Y["des-ede-cbc"]={key:16,iv:8},Y["des-ede"]={key:16,iv:0}}),GY=Z0((Y)=>{var q=fX(),F=d5(),O=l5(),Z=WY(),N=k7();function V(H,P){H=H.toLowerCase();var R,k;if(O[H])R=O[H].key,k=O[H].iv;else if(Z[H])R=Z[H].key*8,k=Z[H].iv;else throw new TypeError("invalid suite type");var v=N(P,!1,R,k);return B(H,v.key,v.iv)}function C(H,P){H=H.toLowerCase();var R,k;if(O[H])R=O[H].key,k=O[H].iv;else if(Z[H])R=Z[H].key*8,k=Z[H].iv;else throw new TypeError("invalid suite type");var v=N(P,!1,R,k);return D(H,v.key,v.iv)}function B(H,P,R){if(H=H.toLowerCase(),O[H])return F.createCipheriv(H,P,R);if(Z[H])return new q({key:P,iv:R,mode:H});throw new TypeError("invalid suite type")}function D(H,P,R){if(H=H.toLowerCase(),O[H])return F.createDecipheriv(H,P,R);if(Z[H])return new q({key:P,iv:R,mode:H,decrypt:!0});throw new TypeError("invalid suite type")}function L(){return Object.keys(Z).concat(F.getCiphers())}Y.createCipher=Y.Cipher=V,Y.createCipheriv=Y.Cipheriv=B,Y.createDecipher=Y.Decipher=C,Y.createDecipheriv=Y.Decipheriv=D,Y.listCiphers=Y.getCiphers=L}),E8=Z0(()=>{}),w3=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,d=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(d,U0)|0,z=Math.imul(d,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(d,C0)|0,z=z+Math.imul(d,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(d,N0)|0,z=z+Math.imul(d,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(d,L0)|0,z=z+Math.imul(d,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(d,k0)|0,z=z+Math.imul(d,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(d,R0)|0,z=z+Math.imul(d,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(d,T0)|0,z=z+Math.imul(d,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(d,A0)|0,z=z+Math.imul(d,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(d,x0)|0,z=z+Math.imul(d,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(d,E0)|0,z=z+Math.imul(d,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new u(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function u(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}u.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},u.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},u.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},u.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},u.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},u.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},u.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},u.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},u.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},u.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},u.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},u.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},u.prototype.sqr=function(Q){return this.mul(Q,Q)},u.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},u.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},u.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},u.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},u.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){u.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,u),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),XY=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,d=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(d,U0)|0,z=Math.imul(d,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(d,C0)|0,z=z+Math.imul(d,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(d,N0)|0,z=z+Math.imul(d,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(d,L0)|0,z=z+Math.imul(d,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(d,k0)|0,z=z+Math.imul(d,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(d,R0)|0,z=z+Math.imul(d,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(d,T0)|0,z=z+Math.imul(d,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(d,A0)|0,z=z+Math.imul(d,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(d,x0)|0,z=z+Math.imul(d,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(d,E0)|0,z=z+Math.imul(d,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new u(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function u(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}u.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},u.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},u.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},u.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},u.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},u.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},u.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},u.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},u.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},u.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},u.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},u.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},u.prototype.sqr=function(Q){return this.mul(Q,Q)},u.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},u.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},u.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},u.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},u.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){u.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,u),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),YY=Z0(()=>{}),u5=Z0((Y,q)=>{var F;q.exports=function(N){return F||(F=new O(null)),F.generate(N)};function O(N){this.rand=N}if(q.exports.Rand=O,O.prototype.generate=function(N){return this._rand(N)},O.prototype._rand=function(N){if(this.rand.getBytes)return this.rand.getBytes(N);for(var V=new Uint8Array(N),C=0;C<V.length;C++)V[C]=this.rand.getByte();return V},typeof self=="object")self.crypto&&self.crypto.getRandomValues?O.prototype._rand=function(N){var V=new Uint8Array(N);return self.crypto.getRandomValues(V),V}:self.msCrypto&&self.msCrypto.getRandomValues?O.prototype._rand=function(N){var V=new Uint8Array(N);return self.msCrypto.getRandomValues(V),V}:typeof window=="object"&&(O.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Z=YY(),typeof Z.randomBytes!="function")throw new Error("Not supported");O.prototype._rand=function(N){return Z.randomBytes(N)}}catch{}var Z}),g3=Z0((Y,q)=>{var F=XY(),O=u5();function Z(N){this.rand=N||new O.Rand}q.exports=Z,Z.create=function(N){return new Z(N)},Z.prototype._randbelow=function(N){var V=N.bitLength(),C=Math.ceil(V/8);do var B=new F(this.rand.generate(C));while(B.cmp(N)>=0);return B},Z.prototype._randrange=function(N,V){var C=V.sub(N);return N.add(this._randbelow(C))},Z.prototype.test=function(N,V,C){var B=N.bitLength(),D=F.mont(N),L=new F(1).toRed(D);V||(V=Math.max(1,B/48|0));for(var H=N.subn(1),P=0;!H.testn(P);P++);for(var R=N.shrn(P),k=H.toRed(D),v=!0;V>0;V--){var M=this._randrange(new F(2),H);C&&C(M);var w=M.toRed(D).redPow(R);if(!(w.cmp(L)===0||w.cmp(k)===0)){for(var x=1;x<P;x++){if(w=w.redSqr(),w.cmp(L)===0)return!1;if(w.cmp(k)===0)break}if(x===P)return!1}}return v},Z.prototype.getDivisor=function(N,V){var C=N.bitLength(),B=F.mont(N),D=new F(1).toRed(B);V||(V=Math.max(1,C/48|0));for(var L=N.subn(1),H=0;!L.testn(H);H++);for(var P=N.shrn(H),R=L.toRed(B);V>0;V--){var k=this._randrange(new F(2),L),v=N.gcd(k);if(v.cmpn(1)!==0)return v;var M=k.toRed(B).redPow(P);if(!(M.cmp(D)===0||M.cmp(R)===0)){for(var w=1;w<H;w++){if(M=M.redSqr(),M.cmp(D)===0)return M.fromRed().subn(1).gcd(N);if(M.cmp(R)===0)break}if(w===H)return M=M.redSqr(),M.fromRed().subn(1).gcd(N)}}return!1}}),y3=Z0((Y,q)=>{var F=t8();q.exports=m,m.simpleSieve=_,m.fermatTest=p;var O=w3(),Z=new O(24),N=g3(),V=new N,C=new O(1),B=new O(2),D=new O(5),L=new O(16),H=new O(8),P=new O(10),R=new O(3),k=new O(7),v=new O(11),M=new O(4),w=new O(12),x=null;function g(){if(x!==null)return x;var f=1048576,s=[];s[0]=2;for(var Q0=1,u=3;u<f;u+=2){for(var K0=Math.ceil(Math.sqrt(u)),Q=0;Q<Q0&&s[Q]<=K0&&u%s[Q]!==0;Q++);Q0!==Q&&s[Q]<=K0||(s[Q0++]=u)}return x=s,s}function _(f){for(var s=g(),Q0=0;Q0<s.length;Q0++)if(f.modn(s[Q0])===0)return f.cmpn(s[Q0])===0;return!0}function p(f){var s=O.mont(f);return B.toRed(s).redPow(f.subn(1)).fromRed().cmpn(1)===0}function m(f,s){if(f<16)return s===2||s===5?new O([140,123]):new O([140,39]);s=new O(s);for(var Q0,u;;){for(Q0=new O(F(Math.ceil(f/8)));Q0.bitLength()>f;)Q0.ishrn(1);if(Q0.isEven()&&Q0.iadd(C),Q0.testn(1)||Q0.iadd(B),s.cmp(B)){if(!s.cmp(D))for(;Q0.mod(P).cmp(R);)Q0.iadd(M)}else for(;Q0.mod(Z).cmp(v);)Q0.iadd(M);if(u=Q0.shrn(1),_(u)&&_(Q0)&&p(u)&&p(Q0)&&V.test(u)&&V.test(Q0))return Q0}}}),VY=Z0((Y,q)=>{q.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"}}}),JY=Z0((Y,q)=>{var F=w3(),O=g3(),Z=new O,N=new F(24),V=new F(11),C=new F(10),B=new F(3),D=new F(7),L=y3(),H=t8();q.exports=M;function P(x,g){return g=g||"utf8",Buffer.isBuffer(x)||(x=new Buffer(x,g)),this._pub=new F(x),this}function R(x,g){return g=g||"utf8",Buffer.isBuffer(x)||(x=new Buffer(x,g)),this._priv=new F(x),this}var k={};function v(x,g){var _=g.toString("hex"),p=[_,x.toString(16)].join("_");if(p in k)return k[p];var m=0;if(x.isEven()||!L.simpleSieve||!L.fermatTest(x)||!Z.test(x))return m+=1,_==="02"||_==="05"?m+=8:m+=4,k[p]=m,m;Z.test(x.shrn(1))||(m+=2);var f;switch(_){case"02":x.mod(N).cmp(V)&&(m+=8);break;case"05":f=x.mod(C),f.cmp(B)&&f.cmp(D)&&(m+=8);break;default:m+=4}return k[p]=m,m}function M(x,g,_){this.setGenerator(g),this.__prime=new F(x),this._prime=F.mont(this.__prime),this._primeLen=x.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,_?(this.setPublicKey=P,this.setPrivateKey=R):this._primeCode=8}Object.defineProperty(M.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=v(this.__prime,this.__gen)),this._primeCode}}),M.prototype.generateKeys=function(){return this._priv||(this._priv=new F(H(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},M.prototype.computeSecret=function(x){x=new F(x),x=x.toRed(this._prime);var g=x.redPow(this._priv).fromRed(),_=new Buffer(g.toArray()),p=this.getPrime();if(_.length<p.length){var m=new Buffer(p.length-_.length);m.fill(0),_=Buffer.concat([m,_])}return _},M.prototype.getPublicKey=function(x){return w(this._pub,x)},M.prototype.getPrivateKey=function(x){return w(this._priv,x)},M.prototype.getPrime=function(x){return w(this.__prime,x)},M.prototype.getGenerator=function(x){return w(this._gen,x)},M.prototype.setGenerator=function(x,g){return g=g||"utf8",Buffer.isBuffer(x)||(x=new Buffer(x,g)),this.__gen=x,this._gen=new F(x),this};function w(x,g){var _=new Buffer(x.toArray());return g?_.toString(g):_}}),UY=Z0((Y)=>{var q=y3(),F=VY(),O=JY();function Z(C){var B=new Buffer(F[C].prime,"hex"),D=new Buffer(F[C].gen,"hex");return new O(B,D)}var N={binary:!0,hex:!0,base64:!0};function V(C,B,D,L){return Buffer.isBuffer(B)||N[B]===void 0?V(C,"binary",B,D):(B=B||"binary",L=L||"binary",D=D||new Buffer([2]),Buffer.isBuffer(D)||(D=new Buffer(D,L)),typeof C=="number"?new O(q(C,D),D,!0):(Buffer.isBuffer(C)||(C=new Buffer(C,B)),new O(C,D,!0)))}Y.DiffieHellmanGroup=Y.createDiffieHellmanGroup=Y.getDiffieHellman=Z,Y.createDiffieHellman=Y.DiffieHellman=V}),_3=Z0((Y,q)=>{q.exports=x8().EventEmitter}),FY=Z0((Y,q)=>{function F(M,w){var x=Object.keys(M);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(M);w&&(g=g.filter(function(_){return Object.getOwnPropertyDescriptor(M,_).enumerable})),x.push.apply(x,g)}return x}function O(M){for(var w=1;w<arguments.length;w++){var x=arguments[w]!=null?arguments[w]:{};w%2?F(Object(x),!0).forEach(function(g){Z(M,g,x[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(M,Object.getOwnPropertyDescriptors(x)):F(Object(x)).forEach(function(g){Object.defineProperty(M,g,Object.getOwnPropertyDescriptor(x,g))})}return M}function Z(M,w,x){return w=B(w),(w in M)?Object.defineProperty(M,w,{value:x,enumerable:!0,configurable:!0,writable:!0}):M[w]=x,M}function N(M,w){if(!(M instanceof w))throw new TypeError("Cannot call a class as a function")}function V(M,w){for(var x=0;x<w.length;x++){var g=w[x];g.enumerable=g.enumerable||!1,g.configurable=!0,("value"in g)&&(g.writable=!0),Object.defineProperty(M,B(g.key),g)}}function C(M,w,x){return w&&V(M.prototype,w),x&&V(M,x),Object.defineProperty(M,"prototype",{writable:!1}),M}function B(M){var w=D(M,"string");return typeof w=="symbol"?w:String(w)}function D(M,w){if(typeof M!="object"||M===null)return M;var x=M[Symbol.toPrimitive];if(x!==void 0){var g=x.call(M,w||"default");if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(M)}var L=R6(),H=L.Buffer,P=O7(),R=P.inspect,k=R&&R.custom||"inspect";function v(M,w,x){H.prototype.copy.call(M,w,x)}q.exports=function(){function M(){N(this,M),this.head=null,this.tail=null,this.length=0}return C(M,[{key:"push",value:function(w){var x={data:w,next:null};this.length>0?this.tail.next=x:this.head=x,this.tail=x,++this.length}},{key:"unshift",value:function(w){var x={data:w,next:this.head};this.length===0&&(this.tail=x),this.head=x,++this.length}},{key:"shift",value:function(){if(this.length!==0){var w=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,w}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(w){if(this.length===0)return"";for(var x=this.head,g=""+x.data;x=x.next;)g+=w+x.data;return g}},{key:"concat",value:function(w){if(this.length===0)return H.alloc(0);for(var x=H.allocUnsafe(w>>>0),g=this.head,_=0;g;)v(g.data,x,_),_+=g.data.length,g=g.next;return x}},{key:"consume",value:function(w,x){var g;return w<this.head.data.length?(g=this.head.data.slice(0,w),this.head.data=this.head.data.slice(w)):w===this.head.data.length?g=this.shift():g=x?this._getString(w):this._getBuffer(w),g}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(w){var x=this.head,g=1,_=x.data;for(w-=_.length;x=x.next;){var p=x.data,m=w>p.length?p.length:w;if(m===p.length?_+=p:_+=p.slice(0,w),w-=m,w===0){m===p.length?(++g,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=p.slice(m));break}++g}return this.length-=g,_}},{key:"_getBuffer",value:function(w){var x=H.allocUnsafe(w),g=this.head,_=1;for(g.data.copy(x),w-=g.data.length;g=g.next;){var p=g.data,m=w>p.length?p.length:w;if(p.copy(x,x.length-w,0,m),w-=m,w===0){m===p.length?(++_,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=p.slice(m));break}++_}return this.length-=_,x}},{key:k,value:function(w,x){return R(this,O(O({},x),{},{depth:0,customInspect:!1}))}}]),M}()}),m3=Z0((Y,q)=>{function F(B,D){var L=this,H=this._readableState&&this._readableState.destroyed,P=this._writableState&&this._writableState.destroyed;return H||P?(D?D(B):B&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(V,this,B)):process.nextTick(V,this,B)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(B||null,function(R){!D&&R?L._writableState?L._writableState.errorEmitted?process.nextTick(Z,L):(L._writableState.errorEmitted=!0,process.nextTick(O,L,R)):process.nextTick(O,L,R):D?(process.nextTick(Z,L),D(R)):process.nextTick(Z,L)}),this)}function O(B,D){V(B,D),Z(B)}function Z(B){B._writableState&&!B._writableState.emitClose||B._readableState&&!B._readableState.emitClose||B.emit("close")}function N(){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 V(B,D){B.emit("error",D)}function C(B,D){var{_readableState:L,_writableState:H}=B;L&&L.autoDestroy||H&&H.autoDestroy?B.destroy(D):B.emit("error",D)}q.exports={destroy:F,undestroy:N,errorOrDestroy:C}}),G1=Z0((Y,q)=>{function F(D,L){D.prototype=Object.create(L.prototype),D.prototype.constructor=D,D.__proto__=L}var O={};function Z(D,L,H){H||(H=Error);function P(k,v,M){return typeof L=="string"?L:L(k,v,M)}var R=function(k){F(v,k);function v(M,w,x){return k.call(this,P(M,w,x))||this}return v}(H);R.prototype.name=H.name,R.prototype.code=D,O[D]=R}function N(D,L){if(Array.isArray(D)){var H=D.length;return D=D.map(function(P){return String(P)}),H>2?"one of ".concat(L," ").concat(D.slice(0,H-1).join(", "),", or ")+D[H-1]:H===2?"one of ".concat(L," ").concat(D[0]," or ").concat(D[1]):"of ".concat(L," ").concat(D[0])}else return"of ".concat(L," ").concat(String(D))}function V(D,L,H){return D.substr(!H||H<0?0:+H,L.length)===L}function C(D,L,H){return(H===void 0||H>D.length)&&(H=D.length),D.substring(H-L.length,H)===L}function B(D,L,H){return typeof H!="number"&&(H=0),H+L.length>D.length?!1:D.indexOf(L,H)!==-1}Z("ERR_INVALID_OPT_VALUE",function(D,L){return'The value "'+L+'" is invalid for option "'+D+'"'},TypeError),Z("ERR_INVALID_ARG_TYPE",function(D,L,H){var P;typeof L=="string"&&V(L,"not ")?(P="must not be",L=L.replace(/^not /,"")):P="must be";var R;if(C(D," argument"))R="The ".concat(D," ").concat(P," ").concat(N(L,"type"));else{var k=B(D,".")?"property":"argument";R='The "'.concat(D,'" ').concat(k," ").concat(P," ").concat(N(L,"type"))}return R+=". Received type ".concat(typeof H),R},TypeError),Z("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Z("ERR_METHOD_NOT_IMPLEMENTED",function(D){return"The "+D+" method is not implemented"}),Z("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Z("ERR_STREAM_DESTROYED",function(D){return"Cannot call "+D+" after a stream was destroyed"}),Z("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Z("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Z("ERR_STREAM_WRITE_AFTER_END","write after end"),Z("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Z("ERR_UNKNOWN_ENCODING",function(D){return"Unknown encoding: "+D},TypeError),Z("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),q.exports.codes=O}),p3=Z0((Y,q)=>{var F=G1().codes.ERR_INVALID_OPT_VALUE;function O(N,V,C){return N.highWaterMark!=null?N.highWaterMark:V?N[C]:null}function Z(N,V,C,B){var D=O(V,B,C);if(D!=null){if(!(isFinite(D)&&Math.floor(D)===D)||D<0){var L=B?C:"highWaterMark";throw new F(L,D)}return Math.floor(D)}return N.objectMode?16:16384}q.exports={getHighWaterMark:Z}}),b3=Z0((Y,q)=>{q.exports=u;function F(l){var h=this;this.next=null,this.entry=null,this.finish=function(){t(h,l)}}var O;u.WritableState=s;var Z={deprecate:X3()},N=_3(),V=R6().Buffer,C=(typeof window<"u"?window:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B(l){return V.from(l)}function D(l){return V.isBuffer(l)||l instanceof C}var L=m3(),H=p3(),P=H.getHighWaterMark,R=G1().codes,k=R.ERR_INVALID_ARG_TYPE,v=R.ERR_METHOD_NOT_IMPLEMENTED,M=R.ERR_MULTIPLE_CALLBACK,w=R.ERR_STREAM_CANNOT_PIPE,x=R.ERR_STREAM_DESTROYED,g=R.ERR_STREAM_NULL_VALUES,_=R.ERR_STREAM_WRITE_AFTER_END,p=R.ERR_UNKNOWN_ENCODING,m=L.errorOrDestroy;h0()(u,N);function f(){}function s(l,h,n){O=O||i8(),l=l||{},typeof n!="boolean"&&(n=h instanceof O),this.objectMode=!!l.objectMode,n&&(this.objectMode=this.objectMode||!!l.writableObjectMode),this.highWaterMark=P(this,l,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var q0=l.decodeStrings===!1;this.decodeStrings=!q0,this.defaultEncoding=l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G0){j(h,G0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=l.emitClose!==!1,this.autoDestroy=!!l.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new F(this)}s.prototype.getBuffer=function(){for(var l=this.bufferedRequest,h=[];l;)h.push(l),l=l.next;return h},function(){try{Object.defineProperty(s.prototype,"buffer",{get:Z.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var Q0;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Q0=Function.prototype[Symbol.hasInstance],Object.defineProperty(u,Symbol.hasInstance,{value:function(l){return Q0.call(this,l)?!0:this!==u?!1:l&&l._writableState instanceof s}})):Q0=function(l){return l instanceof this};function u(l){O=O||i8();var h=this instanceof O;if(!h&&!Q0.call(u,this))return new u(l);this._writableState=new s(l,this,h),this.writable=!0,l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final)),N.call(this)}u.prototype.pipe=function(){m(this,new w)};function K0(l,h){var n=new _;m(l,n),process.nextTick(h,n)}function Q(l,h,n,q0){var G0;return n===null?G0=new g:typeof n!="string"&&!h.objectMode&&(G0=new k("chunk",["string","Buffer"],n)),G0?(m(l,G0),process.nextTick(q0,G0),!1):!0}u.prototype.write=function(l,h,n){var q0=this._writableState,G0=!1,F0=!q0.objectMode&&D(l);return F0&&!V.isBuffer(l)&&(l=B(l)),typeof h=="function"&&(n=h,h=null),F0?h="buffer":h||(h=q0.defaultEncoding),typeof n!="function"&&(n=f),q0.ending?K0(this,n):(F0||Q(this,q0,l,n))&&(q0.pendingcb++,G0=J(this,q0,F0,l,h,n)),G0},u.prototype.cork=function(){this._writableState.corked++},u.prototype.uncork=function(){var l=this._writableState;l.corked&&(l.corked--,!l.writing&&!l.corked&&!l.bufferProcessing&&l.bufferedRequest&&z(this,l))},u.prototype.setDefaultEncoding=function(l){if(typeof l=="string"&&(l=l.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((l+"").toLowerCase())>-1))throw new p(l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function G(l,h,n){return!l.objectMode&&l.decodeStrings!==!1&&typeof h=="string"&&(h=V.from(h,n)),h}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function J(l,h,n,q0,G0,F0){if(!n){var b=G(h,q0,G0);q0!==b&&(n=!0,G0="buffer",q0=b)}var E=h.objectMode?1:q0.length;h.length+=E;var d=h.length<h.highWaterMark;if(d||(h.needDrain=!0),h.writing||h.corked){var e=h.lastBufferedRequest;h.lastBufferedRequest={chunk:q0,encoding:G0,isBuf:n,callback:F0,next:null},e?e.next=h.lastBufferedRequest:h.bufferedRequest=h.lastBufferedRequest,h.bufferedRequestCount+=1}else X(l,h,!1,E,q0,G0,F0);return d}function X(l,h,n,q0,G0,F0,b){h.writelen=q0,h.writecb=b,h.writing=!0,h.sync=!0,h.destroyed?h.onwrite(new x("write")):n?l._writev(G0,h.onwrite):l._write(G0,F0,h.onwrite),h.sync=!1}function U(l,h,n,q0,G0){--h.pendingcb,n?(process.nextTick(G0,q0),process.nextTick(r,l,h),l._writableState.errorEmitted=!0,m(l,q0)):(G0(q0),l._writableState.errorEmitted=!0,m(l,q0),r(l,h))}function $(l){l.writing=!1,l.writecb=null,l.length-=l.writelen,l.writelen=0}function j(l,h){var n=l._writableState,q0=n.sync,G0=n.writecb;if(typeof G0!="function")throw new M;if($(n),h)U(l,n,q0,h,G0);else{var F0=A(n)||l.destroyed;!F0&&!n.corked&&!n.bufferProcessing&&n.bufferedRequest&&z(l,n),q0?process.nextTick(K,l,n,F0,G0):K(l,n,F0,G0)}}function K(l,h,n,q0){n||W(l,h),h.pendingcb--,q0(),r(l,h)}function W(l,h){h.length===0&&h.needDrain&&(h.needDrain=!1,l.emit("drain"))}function z(l,h){h.bufferProcessing=!0;var n=h.bufferedRequest;if(l._writev&&n&&n.next){var q0=h.bufferedRequestCount,G0=new Array(q0),F0=h.corkedRequestsFree;F0.entry=n;for(var b=0,E=!0;n;)G0[b]=n,n.isBuf||(E=!1),n=n.next,b+=1;G0.allBuffers=E,X(l,h,!0,h.length,G0,"",F0.finish),h.pendingcb++,h.lastBufferedRequest=null,F0.next?(h.corkedRequestsFree=F0.next,F0.next=null):h.corkedRequestsFree=new F(h),h.bufferedRequestCount=0}else{for(;n;){var{chunk:d,encoding:e,callback:V0}=n,W0=h.objectMode?1:d.length;if(X(l,h,!1,W0,d,e,V0),n=n.next,h.bufferedRequestCount--,h.writing)break}n===null&&(h.lastBufferedRequest=null)}h.bufferedRequest=n,h.bufferProcessing=!1}u.prototype._write=function(l,h,n){n(new v("_write()"))},u.prototype._writev=null,u.prototype.end=function(l,h,n){var q0=this._writableState;return typeof l=="function"?(n=l,l=null,h=null):typeof h=="function"&&(n=h,h=null),l!=null&&this.write(l,h),q0.corked&&(q0.corked=1,this.uncork()),q0.ending||a(this,q0,n),this},Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function A(l){return l.ending&&l.length===0&&l.bufferedRequest===null&&!l.finished&&!l.writing}function T(l,h){l._final(function(n){h.pendingcb--,n&&m(l,n),h.prefinished=!0,l.emit("prefinish"),r(l,h)})}function y(l,h){!h.prefinished&&!h.finalCalled&&(typeof l._final=="function"&&!h.destroyed?(h.pendingcb++,h.finalCalled=!0,process.nextTick(T,l,h)):(h.prefinished=!0,l.emit("prefinish")))}function r(l,h){var n=A(h);if(n&&(y(l,h),h.pendingcb===0&&(h.finished=!0,l.emit("finish"),h.autoDestroy))){var q0=l._readableState;(!q0||q0.autoDestroy&&q0.endEmitted)&&l.destroy()}return n}function a(l,h,n){h.ending=!0,r(l,h),n&&(h.finished?process.nextTick(n):l.once("finish",n)),h.ended=!0,l.writable=!1}function t(l,h,n){var q0=l.entry;for(l.entry=null;q0;){var G0=q0.callback;h.pendingcb--,G0(n),q0=q0.next}h.corkedRequestsFree.next=l}Object.defineProperty(u.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(l){!this._writableState||(this._writableState.destroyed=l)}}),u.prototype.destroy=L.destroy,u.prototype._undestroy=L.undestroy,u.prototype._destroy=function(l,h){h(l)}}),i8=Z0((Y,q)=>{var F=Object.keys||function(H){var P=[];for(var R in H)P.push(R);return P};q.exports=B;var O=h3(),Z=b3();h0()(B,O);for(N=F(Z.prototype),C=0;C<N.length;C++)V=N[C],B.prototype[V]||(B.prototype[V]=Z.prototype[V]);var N,V,C;function B(H){if(!(this instanceof B))return new B(H);O.call(this,H),Z.call(this,H),this.allowHalfOpen=!0,H&&(H.readable===!1&&(this.readable=!1),H.writable===!1&&(this.writable=!1),H.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",D)))}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function D(){this._writableState.ended||process.nextTick(L,this)}function L(H){H.end()}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(H){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=H,this._writableState.destroyed=H)}})}),f5=Z0((Y,q)=>{var F=G1().codes.ERR_STREAM_PREMATURE_CLOSE;function O(C){var B=!1;return function(){if(!B){B=!0;for(var D=arguments.length,L=new Array(D),H=0;H<D;H++)L[H]=arguments[H];C.apply(this,L)}}}function Z(){}function N(C){return C.setHeader&&typeof C.abort=="function"}function V(C,B,D){if(typeof B=="function")return V(C,null,B);B||(B={}),D=O(D||Z);var L=B.readable||B.readable!==!1&&C.readable,H=B.writable||B.writable!==!1&&C.writable,P=function(){C.writable||k()},R=C._writableState&&C._writableState.finished,k=function(){H=!1,R=!0,L||D.call(C)},v=C._readableState&&C._readableState.endEmitted,M=function(){L=!1,v=!0,H||D.call(C)},w=function(_){D.call(C,_)},x=function(){var _;if(L&&!v)return(!C._readableState||!C._readableState.ended)&&(_=new F),D.call(C,_);if(H&&!R)return(!C._writableState||!C._writableState.ended)&&(_=new F),D.call(C,_)},g=function(){C.req.on("finish",k)};return N(C)?(C.on("complete",k),C.on("abort",x),C.req?g():C.on("request",g)):H&&!C._writableState&&(C.on("end",P),C.on("close",P)),C.on("end",M),C.on("finish",k),B.error!==!1&&C.on("error",w),C.on("close",x),function(){C.removeListener("complete",k),C.removeListener("abort",x),C.removeListener("request",g),C.req&&C.req.removeListener("finish",k),C.removeListener("end",P),C.removeListener("close",P),C.removeListener("finish",k),C.removeListener("end",M),C.removeListener("error",w),C.removeListener("close",x)}}q.exports=V}),KY=Z0((Y,q)=>{var F;function O(p,m,f){return m=Z(m),(m in p)?Object.defineProperty(p,m,{value:f,enumerable:!0,configurable:!0,writable:!0}):p[m]=f,p}function Z(p){var m=N(p,"string");return typeof m=="symbol"?m:String(m)}function N(p,m){if(typeof p!="object"||p===null)return p;var f=p[Symbol.toPrimitive];if(f!==void 0){var s=f.call(p,m||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(p)}var V=f5(),C=Symbol("lastResolve"),B=Symbol("lastReject"),D=Symbol("error"),L=Symbol("ended"),H=Symbol("lastPromise"),P=Symbol("handlePromise"),R=Symbol("stream");function k(p,m){return{value:p,done:m}}function v(p){var m=p[C];if(m!==null){var f=p[R].read();f!==null&&(p[H]=null,p[C]=null,p[B]=null,m(k(f,!1)))}}function M(p){process.nextTick(v,p)}function w(p,m){return function(f,s){p.then(function(){if(m[L]){f(k(void 0,!0));return}m[P](f,s)},s)}}var x=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((F={get stream(){return this[R]},next:function(){var p=this,m=this[D];if(m!==null)return Promise.reject(m);if(this[L])return Promise.resolve(k(void 0,!0));if(this[R].destroyed)return new Promise(function(u,K0){process.nextTick(function(){p[D]?K0(p[D]):u(k(void 0,!0))})});var f=this[H],s;if(f)s=new Promise(w(f,this));else{var Q0=this[R].read();if(Q0!==null)return Promise.resolve(k(Q0,!1));s=new Promise(this[P])}return this[H]=s,s}},O(F,Symbol.asyncIterator,function(){return this}),O(F,"return",function(){var p=this;return new Promise(function(m,f){p[R].destroy(null,function(s){if(s){f(s);return}m(k(void 0,!0))})})}),F),x),_=function(p){var m,f=Object.create(g,(m={},O(m,R,{value:p,writable:!0}),O(m,C,{value:null,writable:!0}),O(m,B,{value:null,writable:!0}),O(m,D,{value:null,writable:!0}),O(m,L,{value:p._readableState.endEmitted,writable:!0}),O(m,P,{value:function(s,Q0){var u=f[R].read();u?(f[H]=null,f[C]=null,f[B]=null,s(k(u,!1))):(f[C]=s,f[B]=Q0)},writable:!0}),m));return f[H]=null,V(p,function(s){if(s&&s.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Q0=f[B];Q0!==null&&(f[H]=null,f[C]=null,f[B]=null,Q0(s)),f[D]=s;return}var u=f[C];u!==null&&(f[H]=null,f[C]=null,f[B]=null,u(k(void 0,!0))),f[L]=!0}),p.on("readable",M.bind(null,f)),f};q.exports=_}),zY=Z0((Y,q)=>{q.exports=function(){throw new Error("Readable.from is not available in the browser")}}),h3=Z0((Y,q)=>{q.exports=Q;var F;Q.ReadableState=K0;var O=x8().EventEmitter,Z=function(b,E){return b.listeners(E).length},N=_3(),V=R6().Buffer,C=(typeof window<"u"?window:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function B(b){return V.from(b)}function D(b){return V.isBuffer(b)||b instanceof C}var L=O7(),H;L&&L.debuglog?H=L.debuglog("stream"):H=function(){};var P=FY(),R=m3(),k=p3(),v=k.getHighWaterMark,M=G1().codes,w=M.ERR_INVALID_ARG_TYPE,x=M.ERR_STREAM_PUSH_AFTER_EOF,g=M.ERR_METHOD_NOT_IMPLEMENTED,_=M.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,p,m,f;h0()(Q,N);var s=R.errorOrDestroy,Q0=["error","close","destroy","pause","resume"];function u(b,E,d){if(typeof b.prependListener=="function")return b.prependListener(E,d);!b._events||!b._events[E]?b.on(E,d):Array.isArray(b._events[E])?b._events[E].unshift(d):b._events[E]=[d,b._events[E]]}function K0(b,E,d){F=F||i8(),b=b||{},typeof d!="boolean"&&(d=E instanceof F),this.objectMode=!!b.objectMode,d&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.highWaterMark=v(this,b,"readableHighWaterMark",d),this.buffer=new P,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=b.emitClose!==!1,this.autoDestroy=!!b.autoDestroy,this.destroyed=!1,this.defaultEncoding=b.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(p||(p=(j7(),g6(x1)).StringDecoder),this.decoder=new p(b.encoding),this.encoding=b.encoding)}function Q(b){if(F=F||i8(),!(this instanceof Q))return new Q(b);var E=this instanceof F;this._readableState=new K0(b,this,E),this.readable=!0,b&&(typeof b.read=="function"&&(this._read=b.read),typeof b.destroy=="function"&&(this._destroy=b.destroy)),N.call(this)}Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(b){!this._readableState||(this._readableState.destroyed=b)}}),Q.prototype.destroy=R.destroy,Q.prototype._undestroy=R.undestroy,Q.prototype._destroy=function(b,E){E(b)},Q.prototype.push=function(b,E){var d=this._readableState,e;return d.objectMode?e=!0:typeof b=="string"&&(E=E||d.defaultEncoding,E!==d.encoding&&(b=V.from(b,E),E=""),e=!0),G(this,b,E,!1,e)},Q.prototype.unshift=function(b){return G(this,b,null,!0,!1)};function G(b,E,d,e,V0){H("readableAddChunk",E);var W0=b._readableState;if(E===null)W0.reading=!1,K(b,W0);else{var J0;if(V0||(J0=X(W0,E)),J0)s(b,J0);else if(W0.objectMode||E&&E.length>0)if(typeof E!="string"&&!W0.objectMode&&Object.getPrototypeOf(E)!==V.prototype&&(E=B(E)),e)W0.endEmitted?s(b,new _):J(b,W0,E,!0);else if(W0.ended)s(b,new x);else{if(W0.destroyed)return!1;W0.reading=!1,W0.decoder&&!d?(E=W0.decoder.write(E),W0.objectMode||E.length!==0?J(b,W0,E,!1):A(b,W0)):J(b,W0,E,!1)}else e||(W0.reading=!1,A(b,W0))}return!W0.ended&&(W0.length<W0.highWaterMark||W0.length===0)}function J(b,E,d,e){E.flowing&&E.length===0&&!E.sync?(E.awaitDrain=0,b.emit("data",d)):(E.length+=E.objectMode?1:d.length,e?E.buffer.unshift(d):E.buffer.push(d),E.needReadable&&W(b)),A(b,E)}function X(b,E){var d;return!D(E)&&typeof E!="string"&&E!==void 0&&!b.objectMode&&(d=new w("chunk",["string","Buffer","Uint8Array"],E)),d}Q.prototype.isPaused=function(){return this._readableState.flowing===!1},Q.prototype.setEncoding=function(b){p||(p=(j7(),g6(x1)).StringDecoder);var E=new p(b);this._readableState.decoder=E,this._readableState.encoding=this._readableState.decoder.encoding;for(var d=this._readableState.buffer.head,e="";d!==null;)e+=E.write(d.data),d=d.next;return this._readableState.buffer.clear(),e!==""&&this._readableState.buffer.push(e),this._readableState.length=e.length,this};var U=1073741824;function $(b){return b>=U?b=U:(b--,b|=b>>>1,b|=b>>>2,b|=b>>>4,b|=b>>>8,b|=b>>>16,b++),b}function j(b,E){return b<=0||E.length===0&&E.ended?0:E.objectMode?1:b!==b?E.flowing&&E.length?E.buffer.head.data.length:E.length:(b>E.highWaterMark&&(E.highWaterMark=$(b)),b<=E.length?b:E.ended?E.length:(E.needReadable=!0,0))}Q.prototype.read=function(b){H("read",b),b=parseInt(b,10);var E=this._readableState,d=b;if(b!==0&&(E.emittedReadable=!1),b===0&&E.needReadable&&((E.highWaterMark!==0?E.length>=E.highWaterMark:E.length>0)||E.ended))return H("read: emitReadable",E.length,E.ended),E.length===0&&E.ended?q0(this):W(this),null;if(b=j(b,E),b===0&&E.ended)return E.length===0&&q0(this),null;var e=E.needReadable;H("need readable",e),(E.length===0||E.length-b<E.highWaterMark)&&(e=!0,H("length less than watermark",e)),E.ended||E.reading?(e=!1,H("reading or ended",e)):e&&(H("do read"),E.reading=!0,E.sync=!0,E.length===0&&(E.needReadable=!0),this._read(E.highWaterMark),E.sync=!1,E.reading||(b=j(d,E)));var V0;return b>0?V0=n(b,E):V0=null,V0===null?(E.needReadable=E.length<=E.highWaterMark,b=0):(E.length-=b,E.awaitDrain=0),E.length===0&&(E.ended||(E.needReadable=!0),d!==b&&E.ended&&q0(this)),V0!==null&&this.emit("data",V0),V0};function K(b,E){if(H("onEofChunk"),!E.ended){if(E.decoder){var d=E.decoder.end();d&&d.length&&(E.buffer.push(d),E.length+=E.objectMode?1:d.length)}E.ended=!0,E.sync?W(b):(E.needReadable=!1,E.emittedReadable||(E.emittedReadable=!0,z(b)))}}function W(b){var E=b._readableState;H("emitReadable",E.needReadable,E.emittedReadable),E.needReadable=!1,E.emittedReadable||(H("emitReadable",E.flowing),E.emittedReadable=!0,process.nextTick(z,b))}function z(b){var E=b._readableState;H("emitReadable_",E.destroyed,E.length,E.ended),!E.destroyed&&(E.length||E.ended)&&(b.emit("readable"),E.emittedReadable=!1),E.needReadable=!E.flowing&&!E.ended&&E.length<=E.highWaterMark,h(b)}function A(b,E){E.readingMore||(E.readingMore=!0,process.nextTick(T,b,E))}function T(b,E){for(;!E.reading&&!E.ended&&(E.length<E.highWaterMark||E.flowing&&E.length===0);){var d=E.length;if(H("maybeReadMore read 0"),b.read(0),d===E.length)break}E.readingMore=!1}Q.prototype._read=function(b){s(this,new g("_read()"))},Q.prototype.pipe=function(b,E){var d=this,e=this._readableState;switch(e.pipesCount){case 0:e.pipes=b;break;case 1:e.pipes=[e.pipes,b];break;default:e.pipes.push(b);break}e.pipesCount+=1,H("pipe count=%d opts=%j",e.pipesCount,E);var V0=(!E||E.end!==!1)&&b!==process.stdout&&b!==process.stderr,W0=V0?Y0:c;e.endEmitted?process.nextTick(W0):d.once("end",W0),b.on("unpipe",J0);function J0(o,i){H("onunpipe"),o===d&&i&&i.hasUnpiped===!1&&(i.hasUnpiped=!0,$0())}function Y0(){H("onend"),b.end()}var X0=y(d);b.on("drain",X0);var g0=!1;function $0(){H("cleanup"),b.removeListener("close",I),b.removeListener("finish",S),b.removeListener("drain",X0),b.removeListener("error",_0),b.removeListener("unpipe",J0),d.removeListener("end",Y0),d.removeListener("end",c),d.removeListener("data",z0),g0=!0,e.awaitDrain&&(!b._writableState||b._writableState.needDrain)&&X0()}d.on("data",z0);function z0(o){H("ondata");var i=b.write(o);H("dest.write",i),i===!1&&((e.pipesCount===1&&e.pipes===b||e.pipesCount>1&&F0(e.pipes,b)!==-1)&&!g0&&(H("false write response, pause",e.awaitDrain),e.awaitDrain++),d.pause())}function _0(o){H("onerror",o),c(),b.removeListener("error",_0),Z(b,"error")===0&&s(b,o)}u(b,"error",_0);function I(){b.removeListener("finish",S),c()}b.once("close",I);function S(){H("onfinish"),b.removeListener("close",I),c()}b.once("finish",S);function c(){H("unpipe"),d.unpipe(b)}return b.emit("pipe",d),e.flowing||(H("pipe resume"),d.resume()),b};function y(b){return function(){var E=b._readableState;H("pipeOnDrain",E.awaitDrain),E.awaitDrain&&E.awaitDrain--,E.awaitDrain===0&&Z(b,"data")&&(E.flowing=!0,h(b))}}Q.prototype.unpipe=function(b){var E=this._readableState,d={hasUnpiped:!1};if(E.pipesCount===0)return this;if(E.pipesCount===1)return b&&b!==E.pipes?this:(b||(b=E.pipes),E.pipes=null,E.pipesCount=0,E.flowing=!1,b&&b.emit("unpipe",this,d),this);if(!b){var{pipes:e,pipesCount:V0}=E;E.pipes=null,E.pipesCount=0,E.flowing=!1;for(var W0=0;W0<V0;W0++)e[W0].emit("unpipe",this,{hasUnpiped:!1});return this}var J0=F0(E.pipes,b);return J0===-1?this:(E.pipes.splice(J0,1),E.pipesCount-=1,E.pipesCount===1&&(E.pipes=E.pipes[0]),b.emit("unpipe",this,d),this)},Q.prototype.on=function(b,E){var d=N.prototype.on.call(this,b,E),e=this._readableState;return b==="data"?(e.readableListening=this.listenerCount("readable")>0,e.flowing!==!1&&this.resume()):b==="readable"&&!e.endEmitted&&!e.readableListening&&(e.readableListening=e.needReadable=!0,e.flowing=!1,e.emittedReadable=!1,H("on readable",e.length,e.reading),e.length?W(this):e.reading||process.nextTick(a,this)),d},Q.prototype.addListener=Q.prototype.on,Q.prototype.removeListener=function(b,E){var d=N.prototype.removeListener.call(this,b,E);return b==="readable"&&process.nextTick(r,this),d},Q.prototype.removeAllListeners=function(b){var E=N.prototype.removeAllListeners.apply(this,arguments);return(b==="readable"||b===void 0)&&process.nextTick(r,this),E};function r(b){var E=b._readableState;E.readableListening=b.listenerCount("readable")>0,E.resumeScheduled&&!E.paused?E.flowing=!0:b.listenerCount("data")>0&&b.resume()}function a(b){H("readable nexttick read 0"),b.read(0)}Q.prototype.resume=function(){var b=this._readableState;return b.flowing||(H("resume"),b.flowing=!b.readableListening,t(this,b)),b.paused=!1,this};function t(b,E){E.resumeScheduled||(E.resumeScheduled=!0,process.nextTick(l,b,E))}function l(b,E){H("resume",E.reading),E.reading||b.read(0),E.resumeScheduled=!1,b.emit("resume"),h(b),E.flowing&&!E.reading&&b.read(0)}Q.prototype.pause=function(){return H("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(H("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function h(b){var E=b._readableState;for(H("flow",E.flowing);E.flowing&&b.read()!==null;);}Q.prototype.wrap=function(b){var E=this,d=this._readableState,e=!1;b.on("end",function(){if(H("wrapped end"),d.decoder&&!d.ended){var J0=d.decoder.end();J0&&J0.length&&E.push(J0)}E.push(null)}),b.on("data",function(J0){if(H("wrapped data"),d.decoder&&(J0=d.decoder.write(J0)),!(d.objectMode&&J0==null)&&!(!d.objectMode&&(!J0||!J0.length))){var Y0=E.push(J0);Y0||(e=!0,b.pause())}});for(var V0 in b)this[V0]===void 0&&typeof b[V0]=="function"&&(this[V0]=function(J0){return function(){return b[J0].apply(b,arguments)}}(V0));for(var W0=0;W0<Q0.length;W0++)b.on(Q0[W0],this.emit.bind(this,Q0[W0]));return this._read=function(J0){H("wrapped _read",J0),e&&(e=!1,b.resume())},this},typeof Symbol=="function"&&(Q.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=KY()),m(this)}),Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Q.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Q.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(b){this._readableState&&(this._readableState.flowing=b)}}),Q._fromList=n,Object.defineProperty(Q.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function n(b,E){if(E.length===0)return null;var d;return E.objectMode?d=E.buffer.shift():!b||b>=E.length?(E.decoder?d=E.buffer.join(""):E.buffer.length===1?d=E.buffer.first():d=E.buffer.concat(E.length),E.buffer.clear()):d=E.buffer.consume(b,E.decoder),d}function q0(b){var E=b._readableState;H("endReadable",E.endEmitted),E.endEmitted||(E.ended=!0,process.nextTick(G0,E,b))}function G0(b,E){if(H("endReadableNT",b.endEmitted,b.length),!b.endEmitted&&b.length===0&&(b.endEmitted=!0,E.readable=!1,E.emit("end"),b.autoDestroy)){var d=E._writableState;(!d||d.autoDestroy&&d.finished)&&E.destroy()}}typeof Symbol=="function"&&(Q.from=function(b,E){return f===void 0&&(f=zY()),f(Q,b,E)});function F0(b,E){for(var d=0,e=b.length;d<e;d++)if(b[d]===E)return d;return-1}}),c3=Z0((Y,q)=>{q.exports=D;var F=G1().codes,O=F.ERR_METHOD_NOT_IMPLEMENTED,Z=F.ERR_MULTIPLE_CALLBACK,N=F.ERR_TRANSFORM_ALREADY_TRANSFORMING,V=F.ERR_TRANSFORM_WITH_LENGTH_0,C=i8();h0()(D,C);function B(P,R){var k=this._transformState;k.transforming=!1;var v=k.writecb;if(v===null)return this.emit("error",new Z);k.writechunk=null,k.writecb=null,R!=null&&this.push(R),v(P);var M=this._readableState;M.reading=!1,(M.needReadable||M.length<M.highWaterMark)&&this._read(M.highWaterMark)}function D(P){if(!(this instanceof D))return new D(P);C.call(this,P),this._transformState={afterTransform:B.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,P&&(typeof P.transform=="function"&&(this._transform=P.transform),typeof P.flush=="function"&&(this._flush=P.flush)),this.on("prefinish",L)}function L(){var P=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(R,k){H(P,R,k)}):H(this,null,null)}D.prototype.push=function(P,R){return this._transformState.needTransform=!1,C.prototype.push.call(this,P,R)},D.prototype._transform=function(P,R,k){k(new O("_transform()"))},D.prototype._write=function(P,R,k){var v=this._transformState;if(v.writecb=k,v.writechunk=P,v.writeencoding=R,!v.transforming){var M=this._readableState;(v.needTransform||M.needReadable||M.length<M.highWaterMark)&&this._read(M.highWaterMark)}},D.prototype._read=function(P){var R=this._transformState;R.writechunk!==null&&!R.transforming?(R.transforming=!0,this._transform(R.writechunk,R.writeencoding,R.afterTransform)):R.needTransform=!0},D.prototype._destroy=function(P,R){C.prototype._destroy.call(this,P,function(k){R(k)})};function H(P,R,k){if(R)return P.emit("error",R);if(k!=null&&P.push(k),P._writableState.length)throw new V;if(P._transformState.transforming)throw new N;return P.push(null)}}),ZY=Z0((Y,q)=>{q.exports=O;var F=c3();h0()(O,F);function O(Z){if(!(this instanceof O))return new O(Z);F.call(this,Z)}O.prototype._transform=function(Z,N,V){V(null,Z)}}),$Y=Z0((Y,q)=>{var F;function O(k){var v=!1;return function(){v||(v=!0,k.apply(void 0,arguments))}}var Z=G1().codes,N=Z.ERR_MISSING_ARGS,V=Z.ERR_STREAM_DESTROYED;function C(k){if(k)throw k}function B(k){return k.setHeader&&typeof k.abort=="function"}function D(k,v,M,w){w=O(w);var x=!1;k.on("close",function(){x=!0}),F===void 0&&(F=f5()),F(k,{readable:v,writable:M},function(_){if(_)return w(_);x=!0,w()});var g=!1;return function(_){if(!x&&!g){if(g=!0,B(k))return k.abort();if(typeof k.destroy=="function")return k.destroy();w(_||new V("pipe"))}}}function L(k){k()}function H(k,v){return k.pipe(v)}function P(k){return!k.length||typeof k[k.length-1]!="function"?C:k.pop()}function R(){for(var k=arguments.length,v=new Array(k),M=0;M<k;M++)v[M]=arguments[M];var w=P(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new N("streams");var x,g=v.map(function(_,p){var m=p<v.length-1,f=p>0;return D(_,m,f,function(s){x||(x=s),s&&g.forEach(L),!m&&(g.forEach(L),w(x))})});return v.reduce(H)}q.exports=R}),qY=Z0((Y,q)=>{Y=q.exports=h3(),Y.Stream=Y,Y.Readable=Y,Y.Writable=b3(),Y.Duplex=i8(),Y.Transform=c3(),Y.PassThrough=ZY(),Y.finished=f5(),Y.pipeline=$Y()}),o5=Z0((Y,q)=>{(function(F,O){function Z(X,U){if(!X)throw new Error(U||"Assertion failed")}function N(X,U){X.super_=U;var $=function(){};$.prototype=U.prototype,X.prototype=new $,X.prototype.constructor=X}function V(X,U,$){if(V.isBN(X))return X;this.negative=0,this.words=null,this.length=0,this.red=null,X!==null&&((U==="le"||U==="be")&&($=U,U=10),this._init(X||0,U||10,$||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(X){return X instanceof V?!0:X!==null&&typeof X=="object"&&X.constructor.wordSize===V.wordSize&&Array.isArray(X.words)},V.max=function(X,U){return X.cmp(U)>0?X:U},V.min=function(X,U){return X.cmp(U)<0?X:U},V.prototype._init=function(X,U,$){if(typeof X=="number")return this._initNumber(X,U,$);if(typeof X=="object")return this._initArray(X,U,$);U==="hex"&&(U=16),Z(U===(U|0)&&U>=2&&U<=36),X=X.toString().replace(/\s+/g,"");var j=0;X[0]==="-"&&(j++,this.negative=1),j<X.length&&(U===16?this._parseHex(X,j,$):(this._parseBase(X,U,j),$==="le"&&this._initArray(this.toArray(),U,$)))},V.prototype._initNumber=function(X,U,$){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):(Z(X<9007199254740992),this.words=[X&67108863,X/67108864&67108863,1],this.length=3),$==="le"&&this._initArray(this.toArray(),U,$)},V.prototype._initArray=function(X,U,$){if(Z(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 j=0;j<this.length;j++)this.words[j]=0;var K,W,z=0;if($==="be")for(j=X.length-1,K=0;j>=0;j-=3)W=X[j]|X[j-1]<<8|X[j-2]<<16,this.words[K]|=W<<z&67108863,this.words[K+1]=W>>>26-z&67108863,z+=24,z>=26&&(z-=26,K++);else if($==="le")for(j=0,K=0;j<X.length;j+=3)W=X[j]|X[j+1]<<8|X[j+2]<<16,this.words[K]|=W<<z&67108863,this.words[K+1]=W>>>26-z&67108863,z+=24,z>=26&&(z-=26,K++);return this._strip()};function B(X,U){var $=X.charCodeAt(U);if($>=48&&$<=57)return $-48;if($>=65&&$<=70)return $-55;if($>=97&&$<=102)return $-87;Z(!1,"Invalid character in "+X)}function D(X,U,$){var j=B(X,$);return $-1>=U&&(j|=B(X,$-1)<<4),j}V.prototype._parseHex=function(X,U,$){this.length=Math.ceil((X.length-U)/6),this.words=new Array(this.length);for(var j=0;j<this.length;j++)this.words[j]=0;var K=0,W=0,z;if($==="be")for(j=X.length-1;j>=U;j-=2)z=D(X,U,j)<<K,this.words[W]|=z&67108863,K>=18?(K-=18,W+=1,this.words[W]|=z>>>26):K+=8;else{var A=X.length-U;for(j=A%2===0?U+1:U;j<X.length;j+=2)z=D(X,U,j)<<K,this.words[W]|=z&67108863,K>=18?(K-=18,W+=1,this.words[W]|=z>>>26):K+=8}this._strip()};function L(X,U,$,j){for(var K=0,W=0,z=Math.min(X.length,$),A=U;A<z;A++){var T=X.charCodeAt(A)-48;K*=j,T>=49?W=T-49+10:T>=17?W=T-17+10:W=T,Z(T>=0&&W<j,"Invalid character"),K+=W}return K}V.prototype._parseBase=function(X,U,$){this.words=[0],this.length=1;for(var j=0,K=1;K<=67108863;K*=U)j++;j--,K=K/U|0;for(var W=X.length-$,z=W%j,A=Math.min(W,W-z)+$,T=0,y=$;y<A;y+=j)T=L(X,y,y+j,U),this.imuln(K),this.words[0]+T<67108864?this.words[0]+=T:this._iaddn(T);if(z!==0){var r=1;for(T=L(X,y,X.length,U),y=0;y<z;y++)r*=U;this.imuln(r),this.words[0]+T<67108864?this.words[0]+=T:this._iaddn(T)}this._strip()},V.prototype.copy=function(X){X.words=new Array(this.length);for(var U=0;U<this.length;U++)X.words[U]=this.words[U];X.length=this.length,X.negative=this.negative,X.red=this.red};function H(X,U){X.words=U.words,X.length=U.length,X.negative=U.negative,X.red=U.red}if(V.prototype._move=function(X){H(X,this)},V.prototype.clone=function(){var X=new V(null);return this.copy(X),X},V.prototype._expand=function(X){for(;this.length<X;)this.words[this.length++]=0;return this},V.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{V.prototype[Symbol.for("nodejs.util.inspect.custom")]=P}catch{V.prototype.inspect=P}else V.prototype.inspect=P;function P(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var R=["","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"],k=[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],v=[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];V.prototype.toString=function(X,U){X=X||10,U=U|0||1;var $;if(X===16||X==="hex"){$="";for(var j=0,K=0,W=0;W<this.length;W++){var z=this.words[W],A=((z<<j|K)&16777215).toString(16);K=z>>>24-j&16777215,j+=2,j>=26&&(j-=26,W--),K!==0||W!==this.length-1?$=R[6-A.length]+A+$:$=A+$}for(K!==0&&($=K.toString(16)+$);$.length%U!==0;)$="0"+$;return this.negative!==0&&($="-"+$),$}if(X===(X|0)&&X>=2&&X<=36){var T=k[X],y=v[X];$="";var r=this.clone();for(r.negative=0;!r.isZero();){var a=r.modrn(y).toString(X);r=r.idivn(y),r.isZero()?$=a+$:$=R[T-a.length]+a+$}for(this.isZero()&&($="0"+$);$.length%U!==0;)$="0"+$;return this.negative!==0&&($="-"+$),$}Z(!1,"Base should be between 2 and 36")},V.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&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-X:X},V.prototype.toJSON=function(){return this.toString(16,2)},C&&(V.prototype.toBuffer=function(X,U){return this.toArrayLike(C,X,U)}),V.prototype.toArray=function(X,U){return this.toArrayLike(Array,X,U)};var M=function(X,U){return X.allocUnsafe?X.allocUnsafe(U):new X(U)};V.prototype.toArrayLike=function(X,U,$){this._strip();var j=this.byteLength(),K=$||Math.max(1,j);Z(j<=K,"byte array longer than desired length"),Z(K>0,"Requested array length <= 0");var W=M(X,K),z=U==="le"?"LE":"BE";return this["_toArrayLike"+z](W,j),W},V.prototype._toArrayLikeLE=function(X,U){for(var $=0,j=0,K=0,W=0;K<this.length;K++){var z=this.words[K]<<W|j;X[$++]=z&255,$<X.length&&(X[$++]=z>>8&255),$<X.length&&(X[$++]=z>>16&255),W===6?($<X.length&&(X[$++]=z>>24&255),j=0,W=0):(j=z>>>24,W+=2)}if($<X.length)for(X[$++]=j;$<X.length;)X[$++]=0},V.prototype._toArrayLikeBE=function(X,U){for(var $=X.length-1,j=0,K=0,W=0;K<this.length;K++){var z=this.words[K]<<W|j;X[$--]=z&255,$>=0&&(X[$--]=z>>8&255),$>=0&&(X[$--]=z>>16&255),W===6?($>=0&&(X[$--]=z>>24&255),j=0,W=0):(j=z>>>24,W+=2)}if($>=0)for(X[$--]=j;$>=0;)X[$--]=0},Math.clz32?V.prototype._countBits=function(X){return 32-Math.clz32(X)}:V.prototype._countBits=function(X){var U=X,$=0;return U>=4096&&($+=13,U>>>=13),U>=64&&($+=7,U>>>=7),U>=8&&($+=4,U>>>=4),U>=2&&($+=2,U>>>=2),$+U},V.prototype._zeroBits=function(X){if(X===0)return 26;var U=X,$=0;return(U&8191)===0&&($+=13,U>>>=13),(U&127)===0&&($+=7,U>>>=7),(U&15)===0&&($+=4,U>>>=4),(U&3)===0&&($+=2,U>>>=2),(U&1)===0&&$++,$},V.prototype.bitLength=function(){var X=this.words[this.length-1],U=this._countBits(X);return(this.length-1)*26+U};function w(X){for(var U=new Array(X.bitLength()),$=0;$<U.length;$++){var j=$/26|0,K=$%26;U[$]=X.words[j]>>>K&1}return U}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var X=0,U=0;U<this.length;U++){var $=this._zeroBits(this.words[U]);if(X+=$,$!==26)break}return X},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(X){return this.negative!==0?this.abs().inotn(X).iaddn(1):this.clone()},V.prototype.fromTwos=function(X){return this.testn(X-1)?this.notn(X).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(X){for(;this.length<X.length;)this.words[this.length++]=0;for(var U=0;U<X.length;U++)this.words[U]=this.words[U]|X.words[U];return this._strip()},V.prototype.ior=function(X){return Z((this.negative|X.negative)===0),this.iuor(X)},V.prototype.or=function(X){return this.length>X.length?this.clone().ior(X):X.clone().ior(this)},V.prototype.uor=function(X){return this.length>X.length?this.clone().iuor(X):X.clone().iuor(this)},V.prototype.iuand=function(X){var U;this.length>X.length?U=X:U=this;for(var $=0;$<U.length;$++)this.words[$]=this.words[$]&X.words[$];return this.length=U.length,this._strip()},V.prototype.iand=function(X){return Z((this.negative|X.negative)===0),this.iuand(X)},V.prototype.and=function(X){return this.length>X.length?this.clone().iand(X):X.clone().iand(this)},V.prototype.uand=function(X){return this.length>X.length?this.clone().iuand(X):X.clone().iuand(this)},V.prototype.iuxor=function(X){var U,$;this.length>X.length?(U=this,$=X):(U=X,$=this);for(var j=0;j<$.length;j++)this.words[j]=U.words[j]^$.words[j];if(this!==U)for(;j<U.length;j++)this.words[j]=U.words[j];return this.length=U.length,this._strip()},V.prototype.ixor=function(X){return Z((this.negative|X.negative)===0),this.iuxor(X)},V.prototype.xor=function(X){return this.length>X.length?this.clone().ixor(X):X.clone().ixor(this)},V.prototype.uxor=function(X){return this.length>X.length?this.clone().iuxor(X):X.clone().iuxor(this)},V.prototype.inotn=function(X){Z(typeof X=="number"&&X>=0);var U=Math.ceil(X/26)|0,$=X%26;this._expand(U),$>0&&U--;for(var j=0;j<U;j++)this.words[j]=~this.words[j]&67108863;return $>0&&(this.words[j]=~this.words[j]&67108863>>26-$),this._strip()},V.prototype.notn=function(X){return this.clone().inotn(X)},V.prototype.setn=function(X,U){Z(typeof X=="number"&&X>=0);var $=X/26|0,j=X%26;return this._expand($+1),U?this.words[$]=this.words[$]|1<<j:this.words[$]=this.words[$]&~(1<<j),this._strip()},V.prototype.iadd=function(X){var U;if(this.negative!==0&&X.negative===0)return this.negative=0,U=this.isub(X),this.negative^=1,this._normSign();if(this.negative===0&&X.negative!==0)return X.negative=0,U=this.isub(X),X.negative=1,U._normSign();var $,j;this.length>X.length?($=this,j=X):($=X,j=this);for(var K=0,W=0;W<j.length;W++)U=($.words[W]|0)+(j.words[W]|0)+K,this.words[W]=U&67108863,K=U>>>26;for(;K!==0&&W<$.length;W++)U=($.words[W]|0)+K,this.words[W]=U&67108863,K=U>>>26;if(this.length=$.length,K!==0)this.words[this.length]=K,this.length++;else if($!==this)for(;W<$.length;W++)this.words[W]=$.words[W];return this},V.prototype.add=function(X){var U;return X.negative!==0&&this.negative===0?(X.negative=0,U=this.sub(X),X.negative^=1,U):X.negative===0&&this.negative!==0?(this.negative=0,U=X.sub(this),this.negative=1,U):this.length>X.length?this.clone().iadd(X):X.clone().iadd(this)},V.prototype.isub=function(X){if(X.negative!==0){X.negative=0;var U=this.iadd(X);return X.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(X),this.negative=1,this._normSign();var $=this.cmp(X);if($===0)return this.negative=0,this.length=1,this.words[0]=0,this;var j,K;$>0?(j=this,K=X):(j=X,K=this);for(var W=0,z=0;z<K.length;z++)U=(j.words[z]|0)-(K.words[z]|0)+W,W=U>>26,this.words[z]=U&67108863;for(;W!==0&&z<j.length;z++)U=(j.words[z]|0)+W,W=U>>26,this.words[z]=U&67108863;if(W===0&&z<j.length&&j!==this)for(;z<j.length;z++)this.words[z]=j.words[z];return this.length=Math.max(this.length,z),j!==this&&(this.negative=1),this._strip()},V.prototype.sub=function(X){return this.clone().isub(X)};function x(X,U,$){$.negative=U.negative^X.negative;var j=X.length+U.length|0;$.length=j,j=j-1|0;var K=X.words[0]|0,W=U.words[0]|0,z=K*W,A=z&67108863,T=z/67108864|0;$.words[0]=A;for(var y=1;y<j;y++){for(var r=T>>>26,a=T&67108863,t=Math.min(y,U.length-1),l=Math.max(0,y-X.length+1);l<=t;l++){var h=y-l|0;K=X.words[h]|0,W=U.words[l]|0,z=K*W+a,r+=z/67108864|0,a=z&67108863}$.words[y]=a|0,T=r|0}return T!==0?$.words[y]=T|0:$.length--,$._strip()}var g=function(X,U,$){var j=X.words,K=U.words,W=$.words,z=0,A,T,y,r=j[0]|0,a=r&8191,t=r>>>13,l=j[1]|0,h=l&8191,n=l>>>13,q0=j[2]|0,G0=q0&8191,F0=q0>>>13,b=j[3]|0,E=b&8191,d=b>>>13,e=j[4]|0,V0=e&8191,W0=e>>>13,J0=j[5]|0,Y0=J0&8191,X0=J0>>>13,g0=j[6]|0,$0=g0&8191,z0=g0>>>13,_0=j[7]|0,I=_0&8191,S=_0>>>13,c=j[8]|0,o=c&8191,i=c>>>13,O0=j[9]|0,U0=O0&8191,j0=O0>>>13,c0=K[0]|0,C0=c0&8191,H0=c0>>>13,m0=K[1]|0,N0=m0&8191,P0=m0>>>13,$6=K[2]|0,L0=$6&8191,D0=$6>>>13,a0=K[3]|0,k0=a0&8191,B0=a0>>>13,C6=K[4]|0,R0=C6&8191,I0=C6>>>13,O6=K[5]|0,T0=O6&8191,M0=O6>>>13,D6=K[6]|0,A0=D6&8191,v0=D6>>>13,L6=K[7]|0,x0=L6&8191,S0=L6>>>13,N6=K[8]|0,E0=N6&8191,w0=N6>>>13,z6=K[9]|0,p0=z6&8191,b0=z6>>>13;$.negative=X.negative^U.negative,$.length=19,A=Math.imul(a,C0),T=Math.imul(a,H0),T=T+Math.imul(t,C0)|0,y=Math.imul(t,H0);var n0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(n0>>>26)|0,n0&=67108863,A=Math.imul(h,C0),T=Math.imul(h,H0),T=T+Math.imul(n,C0)|0,y=Math.imul(n,H0),A=A+Math.imul(a,N0)|0,T=T+Math.imul(a,P0)|0,T=T+Math.imul(t,N0)|0,y=y+Math.imul(t,P0)|0;var r0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(r0>>>26)|0,r0&=67108863,A=Math.imul(G0,C0),T=Math.imul(G0,H0),T=T+Math.imul(F0,C0)|0,y=Math.imul(F0,H0),A=A+Math.imul(h,N0)|0,T=T+Math.imul(h,P0)|0,T=T+Math.imul(n,N0)|0,y=y+Math.imul(n,P0)|0,A=A+Math.imul(a,L0)|0,T=T+Math.imul(a,D0)|0,T=T+Math.imul(t,L0)|0,y=y+Math.imul(t,D0)|0;var i0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(i0>>>26)|0,i0&=67108863,A=Math.imul(E,C0),T=Math.imul(E,H0),T=T+Math.imul(d,C0)|0,y=Math.imul(d,H0),A=A+Math.imul(G0,N0)|0,T=T+Math.imul(G0,P0)|0,T=T+Math.imul(F0,N0)|0,y=y+Math.imul(F0,P0)|0,A=A+Math.imul(h,L0)|0,T=T+Math.imul(h,D0)|0,T=T+Math.imul(n,L0)|0,y=y+Math.imul(n,D0)|0,A=A+Math.imul(a,k0)|0,T=T+Math.imul(a,B0)|0,T=T+Math.imul(t,k0)|0,y=y+Math.imul(t,B0)|0;var s0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(s0>>>26)|0,s0&=67108863,A=Math.imul(V0,C0),T=Math.imul(V0,H0),T=T+Math.imul(W0,C0)|0,y=Math.imul(W0,H0),A=A+Math.imul(E,N0)|0,T=T+Math.imul(E,P0)|0,T=T+Math.imul(d,N0)|0,y=y+Math.imul(d,P0)|0,A=A+Math.imul(G0,L0)|0,T=T+Math.imul(G0,D0)|0,T=T+Math.imul(F0,L0)|0,y=y+Math.imul(F0,D0)|0,A=A+Math.imul(h,k0)|0,T=T+Math.imul(h,B0)|0,T=T+Math.imul(n,k0)|0,y=y+Math.imul(n,B0)|0,A=A+Math.imul(a,R0)|0,T=T+Math.imul(a,I0)|0,T=T+Math.imul(t,R0)|0,y=y+Math.imul(t,I0)|0;var t0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(t0>>>26)|0,t0&=67108863,A=Math.imul(Y0,C0),T=Math.imul(Y0,H0),T=T+Math.imul(X0,C0)|0,y=Math.imul(X0,H0),A=A+Math.imul(V0,N0)|0,T=T+Math.imul(V0,P0)|0,T=T+Math.imul(W0,N0)|0,y=y+Math.imul(W0,P0)|0,A=A+Math.imul(E,L0)|0,T=T+Math.imul(E,D0)|0,T=T+Math.imul(d,L0)|0,y=y+Math.imul(d,D0)|0,A=A+Math.imul(G0,k0)|0,T=T+Math.imul(G0,B0)|0,T=T+Math.imul(F0,k0)|0,y=y+Math.imul(F0,B0)|0,A=A+Math.imul(h,R0)|0,T=T+Math.imul(h,I0)|0,T=T+Math.imul(n,R0)|0,y=y+Math.imul(n,I0)|0,A=A+Math.imul(a,T0)|0,T=T+Math.imul(a,M0)|0,T=T+Math.imul(t,T0)|0,y=y+Math.imul(t,M0)|0;var e0=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(e0>>>26)|0,e0&=67108863,A=Math.imul($0,C0),T=Math.imul($0,H0),T=T+Math.imul(z0,C0)|0,y=Math.imul(z0,H0),A=A+Math.imul(Y0,N0)|0,T=T+Math.imul(Y0,P0)|0,T=T+Math.imul(X0,N0)|0,y=y+Math.imul(X0,P0)|0,A=A+Math.imul(V0,L0)|0,T=T+Math.imul(V0,D0)|0,T=T+Math.imul(W0,L0)|0,y=y+Math.imul(W0,D0)|0,A=A+Math.imul(E,k0)|0,T=T+Math.imul(E,B0)|0,T=T+Math.imul(d,k0)|0,y=y+Math.imul(d,B0)|0,A=A+Math.imul(G0,R0)|0,T=T+Math.imul(G0,I0)|0,T=T+Math.imul(F0,R0)|0,y=y+Math.imul(F0,I0)|0,A=A+Math.imul(h,T0)|0,T=T+Math.imul(h,M0)|0,T=T+Math.imul(n,T0)|0,y=y+Math.imul(n,M0)|0,A=A+Math.imul(a,A0)|0,T=T+Math.imul(a,v0)|0,T=T+Math.imul(t,A0)|0,y=y+Math.imul(t,v0)|0;var Q6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,A=Math.imul(I,C0),T=Math.imul(I,H0),T=T+Math.imul(S,C0)|0,y=Math.imul(S,H0),A=A+Math.imul($0,N0)|0,T=T+Math.imul($0,P0)|0,T=T+Math.imul(z0,N0)|0,y=y+Math.imul(z0,P0)|0,A=A+Math.imul(Y0,L0)|0,T=T+Math.imul(Y0,D0)|0,T=T+Math.imul(X0,L0)|0,y=y+Math.imul(X0,D0)|0,A=A+Math.imul(V0,k0)|0,T=T+Math.imul(V0,B0)|0,T=T+Math.imul(W0,k0)|0,y=y+Math.imul(W0,B0)|0,A=A+Math.imul(E,R0)|0,T=T+Math.imul(E,I0)|0,T=T+Math.imul(d,R0)|0,y=y+Math.imul(d,I0)|0,A=A+Math.imul(G0,T0)|0,T=T+Math.imul(G0,M0)|0,T=T+Math.imul(F0,T0)|0,y=y+Math.imul(F0,M0)|0,A=A+Math.imul(h,A0)|0,T=T+Math.imul(h,v0)|0,T=T+Math.imul(n,A0)|0,y=y+Math.imul(n,v0)|0,A=A+Math.imul(a,x0)|0,T=T+Math.imul(a,S0)|0,T=T+Math.imul(t,x0)|0,y=y+Math.imul(t,S0)|0;var W6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(W6>>>26)|0,W6&=67108863,A=Math.imul(o,C0),T=Math.imul(o,H0),T=T+Math.imul(i,C0)|0,y=Math.imul(i,H0),A=A+Math.imul(I,N0)|0,T=T+Math.imul(I,P0)|0,T=T+Math.imul(S,N0)|0,y=y+Math.imul(S,P0)|0,A=A+Math.imul($0,L0)|0,T=T+Math.imul($0,D0)|0,T=T+Math.imul(z0,L0)|0,y=y+Math.imul(z0,D0)|0,A=A+Math.imul(Y0,k0)|0,T=T+Math.imul(Y0,B0)|0,T=T+Math.imul(X0,k0)|0,y=y+Math.imul(X0,B0)|0,A=A+Math.imul(V0,R0)|0,T=T+Math.imul(V0,I0)|0,T=T+Math.imul(W0,R0)|0,y=y+Math.imul(W0,I0)|0,A=A+Math.imul(E,T0)|0,T=T+Math.imul(E,M0)|0,T=T+Math.imul(d,T0)|0,y=y+Math.imul(d,M0)|0,A=A+Math.imul(G0,A0)|0,T=T+Math.imul(G0,v0)|0,T=T+Math.imul(F0,A0)|0,y=y+Math.imul(F0,v0)|0,A=A+Math.imul(h,x0)|0,T=T+Math.imul(h,S0)|0,T=T+Math.imul(n,x0)|0,y=y+Math.imul(n,S0)|0,A=A+Math.imul(a,E0)|0,T=T+Math.imul(a,w0)|0,T=T+Math.imul(t,E0)|0,y=y+Math.imul(t,w0)|0;var G6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(G6>>>26)|0,G6&=67108863,A=Math.imul(U0,C0),T=Math.imul(U0,H0),T=T+Math.imul(j0,C0)|0,y=Math.imul(j0,H0),A=A+Math.imul(o,N0)|0,T=T+Math.imul(o,P0)|0,T=T+Math.imul(i,N0)|0,y=y+Math.imul(i,P0)|0,A=A+Math.imul(I,L0)|0,T=T+Math.imul(I,D0)|0,T=T+Math.imul(S,L0)|0,y=y+Math.imul(S,D0)|0,A=A+Math.imul($0,k0)|0,T=T+Math.imul($0,B0)|0,T=T+Math.imul(z0,k0)|0,y=y+Math.imul(z0,B0)|0,A=A+Math.imul(Y0,R0)|0,T=T+Math.imul(Y0,I0)|0,T=T+Math.imul(X0,R0)|0,y=y+Math.imul(X0,I0)|0,A=A+Math.imul(V0,T0)|0,T=T+Math.imul(V0,M0)|0,T=T+Math.imul(W0,T0)|0,y=y+Math.imul(W0,M0)|0,A=A+Math.imul(E,A0)|0,T=T+Math.imul(E,v0)|0,T=T+Math.imul(d,A0)|0,y=y+Math.imul(d,v0)|0,A=A+Math.imul(G0,x0)|0,T=T+Math.imul(G0,S0)|0,T=T+Math.imul(F0,x0)|0,y=y+Math.imul(F0,S0)|0,A=A+Math.imul(h,E0)|0,T=T+Math.imul(h,w0)|0,T=T+Math.imul(n,E0)|0,y=y+Math.imul(n,w0)|0,A=A+Math.imul(a,p0)|0,T=T+Math.imul(a,b0)|0,T=T+Math.imul(t,p0)|0,y=y+Math.imul(t,b0)|0;var X6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(X6>>>26)|0,X6&=67108863,A=Math.imul(U0,N0),T=Math.imul(U0,P0),T=T+Math.imul(j0,N0)|0,y=Math.imul(j0,P0),A=A+Math.imul(o,L0)|0,T=T+Math.imul(o,D0)|0,T=T+Math.imul(i,L0)|0,y=y+Math.imul(i,D0)|0,A=A+Math.imul(I,k0)|0,T=T+Math.imul(I,B0)|0,T=T+Math.imul(S,k0)|0,y=y+Math.imul(S,B0)|0,A=A+Math.imul($0,R0)|0,T=T+Math.imul($0,I0)|0,T=T+Math.imul(z0,R0)|0,y=y+Math.imul(z0,I0)|0,A=A+Math.imul(Y0,T0)|0,T=T+Math.imul(Y0,M0)|0,T=T+Math.imul(X0,T0)|0,y=y+Math.imul(X0,M0)|0,A=A+Math.imul(V0,A0)|0,T=T+Math.imul(V0,v0)|0,T=T+Math.imul(W0,A0)|0,y=y+Math.imul(W0,v0)|0,A=A+Math.imul(E,x0)|0,T=T+Math.imul(E,S0)|0,T=T+Math.imul(d,x0)|0,y=y+Math.imul(d,S0)|0,A=A+Math.imul(G0,E0)|0,T=T+Math.imul(G0,w0)|0,T=T+Math.imul(F0,E0)|0,y=y+Math.imul(F0,w0)|0,A=A+Math.imul(h,p0)|0,T=T+Math.imul(h,b0)|0,T=T+Math.imul(n,p0)|0,y=y+Math.imul(n,b0)|0;var Y6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,A=Math.imul(U0,L0),T=Math.imul(U0,D0),T=T+Math.imul(j0,L0)|0,y=Math.imul(j0,D0),A=A+Math.imul(o,k0)|0,T=T+Math.imul(o,B0)|0,T=T+Math.imul(i,k0)|0,y=y+Math.imul(i,B0)|0,A=A+Math.imul(I,R0)|0,T=T+Math.imul(I,I0)|0,T=T+Math.imul(S,R0)|0,y=y+Math.imul(S,I0)|0,A=A+Math.imul($0,T0)|0,T=T+Math.imul($0,M0)|0,T=T+Math.imul(z0,T0)|0,y=y+Math.imul(z0,M0)|0,A=A+Math.imul(Y0,A0)|0,T=T+Math.imul(Y0,v0)|0,T=T+Math.imul(X0,A0)|0,y=y+Math.imul(X0,v0)|0,A=A+Math.imul(V0,x0)|0,T=T+Math.imul(V0,S0)|0,T=T+Math.imul(W0,x0)|0,y=y+Math.imul(W0,S0)|0,A=A+Math.imul(E,E0)|0,T=T+Math.imul(E,w0)|0,T=T+Math.imul(d,E0)|0,y=y+Math.imul(d,w0)|0,A=A+Math.imul(G0,p0)|0,T=T+Math.imul(G0,b0)|0,T=T+Math.imul(F0,p0)|0,y=y+Math.imul(F0,b0)|0;var V6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(V6>>>26)|0,V6&=67108863,A=Math.imul(U0,k0),T=Math.imul(U0,B0),T=T+Math.imul(j0,k0)|0,y=Math.imul(j0,B0),A=A+Math.imul(o,R0)|0,T=T+Math.imul(o,I0)|0,T=T+Math.imul(i,R0)|0,y=y+Math.imul(i,I0)|0,A=A+Math.imul(I,T0)|0,T=T+Math.imul(I,M0)|0,T=T+Math.imul(S,T0)|0,y=y+Math.imul(S,M0)|0,A=A+Math.imul($0,A0)|0,T=T+Math.imul($0,v0)|0,T=T+Math.imul(z0,A0)|0,y=y+Math.imul(z0,v0)|0,A=A+Math.imul(Y0,x0)|0,T=T+Math.imul(Y0,S0)|0,T=T+Math.imul(X0,x0)|0,y=y+Math.imul(X0,S0)|0,A=A+Math.imul(V0,E0)|0,T=T+Math.imul(V0,w0)|0,T=T+Math.imul(W0,E0)|0,y=y+Math.imul(W0,w0)|0,A=A+Math.imul(E,p0)|0,T=T+Math.imul(E,b0)|0,T=T+Math.imul(d,p0)|0,y=y+Math.imul(d,b0)|0;var J6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(J6>>>26)|0,J6&=67108863,A=Math.imul(U0,R0),T=Math.imul(U0,I0),T=T+Math.imul(j0,R0)|0,y=Math.imul(j0,I0),A=A+Math.imul(o,T0)|0,T=T+Math.imul(o,M0)|0,T=T+Math.imul(i,T0)|0,y=y+Math.imul(i,M0)|0,A=A+Math.imul(I,A0)|0,T=T+Math.imul(I,v0)|0,T=T+Math.imul(S,A0)|0,y=y+Math.imul(S,v0)|0,A=A+Math.imul($0,x0)|0,T=T+Math.imul($0,S0)|0,T=T+Math.imul(z0,x0)|0,y=y+Math.imul(z0,S0)|0,A=A+Math.imul(Y0,E0)|0,T=T+Math.imul(Y0,w0)|0,T=T+Math.imul(X0,E0)|0,y=y+Math.imul(X0,w0)|0,A=A+Math.imul(V0,p0)|0,T=T+Math.imul(V0,b0)|0,T=T+Math.imul(W0,p0)|0,y=y+Math.imul(W0,b0)|0;var U6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(U6>>>26)|0,U6&=67108863,A=Math.imul(U0,T0),T=Math.imul(U0,M0),T=T+Math.imul(j0,T0)|0,y=Math.imul(j0,M0),A=A+Math.imul(o,A0)|0,T=T+Math.imul(o,v0)|0,T=T+Math.imul(i,A0)|0,y=y+Math.imul(i,v0)|0,A=A+Math.imul(I,x0)|0,T=T+Math.imul(I,S0)|0,T=T+Math.imul(S,x0)|0,y=y+Math.imul(S,S0)|0,A=A+Math.imul($0,E0)|0,T=T+Math.imul($0,w0)|0,T=T+Math.imul(z0,E0)|0,y=y+Math.imul(z0,w0)|0,A=A+Math.imul(Y0,p0)|0,T=T+Math.imul(Y0,b0)|0,T=T+Math.imul(X0,p0)|0,y=y+Math.imul(X0,b0)|0;var F6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(F6>>>26)|0,F6&=67108863,A=Math.imul(U0,A0),T=Math.imul(U0,v0),T=T+Math.imul(j0,A0)|0,y=Math.imul(j0,v0),A=A+Math.imul(o,x0)|0,T=T+Math.imul(o,S0)|0,T=T+Math.imul(i,x0)|0,y=y+Math.imul(i,S0)|0,A=A+Math.imul(I,E0)|0,T=T+Math.imul(I,w0)|0,T=T+Math.imul(S,E0)|0,y=y+Math.imul(S,w0)|0,A=A+Math.imul($0,p0)|0,T=T+Math.imul($0,b0)|0,T=T+Math.imul(z0,p0)|0,y=y+Math.imul(z0,b0)|0;var K6=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(K6>>>26)|0,K6&=67108863,A=Math.imul(U0,x0),T=Math.imul(U0,S0),T=T+Math.imul(j0,x0)|0,y=Math.imul(j0,S0),A=A+Math.imul(o,E0)|0,T=T+Math.imul(o,w0)|0,T=T+Math.imul(i,E0)|0,y=y+Math.imul(i,w0)|0,A=A+Math.imul(I,p0)|0,T=T+Math.imul(I,b0)|0,T=T+Math.imul(S,p0)|0,y=y+Math.imul(S,b0)|0;var f7=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(f7>>>26)|0,f7&=67108863,A=Math.imul(U0,E0),T=Math.imul(U0,w0),T=T+Math.imul(j0,E0)|0,y=Math.imul(j0,w0),A=A+Math.imul(o,p0)|0,T=T+Math.imul(o,b0)|0,T=T+Math.imul(i,p0)|0,y=y+Math.imul(i,b0)|0;var o7=(z+A|0)+((T&8191)<<13)|0;z=(y+(T>>>13)|0)+(o7>>>26)|0,o7&=67108863,A=Math.imul(U0,p0),T=Math.imul(U0,b0),T=T+Math.imul(j0,p0)|0,y=Math.imul(j0,b0);var a7=(z+A|0)+((T&8191)<<13)|0;return z=(y+(T>>>13)|0)+(a7>>>26)|0,a7&=67108863,W[0]=n0,W[1]=r0,W[2]=i0,W[3]=s0,W[4]=t0,W[5]=e0,W[6]=Q6,W[7]=W6,W[8]=G6,W[9]=X6,W[10]=Y6,W[11]=V6,W[12]=J6,W[13]=U6,W[14]=F6,W[15]=K6,W[16]=f7,W[17]=o7,W[18]=a7,z!==0&&(W[19]=z,$.length++),$};Math.imul||(g=x);function _(X,U,$){$.negative=U.negative^X.negative,$.length=X.length+U.length;for(var j=0,K=0,W=0;W<$.length-1;W++){var z=K;K=0;for(var A=j&67108863,T=Math.min(W,U.length-1),y=Math.max(0,W-X.length+1);y<=T;y++){var r=W-y,a=X.words[r]|0,t=U.words[y]|0,l=a*t,h=l&67108863;z=z+(l/67108864|0)|0,h=h+A|0,A=h&67108863,z=z+(h>>>26)|0,K+=z>>>26,z&=67108863}$.words[W]=A,j=z,z=K}return j!==0?$.words[W]=j:$.length--,$._strip()}function p(X,U,$){return _(X,U,$)}V.prototype.mulTo=function(X,U){var $,j=this.length+X.length;return this.length===10&&X.length===10?$=g(this,X,U):j<63?$=x(this,X,U):j<1024?$=_(this,X,U):$=p(this,X,U),$};function m(X,U){this.x=X,this.y=U}m.prototype.makeRBT=function(X){for(var U=new Array(X),$=V.prototype._countBits(X)-1,j=0;j<X;j++)U[j]=this.revBin(j,$,X);return U},m.prototype.revBin=function(X,U,$){if(X===0||X===$-1)return X;for(var j=0,K=0;K<U;K++)j|=(X&1)<<U-K-1,X>>=1;return j},m.prototype.permute=function(X,U,$,j,K,W){for(var z=0;z<W;z++)j[z]=U[X[z]],K[z]=$[X[z]]},m.prototype.transform=function(X,U,$,j,K,W){this.permute(W,X,U,$,j,K);for(var z=1;z<K;z<<=1)for(var A=z<<1,T=Math.cos(2*Math.PI/A),y=Math.sin(2*Math.PI/A),r=0;r<K;r+=A)for(var a=T,t=y,l=0;l<z;l++){var h=$[r+l],n=j[r+l],q0=$[r+l+z],G0=j[r+l+z],F0=a*q0-t*G0;G0=a*G0+t*q0,q0=F0,$[r+l]=h+q0,j[r+l]=n+G0,$[r+l+z]=h-q0,j[r+l+z]=n-G0,l!==A&&(F0=T*a-y*t,t=T*t+y*a,a=F0)}},m.prototype.guessLen13b=function(X,U){var $=Math.max(U,X)|1,j=$&1,K=0;for($=$/2|0;$;$=$>>>1)K++;return 1<<K+1+j},m.prototype.conjugate=function(X,U,$){if(!($<=1))for(var j=0;j<$/2;j++){var K=X[j];X[j]=X[$-j-1],X[$-j-1]=K,K=U[j],U[j]=-U[$-j-1],U[$-j-1]=-K}},m.prototype.normalize13b=function(X,U){for(var $=0,j=0;j<U/2;j++){var K=Math.round(X[2*j+1]/U)*8192+Math.round(X[2*j]/U)+$;X[j]=K&67108863,K<67108864?$=0:$=K/67108864|0}return X},m.prototype.convert13b=function(X,U,$,j){for(var K=0,W=0;W<U;W++)K=K+(X[W]|0),$[2*W]=K&8191,K=K>>>13,$[2*W+1]=K&8191,K=K>>>13;for(W=2*U;W<j;++W)$[W]=0;Z(K===0),Z((K&-8192)===0)},m.prototype.stub=function(X){for(var U=new Array(X),$=0;$<X;$++)U[$]=0;return U},m.prototype.mulp=function(X,U,$){var j=2*this.guessLen13b(X.length,U.length),K=this.makeRBT(j),W=this.stub(j),z=new Array(j),A=new Array(j),T=new Array(j),y=new Array(j),r=new Array(j),a=new Array(j),t=$.words;t.length=j,this.convert13b(X.words,X.length,z,j),this.convert13b(U.words,U.length,y,j),this.transform(z,W,A,T,j,K),this.transform(y,W,r,a,j,K);for(var l=0;l<j;l++){var h=A[l]*r[l]-T[l]*a[l];T[l]=A[l]*a[l]+T[l]*r[l],A[l]=h}return this.conjugate(A,T,j),this.transform(A,T,t,W,j,K),this.conjugate(t,W,j),this.normalize13b(t,j),$.negative=X.negative^U.negative,$.length=X.length+U.length,$._strip()},V.prototype.mul=function(X){var U=new V(null);return U.words=new Array(this.length+X.length),this.mulTo(X,U)},V.prototype.mulf=function(X){var U=new V(null);return U.words=new Array(this.length+X.length),p(this,X,U)},V.prototype.imul=function(X){return this.clone().mulTo(X,this)},V.prototype.imuln=function(X){var U=X<0;U&&(X=-X),Z(typeof X=="number"),Z(X<67108864);for(var $=0,j=0;j<this.length;j++){var K=(this.words[j]|0)*X,W=(K&67108863)+($&67108863);$>>=26,$+=K/67108864|0,$+=W>>>26,this.words[j]=W&67108863}return $!==0&&(this.words[j]=$,this.length++),U?this.ineg():this},V.prototype.muln=function(X){return this.clone().imuln(X)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(X){var U=w(X);if(U.length===0)return new V(1);for(var $=this,j=0;j<U.length&&U[j]===0;j++,$=$.sqr());if(++j<U.length)for(var K=$.sqr();j<U.length;j++,K=K.sqr())U[j]!==0&&($=$.mul(K));return $},V.prototype.iushln=function(X){Z(typeof X=="number"&&X>=0);var U=X%26,$=(X-U)/26,j=67108863>>>26-U<<26-U,K;if(U!==0){var W=0;for(K=0;K<this.length;K++){var z=this.words[K]&j,A=(this.words[K]|0)-z<<U;this.words[K]=A|W,W=z>>>26-U}W&&(this.words[K]=W,this.length++)}if($!==0){for(K=this.length-1;K>=0;K--)this.words[K+$]=this.words[K];for(K=0;K<$;K++)this.words[K]=0;this.length+=$}return this._strip()},V.prototype.ishln=function(X){return Z(this.negative===0),this.iushln(X)},V.prototype.iushrn=function(X,U,$){Z(typeof X=="number"&&X>=0);var j;U?j=(U-U%26)/26:j=0;var K=X%26,W=Math.min((X-K)/26,this.length),z=67108863^67108863>>>K<<K,A=$;if(j-=W,j=Math.max(0,j),A){for(var T=0;T<W;T++)A.words[T]=this.words[T];A.length=W}if(W!==0)if(this.length>W)for(this.length-=W,T=0;T<this.length;T++)this.words[T]=this.words[T+W];else this.words[0]=0,this.length=1;var y=0;for(T=this.length-1;T>=0&&(y!==0||T>=j);T--){var r=this.words[T]|0;this.words[T]=y<<26-K|r>>>K,y=r&z}return A&&y!==0&&(A.words[A.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},V.prototype.ishrn=function(X,U,$){return Z(this.negative===0),this.iushrn(X,U,$)},V.prototype.shln=function(X){return this.clone().ishln(X)},V.prototype.ushln=function(X){return this.clone().iushln(X)},V.prototype.shrn=function(X){return this.clone().ishrn(X)},V.prototype.ushrn=function(X){return this.clone().iushrn(X)},V.prototype.testn=function(X){Z(typeof X=="number"&&X>=0);var U=X%26,$=(X-U)/26,j=1<<U;if(this.length<=$)return!1;var K=this.words[$];return!!(K&j)},V.prototype.imaskn=function(X){Z(typeof X=="number"&&X>=0);var U=X%26,$=(X-U)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=$)return this;if(U!==0&&$++,this.length=Math.min($,this.length),U!==0){var j=67108863^67108863>>>U<<U;this.words[this.length-1]&=j}return this._strip()},V.prototype.maskn=function(X){return this.clone().imaskn(X)},V.prototype.iaddn=function(X){return Z(typeof X=="number"),Z(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)},V.prototype._iaddn=function(X){this.words[0]+=X;for(var U=0;U<this.length&&this.words[U]>=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},V.prototype.isubn=function(X){if(Z(typeof X=="number"),Z(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 U=0;U<this.length&&this.words[U]<0;U++)this.words[U]+=67108864,this.words[U+1]-=1;return this._strip()},V.prototype.addn=function(X){return this.clone().iaddn(X)},V.prototype.subn=function(X){return this.clone().isubn(X)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(X,U,$){var j=X.length+$,K;this._expand(j);var W,z=0;for(K=0;K<X.length;K++){W=(this.words[K+$]|0)+z;var A=(X.words[K]|0)*U;W-=A&67108863,z=(W>>26)-(A/67108864|0),this.words[K+$]=W&67108863}for(;K<this.length-$;K++)W=(this.words[K+$]|0)+z,z=W>>26,this.words[K+$]=W&67108863;if(z===0)return this._strip();for(Z(z===-1),z=0,K=0;K<this.length;K++)W=-(this.words[K]|0)+z,z=W>>26,this.words[K]=W&67108863;return this.negative=1,this._strip()},V.prototype._wordDiv=function(X,U){var $=this.length-X.length,j=this.clone(),K=X,W=K.words[K.length-1]|0,z=this._countBits(W);$=26-z,$!==0&&(K=K.ushln($),j.iushln($),W=K.words[K.length-1]|0);var A=j.length-K.length,T;if(U!=="mod"){T=new V(null),T.length=A+1,T.words=new Array(T.length);for(var y=0;y<T.length;y++)T.words[y]=0}var r=j.clone()._ishlnsubmul(K,1,A);r.negative===0&&(j=r,T&&(T.words[A]=1));for(var a=A-1;a>=0;a--){var t=(j.words[K.length+a]|0)*67108864+(j.words[K.length+a-1]|0);for(t=Math.min(t/W|0,67108863),j._ishlnsubmul(K,t,a);j.negative!==0;)t--,j.negative=0,j._ishlnsubmul(K,1,a),j.isZero()||(j.negative^=1);T&&(T.words[a]=t)}return T&&T._strip(),j._strip(),U!=="div"&&$!==0&&j.iushrn($),{div:T||null,mod:j}},V.prototype.divmod=function(X,U,$){if(Z(!X.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var j,K,W;return this.negative!==0&&X.negative===0?(W=this.neg().divmod(X,U),U!=="mod"&&(j=W.div.neg()),U!=="div"&&(K=W.mod.neg(),$&&K.negative!==0&&K.iadd(X)),{div:j,mod:K}):this.negative===0&&X.negative!==0?(W=this.divmod(X.neg(),U),U!=="mod"&&(j=W.div.neg()),{div:j,mod:W.mod}):(this.negative&X.negative)!==0?(W=this.neg().divmod(X.neg(),U),U!=="div"&&(K=W.mod.neg(),$&&K.negative!==0&&K.isub(X)),{div:W.div,mod:K}):X.length>this.length||this.cmp(X)<0?{div:new V(0),mod:this}:X.length===1?U==="div"?{div:this.divn(X.words[0]),mod:null}:U==="mod"?{div:null,mod:new V(this.modrn(X.words[0]))}:{div:this.divn(X.words[0]),mod:new V(this.modrn(X.words[0]))}:this._wordDiv(X,U)},V.prototype.div=function(X){return this.divmod(X,"div",!1).div},V.prototype.mod=function(X){return this.divmod(X,"mod",!1).mod},V.prototype.umod=function(X){return this.divmod(X,"mod",!0).mod},V.prototype.divRound=function(X){var U=this.divmod(X);if(U.mod.isZero())return U.div;var $=U.div.negative!==0?U.mod.isub(X):U.mod,j=X.ushrn(1),K=X.andln(1),W=$.cmp(j);return W<0||K===1&&W===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},V.prototype.modrn=function(X){var U=X<0;U&&(X=-X),Z(X<=67108863);for(var $=(1<<26)%X,j=0,K=this.length-1;K>=0;K--)j=($*j+(this.words[K]|0))%X;return U?-j:j},V.prototype.modn=function(X){return this.modrn(X)},V.prototype.idivn=function(X){var U=X<0;U&&(X=-X),Z(X<=67108863);for(var $=0,j=this.length-1;j>=0;j--){var K=(this.words[j]|0)+$*67108864;this.words[j]=K/X|0,$=K%X}return this._strip(),U?this.ineg():this},V.prototype.divn=function(X){return this.clone().idivn(X)},V.prototype.egcd=function(X){Z(X.negative===0),Z(!X.isZero());var U=this,$=X.clone();U.negative!==0?U=U.umod(X):U=U.clone();for(var j=new V(1),K=new V(0),W=new V(0),z=new V(1),A=0;U.isEven()&&$.isEven();)U.iushrn(1),$.iushrn(1),++A;for(var T=$.clone(),y=U.clone();!U.isZero();){for(var r=0,a=1;(U.words[0]&a)===0&&r<26;++r,a<<=1);if(r>0)for(U.iushrn(r);r-- >0;)(j.isOdd()||K.isOdd())&&(j.iadd(T),K.isub(y)),j.iushrn(1),K.iushrn(1);for(var t=0,l=1;($.words[0]&l)===0&&t<26;++t,l<<=1);if(t>0)for($.iushrn(t);t-- >0;)(W.isOdd()||z.isOdd())&&(W.iadd(T),z.isub(y)),W.iushrn(1),z.iushrn(1);U.cmp($)>=0?(U.isub($),j.isub(W),K.isub(z)):($.isub(U),W.isub(j),z.isub(K))}return{a:W,b:z,gcd:$.iushln(A)}},V.prototype._invmp=function(X){Z(X.negative===0),Z(!X.isZero());var U=this,$=X.clone();U.negative!==0?U=U.umod(X):U=U.clone();for(var j=new V(1),K=new V(0),W=$.clone();U.cmpn(1)>0&&$.cmpn(1)>0;){for(var z=0,A=1;(U.words[0]&A)===0&&z<26;++z,A<<=1);if(z>0)for(U.iushrn(z);z-- >0;)j.isOdd()&&j.iadd(W),j.iushrn(1);for(var T=0,y=1;($.words[0]&y)===0&&T<26;++T,y<<=1);if(T>0)for($.iushrn(T);T-- >0;)K.isOdd()&&K.iadd(W),K.iushrn(1);U.cmp($)>=0?(U.isub($),j.isub(K)):($.isub(U),K.isub(j))}var r;return U.cmpn(1)===0?r=j:r=K,r.cmpn(0)<0&&r.iadd(X),r},V.prototype.gcd=function(X){if(this.isZero())return X.abs();if(X.isZero())return this.abs();var U=this.clone(),$=X.clone();U.negative=0,$.negative=0;for(var j=0;U.isEven()&&$.isEven();j++)U.iushrn(1),$.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;$.isEven();)$.iushrn(1);var K=U.cmp($);if(K<0){var W=U;U=$,$=W}else if(K===0||$.cmpn(1)===0)break;U.isub($)}while(!0);return $.iushln(j)},V.prototype.invm=function(X){return this.egcd(X).a.umod(X)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(X){return this.words[0]&X},V.prototype.bincn=function(X){Z(typeof X=="number");var U=X%26,$=(X-U)/26,j=1<<U;if(this.length<=$)return this._expand($+1),this.words[$]|=j,this;for(var K=j,W=$;K!==0&&W<this.length;W++){var z=this.words[W]|0;z+=K,K=z>>>26,z&=67108863,this.words[W]=z}return K!==0&&(this.words[W]=K,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(X){var U=X<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this._strip();var $;if(this.length>1)$=1;else{U&&(X=-X),Z(X<=67108863,"Number is too big");var j=this.words[0]|0;$=j===X?0:j<X?-1:1}return this.negative!==0?-$|0:$},V.prototype.cmp=function(X){if(this.negative!==0&&X.negative===0)return-1;if(this.negative===0&&X.negative!==0)return 1;var U=this.ucmp(X);return this.negative!==0?-U|0:U},V.prototype.ucmp=function(X){if(this.length>X.length)return 1;if(this.length<X.length)return-1;for(var U=0,$=this.length-1;$>=0;$--){var j=this.words[$]|0,K=X.words[$]|0;if(j!==K){j<K?U=-1:j>K&&(U=1);break}}return U},V.prototype.gtn=function(X){return this.cmpn(X)===1},V.prototype.gt=function(X){return this.cmp(X)===1},V.prototype.gten=function(X){return this.cmpn(X)>=0},V.prototype.gte=function(X){return this.cmp(X)>=0},V.prototype.ltn=function(X){return this.cmpn(X)===-1},V.prototype.lt=function(X){return this.cmp(X)===-1},V.prototype.lten=function(X){return this.cmpn(X)<=0},V.prototype.lte=function(X){return this.cmp(X)<=0},V.prototype.eqn=function(X){return this.cmpn(X)===0},V.prototype.eq=function(X){return this.cmp(X)===0},V.red=function(X){return new G(X)},V.prototype.toRed=function(X){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),X.convertTo(this)._forceRed(X)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(X){return this.red=X,this},V.prototype.forceRed=function(X){return Z(!this.red,"Already a number in reduction context"),this._forceRed(X)},V.prototype.redAdd=function(X){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,X)},V.prototype.redIAdd=function(X){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,X)},V.prototype.redSub=function(X){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,X)},V.prototype.redISub=function(X){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,X)},V.prototype.redShl=function(X){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,X)},V.prototype.redMul=function(X){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.mul(this,X)},V.prototype.redIMul=function(X){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,X),this.red.imul(this,X)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(X){return Z(this.red&&!X.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,X)};var f={k256:null,p224:null,p192:null,p25519:null};function s(X,U){this.name=X,this.p=new V(U,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}s.prototype._tmp=function(){var X=new V(null);return X.words=new Array(Math.ceil(this.n/13)),X},s.prototype.ireduce=function(X){var U=X,$;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),$=U.bitLength();while($>this.n);var j=$<this.n?-1:U.ucmp(this.p);return j===0?(U.words[0]=0,U.length=1):j>0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},s.prototype.split=function(X,U){X.iushrn(this.n,0,U)},s.prototype.imulK=function(X){return X.imul(this.k)};function Q0(){s.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(Q0,s),Q0.prototype.split=function(X,U){for(var $=4194303,j=Math.min(X.length,9),K=0;K<j;K++)U.words[K]=X.words[K];if(U.length=j,X.length<=9){X.words[0]=0,X.length=1;return}var W=X.words[9];for(U.words[U.length++]=W&$,K=10;K<X.length;K++){var z=X.words[K]|0;X.words[K-10]=(z&$)<<4|W>>>22,W=z}W>>>=22,X.words[K-10]=W,W===0&&X.length>10?X.length-=10:X.length-=9},Q0.prototype.imulK=function(X){X.words[X.length]=0,X.words[X.length+1]=0,X.length+=2;for(var U=0,$=0;$<X.length;$++){var j=X.words[$]|0;U+=j*977,X.words[$]=U&67108863,U=j*64+(U/67108864|0)}return X.words[X.length-1]===0&&(X.length--,X.words[X.length-1]===0&&X.length--),X};function u(){s.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(u,s);function K0(){s.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(K0,s);function Q(){s.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q,s),Q.prototype.imulK=function(X){for(var U=0,$=0;$<X.length;$++){var j=(X.words[$]|0)*19+U,K=j&67108863;j>>>=26,X.words[$]=K,U=j}return U!==0&&(X.words[X.length++]=U),X},V._prime=function(X){if(f[X])return f[X];var U;if(X==="k256")U=new Q0;else if(X==="p224")U=new u;else if(X==="p192")U=new K0;else if(X==="p25519")U=new Q;else throw new Error("Unknown prime "+X);return f[X]=U,U};function G(X){if(typeof X=="string"){var U=V._prime(X);this.m=U.p,this.prime=U}else Z(X.gtn(1),"modulus must be greater than 1"),this.m=X,this.prime=null}G.prototype._verify1=function(X){Z(X.negative===0,"red works only with positives"),Z(X.red,"red works only with red numbers")},G.prototype._verify2=function(X,U){Z((X.negative|U.negative)===0,"red works only with positives"),Z(X.red&&X.red===U.red,"red works only with red numbers")},G.prototype.imod=function(X){return this.prime?this.prime.ireduce(X)._forceRed(this):(H(X,X.umod(this.m)._forceRed(this)),X)},G.prototype.neg=function(X){return X.isZero()?X.clone():this.m.sub(X)._forceRed(this)},G.prototype.add=function(X,U){this._verify2(X,U);var $=X.add(U);return $.cmp(this.m)>=0&&$.isub(this.m),$._forceRed(this)},G.prototype.iadd=function(X,U){this._verify2(X,U);var $=X.iadd(U);return $.cmp(this.m)>=0&&$.isub(this.m),$},G.prototype.sub=function(X,U){this._verify2(X,U);var $=X.sub(U);return $.cmpn(0)<0&&$.iadd(this.m),$._forceRed(this)},G.prototype.isub=function(X,U){this._verify2(X,U);var $=X.isub(U);return $.cmpn(0)<0&&$.iadd(this.m),$},G.prototype.shl=function(X,U){return this._verify1(X),this.imod(X.ushln(U))},G.prototype.imul=function(X,U){return this._verify2(X,U),this.imod(X.imul(U))},G.prototype.mul=function(X,U){return this._verify2(X,U),this.imod(X.mul(U))},G.prototype.isqr=function(X){return this.imul(X,X.clone())},G.prototype.sqr=function(X){return this.mul(X,X)},G.prototype.sqrt=function(X){if(X.isZero())return X.clone();var U=this.m.andln(3);if(Z(U%2===1),U===3){var $=this.m.add(new V(1)).iushrn(2);return this.pow(X,$)}for(var j=this.m.subn(1),K=0;!j.isZero()&&j.andln(1)===0;)K++,j.iushrn(1);Z(!j.isZero());var W=new V(1).toRed(this),z=W.redNeg(),A=this.m.subn(1).iushrn(1),T=this.m.bitLength();for(T=new V(2*T*T).toRed(this);this.pow(T,A).cmp(z)!==0;)T.redIAdd(z);for(var y=this.pow(T,j),r=this.pow(X,j.addn(1).iushrn(1)),a=this.pow(X,j),t=K;a.cmp(W)!==0;){for(var l=a,h=0;l.cmp(W)!==0;h++)l=l.redSqr();Z(h<t);var n=this.pow(y,new V(1).iushln(t-h-1));r=r.redMul(n),y=n.redSqr(),a=a.redMul(y),t=h}return r},G.prototype.invm=function(X){var U=X._invmp(this.m);return U.negative!==0?(U.negative=0,this.imod(U).redNeg()):this.imod(U)},G.prototype.pow=function(X,U){if(U.isZero())return new V(1).toRed(this);if(U.cmpn(1)===0)return X.clone();var $=4,j=new Array(1<<$);j[0]=new V(1).toRed(this),j[1]=X;for(var K=2;K<j.length;K++)j[K]=this.mul(j[K-1],X);var W=j[0],z=0,A=0,T=U.bitLength()%26;for(T===0&&(T=26),K=U.length-1;K>=0;K--){for(var y=U.words[K],r=T-1;r>=0;r--){var a=y>>r&1;if(W!==j[0]&&(W=this.sqr(W)),a===0&&z===0){A=0;continue}z<<=1,z|=a,A++,!(A!==$&&(K!==0||r!==0))&&(W=this.mul(W,j[z]),A=0,z=0)}T=26}return W},G.prototype.convertTo=function(X){var U=X.umod(this.m);return U===X?U.clone():U},G.prototype.convertFrom=function(X){var U=X.clone();return U.red=null,U},V.mont=function(X){return new J(X)};function J(X){G.call(this,X),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(J,G),J.prototype.convertTo=function(X){return this.imod(X.ushln(this.shift))},J.prototype.convertFrom=function(X){var U=this.imod(X.mul(this.rinv));return U.red=null,U},J.prototype.imul=function(X,U){if(X.isZero()||U.isZero())return X.words[0]=0,X.length=1,X;var $=X.imul(U),j=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=$.isub(j).iushrn(this.shift),W=K;return K.cmp(this.m)>=0?W=K.isub(this.m):K.cmpn(0)<0&&(W=K.iadd(this.m)),W._forceRed(this)},J.prototype.mul=function(X,U){if(X.isZero()||U.isZero())return new V(0)._forceRed(this);var $=X.mul(U),j=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),K=$.isub(j).iushrn(this.shift),W=K;return K.cmp(this.m)>=0?W=K.isub(this.m):K.cmpn(0)<0&&(W=K.iadd(this.m)),W._forceRed(this)},J.prototype.invm=function(X){var U=this.imod(X._invmp(this.m).mul(this.r2));return U._forceRed(this)}})(typeof q>"u"||q,Y)}),a5=Z0((Y,q)=>{var F=o5(),O=t8();function Z(C){var B=N(C),D=B.toRed(F.mont(C.modulus)).redPow(new F(C.publicExponent)).fromRed();return{blinder:D,unblinder:B.invm(C.modulus)}}function N(C){var B=C.modulus.byteLength(),D;do D=new F(O(B));while(D.cmp(C.modulus)>=0||!D.umod(C.prime1)||!D.umod(C.prime2));return D}function V(C,B){var D=Z(B),L=B.modulus.byteLength(),H=new F(C).mul(D.blinder).umod(B.modulus),P=H.toRed(F.mont(B.prime1)),R=H.toRed(F.mont(B.prime2)),k=B.coefficient,v=B.prime1,M=B.prime2,w=P.redPow(B.exponent1).fromRed(),x=R.redPow(B.exponent2).fromRed(),g=w.isub(x).imul(k).umod(v).imul(M);return x.iadd(g).imul(D.unblinder).umod(B.modulus).toArrayLike(Buffer,"be",L)}V.getr=N,q.exports=V}),jY=Z0((Y,q)=>{q.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"}}}),X8=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,d=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(d,U0)|0,z=Math.imul(d,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(d,C0)|0,z=z+Math.imul(d,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(d,N0)|0,z=z+Math.imul(d,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(d,L0)|0,z=z+Math.imul(d,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(d,k0)|0,z=z+Math.imul(d,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(d,R0)|0,z=z+Math.imul(d,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(d,T0)|0,z=z+Math.imul(d,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(d,A0)|0,z=z+Math.imul(d,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(d,x0)|0,z=z+Math.imul(d,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(d,E0)|0,z=z+Math.imul(d,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new u(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function u(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}u.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},u.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},u.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},u.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},u.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},u.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},u.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},u.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},u.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},u.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},u.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},u.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},u.prototype.sqr=function(Q){return this.mul(Q,Q)},u.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},u.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},u.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},u.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},u.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){u.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,u),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),l3=Z0((Y)=>{var q=Y;function F(N,V){if(Array.isArray(N))return N.slice();if(!N)return[];var C=[];if(typeof N!="string"){for(var B=0;B<N.length;B++)C[B]=N[B]|0;return C}if(V==="hex"){N=N.replace(/[^a-z0-9]+/ig,""),N.length%2!==0&&(N="0"+N);for(var B=0;B<N.length;B+=2)C.push(parseInt(N[B]+N[B+1],16))}else for(var B=0;B<N.length;B++){var D=N.charCodeAt(B),L=D>>8,H=D&255;L?C.push(L,H):C.push(H)}return C}q.toArray=F;function O(N){return N.length===1?"0"+N:N}q.zero2=O;function Z(N){for(var V="",C=0;C<N.length;C++)V+=O(N[C].toString(16));return V}q.toHex=Z,q.encode=function(N,V){return V==="hex"?Z(N):N}}),_6=Z0((Y)=>{var q=Y,F=X8(),O=y6(),Z=l3();q.assert=O,q.toArray=Z.toArray,q.zero2=Z.zero2,q.toHex=Z.toHex,q.encode=Z.encode;function N(L,H,P){var R=new Array(Math.max(L.bitLength(),P)+1);R.fill(0);for(var k=1<<H+1,v=L.clone(),M=0;M<R.length;M++){var w,x=v.andln(k-1);v.isOdd()?(x>(k>>1)-1?w=(k>>1)-x:w=x,v.isubn(w)):w=0,R[M]=w,v.iushrn(1)}return R}q.getNAF=N;function V(L,H){var P=[[],[]];L=L.clone(),H=H.clone();for(var R=0,k=0,v;L.cmpn(-R)>0||H.cmpn(-k)>0;){var M=L.andln(3)+R&3,w=H.andln(3)+k&3;M===3&&(M=-1),w===3&&(w=-1);var x;(M&1)===0?x=0:(v=L.andln(7)+R&7,(v===3||v===5)&&w===2?x=-M:x=M),P[0].push(x);var g;(w&1)===0?g=0:(v=H.andln(7)+k&7,(v===3||v===5)&&M===2?g=-w:g=w),P[1].push(g),2*R===x+1&&(R=1-R),2*k===g+1&&(k=1-k),L.iushrn(1),H.iushrn(1)}return P}q.getJSF=V;function C(L,H,P){var R="_"+H;L.prototype[H]=function(){return this[R]!==void 0?this[R]:this[R]=P.call(this)}}q.cachedProperty=C;function B(L){return typeof L=="string"?q.toArray(L,"hex"):L}q.parseBytes=B;function D(L){return new F(L,"hex","le")}q.intFromLE=D}),B7=Z0((Y,q)=>{var F=X8(),O=_6(),Z=O.getNAF,N=O.getJSF,V=O.assert;function C(D,L){this.type=D,this.p=new F(L.p,16),this.red=L.prime?F.red(L.prime):F.mont(this.p),this.zero=new F(0).toRed(this.red),this.one=new F(1).toRed(this.red),this.two=new F(2).toRed(this.red),this.n=L.n&&new F(L.n,16),this.g=L.g&&this.pointFromJSON(L.g,L.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 H=this.n&&this.p.div(this.n);!H||H.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}q.exports=C,C.prototype.point=function(){throw new Error("Not implemented")},C.prototype.validate=function(){throw new Error("Not implemented")},C.prototype._fixedNafMul=function(D,L){V(D.precomputed);var H=D._getDoubles(),P=Z(L,1,this._bitLength),R=(1<<H.step+1)-(H.step%2===0?2:1);R/=3;var k=[],v,M;for(v=0;v<P.length;v+=H.step){M=0;for(var w=v+H.step-1;w>=v;w--)M=(M<<1)+P[w];k.push(M)}for(var x=this.jpoint(null,null,null),g=this.jpoint(null,null,null),_=R;_>0;_--){for(v=0;v<k.length;v++)M=k[v],M===_?g=g.mixedAdd(H.points[v]):M===-_&&(g=g.mixedAdd(H.points[v].neg()));x=x.add(g)}return x.toP()},C.prototype._wnafMul=function(D,L){var H=4,P=D._getNAFPoints(H);H=P.wnd;for(var R=P.points,k=Z(L,H,this._bitLength),v=this.jpoint(null,null,null),M=k.length-1;M>=0;M--){for(var w=0;M>=0&&k[M]===0;M--)w++;if(M>=0&&w++,v=v.dblp(w),M<0)break;var x=k[M];V(x!==0),D.type==="affine"?x>0?v=v.mixedAdd(R[x-1>>1]):v=v.mixedAdd(R[-x-1>>1].neg()):x>0?v=v.add(R[x-1>>1]):v=v.add(R[-x-1>>1].neg())}return D.type==="affine"?v.toP():v},C.prototype._wnafMulAdd=function(D,L,H,P,R){var k=this._wnafT1,v=this._wnafT2,M=this._wnafT3,w=0,x,g,_;for(x=0;x<P;x++){_=L[x];var p=_._getNAFPoints(D);k[x]=p.wnd,v[x]=p.points}for(x=P-1;x>=1;x-=2){var m=x-1,f=x;if(k[m]!==1||k[f]!==1){M[m]=Z(H[m],k[m],this._bitLength),M[f]=Z(H[f],k[f],this._bitLength),w=Math.max(M[m].length,w),w=Math.max(M[f].length,w);continue}var s=[L[m],null,null,L[f]];L[m].y.cmp(L[f].y)===0?(s[1]=L[m].add(L[f]),s[2]=L[m].toJ().mixedAdd(L[f].neg())):L[m].y.cmp(L[f].y.redNeg())===0?(s[1]=L[m].toJ().mixedAdd(L[f]),s[2]=L[m].add(L[f].neg())):(s[1]=L[m].toJ().mixedAdd(L[f]),s[2]=L[m].toJ().mixedAdd(L[f].neg()));var Q0=[-3,-1,-5,-7,0,7,5,1,3],u=N(H[m],H[f]);for(w=Math.max(u[0].length,w),M[m]=new Array(w),M[f]=new Array(w),g=0;g<w;g++){var K0=u[0][g]|0,Q=u[1][g]|0;M[m][g]=Q0[(K0+1)*3+(Q+1)],M[f][g]=0,v[m]=s}}var G=this.jpoint(null,null,null),J=this._wnafT4;for(x=w;x>=0;x--){for(var X=0;x>=0;){var U=!0;for(g=0;g<P;g++)J[g]=M[g][x]|0,J[g]!==0&&(U=!1);if(!U)break;X++,x--}if(x>=0&&X++,G=G.dblp(X),x<0)break;for(g=0;g<P;g++){var $=J[g];$!==0&&($>0?_=v[g][$-1>>1]:$<0&&(_=v[g][-$-1>>1].neg()),_.type==="affine"?G=G.mixedAdd(_):G=G.add(_))}}for(x=0;x<P;x++)v[x]=null;return R?G:G.toP()};function B(D,L){this.curve=D,this.type=L,this.precomputed=null}C.BasePoint=B,B.prototype.eq=function(){throw new Error("Not implemented")},B.prototype.validate=function(){return this.curve.validate(this)},C.prototype.decodePoint=function(D,L){D=O.toArray(D,L);var H=this.p.byteLength();if((D[0]===4||D[0]===6||D[0]===7)&&D.length-1===2*H){D[0]===6?V(D[D.length-1]%2===0):D[0]===7&&V(D[D.length-1]%2===1);var P=this.point(D.slice(1,1+H),D.slice(1+H,1+2*H));return P}else if((D[0]===2||D[0]===3)&&D.length-1===H)return this.pointFromX(D.slice(1,1+H),D[0]===3);throw new Error("Unknown point format")},B.prototype.encodeCompressed=function(D){return this.encode(D,!0)},B.prototype._encode=function(D){var L=this.curve.p.byteLength(),H=this.getX().toArray("be",L);return D?[this.getY().isEven()?2:3].concat(H):[4].concat(H,this.getY().toArray("be",L))},B.prototype.encode=function(D,L){return O.encode(this._encode(L),D)},B.prototype.precompute=function(D){if(this.precomputed)return this;var L={doubles:null,naf:null,beta:null};return L.naf=this._getNAFPoints(8),L.doubles=this._getDoubles(4,D),L.beta=this._getBeta(),this.precomputed=L,this},B.prototype._hasDoubles=function(D){if(!this.precomputed)return!1;var L=this.precomputed.doubles;return L?L.points.length>=Math.ceil((D.bitLength()+1)/L.step):!1},B.prototype._getDoubles=function(D,L){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var H=[this],P=this,R=0;R<L;R+=D){for(var k=0;k<D;k++)P=P.dbl();H.push(P)}return{step:D,points:H}},B.prototype._getNAFPoints=function(D){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var L=[this],H=(1<<D)-1,P=H===1?null:this.dbl(),R=1;R<H;R++)L[R]=L[R-1].add(P);return{wnd:D,points:L}},B.prototype._getBeta=function(){return null},B.prototype.dblp=function(D){for(var L=this,H=0;H<D;H++)L=L.dbl();return L}}),HY=Z0((Y,q)=>{var F=_6(),O=X8(),Z=h0(),N=B7(),V=F.assert;function C(L){N.call(this,"short",L),this.a=new O(L.a,16).toRed(this.red),this.b=new O(L.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(L),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Z(C,N),q.exports=C,C.prototype._getEndomorphism=function(L){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var H,P;if(L.beta)H=new O(L.beta,16).toRed(this.red);else{var R=this._getEndoRoots(this.p);H=R[0].cmp(R[1])<0?R[0]:R[1],H=H.toRed(this.red)}if(L.lambda)P=new O(L.lambda,16);else{var k=this._getEndoRoots(this.n);this.g.mul(k[0]).x.cmp(this.g.x.redMul(H))===0?P=k[0]:(P=k[1],V(this.g.mul(P).x.cmp(this.g.x.redMul(H))===0))}var v;return L.basis?v=L.basis.map(function(M){return{a:new O(M.a,16),b:new O(M.b,16)}}):v=this._getEndoBasis(P),{beta:H,lambda:P,basis:v}}},C.prototype._getEndoRoots=function(L){var H=L===this.p?this.red:O.mont(L),P=new O(2).toRed(H).redInvm(),R=P.redNeg(),k=new O(3).toRed(H).redNeg().redSqrt().redMul(P),v=R.redAdd(k).fromRed(),M=R.redSub(k).fromRed();return[v,M]},C.prototype._getEndoBasis=function(L){for(var H=this.n.ushrn(Math.floor(this.n.bitLength()/2)),P=L,R=this.n.clone(),k=new O(1),v=new O(0),M=new O(0),w=new O(1),x,g,_,p,m,f,s,Q0=0,u,K0;P.cmpn(0)!==0;){var Q=R.div(P);u=R.sub(Q.mul(P)),K0=M.sub(Q.mul(k));var G=w.sub(Q.mul(v));if(!_&&u.cmp(H)<0)x=s.neg(),g=k,_=u.neg(),p=K0;else if(_&&++Q0===2)break;s=u,R=P,P=u,M=k,k=K0,w=v,v=G}m=u.neg(),f=K0;var J=_.sqr().add(p.sqr()),X=m.sqr().add(f.sqr());return X.cmp(J)>=0&&(m=x,f=g),_.negative&&(_=_.neg(),p=p.neg()),m.negative&&(m=m.neg(),f=f.neg()),[{a:_,b:p},{a:m,b:f}]},C.prototype._endoSplit=function(L){var H=this.endo.basis,P=H[0],R=H[1],k=R.b.mul(L).divRound(this.n),v=P.b.neg().mul(L).divRound(this.n),M=k.mul(P.a),w=v.mul(R.a),x=k.mul(P.b),g=v.mul(R.b),_=L.sub(M).sub(w),p=x.add(g).neg();return{k1:_,k2:p}},C.prototype.pointFromX=function(L,H){L=new O(L,16),L.red||(L=L.toRed(this.red));var P=L.redSqr().redMul(L).redIAdd(L.redMul(this.a)).redIAdd(this.b),R=P.redSqrt();if(R.redSqr().redSub(P).cmp(this.zero)!==0)throw new Error("invalid point");var k=R.fromRed().isOdd();return(H&&!k||!H&&k)&&(R=R.redNeg()),this.point(L,R)},C.prototype.validate=function(L){if(L.inf)return!0;var{x:H,y:P}=L,R=this.a.redMul(H),k=H.redSqr().redMul(H).redIAdd(R).redIAdd(this.b);return P.redSqr().redISub(k).cmpn(0)===0},C.prototype._endoWnafMulAdd=function(L,H,P){for(var R=this._endoWnafT1,k=this._endoWnafT2,v=0;v<L.length;v++){var M=this._endoSplit(H[v]),w=L[v],x=w._getBeta();M.k1.negative&&(M.k1.ineg(),w=w.neg(!0)),M.k2.negative&&(M.k2.ineg(),x=x.neg(!0)),R[v*2]=w,R[v*2+1]=x,k[v*2]=M.k1,k[v*2+1]=M.k2}for(var g=this._wnafMulAdd(1,R,k,v*2,P),_=0;_<v*2;_++)R[_]=null,k[_]=null;return g};function B(L,H,P,R){N.BasePoint.call(this,L,"affine"),H===null&&P===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new O(H,16),this.y=new O(P,16),R&&(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)}Z(B,N.BasePoint),C.prototype.point=function(L,H,P){return new B(this,L,H,P)},C.prototype.pointFromJSON=function(L,H){return B.fromJSON(this,L,H)},B.prototype._getBeta=function(){if(this.curve.endo){var L=this.precomputed;if(L&&L.beta)return L.beta;var H=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(L){var P=this.curve,R=function(k){return P.point(k.x.redMul(P.endo.beta),k.y)};L.beta=H,H.precomputed={beta:null,naf:L.naf&&{wnd:L.naf.wnd,points:L.naf.points.map(R)},doubles:L.doubles&&{step:L.doubles.step,points:L.doubles.points.map(R)}}}return H}},B.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]},B.fromJSON=function(L,H,P){typeof H=="string"&&(H=JSON.parse(H));var R=L.point(H[0],H[1],P);if(!H[2])return R;function k(M){return L.point(M[0],M[1],P)}var v=H[2];return R.precomputed={beta:null,doubles:v.doubles&&{step:v.doubles.step,points:[R].concat(v.doubles.points.map(k))},naf:v.naf&&{wnd:v.naf.wnd,points:[R].concat(v.naf.points.map(k))}},R},B.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)+">"},B.prototype.isInfinity=function(){return this.inf},B.prototype.add=function(L){if(this.inf)return L;if(L.inf)return this;if(this.eq(L))return this.dbl();if(this.neg().eq(L))return this.curve.point(null,null);if(this.x.cmp(L.x)===0)return this.curve.point(null,null);var H=this.y.redSub(L.y);H.cmpn(0)!==0&&(H=H.redMul(this.x.redSub(L.x).redInvm()));var P=H.redSqr().redISub(this.x).redISub(L.x),R=H.redMul(this.x.redSub(P)).redISub(this.y);return this.curve.point(P,R)},B.prototype.dbl=function(){if(this.inf)return this;var L=this.y.redAdd(this.y);if(L.cmpn(0)===0)return this.curve.point(null,null);var H=this.curve.a,P=this.x.redSqr(),R=L.redInvm(),k=P.redAdd(P).redIAdd(P).redIAdd(H).redMul(R),v=k.redSqr().redISub(this.x.redAdd(this.x)),M=k.redMul(this.x.redSub(v)).redISub(this.y);return this.curve.point(v,M)},B.prototype.getX=function(){return this.x.fromRed()},B.prototype.getY=function(){return this.y.fromRed()},B.prototype.mul=function(L){return L=new O(L,16),this.isInfinity()?this:this._hasDoubles(L)?this.curve._fixedNafMul(this,L):this.curve.endo?this.curve._endoWnafMulAdd([this],[L]):this.curve._wnafMul(this,L)},B.prototype.mulAdd=function(L,H,P){var R=[this,H],k=[L,P];return this.curve.endo?this.curve._endoWnafMulAdd(R,k):this.curve._wnafMulAdd(1,R,k,2)},B.prototype.jmulAdd=function(L,H,P){var R=[this,H],k=[L,P];return this.curve.endo?this.curve._endoWnafMulAdd(R,k,!0):this.curve._wnafMulAdd(1,R,k,2,!0)},B.prototype.eq=function(L){return this===L||this.inf===L.inf&&(this.inf||this.x.cmp(L.x)===0&&this.y.cmp(L.y)===0)},B.prototype.neg=function(L){if(this.inf)return this;var H=this.curve.point(this.x,this.y.redNeg());if(L&&this.precomputed){var P=this.precomputed,R=function(k){return k.neg()};H.precomputed={naf:P.naf&&{wnd:P.naf.wnd,points:P.naf.points.map(R)},doubles:P.doubles&&{step:P.doubles.step,points:P.doubles.points.map(R)}}}return H},B.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var L=this.curve.jpoint(this.x,this.y,this.curve.one);return L};function D(L,H,P,R){N.BasePoint.call(this,L,"jacobian"),H===null&&P===null&&R===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new O(0)):(this.x=new O(H,16),this.y=new O(P,16),this.z=new O(R,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}Z(D,N.BasePoint),C.prototype.jpoint=function(L,H,P){return new D(this,L,H,P)},D.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var L=this.z.redInvm(),H=L.redSqr(),P=this.x.redMul(H),R=this.y.redMul(H).redMul(L);return this.curve.point(P,R)},D.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},D.prototype.add=function(L){if(this.isInfinity())return L;if(L.isInfinity())return this;var H=L.z.redSqr(),P=this.z.redSqr(),R=this.x.redMul(H),k=L.x.redMul(P),v=this.y.redMul(H.redMul(L.z)),M=L.y.redMul(P.redMul(this.z)),w=R.redSub(k),x=v.redSub(M);if(w.cmpn(0)===0)return x.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var g=w.redSqr(),_=g.redMul(w),p=R.redMul(g),m=x.redSqr().redIAdd(_).redISub(p).redISub(p),f=x.redMul(p.redISub(m)).redISub(v.redMul(_)),s=this.z.redMul(L.z).redMul(w);return this.curve.jpoint(m,f,s)},D.prototype.mixedAdd=function(L){if(this.isInfinity())return L.toJ();if(L.isInfinity())return this;var H=this.z.redSqr(),P=this.x,R=L.x.redMul(H),k=this.y,v=L.y.redMul(H).redMul(this.z),M=P.redSub(R),w=k.redSub(v);if(M.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var x=M.redSqr(),g=x.redMul(M),_=P.redMul(x),p=w.redSqr().redIAdd(g).redISub(_).redISub(_),m=w.redMul(_.redISub(p)).redISub(k.redMul(g)),f=this.z.redMul(M);return this.curve.jpoint(p,m,f)},D.prototype.dblp=function(L){if(L===0)return this;if(this.isInfinity())return this;if(!L)return this.dbl();var H;if(this.curve.zeroA||this.curve.threeA){var P=this;for(H=0;H<L;H++)P=P.dbl();return P}var R=this.curve.a,k=this.curve.tinv,v=this.x,M=this.y,w=this.z,x=w.redSqr().redSqr(),g=M.redAdd(M);for(H=0;H<L;H++){var _=v.redSqr(),p=g.redSqr(),m=p.redSqr(),f=_.redAdd(_).redIAdd(_).redIAdd(R.redMul(x)),s=v.redMul(p),Q0=f.redSqr().redISub(s.redAdd(s)),u=s.redISub(Q0),K0=f.redMul(u);K0=K0.redIAdd(K0).redISub(m);var Q=g.redMul(w);H+1<L&&(x=x.redMul(m)),v=Q0,w=Q,g=K0}return this.curve.jpoint(v,g.redMul(k),w)},D.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},D.prototype._zeroDbl=function(){var L,H,P;if(this.zOne){var R=this.x.redSqr(),k=this.y.redSqr(),v=k.redSqr(),M=this.x.redAdd(k).redSqr().redISub(R).redISub(v);M=M.redIAdd(M);var w=R.redAdd(R).redIAdd(R),x=w.redSqr().redISub(M).redISub(M),g=v.redIAdd(v);g=g.redIAdd(g),g=g.redIAdd(g),L=x,H=w.redMul(M.redISub(x)).redISub(g),P=this.y.redAdd(this.y)}else{var _=this.x.redSqr(),p=this.y.redSqr(),m=p.redSqr(),f=this.x.redAdd(p).redSqr().redISub(_).redISub(m);f=f.redIAdd(f);var s=_.redAdd(_).redIAdd(_),Q0=s.redSqr(),u=m.redIAdd(m);u=u.redIAdd(u),u=u.redIAdd(u),L=Q0.redISub(f).redISub(f),H=s.redMul(f.redISub(L)).redISub(u),P=this.y.redMul(this.z),P=P.redIAdd(P)}return this.curve.jpoint(L,H,P)},D.prototype._threeDbl=function(){var L,H,P;if(this.zOne){var R=this.x.redSqr(),k=this.y.redSqr(),v=k.redSqr(),M=this.x.redAdd(k).redSqr().redISub(R).redISub(v);M=M.redIAdd(M);var w=R.redAdd(R).redIAdd(R).redIAdd(this.curve.a),x=w.redSqr().redISub(M).redISub(M);L=x;var g=v.redIAdd(v);g=g.redIAdd(g),g=g.redIAdd(g),H=w.redMul(M.redISub(x)).redISub(g),P=this.y.redAdd(this.y)}else{var _=this.z.redSqr(),p=this.y.redSqr(),m=this.x.redMul(p),f=this.x.redSub(_).redMul(this.x.redAdd(_));f=f.redAdd(f).redIAdd(f);var s=m.redIAdd(m);s=s.redIAdd(s);var Q0=s.redAdd(s);L=f.redSqr().redISub(Q0),P=this.y.redAdd(this.z).redSqr().redISub(p).redISub(_);var u=p.redSqr();u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u),H=f.redMul(s.redISub(L)).redISub(u)}return this.curve.jpoint(L,H,P)},D.prototype._dbl=function(){var L=this.curve.a,H=this.x,P=this.y,R=this.z,k=R.redSqr().redSqr(),v=H.redSqr(),M=P.redSqr(),w=v.redAdd(v).redIAdd(v).redIAdd(L.redMul(k)),x=H.redAdd(H);x=x.redIAdd(x);var g=x.redMul(M),_=w.redSqr().redISub(g.redAdd(g)),p=g.redISub(_),m=M.redSqr();m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var f=w.redMul(p).redISub(m),s=P.redAdd(P).redMul(R);return this.curve.jpoint(_,f,s)},D.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var L=this.x.redSqr(),H=this.y.redSqr(),P=this.z.redSqr(),R=H.redSqr(),k=L.redAdd(L).redIAdd(L),v=k.redSqr(),M=this.x.redAdd(H).redSqr().redISub(L).redISub(R);M=M.redIAdd(M),M=M.redAdd(M).redIAdd(M),M=M.redISub(v);var w=M.redSqr(),x=R.redIAdd(R);x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var g=k.redIAdd(M).redSqr().redISub(v).redISub(w).redISub(x),_=H.redMul(g);_=_.redIAdd(_),_=_.redIAdd(_);var p=this.x.redMul(w).redISub(_);p=p.redIAdd(p),p=p.redIAdd(p);var m=this.y.redMul(g.redMul(x.redISub(g)).redISub(M.redMul(w)));m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m);var f=this.z.redAdd(M).redSqr().redISub(P).redISub(w);return this.curve.jpoint(p,m,f)},D.prototype.mul=function(L,H){return L=new O(L,H),this.curve._wnafMul(this,L)},D.prototype.eq=function(L){if(L.type==="affine")return this.eq(L.toJ());if(this===L)return!0;var H=this.z.redSqr(),P=L.z.redSqr();if(this.x.redMul(P).redISub(L.x.redMul(H)).cmpn(0)!==0)return!1;var R=H.redMul(this.z),k=P.redMul(L.z);return this.y.redMul(k).redISub(L.y.redMul(R)).cmpn(0)===0},D.prototype.eqXToP=function(L){var H=this.z.redSqr(),P=L.toRed(this.curve.red).redMul(H);if(this.x.cmp(P)===0)return!0;for(var R=L.clone(),k=this.curve.redN.redMul(H);;){if(R.iadd(this.curve.n),R.cmp(this.curve.p)>=0)return!1;if(P.redIAdd(k),this.x.cmp(P)===0)return!0}},D.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)+">"},D.prototype.isInfinity=function(){return this.z.cmpn(0)===0}}),CY=Z0((Y,q)=>{var F=X8(),O=h0(),Z=B7(),N=_6();function V(B){Z.call(this,"mont",B),this.a=new F(B.a,16).toRed(this.red),this.b=new F(B.b,16).toRed(this.red),this.i4=new F(4).toRed(this.red).redInvm(),this.two=new F(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}O(V,Z),q.exports=V,V.prototype.validate=function(B){var D=B.normalize().x,L=D.redSqr(),H=L.redMul(D).redAdd(L.redMul(this.a)).redAdd(D),P=H.redSqrt();return P.redSqr().cmp(H)===0};function C(B,D,L){Z.BasePoint.call(this,B,"projective"),D===null&&L===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new F(D,16),this.z=new F(L,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}O(C,Z.BasePoint),V.prototype.decodePoint=function(B,D){return this.point(N.toArray(B,D),1)},V.prototype.point=function(B,D){return new C(this,B,D)},V.prototype.pointFromJSON=function(B){return C.fromJSON(this,B)},C.prototype.precompute=function(){},C.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},C.fromJSON=function(B,D){return new C(B,D[0],D[1]||B.one)},C.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)+">"},C.prototype.isInfinity=function(){return this.z.cmpn(0)===0},C.prototype.dbl=function(){var B=this.x.redAdd(this.z),D=B.redSqr(),L=this.x.redSub(this.z),H=L.redSqr(),P=D.redSub(H),R=D.redMul(H),k=P.redMul(H.redAdd(this.curve.a24.redMul(P)));return this.curve.point(R,k)},C.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.diffAdd=function(B,D){var L=this.x.redAdd(this.z),H=this.x.redSub(this.z),P=B.x.redAdd(B.z),R=B.x.redSub(B.z),k=R.redMul(L),v=P.redMul(H),M=D.z.redMul(k.redAdd(v).redSqr()),w=D.x.redMul(k.redISub(v).redSqr());return this.curve.point(M,w)},C.prototype.mul=function(B){for(var D=B.clone(),L=this,H=this.curve.point(null,null),P=this,R=[];D.cmpn(0)!==0;D.iushrn(1))R.push(D.andln(1));for(var k=R.length-1;k>=0;k--)R[k]===0?(L=L.diffAdd(H,P),H=H.dbl()):(H=L.diffAdd(H,P),L=L.dbl());return H},C.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.eq=function(B){return this.getX().cmp(B.getX())===0},C.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},C.prototype.getX=function(){return this.normalize(),this.x.fromRed()}}),OY=Z0((Y,q)=>{var F=_6(),O=X8(),Z=h0(),N=B7(),V=F.assert;function C(D){this.twisted=(D.a|0)!==1,this.mOneA=this.twisted&&(D.a|0)===-1,this.extended=this.mOneA,N.call(this,"edwards",D),this.a=new O(D.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new O(D.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new O(D.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),V(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(D.c|0)===1}Z(C,N),q.exports=C,C.prototype._mulA=function(D){return this.mOneA?D.redNeg():this.a.redMul(D)},C.prototype._mulC=function(D){return this.oneC?D:this.c.redMul(D)},C.prototype.jpoint=function(D,L,H,P){return this.point(D,L,H,P)},C.prototype.pointFromX=function(D,L){D=new O(D,16),D.red||(D=D.toRed(this.red));var H=D.redSqr(),P=this.c2.redSub(this.a.redMul(H)),R=this.one.redSub(this.c2.redMul(this.d).redMul(H)),k=P.redMul(R.redInvm()),v=k.redSqrt();if(v.redSqr().redSub(k).cmp(this.zero)!==0)throw new Error("invalid point");var M=v.fromRed().isOdd();return(L&&!M||!L&&M)&&(v=v.redNeg()),this.point(D,v)},C.prototype.pointFromY=function(D,L){D=new O(D,16),D.red||(D=D.toRed(this.red));var H=D.redSqr(),P=H.redSub(this.c2),R=H.redMul(this.d).redMul(this.c2).redSub(this.a),k=P.redMul(R.redInvm());if(k.cmp(this.zero)===0){if(L)throw new Error("invalid point");return this.point(this.zero,D)}var v=k.redSqrt();if(v.redSqr().redSub(k).cmp(this.zero)!==0)throw new Error("invalid point");return v.fromRed().isOdd()!==L&&(v=v.redNeg()),this.point(v,D)},C.prototype.validate=function(D){if(D.isInfinity())return!0;D.normalize();var L=D.x.redSqr(),H=D.y.redSqr(),P=L.redMul(this.a).redAdd(H),R=this.c2.redMul(this.one.redAdd(this.d.redMul(L).redMul(H)));return P.cmp(R)===0};function B(D,L,H,P,R){N.BasePoint.call(this,D,"projective"),L===null&&H===null&&P===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 O(L,16),this.y=new O(H,16),this.z=P?new O(P,16):this.curve.one,this.t=R&&new O(R,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()))))}Z(B,N.BasePoint),C.prototype.pointFromJSON=function(D){return B.fromJSON(this,D)},C.prototype.point=function(D,L,H,P){return new B(this,D,L,H,P)},B.fromJSON=function(D,L){return new B(D,L[0],L[1],L[2])},B.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)+">"},B.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},B.prototype._extDbl=function(){var D=this.x.redSqr(),L=this.y.redSqr(),H=this.z.redSqr();H=H.redIAdd(H);var P=this.curve._mulA(D),R=this.x.redAdd(this.y).redSqr().redISub(D).redISub(L),k=P.redAdd(L),v=k.redSub(H),M=P.redSub(L),w=R.redMul(v),x=k.redMul(M),g=R.redMul(M),_=v.redMul(k);return this.curve.point(w,x,_,g)},B.prototype._projDbl=function(){var D=this.x.redAdd(this.y).redSqr(),L=this.x.redSqr(),H=this.y.redSqr(),P,R,k,v,M,w;if(this.curve.twisted){v=this.curve._mulA(L);var x=v.redAdd(H);this.zOne?(P=D.redSub(L).redSub(H).redMul(x.redSub(this.curve.two)),R=x.redMul(v.redSub(H)),k=x.redSqr().redSub(x).redSub(x)):(M=this.z.redSqr(),w=x.redSub(M).redISub(M),P=D.redSub(L).redISub(H).redMul(w),R=x.redMul(v.redSub(H)),k=x.redMul(w))}else v=L.redAdd(H),M=this.curve._mulC(this.z).redSqr(),w=v.redSub(M).redSub(M),P=this.curve._mulC(D.redISub(v)).redMul(w),R=this.curve._mulC(v).redMul(L.redISub(H)),k=v.redMul(w);return this.curve.point(P,R,k)},B.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},B.prototype._extAdd=function(D){var L=this.y.redSub(this.x).redMul(D.y.redSub(D.x)),H=this.y.redAdd(this.x).redMul(D.y.redAdd(D.x)),P=this.t.redMul(this.curve.dd).redMul(D.t),R=this.z.redMul(D.z.redAdd(D.z)),k=H.redSub(L),v=R.redSub(P),M=R.redAdd(P),w=H.redAdd(L),x=k.redMul(v),g=M.redMul(w),_=k.redMul(w),p=v.redMul(M);return this.curve.point(x,g,p,_)},B.prototype._projAdd=function(D){var L=this.z.redMul(D.z),H=L.redSqr(),P=this.x.redMul(D.x),R=this.y.redMul(D.y),k=this.curve.d.redMul(P).redMul(R),v=H.redSub(k),M=H.redAdd(k),w=this.x.redAdd(this.y).redMul(D.x.redAdd(D.y)).redISub(P).redISub(R),x=L.redMul(v).redMul(w),g,_;return this.curve.twisted?(g=L.redMul(M).redMul(R.redSub(this.curve._mulA(P))),_=v.redMul(M)):(g=L.redMul(M).redMul(R.redSub(P)),_=this.curve._mulC(v).redMul(M)),this.curve.point(x,g,_)},B.prototype.add=function(D){return this.isInfinity()?D:D.isInfinity()?this:this.curve.extended?this._extAdd(D):this._projAdd(D)},B.prototype.mul=function(D){return this._hasDoubles(D)?this.curve._fixedNafMul(this,D):this.curve._wnafMul(this,D)},B.prototype.mulAdd=function(D,L,H){return this.curve._wnafMulAdd(1,[this,L],[D,H],2,!1)},B.prototype.jmulAdd=function(D,L,H){return this.curve._wnafMulAdd(1,[this,L],[D,H],2,!0)},B.prototype.normalize=function(){if(this.zOne)return this;var D=this.z.redInvm();return this.x=this.x.redMul(D),this.y=this.y.redMul(D),this.t&&(this.t=this.t.redMul(D)),this.z=this.curve.one,this.zOne=!0,this},B.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},B.prototype.getX=function(){return this.normalize(),this.x.fromRed()},B.prototype.getY=function(){return this.normalize(),this.y.fromRed()},B.prototype.eq=function(D){return this===D||this.getX().cmp(D.getX())===0&&this.getY().cmp(D.getY())===0},B.prototype.eqXToP=function(D){var L=D.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(L)===0)return!0;for(var H=D.clone(),P=this.curve.redN.redMul(this.z);;){if(H.iadd(this.curve.n),H.cmp(this.curve.p)>=0)return!1;if(L.redIAdd(P),this.x.cmp(L)===0)return!0}},B.prototype.toP=B.prototype.normalize,B.prototype.mixedAdd=B.prototype.add}),d3=Z0((Y)=>{var q=Y;q.base=B7(),q.short=HY(),q.mont=CY(),q.edwards=OY()}),o6=Z0((Y)=>{var q=y6(),F=h0();Y.inherits=F;function O(G,J){return(G.charCodeAt(J)&64512)!==55296||J<0||J+1>=G.length?!1:(G.charCodeAt(J+1)&64512)===56320}function Z(G,J){if(Array.isArray(G))return G.slice();if(!G)return[];var X=[];if(typeof G=="string")if(J){if(J==="hex")for(G=G.replace(/[^a-z0-9]+/ig,""),G.length%2!==0&&(G="0"+G),$=0;$<G.length;$+=2)X.push(parseInt(G[$]+G[$+1],16))}else for(var U=0,$=0;$<G.length;$++){var j=G.charCodeAt($);j<128?X[U++]=j:j<2048?(X[U++]=j>>6|192,X[U++]=j&63|128):O(G,$)?(j=65536+((j&1023)<<10)+(G.charCodeAt(++$)&1023),X[U++]=j>>18|240,X[U++]=j>>12&63|128,X[U++]=j>>6&63|128,X[U++]=j&63|128):(X[U++]=j>>12|224,X[U++]=j>>6&63|128,X[U++]=j&63|128)}else for($=0;$<G.length;$++)X[$]=G[$]|0;return X}Y.toArray=Z;function N(G){for(var J="",X=0;X<G.length;X++)J+=B(G[X].toString(16));return J}Y.toHex=N;function V(G){var J=G>>>24|G>>>8&65280|G<<8&16711680|(G&255)<<24;return J>>>0}Y.htonl=V;function C(G,J){for(var X="",U=0;U<G.length;U++){var $=G[U];J==="little"&&($=V($)),X+=D($.toString(16))}return X}Y.toHex32=C;function B(G){return G.length===1?"0"+G:G}Y.zero2=B;function D(G){return G.length===7?"0"+G:G.length===6?"00"+G:G.length===5?"000"+G:G.length===4?"0000"+G:G.length===3?"00000"+G:G.length===2?"000000"+G:G.length===1?"0000000"+G:G}Y.zero8=D;function L(G,J,X,U){var $=X-J;q($%4===0);for(var j=new Array($/4),K=0,W=J;K<j.length;K++,W+=4){var z;U==="big"?z=G[W]<<24|G[W+1]<<16|G[W+2]<<8|G[W+3]:z=G[W+3]<<24|G[W+2]<<16|G[W+1]<<8|G[W],j[K]=z>>>0}return j}Y.join32=L;function H(G,J){for(var X=new Array(G.length*4),U=0,$=0;U<G.length;U++,$+=4){var j=G[U];J==="big"?(X[$]=j>>>24,X[$+1]=j>>>16&255,X[$+2]=j>>>8&255,X[$+3]=j&255):(X[$+3]=j>>>24,X[$+2]=j>>>16&255,X[$+1]=j>>>8&255,X[$]=j&255)}return X}Y.split32=H;function P(G,J){return G>>>J|G<<32-J}Y.rotr32=P;function R(G,J){return G<<J|G>>>32-J}Y.rotl32=R;function k(G,J){return G+J>>>0}Y.sum32=k;function v(G,J,X){return G+J+X>>>0}Y.sum32_3=v;function M(G,J,X,U){return G+J+X+U>>>0}Y.sum32_4=M;function w(G,J,X,U,$){return G+J+X+U+$>>>0}Y.sum32_5=w;function x(G,J,X,U){var $=G[J],j=G[J+1],K=U+j>>>0,W=(K<U?1:0)+X+$;G[J]=W>>>0,G[J+1]=K}Y.sum64=x;function g(G,J,X,U){var $=J+U>>>0,j=($<J?1:0)+G+X;return j>>>0}Y.sum64_hi=g;function _(G,J,X,U){var $=J+U;return $>>>0}Y.sum64_lo=_;function p(G,J,X,U,$,j,K,W){var z=0,A=J;A=A+U>>>0,z+=A<J?1:0,A=A+j>>>0,z+=A<j?1:0,A=A+W>>>0,z+=A<W?1:0;var T=G+X+$+K+z;return T>>>0}Y.sum64_4_hi=p;function m(G,J,X,U,$,j,K,W){var z=J+U+j+W;return z>>>0}Y.sum64_4_lo=m;function f(G,J,X,U,$,j,K,W,z,A){var T=0,y=J;y=y+U>>>0,T+=y<J?1:0,y=y+j>>>0,T+=y<j?1:0,y=y+W>>>0,T+=y<W?1:0,y=y+A>>>0,T+=y<A?1:0;var r=G+X+$+K+z+T;return r>>>0}Y.sum64_5_hi=f;function s(G,J,X,U,$,j,K,W,z,A){var T=J+U+j+W+A;return T>>>0}Y.sum64_5_lo=s;function Q0(G,J,X){var U=J<<32-X|G>>>X;return U>>>0}Y.rotr64_hi=Q0;function u(G,J,X){var U=G<<32-X|J>>>X;return U>>>0}Y.rotr64_lo=u;function K0(G,J,X){return G>>>X}Y.shr64_hi=K0;function Q(G,J,X){var U=G<<32-X|J>>>X;return U>>>0}Y.shr64_lo=Q}),y1=Z0((Y)=>{var q=o6(),F=y6();function O(){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}Y.BlockHash=O,O.prototype.update=function(Z,N){if(Z=q.toArray(Z,N),this.pending?this.pending=this.pending.concat(Z):this.pending=Z,this.pendingTotal+=Z.length,this.pending.length>=this._delta8){Z=this.pending;var V=Z.length%this._delta8;this.pending=Z.slice(Z.length-V,Z.length),this.pending.length===0&&(this.pending=null),Z=q.join32(Z,0,Z.length-V,this.endian);for(var C=0;C<Z.length;C+=this._delta32)this._update(Z,C,C+this._delta32)}return this},O.prototype.digest=function(Z){return this.update(this._pad()),F(this.pending===null),this._digest(Z)},O.prototype._pad=function(){var Z=this.pendingTotal,N=this._delta8,V=N-(Z+this.padLength)%N,C=new Array(V+this.padLength);C[0]=128;for(var B=1;B<V;B++)C[B]=0;if(Z<<=3,this.endian==="big"){for(var D=8;D<this.padLength;D++)C[B++]=0;C[B++]=0,C[B++]=0,C[B++]=0,C[B++]=0,C[B++]=Z>>>24&255,C[B++]=Z>>>16&255,C[B++]=Z>>>8&255,C[B++]=Z&255}else for(C[B++]=Z&255,C[B++]=Z>>>8&255,C[B++]=Z>>>16&255,C[B++]=Z>>>24&255,C[B++]=0,C[B++]=0,C[B++]=0,C[B++]=0,D=8;D<this.padLength;D++)C[B++]=0;return C}}),u3=Z0((Y)=>{var q=o6(),F=q.rotr32;function O(H,P,R,k){if(H===0)return Z(P,R,k);if(H===1||H===3)return V(P,R,k);if(H===2)return N(P,R,k)}Y.ft_1=O;function Z(H,P,R){return H&P^~H&R}Y.ch32=Z;function N(H,P,R){return H&P^H&R^P&R}Y.maj32=N;function V(H,P,R){return H^P^R}Y.p32=V;function C(H){return F(H,2)^F(H,13)^F(H,22)}Y.s0_256=C;function B(H){return F(H,6)^F(H,11)^F(H,25)}Y.s1_256=B;function D(H){return F(H,7)^F(H,18)^H>>>3}Y.g0_256=D;function L(H){return F(H,17)^F(H,19)^H>>>10}Y.g1_256=L}),DY=Z0((Y,q)=>{var F=o6(),O=y1(),Z=u3(),N=F.rotl32,V=F.sum32,C=F.sum32_5,B=Z.ft_1,D=O.BlockHash,L=[1518500249,1859775393,2400959708,3395469782];function H(){if(!(this instanceof H))return new H;D.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}F.inherits(H,D),q.exports=H,H.blockSize=512,H.outSize=160,H.hmacStrength=80,H.padLength=64,H.prototype._update=function(P,R){for(var k=this.W,v=0;v<16;v++)k[v]=P[R+v];for(;v<k.length;v++)k[v]=N(k[v-3]^k[v-8]^k[v-14]^k[v-16],1);var M=this.h[0],w=this.h[1],x=this.h[2],g=this.h[3],_=this.h[4];for(v=0;v<k.length;v++){var p=~~(v/20),m=C(N(M,5),B(p,w,x,g),_,k[v],L[p]);_=g,g=x,x=N(w,30),w=M,M=m}this.h[0]=V(this.h[0],M),this.h[1]=V(this.h[1],w),this.h[2]=V(this.h[2],x),this.h[3]=V(this.h[3],g),this.h[4]=V(this.h[4],_)},H.prototype._digest=function(P){return P==="hex"?F.toHex32(this.h,"big"):F.split32(this.h,"big")}}),f3=Z0((Y,q)=>{var F=o6(),O=y1(),Z=u3(),N=y6(),V=F.sum32,C=F.sum32_4,B=F.sum32_5,D=Z.ch32,L=Z.maj32,H=Z.s0_256,P=Z.s1_256,R=Z.g0_256,k=Z.g1_256,v=O.BlockHash,M=[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;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=M,this.W=new Array(64)}F.inherits(w,v),q.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(x,g){for(var _=this.W,p=0;p<16;p++)_[p]=x[g+p];for(;p<_.length;p++)_[p]=C(k(_[p-2]),_[p-7],R(_[p-15]),_[p-16]);var m=this.h[0],f=this.h[1],s=this.h[2],Q0=this.h[3],u=this.h[4],K0=this.h[5],Q=this.h[6],G=this.h[7];for(N(this.k.length===_.length),p=0;p<_.length;p++){var J=B(G,P(u),D(u,K0,Q),this.k[p],_[p]),X=V(H(m),L(m,f,s));G=Q,Q=K0,K0=u,u=V(Q0,J),Q0=s,s=f,f=m,m=V(J,X)}this.h[0]=V(this.h[0],m),this.h[1]=V(this.h[1],f),this.h[2]=V(this.h[2],s),this.h[3]=V(this.h[3],Q0),this.h[4]=V(this.h[4],u),this.h[5]=V(this.h[5],K0),this.h[6]=V(this.h[6],Q),this.h[7]=V(this.h[7],G)},w.prototype._digest=function(x){return x==="hex"?F.toHex32(this.h,"big"):F.split32(this.h,"big")}}),LY=Z0((Y,q)=>{var F=o6(),O=f3();function Z(){if(!(this instanceof Z))return new Z;O.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}F.inherits(Z,O),q.exports=Z,Z.blockSize=512,Z.outSize=224,Z.hmacStrength=192,Z.padLength=64,Z.prototype._digest=function(N){return N==="hex"?F.toHex32(this.h.slice(0,7),"big"):F.split32(this.h.slice(0,7),"big")}}),o3=Z0((Y,q)=>{var F=o6(),O=y1(),Z=y6(),N=F.rotr64_hi,V=F.rotr64_lo,C=F.shr64_hi,B=F.shr64_lo,D=F.sum64,L=F.sum64_hi,H=F.sum64_lo,P=F.sum64_4_hi,R=F.sum64_4_lo,k=F.sum64_5_hi,v=F.sum64_5_lo,M=O.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 x(){if(!(this instanceof x))return new x;M.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)}F.inherits(x,M),q.exports=x,x.blockSize=1024,x.outSize=512,x.hmacStrength=192,x.padLength=128,x.prototype._prepareBlock=function(X,U){for(var $=this.W,j=0;j<32;j++)$[j]=X[U+j];for(;j<$.length;j+=2){var K=G($[j-4],$[j-3]),W=J($[j-4],$[j-3]),z=$[j-14],A=$[j-13],T=K0($[j-30],$[j-29]),y=Q($[j-30],$[j-29]),r=$[j-32],a=$[j-31];$[j]=P(K,W,z,A,T,y,r,a),$[j+1]=R(K,W,z,A,T,y,r,a)}},x.prototype._update=function(X,U){this._prepareBlock(X,U);var $=this.W,j=this.h[0],K=this.h[1],W=this.h[2],z=this.h[3],A=this.h[4],T=this.h[5],y=this.h[6],r=this.h[7],a=this.h[8],t=this.h[9],l=this.h[10],h=this.h[11],n=this.h[12],q0=this.h[13],G0=this.h[14],F0=this.h[15];Z(this.k.length===$.length);for(var b=0;b<$.length;b+=2){var E=G0,d=F0,e=Q0(a,t),V0=u(a,t),W0=g(a,t,l,h,n,q0),J0=_(a,t,l,h,n,q0),Y0=this.k[b],X0=this.k[b+1],g0=$[b],$0=$[b+1],z0=k(E,d,e,V0,W0,J0,Y0,X0,g0,$0),_0=v(E,d,e,V0,W0,J0,Y0,X0,g0,$0);E=f(j,K),d=s(j,K),e=p(j,K,W,z,A,T),V0=m(j,K,W,z,A,T);var I=L(E,d,e,V0),S=H(E,d,e,V0);G0=n,F0=q0,n=l,q0=h,l=a,h=t,a=L(y,r,z0,_0),t=H(r,r,z0,_0),y=A,r=T,A=W,T=z,W=j,z=K,j=L(z0,_0,I,S),K=H(z0,_0,I,S)}D(this.h,0,j,K),D(this.h,2,W,z),D(this.h,4,A,T),D(this.h,6,y,r),D(this.h,8,a,t),D(this.h,10,l,h),D(this.h,12,n,q0),D(this.h,14,G0,F0)},x.prototype._digest=function(X){return X==="hex"?F.toHex32(this.h,"big"):F.split32(this.h,"big")};function g(X,U,$,j,K){var W=X&$^~X&K;return W<0&&(W+=4294967296),W}function _(X,U,$,j,K,W){var z=U&j^~U&W;return z<0&&(z+=4294967296),z}function p(X,U,$,j,K){var W=X&$^X&K^$&K;return W<0&&(W+=4294967296),W}function m(X,U,$,j,K,W){var z=U&j^U&W^j&W;return z<0&&(z+=4294967296),z}function f(X,U){var $=N(X,U,28),j=N(U,X,2),K=N(U,X,7),W=$^j^K;return W<0&&(W+=4294967296),W}function s(X,U){var $=V(X,U,28),j=V(U,X,2),K=V(U,X,7),W=$^j^K;return W<0&&(W+=4294967296),W}function Q0(X,U){var $=N(X,U,14),j=N(X,U,18),K=N(U,X,9),W=$^j^K;return W<0&&(W+=4294967296),W}function u(X,U){var $=V(X,U,14),j=V(X,U,18),K=V(U,X,9),W=$^j^K;return W<0&&(W+=4294967296),W}function K0(X,U){var $=N(X,U,1),j=N(X,U,8),K=C(X,U,7),W=$^j^K;return W<0&&(W+=4294967296),W}function Q(X,U){var $=V(X,U,1),j=V(X,U,8),K=B(X,U,7),W=$^j^K;return W<0&&(W+=4294967296),W}function G(X,U){var $=N(X,U,19),j=N(U,X,29),K=C(X,U,6),W=$^j^K;return W<0&&(W+=4294967296),W}function J(X,U){var $=V(X,U,19),j=V(U,X,29),K=B(X,U,6),W=$^j^K;return W<0&&(W+=4294967296),W}}),NY=Z0((Y,q)=>{var F=o6(),O=o3();function Z(){if(!(this instanceof Z))return new Z;O.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}F.inherits(Z,O),q.exports=Z,Z.blockSize=1024,Z.outSize=384,Z.hmacStrength=192,Z.padLength=128,Z.prototype._digest=function(N){return N==="hex"?F.toHex32(this.h.slice(0,12),"big"):F.split32(this.h.slice(0,12),"big")}}),PY=Z0((Y)=>{Y.sha1=DY(),Y.sha224=LY(),Y.sha256=f3(),Y.sha384=NY(),Y.sha512=o3()}),kY=Z0((Y)=>{var q=o6(),F=y1(),O=q.rotl32,Z=q.sum32,N=q.sum32_3,V=q.sum32_4,C=F.BlockHash;function B(){if(!(this instanceof B))return new B;C.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}q.inherits(B,C),Y.ripemd160=B,B.blockSize=512,B.outSize=160,B.hmacStrength=192,B.padLength=64,B.prototype._update=function(M,w){for(var x=this.h[0],g=this.h[1],_=this.h[2],p=this.h[3],m=this.h[4],f=x,s=g,Q0=_,u=p,K0=m,Q=0;Q<80;Q++){var G=Z(O(V(x,D(Q,g,_,p),M[P[Q]+w],L(Q)),k[Q]),m);x=m,m=p,p=O(_,10),_=g,g=G,G=Z(O(V(f,D(79-Q,s,Q0,u),M[R[Q]+w],H(Q)),v[Q]),K0),f=K0,K0=u,u=O(Q0,10),Q0=s,s=G}G=N(this.h[1],_,u),this.h[1]=N(this.h[2],p,K0),this.h[2]=N(this.h[3],m,f),this.h[3]=N(this.h[4],x,s),this.h[4]=N(this.h[0],g,Q0),this.h[0]=G},B.prototype._digest=function(M){return M==="hex"?q.toHex32(this.h,"little"):q.split32(this.h,"little")};function D(M,w,x,g){return M<=15?w^x^g:M<=31?w&x|~w&g:M<=47?(w|~x)^g:M<=63?w&g|x&~g:w^(x|~g)}function L(M){return M<=15?0:M<=31?1518500249:M<=47?1859775393:M<=63?2400959708:2840853838}function H(M){return M<=15?1352829926:M<=31?1548603684:M<=47?1836072691:M<=63?2053994217:0}var P=[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],R=[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],k=[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],v=[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]}),BY=Z0((Y,q)=>{var F=o6(),O=y6();function Z(N,V,C){if(!(this instanceof Z))return new Z(N,V,C);this.Hash=N,this.blockSize=N.blockSize/8,this.outSize=N.outSize/8,this.inner=null,this.outer=null,this._init(F.toArray(V,C))}q.exports=Z,Z.prototype._init=function(N){N.length>this.blockSize&&(N=new this.Hash().update(N).digest()),O(N.length<=this.blockSize);for(var V=N.length;V<this.blockSize;V++)N.push(0);for(V=0;V<N.length;V++)N[V]^=54;for(this.inner=new this.Hash().update(N),V=0;V<N.length;V++)N[V]^=106;this.outer=new this.Hash().update(N)},Z.prototype.update=function(N,V){return this.inner.update(N,V),this},Z.prototype.digest=function(N){return this.outer.update(this.inner.digest()),this.outer.digest(N)}}),n5=Z0((Y)=>{var q=Y;q.utils=o6(),q.common=y1(),q.sha=PY(),q.ripemd=kY(),q.hmac=BY(),q.sha1=q.sha.sha1,q.sha256=q.sha.sha256,q.sha224=q.sha.sha224,q.sha384=q.sha.sha384,q.sha512=q.sha.sha512,q.ripemd160=q.ripemd.ripemd160}),RY=Z0((Y,q)=>{q.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"]]}}}),r5=Z0((Y)=>{var q=Y,F=n5(),O=d3(),Z=_6(),N=Z.assert;function V(D){D.type==="short"?this.curve=new O.short(D):D.type==="edwards"?this.curve=new O.edwards(D):this.curve=new O.mont(D),this.g=this.curve.g,this.n=this.curve.n,this.hash=D.hash,N(this.g.validate(),"Invalid curve"),N(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}q.PresetCurve=V;function C(D,L){Object.defineProperty(q,D,{configurable:!0,enumerable:!0,get:function(){var H=new V(L);return Object.defineProperty(q,D,{configurable:!0,enumerable:!0,value:H}),H}})}C("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:F.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),C("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:F.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),C("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:F.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),C("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:F.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"]}),C("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:F.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"]}),C("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:F.sha256,gRed:!1,g:["9"]}),C("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:F.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var B;try{B=RY()}catch{B=void 0}C("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:F.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",B]})}),IY=Z0((Y,q)=>{var F=n5(),O=l3(),Z=y6();function N(V){if(!(this instanceof N))return new N(V);this.hash=V.hash,this.predResist=!!V.predResist,this.outLen=this.hash.outSize,this.minEntropy=V.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var C=O.toArray(V.entropy,V.entropyEnc||"hex"),B=O.toArray(V.nonce,V.nonceEnc||"hex"),D=O.toArray(V.pers,V.persEnc||"hex");Z(C.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(C,B,D)}q.exports=N,N.prototype._init=function(V,C,B){var D=V.concat(C).concat(B);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var L=0;L<this.V.length;L++)this.K[L]=0,this.V[L]=1;this._update(D),this._reseed=1,this.reseedInterval=281474976710656},N.prototype._hmac=function(){return new F.hmac(this.hash,this.K)},N.prototype._update=function(V){var C=this._hmac().update(this.V).update([0]);V&&(C=C.update(V)),this.K=C.digest(),this.V=this._hmac().update(this.V).digest(),V&&(this.K=this._hmac().update(this.V).update([1]).update(V).digest(),this.V=this._hmac().update(this.V).digest())},N.prototype.reseed=function(V,C,B,D){typeof C!="string"&&(D=B,B=C,C=null),V=O.toArray(V,C),B=O.toArray(B,D),Z(V.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(V.concat(B||[])),this._reseed=1},N.prototype.generate=function(V,C,B,D){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof C!="string"&&(D=B,B=C,C=null),B&&(B=O.toArray(B,D||"hex"),this._update(B));for(var L=[];L.length<V;)this.V=this._hmac().update(this.V).digest(),L=L.concat(this.V);var H=L.slice(0,V);return this._update(B),this._reseed++,O.encode(H,C)}}),TY=Z0((Y,q)=>{var F=X8(),O=_6(),Z=O.assert;function N(V,C){this.ec=V,this.priv=null,this.pub=null,C.priv&&this._importPrivate(C.priv,C.privEnc),C.pub&&this._importPublic(C.pub,C.pubEnc)}q.exports=N,N.fromPublic=function(V,C,B){return C instanceof N?C:new N(V,{pub:C,pubEnc:B})},N.fromPrivate=function(V,C,B){return C instanceof N?C:new N(V,{priv:C,privEnc:B})},N.prototype.validate=function(){var V=this.getPublic();return V.isInfinity()?{result:!1,reason:"Invalid public key"}:V.validate()?V.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"}},N.prototype.getPublic=function(V,C){return typeof V=="string"&&(C=V,V=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),C?this.pub.encode(C,V):this.pub},N.prototype.getPrivate=function(V){return V==="hex"?this.priv.toString(16,2):this.priv},N.prototype._importPrivate=function(V,C){this.priv=new F(V,C||16),this.priv=this.priv.umod(this.ec.curve.n)},N.prototype._importPublic=function(V,C){if(V.x||V.y){this.ec.curve.type==="mont"?Z(V.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Z(V.x&&V.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(V.x,V.y);return}this.pub=this.ec.curve.decodePoint(V,C)},N.prototype.derive=function(V){return V.validate()||Z(V.validate(),"public point not validated"),V.mul(this.priv).getX()},N.prototype.sign=function(V,C,B){return this.ec.sign(V,this,C,B)},N.prototype.verify=function(V,C){return this.ec.verify(V,C,this)},N.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}}),MY=Z0((Y,q)=>{var F=X8(),O=_6(),Z=O.assert;function N(L,H){if(L instanceof N)return L;this._importDER(L,H)||(Z(L.r&&L.s,"Signature without r or s"),this.r=new F(L.r,16),this.s=new F(L.s,16),L.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=L.recoveryParam)}q.exports=N;function V(){this.place=0}function C(L,H){var P=L[H.place++];if(!(P&128))return P;var R=P&15;if(R===0||R>4)return!1;for(var k=0,v=0,M=H.place;v<R;v++,M++)k<<=8,k|=L[M],k>>>=0;return k<=127?!1:(H.place=M,k)}function B(L){for(var H=0,P=L.length-1;!L[H]&&!(L[H+1]&128)&&H<P;)H++;return H===0?L:L.slice(H)}N.prototype._importDER=function(L,H){L=O.toArray(L,H);var P=new V;if(L[P.place++]!==48)return!1;var R=C(L,P);if(R===!1||R+P.place!==L.length||L[P.place++]!==2)return!1;var k=C(L,P);if(k===!1)return!1;var v=L.slice(P.place,k+P.place);if(P.place+=k,L[P.place++]!==2)return!1;var M=C(L,P);if(M===!1||L.length!==M+P.place)return!1;var w=L.slice(P.place,M+P.place);if(v[0]===0)if(v[1]&128)v=v.slice(1);else return!1;if(w[0]===0)if(w[1]&128)w=w.slice(1);else return!1;return this.r=new F(v),this.s=new F(w),this.recoveryParam=null,!0};function D(L,H){if(H<128){L.push(H);return}var P=1+(Math.log(H)/Math.LN2>>>3);for(L.push(P|128);--P;)L.push(H>>>(P<<3)&255);L.push(H)}N.prototype.toDER=function(L){var H=this.r.toArray(),P=this.s.toArray();for(H[0]&128&&(H=[0].concat(H)),P[0]&128&&(P=[0].concat(P)),H=B(H),P=B(P);!P[0]&&!(P[1]&128);)P=P.slice(1);var R=[2];D(R,H.length),R=R.concat(H),R.push(2),D(R,P.length);var k=R.concat(P),v=[48];return D(v,k.length),v=v.concat(k),O.encode(v,L)}}),AY=Z0((Y,q)=>{var F=X8(),O=IY(),Z=_6(),N=r5(),V=u5(),C=Z.assert,B=TY(),D=MY();function L(H){if(!(this instanceof L))return new L(H);typeof H=="string"&&(C(Object.prototype.hasOwnProperty.call(N,H),"Unknown curve "+H),H=N[H]),H instanceof N.PresetCurve&&(H={curve:H}),this.curve=H.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=H.curve.g,this.g.precompute(H.curve.n.bitLength()+1),this.hash=H.hash||H.curve.hash}q.exports=L,L.prototype.keyPair=function(H){return new B(this,H)},L.prototype.keyFromPrivate=function(H,P){return B.fromPrivate(this,H,P)},L.prototype.keyFromPublic=function(H,P){return B.fromPublic(this,H,P)},L.prototype.genKeyPair=function(H){H||(H={});for(var P=new O({hash:this.hash,pers:H.pers,persEnc:H.persEnc||"utf8",entropy:H.entropy||V(this.hash.hmacStrength),entropyEnc:H.entropy&&H.entropyEnc||"utf8",nonce:this.n.toArray()}),R=this.n.byteLength(),k=this.n.sub(new F(2));;){var v=new F(P.generate(R));if(!(v.cmp(k)>0))return v.iaddn(1),this.keyFromPrivate(v)}},L.prototype._truncateToN=function(H,P){var R=H.byteLength()*8-this.n.bitLength();return R>0&&(H=H.ushrn(R)),!P&&H.cmp(this.n)>=0?H.sub(this.n):H},L.prototype.sign=function(H,P,R,k){typeof R=="object"&&(k=R,R=null),k||(k={}),P=this.keyFromPrivate(P,R),H=this._truncateToN(new F(H,16));for(var v=this.n.byteLength(),M=P.getPrivate().toArray("be",v),w=H.toArray("be",v),x=new O({hash:this.hash,entropy:M,nonce:w,pers:k.pers,persEnc:k.persEnc||"utf8"}),g=this.n.sub(new F(1)),_=0;;_++){var p=k.k?k.k(_):new F(x.generate(this.n.byteLength()));if(p=this._truncateToN(p,!0),!(p.cmpn(1)<=0||p.cmp(g)>=0)){var m=this.g.mul(p);if(!m.isInfinity()){var f=m.getX(),s=f.umod(this.n);if(s.cmpn(0)!==0){var Q0=p.invm(this.n).mul(s.mul(P.getPrivate()).iadd(H));if(Q0=Q0.umod(this.n),Q0.cmpn(0)!==0){var u=(m.getY().isOdd()?1:0)|(f.cmp(s)!==0?2:0);return k.canonical&&Q0.cmp(this.nh)>0&&(Q0=this.n.sub(Q0),u^=1),new D({r:s,s:Q0,recoveryParam:u})}}}}}},L.prototype.verify=function(H,P,R,k){H=this._truncateToN(new F(H,16)),R=this.keyFromPublic(R,k),P=new D(P,"hex");var{r:v,s:M}=P;if(v.cmpn(1)<0||v.cmp(this.n)>=0||M.cmpn(1)<0||M.cmp(this.n)>=0)return!1;var w=M.invm(this.n),x=w.mul(H).umod(this.n),g=w.mul(v).umod(this.n),_;return this.curve._maxwellTrick?(_=this.g.jmulAdd(x,R.getPublic(),g),_.isInfinity()?!1:_.eqXToP(v)):(_=this.g.mulAdd(x,R.getPublic(),g),_.isInfinity()?!1:_.getX().umod(this.n).cmp(v)===0)},L.prototype.recoverPubKey=function(H,P,R,k){C((3&R)===R,"The recovery param is more than two bits"),P=new D(P,k);var v=this.n,M=new F(H),w=P.r,x=P.s,g=R&1,_=R>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&_)throw new Error("Unable to find sencond key candinate");_?w=this.curve.pointFromX(w.add(this.curve.n),g):w=this.curve.pointFromX(w,g);var p=P.r.invm(v),m=v.sub(M).mul(p).umod(v),f=x.mul(p).umod(v);return this.g.mulAdd(m,w,f)},L.prototype.getKeyRecoveryParam=function(H,P,R,k){if(P=new D(P,k),P.recoveryParam!==null)return P.recoveryParam;for(var v=0;v<4;v++){var M;try{M=this.recoverPubKey(H,P,v)}catch{continue}if(M.eq(R))return v}throw new Error("Unable to find valid recovery factor")}}),vY=Z0((Y,q)=>{var F=_6(),O=F.assert,Z=F.parseBytes,N=F.cachedProperty;function V(C,B){this.eddsa=C,this._secret=Z(B.secret),C.isPoint(B.pub)?this._pub=B.pub:this._pubBytes=Z(B.pub)}V.fromPublic=function(C,B){return B instanceof V?B:new V(C,{pub:B})},V.fromSecret=function(C,B){return B instanceof V?B:new V(C,{secret:B})},V.prototype.secret=function(){return this._secret},N(V,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),N(V,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),N(V,"privBytes",function(){var C=this.eddsa,B=this.hash(),D=C.encodingLength-1,L=B.slice(0,C.encodingLength);return L[0]&=248,L[D]&=127,L[D]|=64,L}),N(V,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),N(V,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),N(V,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),V.prototype.sign=function(C){return O(this._secret,"KeyPair can only verify"),this.eddsa.sign(C,this)},V.prototype.verify=function(C,B){return this.eddsa.verify(C,B,this)},V.prototype.getSecret=function(C){return O(this._secret,"KeyPair is public only"),F.encode(this.secret(),C)},V.prototype.getPublic=function(C){return F.encode(this.pubBytes(),C)},q.exports=V}),xY=Z0((Y,q)=>{var F=X8(),O=_6(),Z=O.assert,N=O.cachedProperty,V=O.parseBytes;function C(B,D){this.eddsa=B,typeof D!="object"&&(D=V(D)),Array.isArray(D)&&(D={R:D.slice(0,B.encodingLength),S:D.slice(B.encodingLength)}),Z(D.R&&D.S,"Signature without R or S"),B.isPoint(D.R)&&(this._R=D.R),D.S instanceof F&&(this._S=D.S),this._Rencoded=Array.isArray(D.R)?D.R:D.Rencoded,this._Sencoded=Array.isArray(D.S)?D.S:D.Sencoded}N(C,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),N(C,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),N(C,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),N(C,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),C.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},C.prototype.toHex=function(){return O.encode(this.toBytes(),"hex").toUpperCase()},q.exports=C}),SY=Z0((Y,q)=>{var F=n5(),O=r5(),Z=_6(),N=Z.assert,V=Z.parseBytes,C=vY(),B=xY();function D(L){if(N(L==="ed25519","only tested with ed25519 so far"),!(this instanceof D))return new D(L);L=O[L].curve,this.curve=L,this.g=L.g,this.g.precompute(L.n.bitLength()+1),this.pointClass=L.point().constructor,this.encodingLength=Math.ceil(L.n.bitLength()/8),this.hash=F.sha512}q.exports=D,D.prototype.sign=function(L,H){L=V(L);var P=this.keyFromSecret(H),R=this.hashInt(P.messagePrefix(),L),k=this.g.mul(R),v=this.encodePoint(k),M=this.hashInt(v,P.pubBytes(),L).mul(P.priv()),w=R.add(M).umod(this.curve.n);return this.makeSignature({R:k,S:w,Rencoded:v})},D.prototype.verify=function(L,H,P){L=V(L),H=this.makeSignature(H);var R=this.keyFromPublic(P),k=this.hashInt(H.Rencoded(),R.pubBytes(),L),v=this.g.mul(H.S()),M=H.R().add(R.pub().mul(k));return M.eq(v)},D.prototype.hashInt=function(){for(var L=this.hash(),H=0;H<arguments.length;H++)L.update(arguments[H]);return Z.intFromLE(L.digest()).umod(this.curve.n)},D.prototype.keyFromPublic=function(L){return C.fromPublic(this,L)},D.prototype.keyFromSecret=function(L){return C.fromSecret(this,L)},D.prototype.makeSignature=function(L){return L instanceof B?L:new B(this,L)},D.prototype.encodePoint=function(L){var H=L.getY().toArray("le",this.encodingLength);return H[this.encodingLength-1]|=L.getX().isOdd()?128:0,H},D.prototype.decodePoint=function(L){L=Z.parseBytes(L);var H=L.length-1,P=L.slice(0,H).concat(L[H]&-129),R=(L[H]&128)!==0,k=Z.intFromLE(P);return this.curve.pointFromY(k,R)},D.prototype.encodeInt=function(L){return L.toArray("le",this.encodingLength)},D.prototype.decodeInt=function(L){return Z.intFromLE(L)},D.prototype.isPoint=function(L){return L instanceof this.pointClass}}),i5=Z0((Y)=>{var q=Y;q.version=jY().version,q.utils=_6(),q.rand=u5(),q.curve=d3(),q.curves=r5(),q.ec=AY(),q.eddsa=SY()}),a3=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,d=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(d,U0)|0,z=Math.imul(d,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(d,C0)|0,z=z+Math.imul(d,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(d,N0)|0,z=z+Math.imul(d,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(d,L0)|0,z=z+Math.imul(d,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(d,k0)|0,z=z+Math.imul(d,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(d,R0)|0,z=z+Math.imul(d,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(d,T0)|0,z=z+Math.imul(d,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(d,A0)|0,z=z+Math.imul(d,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(d,x0)|0,z=z+Math.imul(d,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(d,E0)|0,z=z+Math.imul(d,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new u(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function u(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}u.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},u.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},u.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},u.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},u.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},u.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},u.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},u.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},u.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},u.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},u.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},u.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},u.prototype.sqr=function(Q){return this.mul(Q,Q)},u.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},u.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},u.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},u.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},u.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){u.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,u),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),s5=Z0((Y,q)=>{var F=R6(),O=F.Buffer,Z={},N;for(N in F)!F.hasOwnProperty(N)||N==="SlowBuffer"||N==="Buffer"||(Z[N]=F[N]);var V=Z.Buffer={};for(N in O)!O.hasOwnProperty(N)||N==="allocUnsafe"||N==="allocUnsafeSlow"||(V[N]=O[N]);if(Z.Buffer.prototype=O.prototype,(!V.from||V.from===Uint8Array.from)&&(V.from=function(C,B,D){if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof C);if(C&&typeof C.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);return O(C,B,D)}),V.alloc||(V.alloc=function(C,B,D){if(typeof C!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof C);if(C<0||C>=2*(1<<30))throw new RangeError('The value "'+C+'" is invalid for option "size"');var L=O(C);return!B||B.length===0?L.fill(0):typeof D=="string"?L.fill(B,D):L.fill(B),L}),!Z.kStringMaxLength)try{Z.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}Z.constants||(Z.constants={MAX_LENGTH:Z.kMaxLength},Z.kStringMaxLength&&(Z.constants.MAX_STRING_LENGTH=Z.kStringMaxLength)),q.exports=Z}),t5=Z0((Y)=>{var q=h0();function F(Z){this._reporterState={obj:null,path:[],options:Z||{},errors:[]}}Y.Reporter=F,F.prototype.isError=function(Z){return Z instanceof O},F.prototype.save=function(){let Z=this._reporterState;return{obj:Z.obj,pathLen:Z.path.length}},F.prototype.restore=function(Z){let N=this._reporterState;N.obj=Z.obj,N.path=N.path.slice(0,Z.pathLen)},F.prototype.enterKey=function(Z){return this._reporterState.path.push(Z)},F.prototype.exitKey=function(Z){let N=this._reporterState;N.path=N.path.slice(0,Z-1)},F.prototype.leaveKey=function(Z,N,V){let C=this._reporterState;this.exitKey(Z),C.obj!==null&&(C.obj[N]=V)},F.prototype.path=function(){return this._reporterState.path.join("/")},F.prototype.enterObject=function(){let Z=this._reporterState,N=Z.obj;return Z.obj={},N},F.prototype.leaveObject=function(Z){let N=this._reporterState,V=N.obj;return N.obj=Z,V},F.prototype.error=function(Z){let N,V=this._reporterState,C=Z instanceof O;if(C?N=Z:N=new O(V.path.map(function(B){return"["+JSON.stringify(B)+"]"}).join(""),Z.message||Z,Z.stack),!V.options.partial)throw N;return C||V.errors.push(N),N},F.prototype.wrapResult=function(Z){let N=this._reporterState;return N.options.partial?{result:this.isError(Z)?null:Z,errors:N.errors}:Z};function O(Z,N){this.path=Z,this.rethrow(N)}q(O,Error),O.prototype.rethrow=function(Z){if(this.message=Z+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,O),!this.stack)try{throw new Error(this.message)}catch(N){this.stack=N.stack}return this}}),S1=Z0((Y)=>{var q=h0(),F=t5().Reporter,O=s5().Buffer;function Z(V,C){if(F.call(this,C),!O.isBuffer(V)){this.error("Input not Buffer");return}this.base=V,this.offset=0,this.length=V.length}q(Z,F),Y.DecoderBuffer=Z,Z.isDecoderBuffer=function(V){return V instanceof Z?!0:typeof V=="object"&&O.isBuffer(V.base)&&V.constructor.name==="DecoderBuffer"&&typeof V.offset=="number"&&typeof V.length=="number"&&typeof V.save=="function"&&typeof V.restore=="function"&&typeof V.isEmpty=="function"&&typeof V.readUInt8=="function"&&typeof V.skip=="function"&&typeof V.raw=="function"},Z.prototype.save=function(){return{offset:this.offset,reporter:F.prototype.save.call(this)}},Z.prototype.restore=function(V){let C=new Z(this.base);return C.offset=V.offset,C.length=this.offset,this.offset=V.offset,F.prototype.restore.call(this,V.reporter),C},Z.prototype.isEmpty=function(){return this.offset===this.length},Z.prototype.readUInt8=function(V){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(V||"DecoderBuffer overrun")},Z.prototype.skip=function(V,C){if(!(this.offset+V<=this.length))return this.error(C||"DecoderBuffer overrun");let B=new Z(this.base);return B._reporterState=this._reporterState,B.offset=this.offset,B.length=this.offset+V,this.offset+=V,B},Z.prototype.raw=function(V){return this.base.slice(V?V.offset:this.offset,this.length)};function N(V,C){if(Array.isArray(V))this.length=0,this.value=V.map(function(B){return N.isEncoderBuffer(B)||(B=new N(B,C)),this.length+=B.length,B},this);else if(typeof V=="number"){if(!(0<=V&&V<=255))return C.error("non-byte EncoderBuffer value");this.value=V,this.length=1}else if(typeof V=="string")this.value=V,this.length=O.byteLength(V);else if(O.isBuffer(V))this.value=V,this.length=V.length;else return C.error("Unsupported type: "+typeof V)}Y.EncoderBuffer=N,N.isEncoderBuffer=function(V){return V instanceof N?!0:typeof V=="object"&&V.constructor.name==="EncoderBuffer"&&typeof V.length=="number"&&typeof V.join=="function"},N.prototype.join=function(V,C){return V||(V=O.alloc(this.length)),C||(C=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(B){B.join(V,C),C+=B.length}):(typeof this.value=="number"?V[C]=this.value:typeof this.value=="string"?V.write(this.value,C):O.isBuffer(this.value)&&this.value.copy(V,C),C+=this.length)),V}}),e5=Z0((Y,q)=>{var F=t5().Reporter,O=S1().EncoderBuffer,Z=S1().DecoderBuffer,N=y6(),V=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],C=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(V),B=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function D(H,P,R){let k={};this._baseState=k,k.name=R,k.enc=H,k.parent=P||null,k.children=null,k.tag=null,k.args=null,k.reverseArgs=null,k.choice=null,k.optional=!1,k.any=!1,k.obj=!1,k.use=null,k.useDecoder=null,k.key=null,k.default=null,k.explicit=null,k.implicit=null,k.contains=null,k.parent||(k.children=[],this._wrap())}q.exports=D;var L=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];D.prototype.clone=function(){let H=this._baseState,P={};L.forEach(function(k){P[k]=H[k]});let R=new this.constructor(P.parent);return R._baseState=P,R},D.prototype._wrap=function(){let H=this._baseState;C.forEach(function(P){this[P]=function(){let R=new this.constructor(this);return H.children.push(R),R[P].apply(R,arguments)}},this)},D.prototype._init=function(H){let P=this._baseState;N(P.parent===null),H.call(this),P.children=P.children.filter(function(R){return R._baseState.parent===this},this),N.equal(P.children.length,1,"Root node can have only one child")},D.prototype._useArgs=function(H){let P=this._baseState,R=H.filter(function(k){return k instanceof this.constructor},this);H=H.filter(function(k){return!(k instanceof this.constructor)},this),R.length!==0&&(N(P.children===null),P.children=R,R.forEach(function(k){k._baseState.parent=this},this)),H.length!==0&&(N(P.args===null),P.args=H,P.reverseArgs=H.map(function(k){if(typeof k!="object"||k.constructor!==Object)return k;let v={};return Object.keys(k).forEach(function(M){M==(M|0)&&(M|=0);let w=k[M];v[w]=M}),v}))},B.forEach(function(H){D.prototype[H]=function(){let P=this._baseState;throw new Error(H+" not implemented for encoding: "+P.enc)}}),V.forEach(function(H){D.prototype[H]=function(){let P=this._baseState,R=Array.prototype.slice.call(arguments);return N(P.tag===null),P.tag=H,this._useArgs(R),this}}),D.prototype.use=function(H){N(H);let P=this._baseState;return N(P.use===null),P.use=H,this},D.prototype.optional=function(){let H=this._baseState;return H.optional=!0,this},D.prototype.def=function(H){let P=this._baseState;return N(P.default===null),P.default=H,P.optional=!0,this},D.prototype.explicit=function(H){let P=this._baseState;return N(P.explicit===null&&P.implicit===null),P.explicit=H,this},D.prototype.implicit=function(H){let P=this._baseState;return N(P.explicit===null&&P.implicit===null),P.implicit=H,this},D.prototype.obj=function(){let H=this._baseState,P=Array.prototype.slice.call(arguments);return H.obj=!0,P.length!==0&&this._useArgs(P),this},D.prototype.key=function(H){let P=this._baseState;return N(P.key===null),P.key=H,this},D.prototype.any=function(){let H=this._baseState;return H.any=!0,this},D.prototype.choice=function(H){let P=this._baseState;return N(P.choice===null),P.choice=H,this._useArgs(Object.keys(H).map(function(R){return H[R]})),this},D.prototype.contains=function(H){let P=this._baseState;return N(P.use===null),P.contains=H,this},D.prototype._decode=function(H,P){let R=this._baseState;if(R.parent===null)return H.wrapResult(R.children[0]._decode(H,P));let k=R.default,v=!0,M=null;if(R.key!==null&&(M=H.enterKey(R.key)),R.optional){let x=null;if(R.explicit!==null?x=R.explicit:R.implicit!==null?x=R.implicit:R.tag!==null&&(x=R.tag),x===null&&!R.any){let g=H.save();try{R.choice===null?this._decodeGeneric(R.tag,H,P):this._decodeChoice(H,P),v=!0}catch{v=!1}H.restore(g)}else if(v=this._peekTag(H,x,R.any),H.isError(v))return v}let w;if(R.obj&&v&&(w=H.enterObject()),v){if(R.explicit!==null){let g=this._decodeTag(H,R.explicit);if(H.isError(g))return g;H=g}let x=H.offset;if(R.use===null&&R.choice===null){let g;R.any&&(g=H.save());let _=this._decodeTag(H,R.implicit!==null?R.implicit:R.tag,R.any);if(H.isError(_))return _;R.any?k=H.raw(g):H=_}if(P&&P.track&&R.tag!==null&&P.track(H.path(),x,H.length,"tagged"),P&&P.track&&R.tag!==null&&P.track(H.path(),H.offset,H.length,"content"),R.any||(R.choice===null?k=this._decodeGeneric(R.tag,H,P):k=this._decodeChoice(H,P)),H.isError(k))return k;if(!R.any&&R.choice===null&&R.children!==null&&R.children.forEach(function(g){g._decode(H,P)}),R.contains&&(R.tag==="octstr"||R.tag==="bitstr")){let g=new Z(k);k=this._getUse(R.contains,H._reporterState.obj)._decode(g,P)}}return R.obj&&v&&(k=H.leaveObject(w)),R.key!==null&&(k!==null||v===!0)?H.leaveKey(M,R.key,k):M!==null&&H.exitKey(M),k},D.prototype._decodeGeneric=function(H,P,R){let k=this._baseState;return H==="seq"||H==="set"?null:H==="seqof"||H==="setof"?this._decodeList(P,H,k.args[0],R):/str$/.test(H)?this._decodeStr(P,H,R):H==="objid"&&k.args?this._decodeObjid(P,k.args[0],k.args[1],R):H==="objid"?this._decodeObjid(P,null,null,R):H==="gentime"||H==="utctime"?this._decodeTime(P,H,R):H==="null_"?this._decodeNull(P,R):H==="bool"?this._decodeBool(P,R):H==="objDesc"?this._decodeStr(P,H,R):H==="int"||H==="enum"?this._decodeInt(P,k.args&&k.args[0],R):k.use!==null?this._getUse(k.use,P._reporterState.obj)._decode(P,R):P.error("unknown tag: "+H)},D.prototype._getUse=function(H,P){let R=this._baseState;return R.useDecoder=this._use(H,P),N(R.useDecoder._baseState.parent===null),R.useDecoder=R.useDecoder._baseState.children[0],R.implicit!==R.useDecoder._baseState.implicit&&(R.useDecoder=R.useDecoder.clone(),R.useDecoder._baseState.implicit=R.implicit),R.useDecoder},D.prototype._decodeChoice=function(H,P){let R=this._baseState,k=null,v=!1;return Object.keys(R.choice).some(function(M){let w=H.save(),x=R.choice[M];try{let g=x._decode(H,P);if(H.isError(g))return!1;k={type:M,value:g},v=!0}catch{return H.restore(w),!1}return!0},this),v?k:H.error("Choice not matched")},D.prototype._createEncoderBuffer=function(H){return new O(H,this.reporter)},D.prototype._encode=function(H,P,R){let k=this._baseState;if(k.default!==null&&k.default===H)return;let v=this._encodeValue(H,P,R);if(v!==void 0&&!this._skipDefault(v,P,R))return v},D.prototype._encodeValue=function(H,P,R){let k=this._baseState;if(k.parent===null)return k.children[0]._encode(H,P||new F);let v=null;if(this.reporter=P,k.optional&&H===void 0)if(k.default!==null)H=k.default;else return;let M=null,w=!1;if(k.any)v=this._createEncoderBuffer(H);else if(k.choice)v=this._encodeChoice(H,P);else if(k.contains)M=this._getUse(k.contains,R)._encode(H,P),w=!0;else if(k.children)M=k.children.map(function(x){if(x._baseState.tag==="null_")return x._encode(null,P,H);if(x._baseState.key===null)return P.error("Child should have a key");let g=P.enterKey(x._baseState.key);if(typeof H!="object")return P.error("Child expected, but input is not object");let _=x._encode(H[x._baseState.key],P,H);return P.leaveKey(g),_},this).filter(function(x){return x}),M=this._createEncoderBuffer(M);else if(k.tag==="seqof"||k.tag==="setof"){if(!(k.args&&k.args.length===1))return P.error("Too many args for : "+k.tag);if(!Array.isArray(H))return P.error("seqof/setof, but data is not Array");let x=this.clone();x._baseState.implicit=null,M=this._createEncoderBuffer(H.map(function(g){let _=this._baseState;return this._getUse(_.args[0],H)._encode(g,P)},x))}else k.use!==null?v=this._getUse(k.use,R)._encode(H,P):(M=this._encodePrimitive(k.tag,H),w=!0);if(!k.any&&k.choice===null){let x=k.implicit!==null?k.implicit:k.tag,g=k.implicit===null?"universal":"context";x===null?k.use===null&&P.error("Tag could be omitted only for .use()"):k.use===null&&(v=this._encodeComposite(x,w,g,M))}return k.explicit!==null&&(v=this._encodeComposite(k.explicit,!1,"context",v)),v},D.prototype._encodeChoice=function(H,P){let R=this._baseState,k=R.choice[H.type];return k||N(!1,H.type+" not found in "+JSON.stringify(Object.keys(R.choice))),k._encode(H.value,P)},D.prototype._encodePrimitive=function(H,P){let R=this._baseState;if(/str$/.test(H))return this._encodeStr(P,H);if(H==="objid"&&R.args)return this._encodeObjid(P,R.reverseArgs[0],R.args[1]);if(H==="objid")return this._encodeObjid(P,null,null);if(H==="gentime"||H==="utctime")return this._encodeTime(P,H);if(H==="null_")return this._encodeNull();if(H==="int"||H==="enum")return this._encodeInt(P,R.args&&R.reverseArgs[0]);if(H==="bool")return this._encodeBool(P);if(H==="objDesc")return this._encodeStr(P,H);throw new Error("Unsupported tag: "+H)},D.prototype._isNumstr=function(H){return/^[0-9 ]*$/.test(H)},D.prototype._isPrintstr=function(H){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(H)}}),Q9=Z0((Y)=>{function q(F){let O={};return Object.keys(F).forEach(function(Z){(Z|0)==Z&&(Z=Z|0);let N=F[Z];O[N]=Z}),O}Y.tagClass={0:"universal",1:"application",2:"context",3:"private"},Y.tagClassByName=q(Y.tagClass),Y.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"},Y.tagByName=q(Y.tag)}),n3=Z0((Y,q)=>{var F=h0(),O=s5().Buffer,Z=e5(),N=Q9();function V(L){this.enc="der",this.name=L.name,this.entity=L,this.tree=new C,this.tree._init(L.body)}q.exports=V,V.prototype.encode=function(L,H){return this.tree._encode(L,H).join()};function C(L){Z.call(this,"der",L)}F(C,Z),C.prototype._encodeComposite=function(L,H,P,R){let k=D(L,H,P,this.reporter);if(R.length<128){let w=O.alloc(2);return w[0]=k,w[1]=R.length,this._createEncoderBuffer([w,R])}let v=1;for(let w=R.length;w>=256;w>>=8)v++;let M=O.alloc(2+v);M[0]=k,M[1]=128|v;for(let w=1+v,x=R.length;x>0;w--,x>>=8)M[w]=x&255;return this._createEncoderBuffer([M,R])},C.prototype._encodeStr=function(L,H){if(H==="bitstr")return this._createEncoderBuffer([L.unused|0,L.data]);if(H==="bmpstr"){let P=O.alloc(L.length*2);for(let R=0;R<L.length;R++)P.writeUInt16BE(L.charCodeAt(R),R*2);return this._createEncoderBuffer(P)}else return H==="numstr"?this._isNumstr(L)?this._createEncoderBuffer(L):this.reporter.error("Encoding of string type: numstr supports only digits and space"):H==="printstr"?this._isPrintstr(L)?this._createEncoderBuffer(L):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(H)?this._createEncoderBuffer(L):H==="objDesc"?this._createEncoderBuffer(L):this.reporter.error("Encoding of string type: "+H+" unsupported")},C.prototype._encodeObjid=function(L,H,P){if(typeof L=="string"){if(!H)return this.reporter.error("string objid given, but no values map found");if(!H.hasOwnProperty(L))return this.reporter.error("objid not found in values map");L=H[L].split(/[\s.]+/g);for(let M=0;M<L.length;M++)L[M]|=0}else if(Array.isArray(L)){L=L.slice();for(let M=0;M<L.length;M++)L[M]|=0}if(!Array.isArray(L))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(L));if(!P){if(L[1]>=40)return this.reporter.error("Second objid identifier OOB");L.splice(0,2,L[0]*40+L[1])}let R=0;for(let M=0;M<L.length;M++){let w=L[M];for(R++;w>=128;w>>=7)R++}let k=O.alloc(R),v=k.length-1;for(let M=L.length-1;M>=0;M--){let w=L[M];for(k[v--]=w&127;(w>>=7)>0;)k[v--]=128|w&127}return this._createEncoderBuffer(k)};function B(L){return L<10?"0"+L:L}C.prototype._encodeTime=function(L,H){let P,R=new Date(L);return H==="gentime"?P=[B(R.getUTCFullYear()),B(R.getUTCMonth()+1),B(R.getUTCDate()),B(R.getUTCHours()),B(R.getUTCMinutes()),B(R.getUTCSeconds()),"Z"].join(""):H==="utctime"?P=[B(R.getUTCFullYear()%100),B(R.getUTCMonth()+1),B(R.getUTCDate()),B(R.getUTCHours()),B(R.getUTCMinutes()),B(R.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+H+" time is not supported yet"),this._encodeStr(P,"octstr")},C.prototype._encodeNull=function(){return this._createEncoderBuffer("")},C.prototype._encodeInt=function(L,H){if(typeof L=="string"){if(!H)return this.reporter.error("String int or enum given, but no values map");if(!H.hasOwnProperty(L))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(L));L=H[L]}if(typeof L!="number"&&!O.isBuffer(L)){let k=L.toArray();!L.sign&&k[0]&128&&k.unshift(0),L=O.from(k)}if(O.isBuffer(L)){let k=L.length;L.length===0&&k++;let v=O.alloc(k);return L.copy(v),L.length===0&&(v[0]=0),this._createEncoderBuffer(v)}if(L<128)return this._createEncoderBuffer(L);if(L<256)return this._createEncoderBuffer([0,L]);let P=1;for(let k=L;k>=256;k>>=8)P++;let R=new Array(P);for(let k=R.length-1;k>=0;k--)R[k]=L&255,L>>=8;return R[0]&128&&R.unshift(0),this._createEncoderBuffer(O.from(R))},C.prototype._encodeBool=function(L){return this._createEncoderBuffer(L?255:0)},C.prototype._use=function(L,H){return typeof L=="function"&&(L=L(H)),L._getEncoder("der").tree},C.prototype._skipDefault=function(L,H,P){let R=this._baseState,k;if(R.default===null)return!1;let v=L.join();if(R.defaultBuffer===void 0&&(R.defaultBuffer=this._encodeValue(R.default,H,P).join()),v.length!==R.defaultBuffer.length)return!1;for(k=0;k<v.length;k++)if(v[k]!==R.defaultBuffer[k])return!1;return!0};function D(L,H,P,R){let k;if(L==="seqof"?L="seq":L==="setof"&&(L="set"),N.tagByName.hasOwnProperty(L))k=N.tagByName[L];else if(typeof L=="number"&&(L|0)===L)k=L;else return R.error("Unknown tag: "+L);return k>=31?R.error("Multi-octet tag encoding unsupported"):(H||(k|=32),k|=N.tagClassByName[P||"universal"]<<6,k)}}),EY=Z0((Y,q)=>{var F=h0(),O=n3();function Z(N){O.call(this,N),this.enc="pem"}F(Z,O),q.exports=Z,Z.prototype.encode=function(N,V){let C=O.prototype.encode.call(this,N).toString("base64"),B=["-----BEGIN "+V.label+"-----"];for(let D=0;D<C.length;D+=64)B.push(C.slice(D,D+64));return B.push("-----END "+V.label+"-----"),B.join(`
|
|
4
|
+
`)}}),r3=Z0((Y)=>{var q=Y;q.der=n3(),q.pem=EY()}),i3=Z0((Y,q)=>{var F=h0(),O=a3(),Z=S1().DecoderBuffer,N=e5(),V=Q9();function C(H){this.enc="der",this.name=H.name,this.entity=H,this.tree=new B,this.tree._init(H.body)}q.exports=C,C.prototype.decode=function(H,P){return Z.isDecoderBuffer(H)||(H=new Z(H,P)),this.tree._decode(H,P)};function B(H){N.call(this,"der",H)}F(B,N),B.prototype._peekTag=function(H,P,R){if(H.isEmpty())return!1;let k=H.save(),v=D(H,'Failed to peek tag: "'+P+'"');return H.isError(v)?v:(H.restore(k),v.tag===P||v.tagStr===P||v.tagStr+"of"===P||R)},B.prototype._decodeTag=function(H,P,R){let k=D(H,'Failed to decode tag of "'+P+'"');if(H.isError(k))return k;let v=L(H,k.primitive,'Failed to get length of "'+P+'"');if(H.isError(v))return v;if(!R&&k.tag!==P&&k.tagStr!==P&&k.tagStr+"of"!==P)return H.error('Failed to match tag: "'+P+'"');if(k.primitive||v!==null)return H.skip(v,'Failed to match body of: "'+P+'"');let M=H.save(),w=this._skipUntilEnd(H,'Failed to skip indefinite length body: "'+this.tag+'"');return H.isError(w)?w:(v=H.offset-M.offset,H.restore(M),H.skip(v,'Failed to match body of: "'+P+'"'))},B.prototype._skipUntilEnd=function(H,P){for(;;){let R=D(H,P);if(H.isError(R))return R;let k=L(H,R.primitive,P);if(H.isError(k))return k;let v;if(R.primitive||k!==null?v=H.skip(k):v=this._skipUntilEnd(H,P),H.isError(v))return v;if(R.tagStr==="end")break}},B.prototype._decodeList=function(H,P,R,k){let v=[];for(;!H.isEmpty();){let M=this._peekTag(H,"end");if(H.isError(M))return M;let w=R.decode(H,"der",k);if(H.isError(w)&&M)break;v.push(w)}return v},B.prototype._decodeStr=function(H,P){if(P==="bitstr"){let R=H.readUInt8();return H.isError(R)?R:{unused:R,data:H.raw()}}else if(P==="bmpstr"){let R=H.raw();if(R.length%2===1)return H.error("Decoding of string type: bmpstr length mismatch");let k="";for(let v=0;v<R.length/2;v++)k+=String.fromCharCode(R.readUInt16BE(v*2));return k}else if(P==="numstr"){let R=H.raw().toString("ascii");return this._isNumstr(R)?R:H.error("Decoding of string type: numstr unsupported characters")}else{if(P==="octstr")return H.raw();if(P==="objDesc")return H.raw();if(P==="printstr"){let R=H.raw().toString("ascii");return this._isPrintstr(R)?R:H.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(P)?H.raw().toString():H.error("Decoding of string type: "+P+" unsupported")}},B.prototype._decodeObjid=function(H,P,R){let k,v=[],M=0,w=0;for(;!H.isEmpty();)w=H.readUInt8(),M<<=7,M|=w&127,(w&128)===0&&(v.push(M),M=0);w&128&&v.push(M);let x=v[0]/40|0,g=v[0]%40;if(R?k=v:k=[x,g].concat(v.slice(1)),P){let _=P[k.join(" ")];_===void 0&&(_=P[k.join(".")]),_!==void 0&&(k=_)}return k},B.prototype._decodeTime=function(H,P){let R=H.raw().toString(),k,v,M,w,x,g;if(P==="gentime")k=R.slice(0,4)|0,v=R.slice(4,6)|0,M=R.slice(6,8)|0,w=R.slice(8,10)|0,x=R.slice(10,12)|0,g=R.slice(12,14)|0;else if(P==="utctime")k=R.slice(0,2)|0,v=R.slice(2,4)|0,M=R.slice(4,6)|0,w=R.slice(6,8)|0,x=R.slice(8,10)|0,g=R.slice(10,12)|0,k<70?k=2000+k:k=1900+k;else return H.error("Decoding "+P+" time is not supported yet");return Date.UTC(k,v-1,M,w,x,g,0)},B.prototype._decodeNull=function(){return null},B.prototype._decodeBool=function(H){let P=H.readUInt8();return H.isError(P)?P:P!==0},B.prototype._decodeInt=function(H,P){let R=H.raw(),k=new O(R);return P&&(k=P[k.toString(10)]||k),k},B.prototype._use=function(H,P){return typeof H=="function"&&(H=H(P)),H._getDecoder("der").tree};function D(H,P){let R=H.readUInt8(P);if(H.isError(R))return R;let k=V.tagClass[R>>6],v=(R&32)===0;if((R&31)===31){let w=R;for(R=0;(w&128)===128;){if(w=H.readUInt8(P),H.isError(w))return w;R<<=7,R|=w&127}}else R&=31;let M=V.tag[R];return{cls:k,primitive:v,tag:R,tagStr:M}}function L(H,P,R){let k=H.readUInt8(R);if(H.isError(k))return k;if(!P&&k===128)return null;if((k&128)===0)return k;let v=k&127;if(v>4)return H.error("length octect is too long");k=0;for(let M=0;M<v;M++){k<<=8;let w=H.readUInt8(R);if(H.isError(w))return w;k|=w}return k}}),wY=Z0((Y,q)=>{var F=h0(),O=s5().Buffer,Z=i3();function N(V){Z.call(this,V),this.enc="pem"}F(N,Z),q.exports=N,N.prototype.decode=function(V,C){let B=V.toString().split(/[\r\n]+/g),D=C.label.toUpperCase(),L=/^-----(BEGIN|END) ([^-]+)-----$/,H=-1,P=-1;for(let v=0;v<B.length;v++){let M=B[v].match(L);if(M!==null&&M[2]===D)if(H===-1){if(M[1]!=="BEGIN")break;H=v}else{if(M[1]!=="END")break;P=v;break}}if(H===-1||P===-1)throw new Error("PEM section not found for: "+D);let R=B.slice(H+1,P).join("");R.replace(/[^a-z0-9+/=]+/gi,"");let k=O.from(R,"base64");return Z.prototype.decode.call(this,k,C)}}),s3=Z0((Y)=>{var q=Y;q.der=i3(),q.pem=wY()}),gY=Z0((Y)=>{var q=r3(),F=s3(),O=h0(),Z=Y;Z.define=function(V,C){return new N(V,C)};function N(V,C){this.name=V,this.body=C,this.decoders={},this.encoders={}}N.prototype._createNamed=function(V){let C=this.name;function B(D){this._initNamed(D,C)}return O(B,V),B.prototype._initNamed=function(D,L){V.call(this,D,L)},new B(this)},N.prototype._getDecoder=function(V){return V=V||"der",this.decoders.hasOwnProperty(V)||(this.decoders[V]=this._createNamed(F[V])),this.decoders[V]},N.prototype.decode=function(V,C,B){return this._getDecoder(C).decode(V,B)},N.prototype._getEncoder=function(V){return V=V||"der",this.encoders.hasOwnProperty(V)||(this.encoders[V]=this._createNamed(q[V])),this.encoders[V]},N.prototype.encode=function(V,C,B){return this._getEncoder(C).encode(V,B)}}),yY=Z0((Y)=>{var q=Y;q.Reporter=t5().Reporter,q.DecoderBuffer=S1().DecoderBuffer,q.EncoderBuffer=S1().EncoderBuffer,q.Node=e5()}),_Y=Z0((Y)=>{var q=Y;q._reverse=function(F){let O={};return Object.keys(F).forEach(function(Z){(Z|0)==Z&&(Z=Z|0);let N=F[Z];O[N]=Z}),O},q.der=Q9()}),t3=Z0((Y)=>{var q=Y;q.bignum=a3(),q.define=gY().define,q.base=yY(),q.constants=_Y(),q.decoders=s3(),q.encoders=r3()}),mY=Z0((Y,q)=>{var F=t3(),O=F.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),Z=F.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),N=F.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),V=F.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(N),this.key("subjectPublicKey").bitstr())}),C=F.define("RelativeDistinguishedName",function(){this.setof(Z)}),B=F.define("RDNSequence",function(){this.seqof(C)}),D=F.define("Name",function(){this.choice({rdnSequence:this.use(B)})}),L=F.define("Validity",function(){this.seq().obj(this.key("notBefore").use(O),this.key("notAfter").use(O))}),H=F.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),P=F.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(N),this.key("issuer").use(D),this.key("validity").use(L),this.key("subject").use(D),this.key("subjectPublicKeyInfo").use(V),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(H).optional())}),R=F.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(P),this.key("signatureAlgorithm").use(N),this.key("signatureValue").bitstr())});q.exports=R}),pY=Z0((Y)=>{var q=t3();Y.certificate=mY();var F=q.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())});Y.RSAPrivateKey=F;var O=q.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Y.RSAPublicKey=O;var Z=q.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(N),this.key("subjectPublicKey").bitstr())});Y.PublicKey=Z;var N=q.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())}),V=q.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(N),this.key("subjectPrivateKey").octstr())});Y.PrivateKey=V;var C=q.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())});Y.EncryptedPrivateKey=C;var B=q.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())});Y.DSAPrivateKey=B,Y.DSAparam=q.define("DSAparam",function(){this.int()});var D=q.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(L),this.key("publicKey").optional().explicit(1).bitstr())});Y.ECPrivateKey=D;var L=q.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});Y.signature=q.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})}),bY=Z0((Y,q)=>{q.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"}}),hY=Z0((Y,q)=>{var F=/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,O=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,Z=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,N=k7(),V=d5(),C=l0().Buffer;q.exports=function(B,D){var L=B.toString(),H=L.match(F),P;if(H){var R="aes"+H[1],k=C.from(H[2],"hex"),v=C.from(H[3].replace(/[\r\n]/g,""),"base64"),M=N(D,k.slice(0,8),parseInt(H[1],10)).key,w=[],x=V.createDecipheriv(R,M,k);w.push(x.update(v)),w.push(x.final()),P=C.concat(w)}else{var g=L.match(Z);P=C.from(g[2].replace(/[\r\n]/g,""),"base64")}var _=L.match(O)[1];return{tag:_,data:P}}}),R7=Z0((Y,q)=>{var F=pY(),O=bY(),Z=hY(),N=d5(),V=T3(),C=l0().Buffer;q.exports=B;function B(L){var H;typeof L=="object"&&!C.isBuffer(L)&&(H=L.passphrase,L=L.key),typeof L=="string"&&(L=C.from(L));var P=Z(L,H),R=P.tag,k=P.data,v,M;switch(R){case"CERTIFICATE":M=F.certificate.decode(k,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(M||(M=F.PublicKey.decode(k,"der")),v=M.algorithm.algorithm.join("."),v){case"1.2.840.113549.1.1.1":return F.RSAPublicKey.decode(M.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return M.subjectPrivateKey=M.subjectPublicKey,{type:"ec",data:M};case"1.2.840.10040.4.1":return M.algorithm.params.pub_key=F.DSAparam.decode(M.subjectPublicKey.data,"der"),{type:"dsa",data:M.algorithm.params};default:throw new Error("unknown key id "+v)}case"ENCRYPTED PRIVATE KEY":k=F.EncryptedPrivateKey.decode(k,"der"),k=D(k,H);case"PRIVATE KEY":switch(M=F.PrivateKey.decode(k,"der"),v=M.algorithm.algorithm.join("."),v){case"1.2.840.113549.1.1.1":return F.RSAPrivateKey.decode(M.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:M.algorithm.curve,privateKey:F.ECPrivateKey.decode(M.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return M.algorithm.params.priv_key=F.DSAparam.decode(M.subjectPrivateKey,"der"),{type:"dsa",params:M.algorithm.params};default:throw new Error("unknown key id "+v)}case"RSA PUBLIC KEY":return F.RSAPublicKey.decode(k,"der");case"RSA PRIVATE KEY":return F.RSAPrivateKey.decode(k,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:F.DSAPrivateKey.decode(k,"der")};case"EC PRIVATE KEY":return k=F.ECPrivateKey.decode(k,"der"),{curve:k.parameters.value,privateKey:k.privateKey};default:throw new Error("unknown key type "+R)}}B.signature=F.signature;function D(L,H){var P=L.algorithm.decrypt.kde.kdeparams.salt,R=parseInt(L.algorithm.decrypt.kde.kdeparams.iters.toString(),10),k=O[L.algorithm.decrypt.cipher.algo.join(".")],v=L.algorithm.decrypt.cipher.iv,M=L.subjectPrivateKey,w=parseInt(k.split("-")[1],10)/8,x=V.pbkdf2Sync(H,P,R,w,"sha1"),g=N.createDecipheriv(k,x,v),_=[];return _.push(g.update(M)),_.push(g.final()),C.concat(_)}}),e3=Z0((Y,q)=>{q.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"}}),cY=Z0((Y,q)=>{var F=l0().Buffer,O=N3(),Z=a5(),N=i5().ec,V=o5(),C=R7(),B=e3();function D(x,g,_,p,m){var f=C(g);if(f.curve){if(p!=="ecdsa"&&p!=="ecdsa/rsa")throw new Error("wrong private key type");return L(x,f)}else if(f.type==="dsa"){if(p!=="dsa")throw new Error("wrong private key type");return H(x,f,_)}else if(p!=="rsa"&&p!=="ecdsa/rsa")throw new Error("wrong private key type");x=F.concat([m,x]);for(var s=f.modulus.byteLength(),Q0=[0,1];x.length+Q0.length+1<s;)Q0.push(255);Q0.push(0);for(var u=-1;++u<x.length;)Q0.push(x[u]);var K0=Z(Q0,f);return K0}function L(x,g){var _=B[g.curve.join(".")];if(!_)throw new Error("unknown curve "+g.curve.join("."));var p=new N(_),m=p.keyFromPrivate(g.privateKey),f=m.sign(x);return F.from(f.toDER())}function H(x,g,_){for(var p=g.params.priv_key,m=g.params.p,f=g.params.q,s=g.params.g,Q0=new V(0),u,K0=k(x,f).mod(f),Q=!1,G=R(p,f,x,_);Q===!1;)u=M(f,G,_),Q0=w(s,u,m,f),Q=u.invm(f).imul(K0.add(p.mul(Q0))).mod(f),Q.cmpn(0)===0&&(Q=!1,Q0=new V(0));return P(Q0,Q)}function P(x,g){x=x.toArray(),g=g.toArray(),x[0]&128&&(x=[0].concat(x)),g[0]&128&&(g=[0].concat(g));var _=x.length+g.length+4,p=[48,_,2,x.length];return p=p.concat(x,[2,g.length],g),F.from(p)}function R(x,g,_,p){if(x=F.from(x.toArray()),x.length<g.byteLength()){var m=F.alloc(g.byteLength()-x.length);x=F.concat([m,x])}var f=_.length,s=v(_,g),Q0=F.alloc(f);Q0.fill(1);var u=F.alloc(f);return u=O(p,u).update(Q0).update(F.from([0])).update(x).update(s).digest(),Q0=O(p,u).update(Q0).digest(),u=O(p,u).update(Q0).update(F.from([1])).update(x).update(s).digest(),Q0=O(p,u).update(Q0).digest(),{k:u,v:Q0}}function k(x,g){var _=new V(x),p=(x.length<<3)-g.bitLength();return p>0&&_.ishrn(p),_}function v(x,g){x=k(x,g),x=x.mod(g);var _=F.from(x.toArray());if(_.length<g.byteLength()){var p=F.alloc(g.byteLength()-_.length);_=F.concat([p,_])}return _}function M(x,g,_){var p,m;do{for(p=F.alloc(0);p.length*8<x.bitLength();)g.v=O(_,g.k).update(g.v).digest(),p=F.concat([p,g.v]);m=k(p,x),g.k=O(_,g.k).update(g.v).update(F.from([0])).digest(),g.v=O(_,g.k).update(g.v).digest()}while(m.cmp(x)!==-1);return m}function w(x,g,_,p){return x.toRed(V.mont(_)).redPow(g).fromRed().mod(p)}q.exports=D,q.exports.getKey=R,q.exports.makeKey=M}),lY=Z0((Y,q)=>{var F=l0().Buffer,O=o5(),Z=i5().ec,N=R7(),V=e3();function C(H,P,R,k,v){var M=N(R);if(M.type==="ec"){if(k!=="ecdsa"&&k!=="ecdsa/rsa")throw new Error("wrong public key type");return B(H,P,M)}else if(M.type==="dsa"){if(k!=="dsa")throw new Error("wrong public key type");return D(H,P,M)}else if(k!=="rsa"&&k!=="ecdsa/rsa")throw new Error("wrong public key type");P=F.concat([v,P]);for(var w=M.modulus.byteLength(),x=[1],g=0;P.length+x.length+2<w;)x.push(255),g++;x.push(0);for(var _=-1;++_<P.length;)x.push(P[_]);x=F.from(x);var p=O.mont(M.modulus);H=new O(H).toRed(p),H=H.redPow(new O(M.publicExponent)),H=F.from(H.fromRed().toArray());var m=g<8?1:0;for(w=Math.min(H.length,x.length),H.length!==x.length&&(m=1),_=-1;++_<w;)m|=H[_]^x[_];return m===0}function B(H,P,R){var k=V[R.data.algorithm.curve.join(".")];if(!k)throw new Error("unknown curve "+R.data.algorithm.curve.join("."));var v=new Z(k),M=R.data.subjectPrivateKey.data;return v.verify(P,H,M)}function D(H,P,R){var k=R.data.p,v=R.data.q,M=R.data.g,w=R.data.pub_key,x=N.signature.decode(H,"der"),g=x.s,_=x.r;L(g,v),L(_,v);var p=O.mont(k),m=g.invm(v),f=M.toRed(p).redPow(new O(P).mul(m).mod(v)).fromRed().mul(w.toRed(p).redPow(_.mul(m).mod(v)).fromRed()).mod(k).mod(v);return f.cmp(_)===0}function L(H,P){if(H.cmpn(0)<=0)throw new Error("invalid sig");if(H.cmp(P)>=P)throw new Error("invalid sig")}q.exports=C}),dY=Z0((Y,q)=>{var F=l0().Buffer,O=w1(),Z=qY(),N=h0(),V=cY(),C=lY(),B=P3();Object.keys(B).forEach(function(R){B[R].id=F.from(B[R].id,"hex"),B[R.toLowerCase()]=B[R]});function D(R){Z.Writable.call(this);var k=B[R];if(!k)throw new Error("Unknown message digest");this._hashType=k.hash,this._hash=O(k.hash),this._tag=k.id,this._signType=k.sign}N(D,Z.Writable),D.prototype._write=function(R,k,v){this._hash.update(R),v()},D.prototype.update=function(R,k){return typeof R=="string"&&(R=F.from(R,k)),this._hash.update(R),this},D.prototype.sign=function(R,k){this.end();var v=this._hash.digest(),M=V(v,R,this._hashType,this._signType,this._tag);return k?M.toString(k):M};function L(R){Z.Writable.call(this);var k=B[R];if(!k)throw new Error("Unknown message digest");this._hash=O(k.hash),this._tag=k.id,this._signType=k.sign}N(L,Z.Writable),L.prototype._write=function(R,k,v){this._hash.update(R),v()},L.prototype.update=function(R,k){return typeof R=="string"&&(R=F.from(R,k)),this._hash.update(R),this},L.prototype.verify=function(R,k,v){typeof k=="string"&&(k=F.from(k,v)),this.end();var M=this._hash.digest();return C(k,M,R,this._signType,this._tag)};function H(R){return new D(R)}function P(R){return new L(R)}q.exports={Sign:H,Verify:P,createSign:H,createVerify:P}}),uY=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,d=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(d,U0)|0,z=Math.imul(d,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(d,C0)|0,z=z+Math.imul(d,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(d,N0)|0,z=z+Math.imul(d,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(d,L0)|0,z=z+Math.imul(d,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(d,k0)|0,z=z+Math.imul(d,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(d,R0)|0,z=z+Math.imul(d,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(d,T0)|0,z=z+Math.imul(d,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(d,A0)|0,z=z+Math.imul(d,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(d,x0)|0,z=z+Math.imul(d,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(d,E0)|0,z=z+Math.imul(d,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new u(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function u(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}u.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},u.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},u.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},u.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},u.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},u.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},u.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},u.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},u.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},u.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},u.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},u.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},u.prototype.sqr=function(Q){return this.mul(Q,Q)},u.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},u.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},u.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},u.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},u.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){u.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,u),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),fY=Z0((Y,q)=>{var F=i5(),O=uY();q.exports=function(C){return new N(C)};var Z={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}};Z.p224=Z.secp224r1,Z.p256=Z.secp256r1=Z.prime256v1,Z.p192=Z.secp192r1=Z.prime192v1,Z.p384=Z.secp384r1,Z.p521=Z.secp521r1;function N(C){this.curveType=Z[C],this.curveType||(this.curveType={name:C}),this.curve=new F.ec(this.curveType.name),this.keys=void 0}N.prototype.generateKeys=function(C,B){return this.keys=this.curve.genKeyPair(),this.getPublicKey(C,B)},N.prototype.computeSecret=function(C,B,D){B=B||"utf8",Buffer.isBuffer(C)||(C=new Buffer(C,B));var L=this.curve.keyFromPublic(C).getPublic(),H=L.mul(this.keys.getPrivate()).getX();return V(H,D,this.curveType.byteLength)},N.prototype.getPublicKey=function(C,B){var D=this.keys.getPublic(B==="compressed",!0);return B==="hybrid"&&(D[D.length-1]%2?D[0]=7:D[0]=6),V(D,C)},N.prototype.getPrivateKey=function(C){return V(this.keys.getPrivate(),C)},N.prototype.setPublicKey=function(C,B){return B=B||"utf8",Buffer.isBuffer(C)||(C=new Buffer(C,B)),this.keys._importPublic(C),this},N.prototype.setPrivateKey=function(C,B){B=B||"utf8",Buffer.isBuffer(C)||(C=new Buffer(C,B));var D=new O(C);return D=D.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(D),this};function V(C,B,D){Array.isArray(C)||(C=C.toArray());var L=new Buffer(C);if(D&&L.length<D){var H=new Buffer(D-L.length);H.fill(0),L=Buffer.concat([H,L])}return B?L.toString(B):L}}),Q2=Z0((Y,q)=>{var F=w1(),O=l0().Buffer;q.exports=function(N,V){for(var C=O.alloc(0),B=0,D;C.length<V;)D=Z(B++),C=O.concat([C,F("sha1").update(N).update(D).digest()]);return C.slice(0,V)};function Z(N){var V=O.allocUnsafe(4);return V.writeUInt32BE(N,0),V}}),W2=Z0((Y,q)=>{q.exports=function(F,O){for(var Z=F.length,N=-1;++N<Z;)F[N]^=O[N];return F}}),W9=Z0((Y,q)=>{(function(F,O){function Z(Q,G){if(!Q)throw new Error(G||"Assertion failed")}function N(Q,G){Q.super_=G;var J=function(){};J.prototype=G.prototype,Q.prototype=new J,Q.prototype.constructor=Q}function V(Q,G,J){if(V.isBN(Q))return Q;this.negative=0,this.words=null,this.length=0,this.red=null,Q!==null&&((G==="le"||G==="be")&&(J=G,G=10),this._init(Q||0,G||10,J||"be"))}typeof F=="object"?F.exports=V:O.BN=V,V.BN=V,V.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=E8().Buffer}catch{}V.isBN=function(Q){return Q instanceof V?!0:Q!==null&&typeof Q=="object"&&Q.constructor.wordSize===V.wordSize&&Array.isArray(Q.words)},V.max=function(Q,G){return Q.cmp(G)>0?Q:G},V.min=function(Q,G){return Q.cmp(G)<0?Q:G},V.prototype._init=function(Q,G,J){if(typeof Q=="number")return this._initNumber(Q,G,J);if(typeof Q=="object")return this._initArray(Q,G,J);G==="hex"&&(G=16),Z(G===(G|0)&&G>=2&&G<=36),Q=Q.toString().replace(/\s+/g,"");var X=0;Q[0]==="-"&&(X++,this.negative=1),X<Q.length&&(G===16?this._parseHex(Q,X,J):(this._parseBase(Q,G,X),J==="le"&&this._initArray(this.toArray(),G,J)))},V.prototype._initNumber=function(Q,G,J){Q<0&&(this.negative=1,Q=-Q),Q<67108864?(this.words=[Q&67108863],this.length=1):Q<4503599627370496?(this.words=[Q&67108863,Q/67108864&67108863],this.length=2):(Z(Q<9007199254740992),this.words=[Q&67108863,Q/67108864&67108863,1],this.length=3),J==="le"&&this._initArray(this.toArray(),G,J)},V.prototype._initArray=function(Q,G,J){if(Z(typeof Q.length=="number"),Q.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(Q.length/3),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U,$,j=0;if(J==="be")for(X=Q.length-1,U=0;X>=0;X-=3)$=Q[X]|Q[X-1]<<8|Q[X-2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);else if(J==="le")for(X=0,U=0;X<Q.length;X+=3)$=Q[X]|Q[X+1]<<8|Q[X+2]<<16,this.words[U]|=$<<j&67108863,this.words[U+1]=$>>>26-j&67108863,j+=24,j>=26&&(j-=26,U++);return this.strip()};function B(Q,G){var J=Q.charCodeAt(G);return J>=65&&J<=70?J-55:J>=97&&J<=102?J-87:J-48&15}function D(Q,G,J){var X=B(Q,J);return J-1>=G&&(X|=B(Q,J-1)<<4),X}V.prototype._parseHex=function(Q,G,J){this.length=Math.ceil((Q.length-G)/6),this.words=new Array(this.length);for(var X=0;X<this.length;X++)this.words[X]=0;var U=0,$=0,j;if(J==="be")for(X=Q.length-1;X>=G;X-=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8;else{var K=Q.length-G;for(X=K%2===0?G+1:G;X<Q.length;X+=2)j=D(Q,G,X)<<U,this.words[$]|=j&67108863,U>=18?(U-=18,$+=1,this.words[$]|=j>>>26):U+=8}this.strip()};function L(Q,G,J,X){for(var U=0,$=Math.min(Q.length,J),j=G;j<$;j++){var K=Q.charCodeAt(j)-48;U*=X,K>=49?U+=K-49+10:K>=17?U+=K-17+10:U+=K}return U}V.prototype._parseBase=function(Q,G,J){this.words=[0],this.length=1;for(var X=0,U=1;U<=67108863;U*=G)X++;X--,U=U/G|0;for(var $=Q.length-J,j=$%X,K=Math.min($,$-j)+J,W=0,z=J;z<K;z+=X)W=L(Q,z,z+X,G),this.imuln(U),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(j!==0){var A=1;for(W=L(Q,z,Q.length,G),z=0;z<j;z++)A*=G;this.imuln(A),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},V.prototype.copy=function(Q){Q.words=new Array(this.length);for(var G=0;G<this.length;G++)Q.words[G]=this.words[G];Q.length=this.length,Q.negative=this.negative,Q.red=this.red},V.prototype.clone=function(){var Q=new V(null);return this.copy(Q),Q},V.prototype._expand=function(Q){for(;this.length<Q;)this.words[this.length++]=0;return this},V.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},V.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},V.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var H=["","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"],P=[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],R=[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];V.prototype.toString=function(Q,G){Q=Q||10,G=G|0||1;var J;if(Q===16||Q==="hex"){J="";for(var X=0,U=0,$=0;$<this.length;$++){var j=this.words[$],K=((j<<X|U)&16777215).toString(16);U=j>>>24-X&16777215,U!==0||$!==this.length-1?J=H[6-K.length]+K+J:J=K+J,X+=2,X>=26&&(X-=26,$--)}for(U!==0&&(J=U.toString(16)+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(Q===(Q|0)&&Q>=2&&Q<=36){var W=P[Q],z=R[Q];J="";var A=this.clone();for(A.negative=0;!A.isZero();){var T=A.modn(z).toString(Q);A=A.idivn(z),A.isZero()?J=T+J:J=H[W-T.length]+T+J}for(this.isZero()&&(J="0"+J);J.length%G!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}Z(!1,"Base should be between 2 and 36")},V.prototype.toNumber=function(){var Q=this.words[0];return this.length===2?Q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?Q+=4503599627370496+this.words[1]*67108864:this.length>2&&Z(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-Q:Q},V.prototype.toJSON=function(){return this.toString(16)},V.prototype.toBuffer=function(Q,G){return Z(typeof C<"u"),this.toArrayLike(C,Q,G)},V.prototype.toArray=function(Q,G){return this.toArrayLike(Array,Q,G)},V.prototype.toArrayLike=function(Q,G,J){var X=this.byteLength(),U=J||Math.max(1,X);Z(X<=U,"byte array longer than desired length"),Z(U>0,"Requested array length <= 0"),this.strip();var $=G==="le",j=new Q(U),K,W,z=this.clone();if($){for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[W]=K;for(;W<U;W++)j[W]=0}else{for(W=0;W<U-X;W++)j[W]=0;for(W=0;!z.isZero();W++)K=z.andln(255),z.iushrn(8),j[U-W-1]=K}return j},Math.clz32?V.prototype._countBits=function(Q){return 32-Math.clz32(Q)}:V.prototype._countBits=function(Q){var G=Q,J=0;return G>=4096&&(J+=13,G>>>=13),G>=64&&(J+=7,G>>>=7),G>=8&&(J+=4,G>>>=4),G>=2&&(J+=2,G>>>=2),J+G},V.prototype._zeroBits=function(Q){if(Q===0)return 26;var G=Q,J=0;return(G&8191)===0&&(J+=13,G>>>=13),(G&127)===0&&(J+=7,G>>>=7),(G&15)===0&&(J+=4,G>>>=4),(G&3)===0&&(J+=2,G>>>=2),(G&1)===0&&J++,J},V.prototype.bitLength=function(){var Q=this.words[this.length-1],G=this._countBits(Q);return(this.length-1)*26+G};function k(Q){for(var G=new Array(Q.bitLength()),J=0;J<G.length;J++){var X=J/26|0,U=J%26;G[J]=(Q.words[X]&1<<U)>>>U}return G}V.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Q=0,G=0;G<this.length;G++){var J=this._zeroBits(this.words[G]);if(Q+=J,J!==26)break}return Q},V.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},V.prototype.toTwos=function(Q){return this.negative!==0?this.abs().inotn(Q).iaddn(1):this.clone()},V.prototype.fromTwos=function(Q){return this.testn(Q-1)?this.notn(Q).iaddn(1).ineg():this.clone()},V.prototype.isNeg=function(){return this.negative!==0},V.prototype.neg=function(){return this.clone().ineg()},V.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},V.prototype.iuor=function(Q){for(;this.length<Q.length;)this.words[this.length++]=0;for(var G=0;G<Q.length;G++)this.words[G]=this.words[G]|Q.words[G];return this.strip()},V.prototype.ior=function(Q){return Z((this.negative|Q.negative)===0),this.iuor(Q)},V.prototype.or=function(Q){return this.length>Q.length?this.clone().ior(Q):Q.clone().ior(this)},V.prototype.uor=function(Q){return this.length>Q.length?this.clone().iuor(Q):Q.clone().iuor(this)},V.prototype.iuand=function(Q){var G;this.length>Q.length?G=Q:G=this;for(var J=0;J<G.length;J++)this.words[J]=this.words[J]&Q.words[J];return this.length=G.length,this.strip()},V.prototype.iand=function(Q){return Z((this.negative|Q.negative)===0),this.iuand(Q)},V.prototype.and=function(Q){return this.length>Q.length?this.clone().iand(Q):Q.clone().iand(this)},V.prototype.uand=function(Q){return this.length>Q.length?this.clone().iuand(Q):Q.clone().iuand(this)},V.prototype.iuxor=function(Q){var G,J;this.length>Q.length?(G=this,J=Q):(G=Q,J=this);for(var X=0;X<J.length;X++)this.words[X]=G.words[X]^J.words[X];if(this!==G)for(;X<G.length;X++)this.words[X]=G.words[X];return this.length=G.length,this.strip()},V.prototype.ixor=function(Q){return Z((this.negative|Q.negative)===0),this.iuxor(Q)},V.prototype.xor=function(Q){return this.length>Q.length?this.clone().ixor(Q):Q.clone().ixor(this)},V.prototype.uxor=function(Q){return this.length>Q.length?this.clone().iuxor(Q):Q.clone().iuxor(this)},V.prototype.inotn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Math.ceil(Q/26)|0,J=Q%26;this._expand(G),J>0&&G--;for(var X=0;X<G;X++)this.words[X]=~this.words[X]&67108863;return J>0&&(this.words[X]=~this.words[X]&67108863>>26-J),this.strip()},V.prototype.notn=function(Q){return this.clone().inotn(Q)},V.prototype.setn=function(Q,G){Z(typeof Q=="number"&&Q>=0);var J=Q/26|0,X=Q%26;return this._expand(J+1),G?this.words[J]=this.words[J]|1<<X:this.words[J]=this.words[J]&~(1<<X),this.strip()},V.prototype.iadd=function(Q){var G;if(this.negative!==0&&Q.negative===0)return this.negative=0,G=this.isub(Q),this.negative^=1,this._normSign();if(this.negative===0&&Q.negative!==0)return Q.negative=0,G=this.isub(Q),Q.negative=1,G._normSign();var J,X;this.length>Q.length?(J=this,X=Q):(J=Q,X=this);for(var U=0,$=0;$<X.length;$++)G=(J.words[$]|0)+(X.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;for(;U!==0&&$<J.length;$++)G=(J.words[$]|0)+U,this.words[$]=G&67108863,U=G>>>26;if(this.length=J.length,U!==0)this.words[this.length]=U,this.length++;else if(J!==this)for(;$<J.length;$++)this.words[$]=J.words[$];return this},V.prototype.add=function(Q){var G;return Q.negative!==0&&this.negative===0?(Q.negative=0,G=this.sub(Q),Q.negative^=1,G):Q.negative===0&&this.negative!==0?(this.negative=0,G=Q.sub(this),this.negative=1,G):this.length>Q.length?this.clone().iadd(Q):Q.clone().iadd(this)},V.prototype.isub=function(Q){if(Q.negative!==0){Q.negative=0;var G=this.iadd(Q);return Q.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(Q),this.negative=1,this._normSign();var J=this.cmp(Q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,U;J>0?(X=this,U=Q):(X=Q,U=this);for(var $=0,j=0;j<U.length;j++)G=(X.words[j]|0)-(U.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;for(;$!==0&&j<X.length;j++)G=(X.words[j]|0)+$,$=G>>26,this.words[j]=G&67108863;if($===0&&j<X.length&&X!==this)for(;j<X.length;j++)this.words[j]=X.words[j];return this.length=Math.max(this.length,j),X!==this&&(this.negative=1),this.strip()},V.prototype.sub=function(Q){return this.clone().isub(Q)};function v(Q,G,J){J.negative=G.negative^Q.negative;var X=Q.length+G.length|0;J.length=X,X=X-1|0;var U=Q.words[0]|0,$=G.words[0]|0,j=U*$,K=j&67108863,W=j/67108864|0;J.words[0]=K;for(var z=1;z<X;z++){for(var A=W>>>26,T=W&67108863,y=Math.min(z,G.length-1),r=Math.max(0,z-Q.length+1);r<=y;r++){var a=z-r|0;U=Q.words[a]|0,$=G.words[r]|0,j=U*$+T,A+=j/67108864|0,T=j&67108863}J.words[z]=T|0,W=A|0}return W!==0?J.words[z]=W|0:J.length--,J.strip()}var M=function(Q,G,J){var X=Q.words,U=G.words,$=J.words,j=0,K,W,z,A=X[0]|0,T=A&8191,y=A>>>13,r=X[1]|0,a=r&8191,t=r>>>13,l=X[2]|0,h=l&8191,n=l>>>13,q0=X[3]|0,G0=q0&8191,F0=q0>>>13,b=X[4]|0,E=b&8191,d=b>>>13,e=X[5]|0,V0=e&8191,W0=e>>>13,J0=X[6]|0,Y0=J0&8191,X0=J0>>>13,g0=X[7]|0,$0=g0&8191,z0=g0>>>13,_0=X[8]|0,I=_0&8191,S=_0>>>13,c=X[9]|0,o=c&8191,i=c>>>13,O0=U[0]|0,U0=O0&8191,j0=O0>>>13,c0=U[1]|0,C0=c0&8191,H0=c0>>>13,m0=U[2]|0,N0=m0&8191,P0=m0>>>13,$6=U[3]|0,L0=$6&8191,D0=$6>>>13,a0=U[4]|0,k0=a0&8191,B0=a0>>>13,C6=U[5]|0,R0=C6&8191,I0=C6>>>13,O6=U[6]|0,T0=O6&8191,M0=O6>>>13,D6=U[7]|0,A0=D6&8191,v0=D6>>>13,L6=U[8]|0,x0=L6&8191,S0=L6>>>13,N6=U[9]|0,E0=N6&8191,w0=N6>>>13;J.negative=Q.negative^G.negative,J.length=19,K=Math.imul(T,U0),W=Math.imul(T,j0),W=W+Math.imul(y,U0)|0,z=Math.imul(y,j0);var z6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(z6>>>26)|0,z6&=67108863,K=Math.imul(a,U0),W=Math.imul(a,j0),W=W+Math.imul(t,U0)|0,z=Math.imul(t,j0),K=K+Math.imul(T,C0)|0,W=W+Math.imul(T,H0)|0,W=W+Math.imul(y,C0)|0,z=z+Math.imul(y,H0)|0;var p0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(p0>>>26)|0,p0&=67108863,K=Math.imul(h,U0),W=Math.imul(h,j0),W=W+Math.imul(n,U0)|0,z=Math.imul(n,j0),K=K+Math.imul(a,C0)|0,W=W+Math.imul(a,H0)|0,W=W+Math.imul(t,C0)|0,z=z+Math.imul(t,H0)|0,K=K+Math.imul(T,N0)|0,W=W+Math.imul(T,P0)|0,W=W+Math.imul(y,N0)|0,z=z+Math.imul(y,P0)|0;var b0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(b0>>>26)|0,b0&=67108863,K=Math.imul(G0,U0),W=Math.imul(G0,j0),W=W+Math.imul(F0,U0)|0,z=Math.imul(F0,j0),K=K+Math.imul(h,C0)|0,W=W+Math.imul(h,H0)|0,W=W+Math.imul(n,C0)|0,z=z+Math.imul(n,H0)|0,K=K+Math.imul(a,N0)|0,W=W+Math.imul(a,P0)|0,W=W+Math.imul(t,N0)|0,z=z+Math.imul(t,P0)|0,K=K+Math.imul(T,L0)|0,W=W+Math.imul(T,D0)|0,W=W+Math.imul(y,L0)|0,z=z+Math.imul(y,D0)|0;var n0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(n0>>>26)|0,n0&=67108863,K=Math.imul(E,U0),W=Math.imul(E,j0),W=W+Math.imul(d,U0)|0,z=Math.imul(d,j0),K=K+Math.imul(G0,C0)|0,W=W+Math.imul(G0,H0)|0,W=W+Math.imul(F0,C0)|0,z=z+Math.imul(F0,H0)|0,K=K+Math.imul(h,N0)|0,W=W+Math.imul(h,P0)|0,W=W+Math.imul(n,N0)|0,z=z+Math.imul(n,P0)|0,K=K+Math.imul(a,L0)|0,W=W+Math.imul(a,D0)|0,W=W+Math.imul(t,L0)|0,z=z+Math.imul(t,D0)|0,K=K+Math.imul(T,k0)|0,W=W+Math.imul(T,B0)|0,W=W+Math.imul(y,k0)|0,z=z+Math.imul(y,B0)|0;var r0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(r0>>>26)|0,r0&=67108863,K=Math.imul(V0,U0),W=Math.imul(V0,j0),W=W+Math.imul(W0,U0)|0,z=Math.imul(W0,j0),K=K+Math.imul(E,C0)|0,W=W+Math.imul(E,H0)|0,W=W+Math.imul(d,C0)|0,z=z+Math.imul(d,H0)|0,K=K+Math.imul(G0,N0)|0,W=W+Math.imul(G0,P0)|0,W=W+Math.imul(F0,N0)|0,z=z+Math.imul(F0,P0)|0,K=K+Math.imul(h,L0)|0,W=W+Math.imul(h,D0)|0,W=W+Math.imul(n,L0)|0,z=z+Math.imul(n,D0)|0,K=K+Math.imul(a,k0)|0,W=W+Math.imul(a,B0)|0,W=W+Math.imul(t,k0)|0,z=z+Math.imul(t,B0)|0,K=K+Math.imul(T,R0)|0,W=W+Math.imul(T,I0)|0,W=W+Math.imul(y,R0)|0,z=z+Math.imul(y,I0)|0;var i0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(i0>>>26)|0,i0&=67108863,K=Math.imul(Y0,U0),W=Math.imul(Y0,j0),W=W+Math.imul(X0,U0)|0,z=Math.imul(X0,j0),K=K+Math.imul(V0,C0)|0,W=W+Math.imul(V0,H0)|0,W=W+Math.imul(W0,C0)|0,z=z+Math.imul(W0,H0)|0,K=K+Math.imul(E,N0)|0,W=W+Math.imul(E,P0)|0,W=W+Math.imul(d,N0)|0,z=z+Math.imul(d,P0)|0,K=K+Math.imul(G0,L0)|0,W=W+Math.imul(G0,D0)|0,W=W+Math.imul(F0,L0)|0,z=z+Math.imul(F0,D0)|0,K=K+Math.imul(h,k0)|0,W=W+Math.imul(h,B0)|0,W=W+Math.imul(n,k0)|0,z=z+Math.imul(n,B0)|0,K=K+Math.imul(a,R0)|0,W=W+Math.imul(a,I0)|0,W=W+Math.imul(t,R0)|0,z=z+Math.imul(t,I0)|0,K=K+Math.imul(T,T0)|0,W=W+Math.imul(T,M0)|0,W=W+Math.imul(y,T0)|0,z=z+Math.imul(y,M0)|0;var s0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(s0>>>26)|0,s0&=67108863,K=Math.imul($0,U0),W=Math.imul($0,j0),W=W+Math.imul(z0,U0)|0,z=Math.imul(z0,j0),K=K+Math.imul(Y0,C0)|0,W=W+Math.imul(Y0,H0)|0,W=W+Math.imul(X0,C0)|0,z=z+Math.imul(X0,H0)|0,K=K+Math.imul(V0,N0)|0,W=W+Math.imul(V0,P0)|0,W=W+Math.imul(W0,N0)|0,z=z+Math.imul(W0,P0)|0,K=K+Math.imul(E,L0)|0,W=W+Math.imul(E,D0)|0,W=W+Math.imul(d,L0)|0,z=z+Math.imul(d,D0)|0,K=K+Math.imul(G0,k0)|0,W=W+Math.imul(G0,B0)|0,W=W+Math.imul(F0,k0)|0,z=z+Math.imul(F0,B0)|0,K=K+Math.imul(h,R0)|0,W=W+Math.imul(h,I0)|0,W=W+Math.imul(n,R0)|0,z=z+Math.imul(n,I0)|0,K=K+Math.imul(a,T0)|0,W=W+Math.imul(a,M0)|0,W=W+Math.imul(t,T0)|0,z=z+Math.imul(t,M0)|0,K=K+Math.imul(T,A0)|0,W=W+Math.imul(T,v0)|0,W=W+Math.imul(y,A0)|0,z=z+Math.imul(y,v0)|0;var t0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(t0>>>26)|0,t0&=67108863,K=Math.imul(I,U0),W=Math.imul(I,j0),W=W+Math.imul(S,U0)|0,z=Math.imul(S,j0),K=K+Math.imul($0,C0)|0,W=W+Math.imul($0,H0)|0,W=W+Math.imul(z0,C0)|0,z=z+Math.imul(z0,H0)|0,K=K+Math.imul(Y0,N0)|0,W=W+Math.imul(Y0,P0)|0,W=W+Math.imul(X0,N0)|0,z=z+Math.imul(X0,P0)|0,K=K+Math.imul(V0,L0)|0,W=W+Math.imul(V0,D0)|0,W=W+Math.imul(W0,L0)|0,z=z+Math.imul(W0,D0)|0,K=K+Math.imul(E,k0)|0,W=W+Math.imul(E,B0)|0,W=W+Math.imul(d,k0)|0,z=z+Math.imul(d,B0)|0,K=K+Math.imul(G0,R0)|0,W=W+Math.imul(G0,I0)|0,W=W+Math.imul(F0,R0)|0,z=z+Math.imul(F0,I0)|0,K=K+Math.imul(h,T0)|0,W=W+Math.imul(h,M0)|0,W=W+Math.imul(n,T0)|0,z=z+Math.imul(n,M0)|0,K=K+Math.imul(a,A0)|0,W=W+Math.imul(a,v0)|0,W=W+Math.imul(t,A0)|0,z=z+Math.imul(t,v0)|0,K=K+Math.imul(T,x0)|0,W=W+Math.imul(T,S0)|0,W=W+Math.imul(y,x0)|0,z=z+Math.imul(y,S0)|0;var e0=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(e0>>>26)|0,e0&=67108863,K=Math.imul(o,U0),W=Math.imul(o,j0),W=W+Math.imul(i,U0)|0,z=Math.imul(i,j0),K=K+Math.imul(I,C0)|0,W=W+Math.imul(I,H0)|0,W=W+Math.imul(S,C0)|0,z=z+Math.imul(S,H0)|0,K=K+Math.imul($0,N0)|0,W=W+Math.imul($0,P0)|0,W=W+Math.imul(z0,N0)|0,z=z+Math.imul(z0,P0)|0,K=K+Math.imul(Y0,L0)|0,W=W+Math.imul(Y0,D0)|0,W=W+Math.imul(X0,L0)|0,z=z+Math.imul(X0,D0)|0,K=K+Math.imul(V0,k0)|0,W=W+Math.imul(V0,B0)|0,W=W+Math.imul(W0,k0)|0,z=z+Math.imul(W0,B0)|0,K=K+Math.imul(E,R0)|0,W=W+Math.imul(E,I0)|0,W=W+Math.imul(d,R0)|0,z=z+Math.imul(d,I0)|0,K=K+Math.imul(G0,T0)|0,W=W+Math.imul(G0,M0)|0,W=W+Math.imul(F0,T0)|0,z=z+Math.imul(F0,M0)|0,K=K+Math.imul(h,A0)|0,W=W+Math.imul(h,v0)|0,W=W+Math.imul(n,A0)|0,z=z+Math.imul(n,v0)|0,K=K+Math.imul(a,x0)|0,W=W+Math.imul(a,S0)|0,W=W+Math.imul(t,x0)|0,z=z+Math.imul(t,S0)|0,K=K+Math.imul(T,E0)|0,W=W+Math.imul(T,w0)|0,W=W+Math.imul(y,E0)|0,z=z+Math.imul(y,w0)|0;var Q6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Q6>>>26)|0,Q6&=67108863,K=Math.imul(o,C0),W=Math.imul(o,H0),W=W+Math.imul(i,C0)|0,z=Math.imul(i,H0),K=K+Math.imul(I,N0)|0,W=W+Math.imul(I,P0)|0,W=W+Math.imul(S,N0)|0,z=z+Math.imul(S,P0)|0,K=K+Math.imul($0,L0)|0,W=W+Math.imul($0,D0)|0,W=W+Math.imul(z0,L0)|0,z=z+Math.imul(z0,D0)|0,K=K+Math.imul(Y0,k0)|0,W=W+Math.imul(Y0,B0)|0,W=W+Math.imul(X0,k0)|0,z=z+Math.imul(X0,B0)|0,K=K+Math.imul(V0,R0)|0,W=W+Math.imul(V0,I0)|0,W=W+Math.imul(W0,R0)|0,z=z+Math.imul(W0,I0)|0,K=K+Math.imul(E,T0)|0,W=W+Math.imul(E,M0)|0,W=W+Math.imul(d,T0)|0,z=z+Math.imul(d,M0)|0,K=K+Math.imul(G0,A0)|0,W=W+Math.imul(G0,v0)|0,W=W+Math.imul(F0,A0)|0,z=z+Math.imul(F0,v0)|0,K=K+Math.imul(h,x0)|0,W=W+Math.imul(h,S0)|0,W=W+Math.imul(n,x0)|0,z=z+Math.imul(n,S0)|0,K=K+Math.imul(a,E0)|0,W=W+Math.imul(a,w0)|0,W=W+Math.imul(t,E0)|0,z=z+Math.imul(t,w0)|0;var W6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(W6>>>26)|0,W6&=67108863,K=Math.imul(o,N0),W=Math.imul(o,P0),W=W+Math.imul(i,N0)|0,z=Math.imul(i,P0),K=K+Math.imul(I,L0)|0,W=W+Math.imul(I,D0)|0,W=W+Math.imul(S,L0)|0,z=z+Math.imul(S,D0)|0,K=K+Math.imul($0,k0)|0,W=W+Math.imul($0,B0)|0,W=W+Math.imul(z0,k0)|0,z=z+Math.imul(z0,B0)|0,K=K+Math.imul(Y0,R0)|0,W=W+Math.imul(Y0,I0)|0,W=W+Math.imul(X0,R0)|0,z=z+Math.imul(X0,I0)|0,K=K+Math.imul(V0,T0)|0,W=W+Math.imul(V0,M0)|0,W=W+Math.imul(W0,T0)|0,z=z+Math.imul(W0,M0)|0,K=K+Math.imul(E,A0)|0,W=W+Math.imul(E,v0)|0,W=W+Math.imul(d,A0)|0,z=z+Math.imul(d,v0)|0,K=K+Math.imul(G0,x0)|0,W=W+Math.imul(G0,S0)|0,W=W+Math.imul(F0,x0)|0,z=z+Math.imul(F0,S0)|0,K=K+Math.imul(h,E0)|0,W=W+Math.imul(h,w0)|0,W=W+Math.imul(n,E0)|0,z=z+Math.imul(n,w0)|0;var G6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(G6>>>26)|0,G6&=67108863,K=Math.imul(o,L0),W=Math.imul(o,D0),W=W+Math.imul(i,L0)|0,z=Math.imul(i,D0),K=K+Math.imul(I,k0)|0,W=W+Math.imul(I,B0)|0,W=W+Math.imul(S,k0)|0,z=z+Math.imul(S,B0)|0,K=K+Math.imul($0,R0)|0,W=W+Math.imul($0,I0)|0,W=W+Math.imul(z0,R0)|0,z=z+Math.imul(z0,I0)|0,K=K+Math.imul(Y0,T0)|0,W=W+Math.imul(Y0,M0)|0,W=W+Math.imul(X0,T0)|0,z=z+Math.imul(X0,M0)|0,K=K+Math.imul(V0,A0)|0,W=W+Math.imul(V0,v0)|0,W=W+Math.imul(W0,A0)|0,z=z+Math.imul(W0,v0)|0,K=K+Math.imul(E,x0)|0,W=W+Math.imul(E,S0)|0,W=W+Math.imul(d,x0)|0,z=z+Math.imul(d,S0)|0,K=K+Math.imul(G0,E0)|0,W=W+Math.imul(G0,w0)|0,W=W+Math.imul(F0,E0)|0,z=z+Math.imul(F0,w0)|0;var X6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(X6>>>26)|0,X6&=67108863,K=Math.imul(o,k0),W=Math.imul(o,B0),W=W+Math.imul(i,k0)|0,z=Math.imul(i,B0),K=K+Math.imul(I,R0)|0,W=W+Math.imul(I,I0)|0,W=W+Math.imul(S,R0)|0,z=z+Math.imul(S,I0)|0,K=K+Math.imul($0,T0)|0,W=W+Math.imul($0,M0)|0,W=W+Math.imul(z0,T0)|0,z=z+Math.imul(z0,M0)|0,K=K+Math.imul(Y0,A0)|0,W=W+Math.imul(Y0,v0)|0,W=W+Math.imul(X0,A0)|0,z=z+Math.imul(X0,v0)|0,K=K+Math.imul(V0,x0)|0,W=W+Math.imul(V0,S0)|0,W=W+Math.imul(W0,x0)|0,z=z+Math.imul(W0,S0)|0,K=K+Math.imul(E,E0)|0,W=W+Math.imul(E,w0)|0,W=W+Math.imul(d,E0)|0,z=z+Math.imul(d,w0)|0;var Y6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(Y6>>>26)|0,Y6&=67108863,K=Math.imul(o,R0),W=Math.imul(o,I0),W=W+Math.imul(i,R0)|0,z=Math.imul(i,I0),K=K+Math.imul(I,T0)|0,W=W+Math.imul(I,M0)|0,W=W+Math.imul(S,T0)|0,z=z+Math.imul(S,M0)|0,K=K+Math.imul($0,A0)|0,W=W+Math.imul($0,v0)|0,W=W+Math.imul(z0,A0)|0,z=z+Math.imul(z0,v0)|0,K=K+Math.imul(Y0,x0)|0,W=W+Math.imul(Y0,S0)|0,W=W+Math.imul(X0,x0)|0,z=z+Math.imul(X0,S0)|0,K=K+Math.imul(V0,E0)|0,W=W+Math.imul(V0,w0)|0,W=W+Math.imul(W0,E0)|0,z=z+Math.imul(W0,w0)|0;var V6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(V6>>>26)|0,V6&=67108863,K=Math.imul(o,T0),W=Math.imul(o,M0),W=W+Math.imul(i,T0)|0,z=Math.imul(i,M0),K=K+Math.imul(I,A0)|0,W=W+Math.imul(I,v0)|0,W=W+Math.imul(S,A0)|0,z=z+Math.imul(S,v0)|0,K=K+Math.imul($0,x0)|0,W=W+Math.imul($0,S0)|0,W=W+Math.imul(z0,x0)|0,z=z+Math.imul(z0,S0)|0,K=K+Math.imul(Y0,E0)|0,W=W+Math.imul(Y0,w0)|0,W=W+Math.imul(X0,E0)|0,z=z+Math.imul(X0,w0)|0;var J6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(J6>>>26)|0,J6&=67108863,K=Math.imul(o,A0),W=Math.imul(o,v0),W=W+Math.imul(i,A0)|0,z=Math.imul(i,v0),K=K+Math.imul(I,x0)|0,W=W+Math.imul(I,S0)|0,W=W+Math.imul(S,x0)|0,z=z+Math.imul(S,S0)|0,K=K+Math.imul($0,E0)|0,W=W+Math.imul($0,w0)|0,W=W+Math.imul(z0,E0)|0,z=z+Math.imul(z0,w0)|0;var U6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(U6>>>26)|0,U6&=67108863,K=Math.imul(o,x0),W=Math.imul(o,S0),W=W+Math.imul(i,x0)|0,z=Math.imul(i,S0),K=K+Math.imul(I,E0)|0,W=W+Math.imul(I,w0)|0,W=W+Math.imul(S,E0)|0,z=z+Math.imul(S,w0)|0;var F6=(j+K|0)+((W&8191)<<13)|0;j=(z+(W>>>13)|0)+(F6>>>26)|0,F6&=67108863,K=Math.imul(o,E0),W=Math.imul(o,w0),W=W+Math.imul(i,E0)|0,z=Math.imul(i,w0);var K6=(j+K|0)+((W&8191)<<13)|0;return j=(z+(W>>>13)|0)+(K6>>>26)|0,K6&=67108863,$[0]=z6,$[1]=p0,$[2]=b0,$[3]=n0,$[4]=r0,$[5]=i0,$[6]=s0,$[7]=t0,$[8]=e0,$[9]=Q6,$[10]=W6,$[11]=G6,$[12]=X6,$[13]=Y6,$[14]=V6,$[15]=J6,$[16]=U6,$[17]=F6,$[18]=K6,j!==0&&($[19]=j,J.length++),J};Math.imul||(M=v);function w(Q,G,J){J.negative=G.negative^Q.negative,J.length=Q.length+G.length;for(var X=0,U=0,$=0;$<J.length-1;$++){var j=U;U=0;for(var K=X&67108863,W=Math.min($,G.length-1),z=Math.max(0,$-Q.length+1);z<=W;z++){var A=$-z,T=Q.words[A]|0,y=G.words[z]|0,r=T*y,a=r&67108863;j=j+(r/67108864|0)|0,a=a+K|0,K=a&67108863,j=j+(a>>>26)|0,U+=j>>>26,j&=67108863}J.words[$]=K,X=j,j=U}return X!==0?J.words[$]=X:J.length--,J.strip()}function x(Q,G,J){var X=new g;return X.mulp(Q,G,J)}V.prototype.mulTo=function(Q,G){var J,X=this.length+Q.length;return this.length===10&&Q.length===10?J=M(this,Q,G):X<63?J=v(this,Q,G):X<1024?J=w(this,Q,G):J=x(this,Q,G),J};function g(Q,G){this.x=Q,this.y=G}g.prototype.makeRBT=function(Q){for(var G=new Array(Q),J=V.prototype._countBits(Q)-1,X=0;X<Q;X++)G[X]=this.revBin(X,J,Q);return G},g.prototype.revBin=function(Q,G,J){if(Q===0||Q===J-1)return Q;for(var X=0,U=0;U<G;U++)X|=(Q&1)<<G-U-1,Q>>=1;return X},g.prototype.permute=function(Q,G,J,X,U,$){for(var j=0;j<$;j++)X[j]=G[Q[j]],U[j]=J[Q[j]]},g.prototype.transform=function(Q,G,J,X,U,$){this.permute($,Q,G,J,X,U);for(var j=1;j<U;j<<=1)for(var K=j<<1,W=Math.cos(2*Math.PI/K),z=Math.sin(2*Math.PI/K),A=0;A<U;A+=K)for(var T=W,y=z,r=0;r<j;r++){var a=J[A+r],t=X[A+r],l=J[A+r+j],h=X[A+r+j],n=T*l-y*h;h=T*h+y*l,l=n,J[A+r]=a+l,X[A+r]=t+h,J[A+r+j]=a-l,X[A+r+j]=t-h,r!==K&&(n=W*T-z*y,y=W*y+z*T,T=n)}},g.prototype.guessLen13b=function(Q,G){var J=Math.max(G,Q)|1,X=J&1,U=0;for(J=J/2|0;J;J=J>>>1)U++;return 1<<U+1+X},g.prototype.conjugate=function(Q,G,J){if(!(J<=1))for(var X=0;X<J/2;X++){var U=Q[X];Q[X]=Q[J-X-1],Q[J-X-1]=U,U=G[X],G[X]=-G[J-X-1],G[J-X-1]=-U}},g.prototype.normalize13b=function(Q,G){for(var J=0,X=0;X<G/2;X++){var U=Math.round(Q[2*X+1]/G)*8192+Math.round(Q[2*X]/G)+J;Q[X]=U&67108863,U<67108864?J=0:J=U/67108864|0}return Q},g.prototype.convert13b=function(Q,G,J,X){for(var U=0,$=0;$<G;$++)U=U+(Q[$]|0),J[2*$]=U&8191,U=U>>>13,J[2*$+1]=U&8191,U=U>>>13;for($=2*G;$<X;++$)J[$]=0;Z(U===0),Z((U&-8192)===0)},g.prototype.stub=function(Q){for(var G=new Array(Q),J=0;J<Q;J++)G[J]=0;return G},g.prototype.mulp=function(Q,G,J){var X=2*this.guessLen13b(Q.length,G.length),U=this.makeRBT(X),$=this.stub(X),j=new Array(X),K=new Array(X),W=new Array(X),z=new Array(X),A=new Array(X),T=new Array(X),y=J.words;y.length=X,this.convert13b(Q.words,Q.length,j,X),this.convert13b(G.words,G.length,z,X),this.transform(j,$,K,W,X,U),this.transform(z,$,A,T,X,U);for(var r=0;r<X;r++){var a=K[r]*A[r]-W[r]*T[r];W[r]=K[r]*T[r]+W[r]*A[r],K[r]=a}return this.conjugate(K,W,X),this.transform(K,W,y,$,X,U),this.conjugate(y,$,X),this.normalize13b(y,X),J.negative=Q.negative^G.negative,J.length=Q.length+G.length,J.strip()},V.prototype.mul=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),this.mulTo(Q,G)},V.prototype.mulf=function(Q){var G=new V(null);return G.words=new Array(this.length+Q.length),x(this,Q,G)},V.prototype.imul=function(Q){return this.clone().mulTo(Q,this)},V.prototype.imuln=function(Q){Z(typeof Q=="number"),Z(Q<67108864);for(var G=0,J=0;J<this.length;J++){var X=(this.words[J]|0)*Q,U=(X&67108863)+(G&67108863);G>>=26,G+=X/67108864|0,G+=U>>>26,this.words[J]=U&67108863}return G!==0&&(this.words[J]=G,this.length++),this},V.prototype.muln=function(Q){return this.clone().imuln(Q)},V.prototype.sqr=function(){return this.mul(this)},V.prototype.isqr=function(){return this.imul(this.clone())},V.prototype.pow=function(Q){var G=k(Q);if(G.length===0)return new V(1);for(var J=this,X=0;X<G.length&&G[X]===0;X++,J=J.sqr());if(++X<G.length)for(var U=J.sqr();X<G.length;X++,U=U.sqr())G[X]!==0&&(J=J.mul(U));return J},V.prototype.iushln=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=67108863>>>26-G<<26-G,U;if(G!==0){var $=0;for(U=0;U<this.length;U++){var j=this.words[U]&X,K=(this.words[U]|0)-j<<G;this.words[U]=K|$,$=j>>>26-G}$&&(this.words[U]=$,this.length++)}if(J!==0){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U<J;U++)this.words[U]=0;this.length+=J}return this.strip()},V.prototype.ishln=function(Q){return Z(this.negative===0),this.iushln(Q)},V.prototype.iushrn=function(Q,G,J){Z(typeof Q=="number"&&Q>=0);var X;G?X=(G-G%26)/26:X=0;var U=Q%26,$=Math.min((Q-U)/26,this.length),j=67108863^67108863>>>U<<U,K=J;if(X-=$,X=Math.max(0,X),K){for(var W=0;W<$;W++)K.words[W]=this.words[W];K.length=$}if($!==0)if(this.length>$)for(this.length-=$,W=0;W<this.length;W++)this.words[W]=this.words[W+$];else this.words[0]=0,this.length=1;var z=0;for(W=this.length-1;W>=0&&(z!==0||W>=X);W--){var A=this.words[W]|0;this.words[W]=z<<26-U|A>>>U,z=A&j}return K&&z!==0&&(K.words[K.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},V.prototype.ishrn=function(Q,G,J){return Z(this.negative===0),this.iushrn(Q,G,J)},V.prototype.shln=function(Q){return this.clone().ishln(Q)},V.prototype.ushln=function(Q){return this.clone().iushln(Q)},V.prototype.shrn=function(Q){return this.clone().ishrn(Q)},V.prototype.ushrn=function(Q){return this.clone().iushrn(Q)},V.prototype.testn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return!1;var U=this.words[J];return!!(U&X)},V.prototype.imaskn=function(Q){Z(typeof Q=="number"&&Q>=0);var G=Q%26,J=(Q-G)/26;if(Z(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(G!==0&&J++,this.length=Math.min(J,this.length),G!==0){var X=67108863^67108863>>>G<<G;this.words[this.length-1]&=X}return this.strip()},V.prototype.maskn=function(Q){return this.clone().imaskn(Q)},V.prototype.iaddn=function(Q){return Z(typeof Q=="number"),Z(Q<67108864),Q<0?this.isubn(-Q):this.negative!==0?this.length===1&&(this.words[0]|0)<Q?(this.words[0]=Q-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(Q),this.negative=1,this):this._iaddn(Q)},V.prototype._iaddn=function(Q){this.words[0]+=Q;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},V.prototype.isubn=function(Q){if(Z(typeof Q=="number"),Z(Q<67108864),Q<0)return this.iaddn(-Q);if(this.negative!==0)return this.negative=0,this.iaddn(Q),this.negative=1,this;if(this.words[0]-=Q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},V.prototype.addn=function(Q){return this.clone().iaddn(Q)},V.prototype.subn=function(Q){return this.clone().isubn(Q)},V.prototype.iabs=function(){return this.negative=0,this},V.prototype.abs=function(){return this.clone().iabs()},V.prototype._ishlnsubmul=function(Q,G,J){var X=Q.length+J,U;this._expand(X);var $,j=0;for(U=0;U<Q.length;U++){$=(this.words[U+J]|0)+j;var K=(Q.words[U]|0)*G;$-=K&67108863,j=($>>26)-(K/67108864|0),this.words[U+J]=$&67108863}for(;U<this.length-J;U++)$=(this.words[U+J]|0)+j,j=$>>26,this.words[U+J]=$&67108863;if(j===0)return this.strip();for(Z(j===-1),j=0,U=0;U<this.length;U++)$=-(this.words[U]|0)+j,j=$>>26,this.words[U]=$&67108863;return this.negative=1,this.strip()},V.prototype._wordDiv=function(Q,G){var J=this.length-Q.length,X=this.clone(),U=Q,$=U.words[U.length-1]|0,j=this._countBits($);J=26-j,J!==0&&(U=U.ushln(J),X.iushln(J),$=U.words[U.length-1]|0);var K=X.length-U.length,W;if(G!=="mod"){W=new V(null),W.length=K+1,W.words=new Array(W.length);for(var z=0;z<W.length;z++)W.words[z]=0}var A=X.clone()._ishlnsubmul(U,1,K);A.negative===0&&(X=A,W&&(W.words[K]=1));for(var T=K-1;T>=0;T--){var y=(X.words[U.length+T]|0)*67108864+(X.words[U.length+T-1]|0);for(y=Math.min(y/$|0,67108863),X._ishlnsubmul(U,y,T);X.negative!==0;)y--,X.negative=0,X._ishlnsubmul(U,1,T),X.isZero()||(X.negative^=1);W&&(W.words[T]=y)}return W&&W.strip(),X.strip(),G!=="div"&&J!==0&&X.iushrn(J),{div:W||null,mod:X}},V.prototype.divmod=function(Q,G,J){if(Z(!Q.isZero()),this.isZero())return{div:new V(0),mod:new V(0)};var X,U,$;return this.negative!==0&&Q.negative===0?($=this.neg().divmod(Q,G),G!=="mod"&&(X=$.div.neg()),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.iadd(Q)),{div:X,mod:U}):this.negative===0&&Q.negative!==0?($=this.divmod(Q.neg(),G),G!=="mod"&&(X=$.div.neg()),{div:X,mod:$.mod}):(this.negative&Q.negative)!==0?($=this.neg().divmod(Q.neg(),G),G!=="div"&&(U=$.mod.neg(),J&&U.negative!==0&&U.isub(Q)),{div:$.div,mod:U}):Q.length>this.length||this.cmp(Q)<0?{div:new V(0),mod:this}:Q.length===1?G==="div"?{div:this.divn(Q.words[0]),mod:null}:G==="mod"?{div:null,mod:new V(this.modn(Q.words[0]))}:{div:this.divn(Q.words[0]),mod:new V(this.modn(Q.words[0]))}:this._wordDiv(Q,G)},V.prototype.div=function(Q){return this.divmod(Q,"div",!1).div},V.prototype.mod=function(Q){return this.divmod(Q,"mod",!1).mod},V.prototype.umod=function(Q){return this.divmod(Q,"mod",!0).mod},V.prototype.divRound=function(Q){var G=this.divmod(Q);if(G.mod.isZero())return G.div;var J=G.div.negative!==0?G.mod.isub(Q):G.mod,X=Q.ushrn(1),U=Q.andln(1),$=J.cmp(X);return $<0||U===1&&$===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},V.prototype.modn=function(Q){Z(Q<=67108863);for(var G=(1<<26)%Q,J=0,X=this.length-1;X>=0;X--)J=(G*J+(this.words[X]|0))%Q;return J},V.prototype.idivn=function(Q){Z(Q<=67108863);for(var G=0,J=this.length-1;J>=0;J--){var X=(this.words[J]|0)+G*67108864;this.words[J]=X/Q|0,G=X%Q}return this.strip()},V.prototype.divn=function(Q){return this.clone().idivn(Q)},V.prototype.egcd=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=new V(0),j=new V(1),K=0;G.isEven()&&J.isEven();)G.iushrn(1),J.iushrn(1),++K;for(var W=J.clone(),z=G.clone();!G.isZero();){for(var A=0,T=1;(G.words[0]&T)===0&&A<26;++A,T<<=1);if(A>0)for(G.iushrn(A);A-- >0;)(X.isOdd()||U.isOdd())&&(X.iadd(W),U.isub(z)),X.iushrn(1),U.iushrn(1);for(var y=0,r=1;(J.words[0]&r)===0&&y<26;++y,r<<=1);if(y>0)for(J.iushrn(y);y-- >0;)($.isOdd()||j.isOdd())&&($.iadd(W),j.isub(z)),$.iushrn(1),j.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub($),U.isub(j)):(J.isub(G),$.isub(X),j.isub(U))}return{a:$,b:j,gcd:J.iushln(K)}},V.prototype._invmp=function(Q){Z(Q.negative===0),Z(!Q.isZero());var G=this,J=Q.clone();G.negative!==0?G=G.umod(Q):G=G.clone();for(var X=new V(1),U=new V(0),$=J.clone();G.cmpn(1)>0&&J.cmpn(1)>0;){for(var j=0,K=1;(G.words[0]&K)===0&&j<26;++j,K<<=1);if(j>0)for(G.iushrn(j);j-- >0;)X.isOdd()&&X.iadd($),X.iushrn(1);for(var W=0,z=1;(J.words[0]&z)===0&&W<26;++W,z<<=1);if(W>0)for(J.iushrn(W);W-- >0;)U.isOdd()&&U.iadd($),U.iushrn(1);G.cmp(J)>=0?(G.isub(J),X.isub(U)):(J.isub(G),U.isub(X))}var A;return G.cmpn(1)===0?A=X:A=U,A.cmpn(0)<0&&A.iadd(Q),A},V.prototype.gcd=function(Q){if(this.isZero())return Q.abs();if(Q.isZero())return this.abs();var G=this.clone(),J=Q.clone();G.negative=0,J.negative=0;for(var X=0;G.isEven()&&J.isEven();X++)G.iushrn(1),J.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;J.isEven();)J.iushrn(1);var U=G.cmp(J);if(U<0){var $=G;G=J,J=$}else if(U===0||J.cmpn(1)===0)break;G.isub(J)}while(!0);return J.iushln(X)},V.prototype.invm=function(Q){return this.egcd(Q).a.umod(Q)},V.prototype.isEven=function(){return(this.words[0]&1)===0},V.prototype.isOdd=function(){return(this.words[0]&1)===1},V.prototype.andln=function(Q){return this.words[0]&Q},V.prototype.bincn=function(Q){Z(typeof Q=="number");var G=Q%26,J=(Q-G)/26,X=1<<G;if(this.length<=J)return this._expand(J+1),this.words[J]|=X,this;for(var U=X,$=J;U!==0&&$<this.length;$++){var j=this.words[$]|0;j+=U,U=j>>>26,j&=67108863,this.words[$]=j}return U!==0&&(this.words[$]=U,this.length++),this},V.prototype.isZero=function(){return this.length===1&&this.words[0]===0},V.prototype.cmpn=function(Q){var G=Q<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var J;if(this.length>1)J=1;else{G&&(Q=-Q),Z(Q<=67108863,"Number is too big");var X=this.words[0]|0;J=X===Q?0:X<Q?-1:1}return this.negative!==0?-J|0:J},V.prototype.cmp=function(Q){if(this.negative!==0&&Q.negative===0)return-1;if(this.negative===0&&Q.negative!==0)return 1;var G=this.ucmp(Q);return this.negative!==0?-G|0:G},V.prototype.ucmp=function(Q){if(this.length>Q.length)return 1;if(this.length<Q.length)return-1;for(var G=0,J=this.length-1;J>=0;J--){var X=this.words[J]|0,U=Q.words[J]|0;if(X!==U){X<U?G=-1:X>U&&(G=1);break}}return G},V.prototype.gtn=function(Q){return this.cmpn(Q)===1},V.prototype.gt=function(Q){return this.cmp(Q)===1},V.prototype.gten=function(Q){return this.cmpn(Q)>=0},V.prototype.gte=function(Q){return this.cmp(Q)>=0},V.prototype.ltn=function(Q){return this.cmpn(Q)===-1},V.prototype.lt=function(Q){return this.cmp(Q)===-1},V.prototype.lten=function(Q){return this.cmpn(Q)<=0},V.prototype.lte=function(Q){return this.cmp(Q)<=0},V.prototype.eqn=function(Q){return this.cmpn(Q)===0},V.prototype.eq=function(Q){return this.cmp(Q)===0},V.red=function(Q){return new u(Q)},V.prototype.toRed=function(Q){return Z(!this.red,"Already a number in reduction context"),Z(this.negative===0,"red works only with positives"),Q.convertTo(this)._forceRed(Q)},V.prototype.fromRed=function(){return Z(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},V.prototype._forceRed=function(Q){return this.red=Q,this},V.prototype.forceRed=function(Q){return Z(!this.red,"Already a number in reduction context"),this._forceRed(Q)},V.prototype.redAdd=function(Q){return Z(this.red,"redAdd works only with red numbers"),this.red.add(this,Q)},V.prototype.redIAdd=function(Q){return Z(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Q)},V.prototype.redSub=function(Q){return Z(this.red,"redSub works only with red numbers"),this.red.sub(this,Q)},V.prototype.redISub=function(Q){return Z(this.red,"redISub works only with red numbers"),this.red.isub(this,Q)},V.prototype.redShl=function(Q){return Z(this.red,"redShl works only with red numbers"),this.red.shl(this,Q)},V.prototype.redMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.mul(this,Q)},V.prototype.redIMul=function(Q){return Z(this.red,"redMul works only with red numbers"),this.red._verify2(this,Q),this.red.imul(this,Q)},V.prototype.redSqr=function(){return Z(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},V.prototype.redISqr=function(){return Z(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},V.prototype.redSqrt=function(){return Z(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},V.prototype.redInvm=function(){return Z(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},V.prototype.redNeg=function(){return Z(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},V.prototype.redPow=function(Q){return Z(this.red&&!Q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Q)};var _={k256:null,p224:null,p192:null,p25519:null};function p(Q,G){this.name=Q,this.p=new V(G,16),this.n=this.p.bitLength(),this.k=new V(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var Q=new V(null);return Q.words=new Array(Math.ceil(this.n/13)),Q},p.prototype.ireduce=function(Q){var G=Q,J;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),J=G.bitLength();while(J>this.n);var X=J<this.n?-1:G.ucmp(this.p);return X===0?(G.words[0]=0,G.length=1):X>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},p.prototype.split=function(Q,G){Q.iushrn(this.n,0,G)},p.prototype.imulK=function(Q){return Q.imul(this.k)};function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}N(m,p),m.prototype.split=function(Q,G){for(var J=4194303,X=Math.min(Q.length,9),U=0;U<X;U++)G.words[U]=Q.words[U];if(G.length=X,Q.length<=9){Q.words[0]=0,Q.length=1;return}var $=Q.words[9];for(G.words[G.length++]=$&J,U=10;U<Q.length;U++){var j=Q.words[U]|0;Q.words[U-10]=(j&J)<<4|$>>>22,$=j}$>>>=22,Q.words[U-10]=$,$===0&&Q.length>10?Q.length-=10:Q.length-=9},m.prototype.imulK=function(Q){Q.words[Q.length]=0,Q.words[Q.length+1]=0,Q.length+=2;for(var G=0,J=0;J<Q.length;J++){var X=Q.words[J]|0;G+=X*977,Q.words[J]=G&67108863,G=X*64+(G/67108864|0)}return Q.words[Q.length-1]===0&&(Q.length--,Q.words[Q.length-1]===0&&Q.length--),Q};function f(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}N(f,p);function s(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}N(s,p);function Q0(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}N(Q0,p),Q0.prototype.imulK=function(Q){for(var G=0,J=0;J<Q.length;J++){var X=(Q.words[J]|0)*19+G,U=X&67108863;X>>>=26,Q.words[J]=U,G=X}return G!==0&&(Q.words[Q.length++]=G),Q},V._prime=function(Q){if(_[Q])return _[Q];var G;if(Q==="k256")G=new m;else if(Q==="p224")G=new f;else if(Q==="p192")G=new s;else if(Q==="p25519")G=new Q0;else throw new Error("Unknown prime "+Q);return _[Q]=G,G};function u(Q){if(typeof Q=="string"){var G=V._prime(Q);this.m=G.p,this.prime=G}else Z(Q.gtn(1),"modulus must be greater than 1"),this.m=Q,this.prime=null}u.prototype._verify1=function(Q){Z(Q.negative===0,"red works only with positives"),Z(Q.red,"red works only with red numbers")},u.prototype._verify2=function(Q,G){Z((Q.negative|G.negative)===0,"red works only with positives"),Z(Q.red&&Q.red===G.red,"red works only with red numbers")},u.prototype.imod=function(Q){return this.prime?this.prime.ireduce(Q)._forceRed(this):Q.umod(this.m)._forceRed(this)},u.prototype.neg=function(Q){return Q.isZero()?Q.clone():this.m.sub(Q)._forceRed(this)},u.prototype.add=function(Q,G){this._verify2(Q,G);var J=Q.add(G);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},u.prototype.iadd=function(Q,G){this._verify2(Q,G);var J=Q.iadd(G);return J.cmp(this.m)>=0&&J.isub(this.m),J},u.prototype.sub=function(Q,G){this._verify2(Q,G);var J=Q.sub(G);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},u.prototype.isub=function(Q,G){this._verify2(Q,G);var J=Q.isub(G);return J.cmpn(0)<0&&J.iadd(this.m),J},u.prototype.shl=function(Q,G){return this._verify1(Q),this.imod(Q.ushln(G))},u.prototype.imul=function(Q,G){return this._verify2(Q,G),this.imod(Q.imul(G))},u.prototype.mul=function(Q,G){return this._verify2(Q,G),this.imod(Q.mul(G))},u.prototype.isqr=function(Q){return this.imul(Q,Q.clone())},u.prototype.sqr=function(Q){return this.mul(Q,Q)},u.prototype.sqrt=function(Q){if(Q.isZero())return Q.clone();var G=this.m.andln(3);if(Z(G%2===1),G===3){var J=this.m.add(new V(1)).iushrn(2);return this.pow(Q,J)}for(var X=this.m.subn(1),U=0;!X.isZero()&&X.andln(1)===0;)U++,X.iushrn(1);Z(!X.isZero());var $=new V(1).toRed(this),j=$.redNeg(),K=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new V(2*W*W).toRed(this);this.pow(W,K).cmp(j)!==0;)W.redIAdd(j);for(var z=this.pow(W,X),A=this.pow(Q,X.addn(1).iushrn(1)),T=this.pow(Q,X),y=U;T.cmp($)!==0;){for(var r=T,a=0;r.cmp($)!==0;a++)r=r.redSqr();Z(a<y);var t=this.pow(z,new V(1).iushln(y-a-1));A=A.redMul(t),z=t.redSqr(),T=T.redMul(z),y=a}return A},u.prototype.invm=function(Q){var G=Q._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},u.prototype.pow=function(Q,G){if(G.isZero())return new V(1).toRed(this);if(G.cmpn(1)===0)return Q.clone();var J=4,X=new Array(1<<J);X[0]=new V(1).toRed(this),X[1]=Q;for(var U=2;U<X.length;U++)X[U]=this.mul(X[U-1],Q);var $=X[0],j=0,K=0,W=G.bitLength()%26;for(W===0&&(W=26),U=G.length-1;U>=0;U--){for(var z=G.words[U],A=W-1;A>=0;A--){var T=z>>A&1;if($!==X[0]&&($=this.sqr($)),T===0&&j===0){K=0;continue}j<<=1,j|=T,K++,!(K!==J&&(U!==0||A!==0))&&($=this.mul($,X[j]),K=0,j=0)}W=26}return $},u.prototype.convertTo=function(Q){var G=Q.umod(this.m);return G===Q?G.clone():G},u.prototype.convertFrom=function(Q){var G=Q.clone();return G.red=null,G},V.mont=function(Q){return new K0(Q)};function K0(Q){u.call(this,Q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new V(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}N(K0,u),K0.prototype.convertTo=function(Q){return this.imod(Q.ushln(this.shift))},K0.prototype.convertFrom=function(Q){var G=this.imod(Q.mul(this.rinv));return G.red=null,G},K0.prototype.imul=function(Q,G){if(Q.isZero()||G.isZero())return Q.words[0]=0,Q.length=1,Q;var J=Q.imul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.mul=function(Q,G){if(Q.isZero()||G.isZero())return new V(0)._forceRed(this);var J=Q.mul(G),X=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),U=J.isub(X).iushrn(this.shift),$=U;return U.cmp(this.m)>=0?$=U.isub(this.m):U.cmpn(0)<0&&($=U.iadd(this.m)),$._forceRed(this)},K0.prototype.invm=function(Q){var G=this.imod(Q._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(typeof q>"u"||q,Y)}),G2=Z0((Y,q)=>{var F=W9(),O=l0().Buffer;function Z(N,V){return O.from(N.toRed(F.mont(V.modulus)).redPow(new F(V.publicExponent)).fromRed().toArray())}q.exports=Z}),oY=Z0((Y,q)=>{var F=R7(),O=t8(),Z=w1(),N=Q2(),V=W2(),C=W9(),B=G2(),D=a5(),L=l0().Buffer;q.exports=function(k,v,M){var w;k.padding?w=k.padding:M?w=1:w=4;var x=F(k),g;if(w===4)g=H(x,v);else if(w===1)g=P(x,v,M);else if(w===3){if(g=new C(v),g.cmp(x.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return M?D(g,x):B(g,x)};function H(k,v){var M=k.modulus.byteLength(),w=v.length,x=Z("sha1").update(L.alloc(0)).digest(),g=x.length,_=2*g;if(w>M-_-2)throw new Error("message too long");var p=L.alloc(M-w-_-2),m=M-g-1,f=O(g),s=V(L.concat([x,p,L.alloc(1,1),v],m),N(f,m)),Q0=V(f,N(s,g));return new C(L.concat([L.alloc(1),Q0,s],M))}function P(k,v,M){var w=v.length,x=k.modulus.byteLength();if(w>x-11)throw new Error("message too long");var g;return M?g=L.alloc(x-w-3,255):g=R(x-w-3),new C(L.concat([L.from([0,M?1:2]),g,L.alloc(1),v],x))}function R(k){for(var v=L.allocUnsafe(k),M=0,w=O(k*2),x=0,g;M<k;)x===w.length&&(w=O(k*2),x=0),g=w[x++],g&&(v[M++]=g);return v}}),aY=Z0((Y,q)=>{var F=R7(),O=Q2(),Z=W2(),N=W9(),V=a5(),C=w1(),B=G2(),D=l0().Buffer;q.exports=function(R,k,v){var M;R.padding?M=R.padding:v?M=1:M=4;var w=F(R),x=w.modulus.byteLength();if(k.length>x||new N(k).cmp(w.modulus)>=0)throw new Error("decryption error");var g;v?g=B(new N(k),w):g=V(k,w);var _=D.alloc(x-g.length);if(g=D.concat([_,g],x),M===4)return L(w,g);if(M===1)return H(w,g,v);if(M===3)return g;throw new Error("unknown padding")};function L(R,k){var v=R.modulus.byteLength(),M=C("sha1").update(D.alloc(0)).digest(),w=M.length;if(k[0]!==0)throw new Error("decryption error");var x=k.slice(1,w+1),g=k.slice(w+1),_=Z(x,O(g,w)),p=Z(g,O(_,v-w-1));if(P(M,p.slice(0,w)))throw new Error("decryption error");for(var m=w;p[m]===0;)m++;if(p[m++]!==1)throw new Error("decryption error");return p.slice(m)}function H(R,k,v){for(var M=k.slice(0,2),w=2,x=0;k[w++]!==0;)if(w>=k.length){x++;break}var g=k.slice(2,w-1);if((M.toString("hex")!=="0002"&&!v||M.toString("hex")!=="0001"&&v)&&x++,g.length<8&&x++,x)throw new Error("decryption error");return k.slice(w)}function P(R,k){R=D.from(R),k=D.from(k);var v=0,M=R.length;R.length!==k.length&&(v++,M=Math.min(R.length,k.length));for(var w=-1;++w<M;)v+=R[w]^k[w];return v}}),nY=Z0((Y)=>{Y.publicEncrypt=oY(),Y.privateDecrypt=aY(),Y.privateEncrypt=function(q,F){return Y.publicEncrypt(q,F,!0)},Y.publicDecrypt=function(q,F){return Y.privateDecrypt(q,F,!0)}}),rY=Z0((Y)=>{function q(){throw new Error(`secure random number generation not supported by this browser
|
|
5
|
+
use chrome, FireFox or Internet Explorer 11`)}var F=l0(),O=t8(),Z=F.Buffer,N=F.kMaxLength,V=window.crypto||window.msCrypto,C=Math.pow(2,32)-1;function B(R,k){if(typeof R!="number"||R!==R)throw new TypeError("offset must be a number");if(R>C||R<0)throw new TypeError("offset must be a uint32");if(R>N||R>k)throw new RangeError("offset out of range")}function D(R,k,v){if(typeof R!="number"||R!==R)throw new TypeError("size must be a number");if(R>C||R<0)throw new TypeError("size must be a uint32");if(R+k>v||R>N)throw new RangeError("buffer too small")}V&&V.getRandomValues?(Y.randomFill=L,Y.randomFillSync=P):(Y.randomFill=q,Y.randomFillSync=q);function L(R,k,v,M){if(!Z.isBuffer(R)&&!(R instanceof window.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof k=="function")M=k,k=0,v=R.length;else if(typeof v=="function")M=v,v=R.length-k;else if(typeof M!="function")throw new TypeError('"cb" argument must be a function');return B(k,R.length),D(v,k,R.length),H(R,k,v,M)}function H(R,k,v,M){var w=R.buffer,x=new Uint8Array(w,k,v);if(V.getRandomValues(x),M){process.nextTick(function(){M(null,R)});return}return R;var g}function P(R,k,v){if(typeof k>"u"&&(k=0),!Z.isBuffer(R)&&!(R instanceof window.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return B(k,R.length),v===void 0&&(v=R.length-k),D(v,k,R.length),H(R,k,v)}}),X2=Z0((Y)=>{Y.randomBytes=Y.rng=Y.pseudoRandomBytes=Y.prng=t8(),Y.createHash=Y.Hash=w1(),Y.createHmac=Y.Hmac=N3();var q=hX(),F=Object.keys(q),O=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(F);Y.getHashes=function(){return O};var Z=T3();Y.pbkdf2=Z.pbkdf2,Y.pbkdf2Sync=Z.pbkdf2Sync;var N=GY();Y.Cipher=N.Cipher,Y.createCipher=N.createCipher,Y.Cipheriv=N.Cipheriv,Y.createCipheriv=N.createCipheriv,Y.Decipher=N.Decipher,Y.createDecipher=N.createDecipher,Y.Decipheriv=N.Decipheriv,Y.createDecipheriv=N.createDecipheriv,Y.getCiphers=N.getCiphers,Y.listCiphers=N.listCiphers;var V=UY();Y.DiffieHellmanGroup=V.DiffieHellmanGroup,Y.createDiffieHellmanGroup=V.createDiffieHellmanGroup,Y.getDiffieHellman=V.getDiffieHellman,Y.createDiffieHellman=V.createDiffieHellman,Y.DiffieHellman=V.DiffieHellman;var C=dY();Y.createSign=C.createSign,Y.Sign=C.Sign,Y.createVerify=C.createVerify,Y.Verify=C.Verify,Y.createECDH=fY();var B=nY();Y.publicEncrypt=B.publicEncrypt,Y.privateEncrypt=B.privateEncrypt,Y.publicDecrypt=B.publicDecrypt,Y.privateDecrypt=B.privateDecrypt;var D=rY();Y.randomFill=D.randomFill,Y.randomFillSync=D.randomFillSync,Y.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
|
|
6
6
|
`))},Y.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}}),Y2={};C7(Y2,{DEFAULT_ENCODING:()=>s8,default:()=>V2,getCurves:()=>Y9,getRandomValues:()=>G9,randomUUID:()=>X9,scrypt:()=>T7,scryptSync:()=>I7,timingSafeEqual:()=>E1,webcrypto:()=>V9});x5(Y2,v8(X2()));var iY=v8(X2()),s8="buffer",G9=(Y)=>crypto.getRandomValues(Y),X9=()=>crypto.randomUUID(),sY=["p192","p224","p256","p384","p521","curve25519","ed25519","secp256k1","secp224r1","prime256v1","prime192v1","ed25519","secp384r1","secp521r1"],E1="timingSafeEqual"in crypto?(Y,q)=>{let{byteLength:F}=Y,{byteLength:O}=q;if(typeof F!="number"||typeof O!="number")throw new TypeError("Input must be an array buffer view");if(F!==O)throw new RangeError("Input buffers must have the same length");return crypto.timingSafeEqual(Y,q)}:void 0,I7="scryptSync"in crypto?(Y,q,F,O)=>{let Z=crypto.scryptSync(Y,q,F,O);return s8!=="buffer"?new Buffer(Z).toString(s8):new Buffer(Z)}:void 0,T7="scryptSync"in crypto?function(Y,q,F,O,Z){if(typeof O=="function"&&(Z=O,O=void 0),typeof Z!="function"){var N=new TypeError("callback must be a function");throw N.code="ERR_INVALID_CALLBACK",N}try{let V=crypto.scryptSync(Y,q,F,O);process.nextTick(Z,null,s8!=="buffer"?new Buffer(V).toString(s8):new Buffer(V))}catch(V){throw V}}:void 0;E1&&(Object.defineProperty(E1,"name",{value:"::bunternal::"}),Object.defineProperty(T7,"name",{value:"::bunternal::"}),Object.defineProperty(I7,"name",{value:"::bunternal::"}));var V9=crypto,V2={...iY,getRandomValues:G9,randomUUID:X9,timingSafeEqual:E1,scryptSync:I7,scrypt:T7,webcrypto:V9,getCurves:Y9};/*!
|
|
7
7
|
* The buffer module from node.js, for the browser.
|
|
8
8
|
*
|
|
9
9
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
10
10
|
* @license MIT
|
|
11
|
-
*//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var z2=function(Y){const{a:q,b:F}=H6,O=y0(Y*Y),Z=y0(O*Y);return y0(Z+q*Y+F)},Z2=function(Y){if(!(Y instanceof o0))throw new TypeError("JacobianPoint expected")},v7=function(Y,q){const F=q.negate();return Y?F:q},$2=function(Y){return Number.parseInt(Y[0],16)>=8?"00"+Y:Y},q2=function(Y){if(Y.length<2||Y[0]!==2)throw new Error(`Invalid signature integer tag: ${V1(Y)}`);const q=Y[1],F=Y.subarray(2,q+2);if(!q||F.length!==q)throw new Error("Invalid signature integer: wrong length");if(F[0]===0&&F[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:b6(F),left:Y.subarray(q+2)}},tY=function(Y){if(Y.length<2||Y[0]!=48)throw new Error(`Invalid signature tag: ${V1(Y)}`);if(Y[1]!==Y.length-2)throw new Error("Invalid signature: incorrect length");const{data:q,left:F}=q2(Y.subarray(2)),{data:O,left:Z}=q2(F);if(Z.length)throw new Error(`Invalid signature: left bytes after parsing: ${V1(Z)}`);return{r:q,s:O}},h1=function(Y){return Y instanceof Uint8Array||ArrayBuffer.isView(Y)&&Y.constructor.name==="Uint8Array"},C2=function(Y){if(!h1(Y))throw new Error("Uint8Array expected")},_1=function(...Y){if(Y.every(C2),Y.length===1)return Y[0];const q=Y.reduce((O,Z)=>O+Z.length,0),F=new Uint8Array(q);for(let O=0,Z=0;O<Y.length;O++){const N=Y[O];F.set(N,Z),Z+=N.length}return F};function V1(Y){C2(Y);let q="";for(let F=0;F<Y.length;F++)q+=eY[Y[F]];return q}var j2=function(Y){if(Y>=Y8._0&&Y<=Y8._9)return Y-Y8._0;if(Y>=Y8.A&&Y<=Y8.F)return Y-(Y8.A-10);if(Y>=Y8.a&&Y<=Y8.f)return Y-(Y8.a-10);return};function C8(Y){if(typeof Y!=="string")throw new Error("hex string expected, got "+typeof Y);const q=Y.length,F=q/2;if(q%2)throw new Error("hex string expected, got unpadded hex of length "+q);const O=new Uint8Array(F);for(let Z=0,N=0;Z<F;Z++,N+=2){const V=j2(Y.charCodeAt(N)),C=j2(Y.charCodeAt(N+1));if(V===void 0||C===void 0){const B=Y[N]+Y[N+1];throw new Error('hex string expected, got non-hex character "'+B+'" at index '+N)}O[Z]=V*16+C}return O}var O8=function(Y){if(typeof Y!=="bigint")throw new Error("Expected bigint");if(!(d0<=Y&&Y<QV))throw new Error("Expected number 0 <= n < 2^256");return Y.toString(16).padStart(64,"0")},c1=function(Y){const q=C8(O8(Y));if(q.length!==32)throw new Error("Error: expected 32 bytes");return q},m1=function(Y){const q=Y.toString(16);return q.length&1?`0${q}`:q},E7=function(Y){if(typeof Y!=="string")throw new TypeError("hexToNumber: expected string, got "+typeof Y);return BigInt(`0x${Y}`)},b6=function(Y){return E7(V1(Y))},g8=function(Y){return h1(Y)?Uint8Array.from(Y):C8(Y)},H2=function(Y){if(typeof Y==="number"&&Number.isSafeInteger(Y)&&Y>0)return BigInt(Y);if(typeof Y==="bigint"&&l1(Y))return Y;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")},y0=function(Y,q=H6.P){const F=Y%q;return F>=d0?F:q+F},m6=function(Y,q){const{P:F}=H6;let O=Y;while(q-- >d0)O*=O,O%=F;return O},WV=function(Y){const{P:q}=H6,F=BigInt(6),O=BigInt(11),Z=BigInt(22),N=BigInt(23),V=BigInt(44),C=BigInt(88),B=Y*Y*Y%q,D=B*B*Y%q,L=m6(D,p1)*D%q,H=m6(L,p1)*D%q,P=m6(H,H8)*B%q,R=m6(P,O)*P%q,k=m6(R,Z)*R%q,v=m6(k,V)*k%q,M=m6(v,C)*v%q,w=m6(M,V)*k%q,x=m6(w,p1)*D%q,g=m6(x,N)*R%q,_=m6(g,F)*B%q,p=m6(_,H8);if(p*p%q!==Y)throw new Error("Cannot find square root");return p},g7=function(Y,q=H6.P){if(Y===d0||q<=d0)throw new Error(`invert: expected positive integers, got n=${Y} mod=${q}`);let F=y0(Y,q),O=q,Z=d0,N=j6,V=j6,C=d0;while(F!==d0){const D=O/F,L=O%F,H=Z-V*D,P=N-C*D;O=F,F=L,Z=V,N=C,V=H,C=P}if(O!==j6)throw new Error("invert: does not exist");return y0(Z,q)},GV=function(Y,q=H6.P){const F=new Array(Y.length),O=Y.reduce((N,V,C)=>{if(V===d0)return N;return F[C]=N,y0(N*V,q)},j6),Z=g7(O,q);return Y.reduceRight((N,V,C)=>{if(V===d0)return N;return F[C]=y0(N*F[C],q),y0(N*V,q)},Z),F},XV=function(Y){const q=Y.length*8-b1*8,F=b6(Y);return q>0?F>>BigInt(q):F},YV=function(Y,q=!1){const F=XV(Y);if(q)return F;const{n:O}=H6;return F>=O?F-O:F},l1=function(Y){return d0<Y&&Y<H6.n},S7=function(Y){return d0<Y&&Y<H6.P};var u1=function(Y){let q;if(typeof Y==="bigint")q=Y;else if(typeof Y==="number"&&Number.isSafeInteger(Y)&&Y>0)q=BigInt(Y);else if(typeof Y==="string"){if(Y.length!==2*b1)throw new Error("Expected 32 bytes of private key");q=E7(Y)}else if(h1(Y)){if(Y.length!==b1)throw new Error("Expected 32 bytes of private key");q=b6(Y)}else throw new TypeError("Expected valid private key");if(!l1(q))throw new Error("Expected private key: 0 < key < n");return q},VV=function(Y){if(Y instanceof Z6)return Y.assertValidity(),Y;else return Z6.fromHex(Y)},JV=function(Y){if(Y instanceof w8)return Y.assertValidity(),Y;try{return w8.fromDER(Y)}catch(q){return w8.fromCompact(Y)}};var w7=function(Y){return y0(b6(Y),H6.n)},UV=function(Y){return Z6.fromPrivateKey(Y).toRawX()};async function FV(Y,q,F){return new z9(Y,q,F).calc()}var KV=function(Y,q,F){return new z9(Y,q,F).calcSync()},O2=function(Y,q,F){const O=Y instanceof J1,Z=O?Y:J1.fromHex(Y);if(O)Z.assertValidity();return{...Z,m:g8(q),P:VV(F)}},D2=function(Y,q,F,O){const Z=Z6.BASE.multiplyAndAddUnsafe(q,u1(F),y0(-O,H6.n));if(!Z||!Z.hasEvenY()||Z.x!==Y)return!1;return!0};async function L2(Y,q,F){try{const{r:O,s:Z,m:N,P:V}=O2(Y,q,F),C=w7(await p6.taggedHash(j8.challenge,c1(O),V.toRawX(),N));return D2(O,V,Z,C)}catch(O){return!1}}var N2=function(Y,q,F){try{const{r:O,s:Z,m:N,P:V}=O2(Y,q,F),C=w7(p6.taggedHashSync(j8.challenge,c1(O),V.toRawX(),N));return D2(O,V,Z,C)}catch(O){if(O instanceof K9)throw O;return!1}};/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */var d0=BigInt(0),j6=BigInt(1),H8=BigInt(2),p1=BigInt(3),J2=BigInt(8),H6=Object.freeze({a:d0,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:j6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),U2=(Y,q)=>(Y+q/H8)/q,M7={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(Y){const{n:q}=H6,F=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),O=-j6*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Z=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),N=F,V=BigInt("0x100000000000000000000000000000000"),C=U2(N*Y,q),B=U2(-O*Y,q);let D=y0(Y-C*F-B*Z,q),L=y0(-C*O-B*N,q);const H=D>V,P=L>V;if(H)D=q-D;if(P)L=q-L;if(D>V||L>V)throw new Error("splitScalarEndo: Endomorphism failed, k="+Y);return{k1neg:H,k1:D,k2neg:P,k2:L}}},X1=32,b1=32;var F2=X1+1,K2=2*X1+1;var A7=H6.a===d0;class K9 extends Error{constructor(Y){super(Y)}}class o0{constructor(Y,q,F){this.x=Y,this.y=q,this.z=F}static fromAffine(Y){if(!(Y instanceof Z6))throw new TypeError("JacobianPoint#fromAffine: expected Point");if(Y.equals(Z6.ZERO))return o0.ZERO;return new o0(Y.x,Y.y,j6)}static toAffineBatch(Y){const q=GV(Y.map((F)=>F.z));return Y.map((F,O)=>F.toAffine(q[O]))}static normalizeZ(Y){return o0.toAffineBatch(Y).map(o0.fromAffine)}equals(Y){Z2(Y);const{x:q,y:F,z:O}=this,{x:Z,y:N,z:V}=Y,C=y0(O*O),B=y0(V*V),D=y0(q*B),L=y0(Z*C),H=y0(y0(F*V)*B),P=y0(y0(N*O)*C);return D===L&&H===P}negate(){return new o0(this.x,y0(-this.y),this.z)}double(){const{x:Y,y:q,z:F}=this,O=y0(Y*Y),Z=y0(q*q),N=y0(Z*Z),V=Y+Z,C=y0(H8*(y0(V*V)-O-N)),B=y0(p1*O),D=y0(B*B),L=y0(D-H8*C),H=y0(B*(C-L)-J2*N),P=y0(H8*q*F);return new o0(L,H,P)}add(Y){Z2(Y);const{x:q,y:F,z:O}=this,{x:Z,y:N,z:V}=Y;if(Z===d0||N===d0)return this;if(q===d0||F===d0)return Y;const C=y0(O*O),B=y0(V*V),D=y0(q*B),L=y0(Z*C),H=y0(y0(F*V)*B),P=y0(y0(N*O)*C),R=y0(L-D),k=y0(P-H);if(R===d0)if(k===d0)return this.double();else return o0.ZERO;const v=y0(R*R),M=y0(R*v),w=y0(D*v),x=y0(k*k-M-H8*w),g=y0(k*(w-x)-H*M),_=y0(O*V*R);return new o0(x,g,_)}subtract(Y){return this.add(Y.negate())}multiplyUnsafe(Y){const q=o0.ZERO;if(typeof Y==="bigint"&&Y===d0)return q;let F=H2(Y);if(F===j6)return this;if(!A7){let L=q,H=this;while(F>d0){if(F&j6)L=L.add(H);H=H.double(),F>>=j6}return L}let{k1neg:O,k1:Z,k2neg:N,k2:V}=M7.splitScalar(F),C=q,B=q,D=this;while(Z>d0||V>d0){if(Z&j6)C=C.add(D);if(V&j6)B=B.add(D);D=D.double(),Z>>=j6,V>>=j6}if(O)C=C.negate();if(N)B=B.negate();return B=new o0(y0(B.x*M7.beta),B.y,B.z),C.add(B)}precomputeWindow(Y){const q=A7?128/Y+1:256/Y+1,F=[];let O=this,Z=O;for(let N=0;N<q;N++){Z=O,F.push(Z);for(let V=1;V<2**(Y-1);V++)Z=Z.add(O),F.push(Z);O=Z.double()}return F}wNAF(Y,q){if(!q&&this.equals(o0.BASE))q=Z6.BASE;const F=q&&q._WINDOW_SIZE||1;if(256%F)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let O=q&&F9.get(q);if(!O){if(O=this.precomputeWindow(F),q&&F!==1)O=o0.normalizeZ(O),F9.set(q,O)}let{ZERO:Z,BASE:N}=o0;const V=1+(A7?128/F:256/F),C=2**(F-1),B=BigInt(2**F-1),D=2**F,L=BigInt(F);for(let H=0;H<V;H++){const P=H*C;let R=Number(Y&B);if(Y>>=L,R>C)R-=D,Y+=j6;const k=P,v=P+Math.abs(R)-1,M=H%2!==0,w=R<0;if(R===0)N=N.add(v7(M,O[k]));else Z=Z.add(v7(w,O[v]))}return{p:Z,f:N}}multiply(Y,q){let F=H2(Y),O,Z;if(A7){const{k1neg:N,k1:V,k2neg:C,k2:B}=M7.splitScalar(F);let{p:D,f:L}=this.wNAF(V,q),{p:H,f:P}=this.wNAF(B,q);D=v7(N,D),H=v7(C,H),H=new o0(y0(H.x*M7.beta),H.y,H.z),O=D.add(H),Z=L.add(P)}else{const{p:N,f:V}=this.wNAF(F,q);O=N,Z=V}return o0.normalizeZ([O,Z])[0]}toAffine(Y){const{x:q,y:F,z:O}=this,Z=this.equals(o0.ZERO);if(Y==null)Y=Z?J2:g7(O);const N=Y,V=y0(N*N),C=y0(V*N),B=y0(q*V),D=y0(F*C),L=y0(O*N);if(Z)return Z6.ZERO;if(L!==j6)throw new Error("invZ was invalid");return new Z6(B,D)}}o0.BASE=new o0(H6.Gx,H6.Gy,j6);o0.ZERO=new o0(d0,j6,d0);var F9=new WeakMap;class Z6{constructor(Y,q){this.x=Y,this.y=q}_setWindowSize(Y){this._WINDOW_SIZE=Y,F9.delete(this)}hasEvenY(){return this.y%H8===d0}static fromCompressedHex(Y){const q=Y.length===32,F=b6(q?Y:Y.subarray(1));if(!S7(F))throw new Error("Point is not on curve");const O=z2(F);let Z=WV(O);const N=(Z&j6)===j6;if(q){if(N)Z=y0(-Z)}else if((Y[0]&1)===1!==N)Z=y0(-Z);const V=new Z6(F,Z);return V.assertValidity(),V}static fromUncompressedHex(Y){const q=b6(Y.subarray(1,X1+1)),F=b6(Y.subarray(X1+1,X1*2+1)),O=new Z6(q,F);return O.assertValidity(),O}static fromHex(Y){const q=g8(Y),F=q.length,O=q[0];if(F===X1)return this.fromCompressedHex(q);if(F===F2&&(O===2||O===3))return this.fromCompressedHex(q);if(F===K2&&O===4)return this.fromUncompressedHex(q);throw new Error(`Point.fromHex: received invalid point. Expected 32-${F2} compressed bytes or ${K2} uncompressed bytes, not ${F}`)}static fromPrivateKey(Y){return Z6.BASE.multiply(u1(Y))}static fromSignature(Y,q,F){const{r:O,s:Z}=JV(q);if(![0,1,2,3].includes(F))throw new Error("Cannot recover: invalid recovery bit");const N=YV(g8(Y)),{n:V}=H6,C=F===2||F===3?O+V:O,B=g7(C,V),D=y0(-N*B,V),L=y0(Z*B,V),H=F&1?"03":"02",P=Z6.fromHex(H+O8(C)),R=Z6.BASE.multiplyAndAddUnsafe(P,D,L);if(!R)throw new Error("Cannot recover signature: point at infinify");return R.assertValidity(),R}toRawBytes(Y=!1){return C8(this.toHex(Y))}toHex(Y=!1){const q=O8(this.x);if(Y)return`${this.hasEvenY()?"02":"03"}${q}`;else return`04${q}${O8(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const{x:q,y:F}=this;if(!S7(q)||!S7(F))throw new Error("Point is not on elliptic curve");const O=y0(F*F),Z=z2(q);if(y0(O-Z)!==d0)throw new Error("Point is not on elliptic curve")}equals(Y){return this.x===Y.x&&this.y===Y.y}negate(){return new Z6(this.x,y0(-this.y))}double(){return o0.fromAffine(this).double().toAffine()}add(Y){return o0.fromAffine(this).add(o0.fromAffine(Y)).toAffine()}subtract(Y){return this.add(Y.negate())}multiply(Y){return o0.fromAffine(this).multiply(Y,this).toAffine()}multiplyAndAddUnsafe(Y,q,F){const O=o0.fromAffine(this),Z=q===d0||q===j6||this!==Z6.BASE?O.multiplyUnsafe(q):O.multiply(q),N=o0.fromAffine(Y).multiplyUnsafe(F),V=Z.add(N);return V.equals(o0.ZERO)?void 0:V.toAffine()}}Z6.BASE=new Z6(H6.Gx,H6.Gy);Z6.ZERO=new Z6(d0,d0);class w8{constructor(Y,q){this.r=Y,this.s=q,this.assertValidity()}static fromCompact(Y){const q=h1(Y);if(typeof Y!=="string"&&!q)throw new TypeError("Signature.fromCompact: Expected string or Uint8Array");const O=q?V1(Y):Y;if(O.length!==128)throw new Error("Signature.fromCompact: Expected 64-byte hex");return new w8(E7(O.slice(0,64)),E7(O.slice(64,128)))}static fromDER(Y){const q=h1(Y);if(typeof Y!=="string"&&!q)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:F,s:O}=tY(q?Y:C8(Y));return new w8(F,O)}static fromHex(Y){return this.fromDER(Y)}assertValidity(){const{r:Y,s:q}=this;if(!l1(Y))throw new Error("Invalid Signature: r must be 0 < r < n");if(!l1(q))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const Y=H6.n>>j6;return this.s>Y}normalizeS(){return this.hasHighS()?new w8(this.r,y0(-this.s,H6.n)):this}toDERRawBytes(){return C8(this.toDERHex())}toDERHex(){const Y=$2(m1(this.s)),q=$2(m1(this.r)),F=Y.length/2,O=q.length/2,Z=m1(F),N=m1(O);return`30${m1(O+F+4)}02${N}${q}02${Z}${Y}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return C8(this.toCompactHex())}toCompactHex(){return O8(this.r)+O8(this.s)}}var eY=Array.from({length:256},(Y,q)=>q.toString(16).padStart(2,"0")),Y8={_0:48,_9:57,A:65,F:70,a:97,f:102},QV=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Y1,U9;class J1{constructor(Y,q){this.r=Y,this.s=q,this.assertValidity()}static fromHex(Y){const q=g8(Y);if(q.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${q.length}`);const F=b6(q.subarray(0,32)),O=b6(q.subarray(32,64));return new J1(F,O)}assertValidity(){const{r:Y,s:q}=this;if(!S7(Y)||!l1(q))throw new Error("Invalid signature")}toHex(){return O8(this.r)+O8(this.s)}toRawBytes(){return C8(this.toHex())}}class z9{constructor(Y,q,F=p6.randomBytes()){if(Y==null)throw new TypeError(`sign: Expected valid message, not "${Y}"`);this.m=g8(Y);const{x:O,scalar:Z}=this.getScalar(u1(q));if(this.px=O,this.d=Z,this.rand=g8(F),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(Y){const q=Z6.fromPrivateKey(Y),F=q.hasEvenY()?Y:H6.n-Y;return{point:q,scalar:F,x:q.toRawX()}}initNonce(Y,q){return c1(Y^b6(q))}finalizeNonce(Y){const q=y0(b6(Y),H6.n);if(q===d0)throw new Error("sign: Creation of signature failed. k is zero");const{point:F,x:O,scalar:Z}=this.getScalar(q);return{R:F,rx:O,k:Z}}finalizeSig(Y,q,F,O){return new J1(Y.x,y0(q+F*O,H6.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:Y,d:q,px:F,rand:O}=this,Z=p6.taggedHash,N=this.initNonce(q,await Z(j8.aux,O)),{R:V,rx:C,k:B}=this.finalizeNonce(await Z(j8.nonce,N,F,Y)),D=w7(await Z(j8.challenge,C,F,Y)),L=this.finalizeSig(V,B,D,q);if(!await L2(L,Y,F))this.error();return L}calcSync(){const{m:Y,d:q,px:F,rand:O}=this,Z=p6.taggedHashSync,N=this.initNonce(q,Z(j8.aux,O)),{R:V,rx:C,k:B}=this.finalizeNonce(Z(j8.nonce,N,F,Y)),D=w7(Z(j8.challenge,C,F,Y)),L=this.finalizeSig(V,B,D,q);if(!N2(L,Y,F))this.error();return L}}var Z9={Signature:J1,getPublicKey:UV,sign:FV,verify:L2,signSync:KV,verifySync:N2};Z6.BASE._setWindowSize(8);var S6={node:J9,web:typeof self==="object"&&("crypto"in self)?self.crypto:void 0},j8={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},x7={},p6={bytesToHex:V1,hexToBytes:C8,concatBytes:_1,mod:y0,invert:g7,isValidPrivateKey(Y){try{return u1(Y),!0}catch(q){return!1}},_bigintTo32Bytes:c1,_normalizePrivateKey:u1,hashToPrivateKey:(Y)=>{Y=g8(Y);const q=b1+8;if(Y.length<q||Y.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const F=y0(b6(Y),H6.n-j6)+j6;return c1(F)},randomBytes:(Y=32)=>{if(S6.web)return S6.web.getRandomValues(new Uint8Array(Y));else if(S6.node){const{randomBytes:q}=S6.node;return Uint8Array.from(q(Y))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>p6.hashToPrivateKey(p6.randomBytes(b1+8)),precompute(Y=8,q=Z6.BASE){const F=q===Z6.BASE?q:new Z6(q.x,q.y);return F._setWindowSize(Y),F.multiply(p1),F},sha256:async(...Y)=>{if(S6.web){const q=await S6.web.subtle.digest("SHA-256",_1(...Y));return new Uint8Array(q)}else if(S6.node){const{createHash:q}=S6.node,F=q("sha256");return Y.forEach((O)=>F.update(O)),Uint8Array.from(F.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(Y,...q)=>{if(S6.web){const F=await S6.web.subtle.importKey("raw",Y,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),O=_1(...q),Z=await S6.web.subtle.sign("HMAC",F,O);return new Uint8Array(Z)}else if(S6.node){const{createHmac:F}=S6.node,O=F("sha256",Y);return q.forEach((Z)=>O.update(Z)),Uint8Array.from(O.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(Y,...q)=>{let F=x7[Y];if(F===void 0){const O=await p6.sha256(Uint8Array.from(Y,(Z)=>Z.charCodeAt(0)));F=_1(O,O),x7[Y]=F}return p6.sha256(F,...q)},taggedHashSync:(Y,...q)=>{if(typeof Y1!=="function")throw new K9("sha256Sync is undefined, you need to set it");let F=x7[Y];if(F===void 0){const O=Y1(Uint8Array.from(Y,(Z)=>Z.charCodeAt(0)));F=_1(O,O),x7[Y]=F}return Y1(F,...q)},_JacobianPoint:o0};Object.defineProperties(p6,{sha256Sync:{configurable:!1,get(){return Y1},set(Y){if(!Y1)Y1=Y}},hmacSha256Sync:{configurable:!1,get(){return U9},set(Y){if(!U9)U9=Y}}});var{floor:$9,random:zV,sin:ZV}=Math,y8="Trystero",D8=(Y,q)=>Array(Y).fill().map(q);var _7=(Y)=>D8(Y,()=>"0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"[$9(zV()*"0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz".length)]).join(""),a6=_7(20),n6=Promise.all.bind(Promise),P2=typeof window!=="undefined",{entries:m7,fromEntries:q9,keys:k2}=Object,V8=()=>{},c6=(Y)=>new Error(`Trystero: ${Y}`),$V=new TextEncoder,qV=new TextDecoder,r6=(Y)=>$V.encode(Y),U1=(Y)=>qV.decode(Y),p7=(Y)=>Y.reduce((q,F)=>q+F.toString(16).padStart(2,"0"),""),d1=(...Y)=>Y.join("@"),jV=(Y,q)=>{const F=[...Y],O=()=>{const N=ZV(q++)*1e4;return N-$9(N)};let Z=F.length;while(Z){const N=$9(O()*Z--);[F[Z],F[N]]=[F[N],F[Z]]}return F},B2=(Y,q,F,O)=>{return(Y.relayUrls||(O?jV(q,j9(Y.appId)):q)).slice(0,Y.relayUrls?Y.relayUrls.length:Y.relayRedundancy||F)},h6=JSON.stringify,_8=JSON.parse,j9=(Y,q=Number.MAX_SAFE_INTEGER)=>Y.split("").reduce((F,O)=>F+O.charCodeAt(0),0)%q;var y7={},R2=(Y,q)=>{const F={},O=()=>{const Z=new WebSocket(Y);Z.onclose=()=>{y7[Y]??=3333,setTimeout(O,y7[Y]),y7[Y]*=2},Z.onmessage=(N)=>q(N.data),F.socket=Z,F.url=Z.url,F.ready=new Promise((N)=>Z.onopen=()=>{N(F),y7[Y]=3333}),F.send=(N)=>{if(Z.readyState===1)Z.send(N)}};return O(),F},I2=(Y)=>()=>q9(m7(Y).map(([q,F])=>[q,F.socket]));var H9="AES-GCM",HV={},CV=(Y)=>btoa(String.fromCharCode.apply(null,new Uint8Array(Y))),OV=(Y)=>{const q=atob(Y);return new Uint8Array(q.length).map((F,O)=>q.charCodeAt(O)).buffer},f1=async(Y)=>HV[Y]||=Array.from(new Uint8Array(await crypto.subtle.digest("SHA-1",r6(Y)))).map((q)=>q.toString(36)).join(""),T2=async(Y,q,F)=>crypto.subtle.importKey("raw",await crypto.subtle.digest({name:"SHA-256"},r6(`${Y}:${q}:${F}`)),{name:H9},!1,["encrypt","decrypt"]),M2="$",A2=",",v2=async(Y,q)=>{const F=crypto.getRandomValues(new Uint8Array(16));return F.join(A2)+M2+CV(await crypto.subtle.encrypt({name:H9,iv:F},await Y,r6(q)))},x2=async(Y,q)=>{const[F,O]=q.split(M2);return U1(await crypto.subtle.decrypt({name:H9,iv:new Uint8Array(F.split(A2))},await Y,OV(O)))};var DV=5000,S2="icegatheringstatechange",E2="offer",LV="answer",C9=(Y,{rtcConfig:q,rtcPolyfill:F,turnConfig:O})=>{const Z=new(F||RTCPeerConnection)({iceServers:NV.concat(O||[]),...q}),N={};let V=!1,C=!1,B=null;const D=(H)=>{H.binaryType="arraybuffer",H.bufferedAmountLowThreshold=65535,H.onmessage=(P)=>N.data?.(P.data),H.onopen=()=>N.connect?.(),H.onclose=()=>N.close?.(),H.onerror=(P)=>N.error?.(P)},L=(H)=>Promise.race([new Promise((P)=>{const R=()=>{if(H.iceGatheringState==="complete")H.removeEventListener(S2,R),P()};H.addEventListener(S2,R),R()}),new Promise((P)=>setTimeout(P,DV))]).then(()=>({type:H.localDescription.type,sdp:H.localDescription.sdp.replace(/a=ice-options:trickle\s\n/g,"")}));if(Y)B=Z.createDataChannel("data"),D(B);else Z.ondatachannel=({channel:H})=>{B=H,D(H)};if(Z.onnegotiationneeded=async()=>{try{V=!0,await Z.setLocalDescription();const H=await L(Z);N.signal?.(H)}catch(H){N.error?.(H)}finally{V=!1}},Z.onconnectionstatechange=()=>{if(["disconnected","failed","closed"].includes(Z.connectionState))N.close?.()},Z.ontrack=(H)=>{N.track?.(H.track,H.streams[0]),N.stream?.(H.streams[0])},Z.onremovestream=(H)=>N.stream?.(H.stream),Y){if(!Z.canTrickleIceCandidates)Z.onnegotiationneeded()}return{created:Date.now(),connection:Z,get channel(){return B},get isDead(){return Z.connectionState==="closed"},async signal(H){if(B?.readyState==="open"&&!H.sdp?.includes("a=rtpmap"))return;try{if(H.type===E2){if(V||Z.signalingState!=="stable"&&!C){if(Y)return;await n6([Z.setLocalDescription({type:"rollback"}),Z.setRemoteDescription(H)])}else await Z.setRemoteDescription(H);await Z.setLocalDescription();const P=await L(Z);return N.signal?.(P),P}else if(H.type===LV){C=!0;try{await Z.setRemoteDescription(H)}finally{C=!1}}}catch(P){N.error?.(P)}},sendData:(H)=>B.send(H),destroy:()=>{B?.close(),Z.close(),V=!1,C=!1},setHandlers:(H)=>Object.assign(N,H),offerPromise:Y?new Promise((H)=>N.signal=(P)=>{if(P.type===E2)H(P)}):Promise.resolve(),addStream:(H)=>H.getTracks().forEach((P)=>Z.addTrack(P,H)),removeStream:(H)=>Z.getSenders().filter((P)=>H.getTracks().includes(P.track)).forEach((P)=>Z.removeTrack(P)),addTrack:(H,P)=>Z.addTrack(H,P),removeTrack:(H)=>{const P=Z.getSenders().find((R)=>R.track===H);if(P)Z.removeTrack(P)},replaceTrack:(H,P)=>{const R=Z.getSenders().find((k)=>k.track===H);if(R)return R.replaceTrack(P)}}},NV=[...D8(3,(Y,q)=>`stun:stun${q||""}.l.google.com:19302`),"stun:stun.cloudflare.com:3478"].map((Y)=>({urls:Y}));var PV=Object.getPrototypeOf(Uint8Array),h7=12,g2=0,c7=g2+h7,l7=c7+1,o1=l7+1,a1=o1+1,m8=16384-a1,b7=255,w2="bufferedamountlow",F1=(Y)=>"@_"+Y,y2=(Y,q,F)=>{const O={},Z={},N={},V={},C={},B={},D={},L={onPeerJoin:V8,onPeerLeave:V8,onPeerStream:V8,onPeerTrack:V8},H=(Q,G)=>(Q?Array.isArray(Q)?Q:[Q]:k2(O)).flatMap((J)=>{const X=O[J];if(!X)return console.warn(`${y8}: no peer with id ${J} found`),[];return G(J,X)}),P=(Q)=>{if(!O[Q])return;delete O[Q],delete V[Q],delete C[Q],L.onPeerLeave(Q),q(Q)},R=(Q)=>{if(Z[Q])return N[Q];if(!Q)throw c6("action type argument is required");const G=r6(Q);if(G.byteLength>h7)throw c6(`action type string "${Q}" (${G.byteLength}b) exceeds `+`byte limit (${h7}). Hint: choose a shorter name.`);const J=new Uint8Array(h7);J.set(G);let X=0;return Z[Q]={onComplete:V8,onProgress:V8,setOnComplete:(U)=>Z[Q]={...Z[Q],onComplete:U},setOnProgress:(U)=>Z[Q]={...Z[Q],onProgress:U},send:async(U,$,j,K)=>{if(j&&typeof j!=="object")throw c6("action meta argument must be an object");const W=typeof U;if(W==="undefined")throw c6("action data cannot be undefined");const z=W!=="string",A=U instanceof Blob,T=A||U instanceof ArrayBuffer||U instanceof PV;if(j&&!T)throw c6("action meta argument can only be used with binary data");const y=T?new Uint8Array(A?await U.arrayBuffer():U):r6(z?h6(U):U),r=j?r6(h6(j)):null,a=Math.ceil(y.byteLength/m8)+(j?1:0)||1,t=D8(a,(l,h)=>{const n=h===a-1,q0=j&&h===0,G0=new Uint8Array(a1+(q0?r.byteLength:n?y.byteLength-m8*(a-(j?2:1)):m8));return G0.set(J),G0.set([X],c7),G0.set([n|q0<<1|T<<2|z<<3],l7),G0.set([Math.round((h+1)/a*b7)],o1),G0.set(j?q0?r:y.subarray((h-1)*m8,h*m8):y.subarray(h*m8,(h+1)*m8),a1),G0});return X=X+1&b7,n6(H($,async(l,h)=>{const{channel:n}=h;let q0=0;while(q0<a){const G0=t[q0];if(n.bufferedAmount>n.bufferedAmountLowThreshold)await new Promise((F0)=>{const b=()=>{n.removeEventListener(w2,b),F0()};n.addEventListener(w2,b)});if(!O[l])break;h.sendData(G0),q0++,K?.(G0[o1]/b7,l,j)}}))}},N[Q]||=[Z[Q].send,Z[Q].setOnComplete,Z[Q].setOnProgress]},k=(Q,G)=>{const J=new Uint8Array(G),X=U1(J.subarray(g2,c7)).replaceAll("\0",""),[U]=J.subarray(c7,l7),[$]=J.subarray(l7,o1),[j]=J.subarray(o1,a1),K=J.subarray(a1),W=!!($&1),z=!!($&1<<1),A=!!($&1<<2),T=!!($&1<<3);if(!Z[X]){console.warn(`${y8}: received message with unregistered type (${X})`);return}V[Q]||={},V[Q][X]||={};const y=V[Q][X][U]||={chunks:[]};if(z)y.meta=_8(U1(K));else y.chunks.push(K);if(Z[X].onProgress(j/b7,Q,y.meta),!W)return;const r=new Uint8Array(y.chunks.reduce((a,t)=>a+t.byteLength,0));if(y.chunks.reduce((a,t)=>{return r.set(t,a),a+t.byteLength},0),delete V[Q][X][U],A)Z[X].onComplete(r,Q,y.meta);else{const a=U1(r);Z[X].onComplete(T?_8(a):a,Q)}},v=async()=>{await d(""),await new Promise((Q)=>setTimeout(Q,99)),m7(O).forEach(([Q,G])=>{G.destroy(),delete O[Q]}),F()},[M,w]=R(F1("ping")),[x,g]=R(F1("pong")),[_,p]=R(F1("signal")),[m,f]=R(F1("stream")),[s,Q0]=R(F1("track")),[d,K0]=R(F1("leave"));if(Y((Q,G)=>{if(O[G])return;O[G]=Q,Q.setHandlers({data:(J)=>k(G,J),stream:(J)=>{L.onPeerStream(J,G,B[G]),delete B[G]},track:(J,X)=>{L.onPeerTrack(J,X,G,D[G]),delete D[G]},signal:(J)=>_(J,G),close:()=>P(G),error:(J)=>{console.error(J),P(G)}}),L.onPeerJoin(G)}),w((Q,G)=>x("",G)),g((Q,G)=>{C[G]?.(),delete C[G]}),p((Q,G)=>O[G]?.signal(Q)),f((Q,G)=>B[G]=Q),Q0((Q,G)=>D[G]=Q),K0((Q,G)=>P(G)),P2)addEventListener("beforeunload",v);return{makeAction:R,leave:v,ping:async(Q)=>{if(!Q)throw c6("ping() must be called with target peer ID");const G=Date.now();return M("",Q),await new Promise((J)=>C[Q]=J),Date.now()-G},getPeers:()=>q9(m7(O).map(([Q,G])=>[Q,G.connection])),addStream:(Q,G,J)=>H(G,async(X,U)=>{if(J)await m(J,X);U.addStream(Q)}),removeStream:(Q,G)=>H(G,(J,X)=>X.removeStream(Q)),addTrack:(Q,G,J,X)=>H(J,async(U,$)=>{if(X)await s(X,U);$.addTrack(Q,G)}),removeTrack:(Q,G)=>H(G,(J,X)=>X.removeTrack(Q)),replaceTrack:(Q,G,J,X)=>H(J,async(U,$)=>{if(X)await s(X,U);$.replaceTrack(Q,G)}),onPeerJoin:(Q)=>L.onPeerJoin=Q,onPeerLeave:(Q)=>L.onPeerLeave=Q,onPeerStream:(Q)=>L.onPeerStream=Q,onPeerTrack:(Q)=>L.onPeerTrack=Q}};var kV=20,BV=5333,_2=57333,m2=({init:Y,subscribe:q,announce:F})=>{const O={};let Z=!1,N,V,C;return(B,D,L)=>{const{appId:H}=B;if(O[H]?.[D])return O[H][D];const P={},R={},k=d1(y8,H,D),v=f1(k),M=f1(d1(k,a6)),w=T2(B.password||"",H,D),x=(U)=>async($)=>({type:$.type,sdp:await U(w,$.sdp)}),g=x(x2),_=x(v2),p=()=>C9(!0,B),m=(U,$,j)=>{if(R[$]){if(R[$]!==U)U.destroy();return}R[$]=U,X(U,$),P[$]?.forEach((K,W)=>{if(W!==j)K.destroy()}),delete P[$]},f=(U,$)=>{if(R[$]===U)delete R[$]},s=(U,$)=>{if(R[U])return;const j=P[U]?.[$];if(j)delete P[U][$],j.destroy()},Q0=(U)=>{return V.push(...D8(U,p)),n6(V.splice(0,U).map(($)=>$.offerPromise.then(_).then((j)=>({peer:$,offer:j}))))},d=(U,$)=>L?.({error:`incorrect password (${B.password}) when decrypting ${$}`,appId:H,peerId:U,roomId:D}),K0=(U)=>async($,j,K)=>{const[W,z]=await n6([v,M]);if($!==W&&$!==z)return;const{peerId:A,offer:T,answer:y,peer:r}=typeof j==="string"?_8(j):j;if(A===a6||R[A])return;if(A&&!T&&!y){if(P[A]?.[U])return;const[[{peer:a,offer:t}],l]=await n6([Q0(1),f1(d1(k,A))]);P[A]||=[],P[A][U]=a,setTimeout(()=>s(A,U),Q[U]*0.9),a.setHandlers({connect:()=>m(a,A,U),close:()=>f(a,A)}),K(l,h6({peerId:a6,offer:t}))}else if(T){if(P[A]?.[U]&&a6>A)return;const t=C9(!1,B);t.setHandlers({connect:()=>m(t,A,U),close:()=>f(t,A)});let l;try{l=await g(T)}catch{d(A,"offer");return}if(t.isDead)return;const[h,n]=await n6([f1(d1(k,A)),t.signal(l)]);K(h,h6({peerId:a6,answer:await _(n)}))}else if(y){let a;try{a=await g(y)}catch(t){d(A,"answer");return}if(r)r.setHandlers({connect:()=>m(r,A,U),close:()=>f(r,A)}),r.signal(a);else{const t=P[A]?.[U];if(t&&!t.isDead)t.signal(a)}}};if(!B)throw c6("requires a config map as the first argument");if(!H&&!B.firebaseApp)throw c6("config map is missing appId field");if(!D)throw c6("roomId argument required");if(!Z){const U=Y(B);V=D8(kV,p),N=Array.isArray(U)?U:[U],Z=!0,C=setInterval(()=>V=V.filter(($)=>{const j=Date.now()-$.created<_2;if(!j)$.destroy();return j}),_2*1.03)}const Q=N.map(()=>BV),G=[],J=N.map(async(U,$)=>q(await U,await v,await M,K0($),Q0));n6([v,M]).then(([U,$])=>{const j=async(K,W)=>{const z=await F(K,U,$);if(typeof z==="number")Q[W]=z;G[W]=setTimeout(()=>j(K,W),Q[W])};J.forEach(async(K,W)=>{await K,j(await N[W],W)})});let X=V8;return O[H]||={},O[H][D]=y2((U)=>X=U,(U)=>delete R[U],()=>{delete O[H][D],G.forEach(clearTimeout),J.forEach(async(U)=>(await U)()),clearInterval(C)})}};var c2={},RV=5,l2="x",u2="EVENT",d2=p6.randomPrivateKey(),IV=p7(Z9.getPublicKey(d2)),O9={},n1={},TV={},f2=()=>Math.floor(Date.now()/1000),o2=(Y)=>TV[Y]??=j9(Y,1e4)+20000,p2=async(Y,q)=>{const F={kind:o2(Y),content:q,pubkey:IV,created_at:f2(),tags:[[l2,Y]]},O=p7(new Uint8Array(await crypto.subtle.digest("SHA-256",r6(h6([0,F.pubkey,F.created_at,F.kind,F.tags,F.content])))));return h6([u2,{...F,id:O,sig:p7(await Z9.sign(O,d2))}])},b2=(Y,q)=>{return O9[Y]=q,h6(["REQ",Y,{kinds:[o2(q)],since:f2(),["#"+l2]:[q]}])},h2=(Y)=>{return delete O9[Y],h6(["CLOSE",Y])},u7=m2({init:(Y)=>B2(Y,AV,RV,!0).map((q)=>{const F=R2(q,(O)=>{const[Z,N,V,C]=_8(O);if(Z!==u2){const B=`${y8}: relay failure from ${F.url} - `;if(Z==="NOTICE")console.warn(B+N);else if(Z==="OK"&&!V)console.warn(B+C);return}n1[N]?.(O9[N],V.content)});return c2[q]=F,F.ready}),subscribe:(Y,q,F,O)=>{const Z=_7(64),N=_7(64);return n1[Z]=n1[N]=(V,C)=>O(V,C,async(B,D)=>Y.send(await p2(B,D))),Y.send(b2(Z,q)),Y.send(b2(N,F)),()=>{Y.send(h2(Z)),Y.send(h2(N)),delete n1[Z],delete n1[N]}},announce:async(Y,q)=>Y.send(await p2(q,h6({peerId:a6})))}),MV=I2(c2),AV=["black.nostrcity.club","eu.purplerelay.com","ftp.halifax.rwth-aachen.de/nostr","nostr.cool110.xyz","nostr.data.haus","nostr.mom","nostr.oxtr.dev","nostr.sathoarder.com","nostr.vulpem.com","nostrelay.memory-art.xyz","playground.nostrcheck.me/relay","relay.agorist.space","relay.binaryrobot.com","relay.fountain.fm","relay.mostro.network","relay.nostraddress.com","relay.nostrdice.com","relay.nostromo.social","relay.oldenburg.cool","relay.snort.social","relay.verified-nostr.com","sendit.nosflare.com","yabu.me/v2"].map((Y)=>"wss://"+Y);var a2=(Y,q,F)=>{let O=q.timestamp;if(q.timestamp&&typeof q.timestamp.physical==="number"){const V=Date.now()+7200000;if(q.timestamp.physical>V)O={physical:V,logical:q.timestamp.logical}}if(!Y||!Y.timestamp)return{resolved:!0,value:q.value,timestamp:O};const Z=Y.timestamp;if(F.compare(Z,O)<0)return{resolved:!0,value:q.value,timestamp:O};return{resolved:!1}};class D9{constructor(Y,q=50){this.key=`gdb_oplog_${Y}`,this.maxSize=q,this.log=this._load()}_load(){try{const Y=localStorage.getItem(this.key);return Y?JSON.parse(Y):[]}catch(Y){return console.error("Failed to load oplog from localStorage:",Y),[]}}_save(){try{localStorage.setItem(this.key,JSON.stringify(this.log))}catch(Y){console.error("Failed to save oplog to localStorage:",Y)}}add(Y){if(this.log.push(Y),this.log.length>this.maxSize)this.log.shift();this._save()}getDelta(Y,q){if(!Y)return[...this.log];return this.log.filter((F)=>q(F.timestamp,Y)>0)}getOldest(){return this.log[0]}clear(){this.log=[],localStorage.removeItem(this.key)}}var vV=()=>{const Y=new Map,q=async()=>{try{const B=await navigator.storage.getDirectory(),L=await(await B.getFileHandle("~opfs-sync-test",{create:!0})).createSyncAccessHandle?.();return await L?.close(),await B.removeEntry("~opfs-sync-test"),!!L}catch{return!1}};let F="idb";const O=(async()=>{if(await q())F="sync";else try{const B=await navigator.storage.getDirectory(),L=await(await B.getFileHandle("~opfs-async-test",{create:!0})).createWritable?.();if(await L?.close(),await B.removeEntry("~opfs-async-test"),L)F="async";else F="idb"}catch{F="idb"}})(),Z=async(B,D)=>{if(!Y.has(B))Y.set(B,[]);const L=Y.get(B),H=L[L.length-1]||Promise.resolve();let P;const R=new Promise((k)=>P=k);L.push(R);try{return await H,await D()}finally{if(L.shift(),P(),L.length===0)Y.delete(B)}},N=(()=>{let B;const D=async()=>{if(!B)B=new Promise((L,H)=>{const P=indexedDB.open("opfs-fallback-db",1);P.onupgradeneeded=()=>P.result.createObjectStore("files"),P.onsuccess=()=>L(P.result),P.onerror=()=>H(P.error)});return B};return{getDB:D,get:async(L)=>{const H=await D();return new Promise((P,R)=>{const v=H.transaction("files","readonly").objectStore("files").get(L);v.onsuccess=()=>P(v.result||new Uint8Array),v.onerror=()=>R(v.error)})},set:async(L,H)=>{const P=await D();return new Promise((R,k)=>{const M=P.transaction("files","readwrite").objectStore("files").put(H,L);M.onsuccess=()=>R(),M.onerror=()=>k(M.error)})}}})(),V=async(B)=>{await O;try{if(F==="idb"){const R=await N.get(B);return{type:"loaded",name:B,data:R}}const L=await(await navigator.storage.getDirectory()).getFileHandle(B);if(F==="sync"){let R;try{R=await L.createSyncAccessHandle();const k=R.getSize(),v=new Uint8Array(k),M=R.read(v,{at:0});return{type:"loaded",name:B,data:v.slice(0,M)}}finally{R?.close()}}const H=await L.getFile(),P=new Uint8Array(await H.arrayBuffer());return{type:"loaded",name:B,data:P}}catch(D){const L=D.name==="NotFoundError"?"File not found":D.message||"Error reading file";return{type:"error",name:B,message:L}}},C=async(B,D)=>{if(await O,!(D instanceof Uint8Array))return{type:"error",name:B,message:"Content must be a Uint8Array"};return Z(B,async()=>{try{if(F==="idb")return await N.set(B,D),{type:"saved",name:B};const H=await(await navigator.storage.getDirectory()).getFileHandle(B,{create:!0});if(F==="sync"){let P;try{P=await H.createSyncAccessHandle(),P.truncate(0),P.write(D,{at:0}),P.flush()}finally{P?.close()}}else{let P;try{P=await H.createWritable(),await P.write(D)}finally{await P?.close()}}return{type:"saved",name:B}}catch(L){return{type:"error",name:B,message:L.message||"Error saving file"}}})};self.onmessage=async({data:B})=>{const{type:D,name:L,content:H}=B;await O;const P={load:()=>V(L),save:()=>C(L,H)};try{const R=P[D],k=R?await R():{type:"error",message:`Unrecognized action type: ${D}`};self.postMessage(k)}catch(R){console.error("Worker unexpected error:",R),self.postMessage({type:"error",name:L,message:R.message||"Unexpected worker error"})}}},n2=vV;var p8={$eq:(Y,q)=>Y===q,$ne:(Y,q)=>Y!==q,$gt:(Y,q)=>Y>q,$gte:(Y,q)=>Y>=q,$lt:(Y,q)=>Y<q,$lte:(Y,q)=>Y<=q,$in:(Y,q)=>Array.isArray(q)&&q.includes(Y),$between:(Y,[q,F])=>Y>=q&&Y<=F,$exists:(Y,q)=>q?Y!==void 0:Y===void 0,$text:{global:(Y,q)=>{const F=(Z)=>String(Z).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^\w\s]/g,""),O=F(q);return Object.values(Y).some((Z)=>{if(typeof Z==="object")return null.fieldSearch(Z,O);return F(Z).includes(O)})},field:(Y,q)=>{const F=(O)=>String(O).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^\w\s]/g,"");return Array.isArray(Y)?Y.some((O)=>F(O).includes(F(q))):F(Y).includes(F(q))}},$like:(Y,q)=>{if(typeof Y!=="string"||typeof q!=="string")return!1;return new RegExp(`^${q.replace(/%/g,".*").replace(/_/g,".")}\$`,"i").test(Y)},$regex:(Y,q)=>typeof Y==="string"&&new RegExp(q.$regex||q,"i").test(Y),$and:(Y,q,F)=>q.every((O)=>{return F.createFilter(O)(Y)}),$or:(Y,q,F)=>q.some((O)=>{return F.createFilter(O)(Y)}),$not:(Y,q,F)=>{return!F.createFilter(q)(Y)}},L9=(Y,q)=>{const F=q.split(".");let O=Y;for(let Z of F)if(O&&typeof O==="object"&&(Z in O))O=O[Z];else return;return O},N9=(Y)=>{const q=(F)=>{return Object.entries(Y).every(([O,Z])=>{if(O.startsWith("$"))return p8[O](F,Z,{filterNode:q,createFilter:N9});const N=L9(F.value,O);if(typeof Z!=="object"||Z===null)return p8.$eq(N,Z);return Object.entries(Z).every(([V,C])=>{if(V==="$text")return p8.$text.field(N,C);if(V==="$between"&&C.every((B)=>B instanceof Date)){const B=new Date(N);return p8.$between(B,C)}return p8[V]?.(N,C,{filterNode:q,createFilter:N9})??!1})})};return q},P9=(Y,q)=>{const F=N9(q.query);let O=Object.values(Y).filter(F);if(q.field)O.sort((Z,N)=>{const V=L9(Z.value,q.field),C=L9(N.value,q.field),B=q.order==="asc"?1:-1;if(typeof V==="string"&&typeof C==="string")return V.localeCompare(C)*B;return((V??0)-(C??0))*B});if(q.$after){const Z=O.findIndex((N)=>N.id===q.$after);O=Z>=0?O.slice(Z+1):[]}if(q.$before){const Z=O.findIndex((N)=>N.id===q.$before);O=Z>=0?O.slice(0,Z):[]}return q.$limit?O.slice(0,q.$limit):O};class k9{constructor(){this.physical=Date.now(),this.logical=0}now(){const Y=Date.now();return this.physical=Math.max(this.physical,Y),this.logical++,{physical:this.physical,logical:this.logical}}update(Y){if(!Y||typeof Y.physical!=="number"||typeof Y.logical!=="number")return;this.physical=Math.max(this.physical,Y.physical),this.logical=Math.max(this.logical,Y.logical)+1}compare(Y,q){if(!Y&&!q)return 0;if(!Y)return-1;if(!q)return 1;if(Y.physical>q.physical)return 1;if(Y.physical<q.physical)return-1;if(Y.logical>q.logical)return 1;if(Y.logical<q.logical)return-1;return 0}}var r2=function(Y,q){return Y.length===q.length&&Y.every((F,O)=>F===q[O])};async function xV(){console.log("\u26A1 GenosDB: Empowering distributed graph databases with real-time synchronization and scalability. Learn more: https://github.com/estebanrfp/gdb \u26A1"),console.log(navigator?.storage?.getDirectory?"OPFS is enabled.":"OPFS is not available."),navigator?.storage?.getDirectory&&await navigator.storage.getDirectory()}if(Symbol.dispose===void 0)Object.defineProperty(Symbol,"dispose",{value:Symbol.for("Symbol.dispose")});class i2{constructor(){this.nodes={}}upsert(Y,q,F){this.nodes[Y]={id:Y,value:q,edges:[],timestamp:F}}get(Y){return this.nodes[Y]||null}link(Y,q,F){const O=this.nodes[Y],Z=this.nodes[q];if(O&&Z&&!O.edges.includes(q))O.edges.push(q),O.timestamp=F}getAllNodes(){return Object.values(this.nodes)}serialize(){return A8.deflate(J8(this.nodes))}deserialize(Y){this.nodes=Q7(A8.inflate(new Uint8Array(Y)))}}class d7{static _listenersInitialized=!1;constructor(Y,{password:q,securityManager:F=null}={}){this.oplog=new D9(Y,20),this.hybridClock=new k9,this.name=Y,this.password=q,this.globalTimestamp=null,this.graph=new i2,this.securityManager=F,this.eventListeners=[],this.operators=p8,this.initWorker(),this.ready=this.loadGraphFromOPFS(),this.loadGlobalTimestamp();const O=`graph-sync-room-${this.name}`,Z={appId:"1234",...this.password&&{password:this.password}},N=u7(Z,O),[V,C]=N.makeAction("syncGraph");this.sendData=V;const B=u7(Z,`app-sync-${this.name}`);if(this.room=B,!d7._listenersInitialized)d7._listenersInitialized=!0,window.addEventListener("online",async()=>{console.log("\u2705 Reconnected to the network."),this.sendData([{type:"sync",timestamp:this.globalTimestamp}])}),window.addEventListener("offline",async()=>{console.log("\u274C Disconnected from the network.")}),document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="visible")console.log("The tab is visible again."),this.sendData([{type:"sync",timestamp:this.globalTimestamp}]);else if(document.visibilityState==="hidden")console.log("The tab is no longer visible.")});xV(),N.onPeerJoin(async(D)=>{console.log("\u26A1 New pair connected:",D),this.sendData([{type:"sync",timestamp:this.globalTimestamp}])}),N.onPeerLeave((D)=>{console.log("\u26A1 Pair disconnected:",D)}),C(async(D)=>{if(this.securityManager&&typeof this.securityManager.verifyIncomingOperations==="function"){const{validatedOperations:L}=await this.securityManager.verifyIncomingOperations(D);if(L&&L.length>0)await this.receiveChanges(L)}else console.log("GDB: No SecurityManager configured or verifyIncomingOperations missing. Processing P2P data directly."),await this.receiveChanges(D),this.emit()}),this.channel=new BroadcastChannel(`graphdb_sync_${this.name}`),this.channel.onmessage=async(D)=>{if(D.data==="update")console.log("\uD83D\uDD04 Update received from another tab..."),await this.loadGraphFromOPFS(),this.loadGlobalTimestamp(),this.emit()}}loadGlobalTimestamp(){const Y=localStorage.getItem(`${this.name}_time`);this.globalTimestamp=Y?JSON.parse(Y):null}saveGlobalTimestamp(Y){this.globalTimestamp=Y,localStorage.setItem(`${this.name}_time`,JSON.stringify(Y))}initWorker(){try{const Y=URL.createObjectURL(new Blob([`(${n2.toString()})()`],{type:"application/javascript"}));this.worker=new Worker(Y),this.worker.addEventListener("message",({data:q})=>{console.log("Worker message:",`${q.name} ${q.type}`),URL.revokeObjectURL(Y)}),console.log("Worker initialized successfully.")}catch({message:Y}){console.error("Failed to initialize worker:",Y)}}getWorker(){return this.worker}emit(){this.eventListeners.forEach((Y)=>Y(this.graph.nodes))}compress(Y){return A8.deflate(Y)}decompress(Y){return A8.inflate(Y)}async getAllNodes(){return await this.ready,this.graph.getAllNodes()}async generateHash(){return crypto.randomUUID()}async hashValue(Y){const q=(new TextEncoder()).encode(Y),F=await crypto.subtle.digest("SHA-256",q);return Array.from(new Uint8Array(F)).map((O)=>O.toString(16).padStart(2,"0")).join("")}async loadGraphFromOPFS(){try{const q=await((F)=>new Promise((O,Z)=>{const N=async({data:V})=>{if(V.type==="loaded"&&V.name===F)this.worker.removeEventListener("message",N),O(new Uint8Array(V.data));else if(V.type==="error")this.worker.removeEventListener("message",N),Z(new Error(V.message||"Unknown error"))};this.worker.addEventListener("message",N),this.worker.postMessage({type:"load",name:F})}))(`${this.name}_graph.msgpack`).catch(()=>new Uint8Array);q.byteLength>0?this.graph.deserialize(q):console.warn("The file '_graph.msgpack' is empty or could not be loaded."),console.log(`Graph loaded from OPFS: [ ${this.graph.getAllNodes().length} nodes ]`)}catch({message:Y}){console.error("General error loading the graph from OPFS:",Y)}}async saveGraphToOPFS(){try{const Y=this.graph.serialize();return await((F,O)=>new Promise((Z,N)=>{const V=({data:C})=>{if(C.type==="saved"&&C.name===F)this.worker.removeEventListener("message",V),Z();else if(C.type==="error")this.worker.removeEventListener("message",V),N(new Error(C.message||"Save error"))};this.worker.addEventListener("message",V),this.worker.postMessage({type:"save",name:F,content:O})}))(`${this.name}_graph.msgpack`,Y),this.channel.postMessage("update"),!0}catch({message:Y}){throw console.error("Save error:",Y),new Error("Save failed")}}async put(Y,q){await this.ready;const F=this.hybridClock.now();return this.saveGlobalTimestamp(F),q??=await this.generateHash(),this.graph.upsert(q,Y,F),this.oplog.add({type:"upsert",id:q,timestamp:F}),await this.saveGraphToOPFS(),await this.sendData([{type:"upsert",id:q,value:Y,timestamp:F}]),this.emit(),q}async get(Y,q=null){if(await this.ready,typeof Y!=="string")return{result:null};const F=this.graph.get(Y);if(!F){if(q)q(null);return{result:null}}const O=(V)=>{if(!V)return null;const C=V.value!==null&&typeof V.value==="object"?{...V.value}:V.value;return{...V,value:C}};if(!q)return{result:O(F)};let Z=F.timestamp;q(O(F));const N=(V)=>{const C=V[Y];if(C){if(this.hybridClock.compare(C.timestamp,Z)>0)Z=C.timestamp,q(O(C))}else q(null),this.eventListeners.splice(this.eventListeners.indexOf(N),1)};return this.eventListeners.push(N),{result:O(F),unsubscribe:()=>{const V=this.eventListeners.indexOf(N);if(V>-1)this.eventListeners.splice(V,1)}}}async map(...Y){await this.ready;let F={...{realtime:!1,query:{},field:null,order:"asc",$limit:null,$after:null,$before:null}},O=null,Z=!1;Y.forEach((B)=>typeof B==="function"?O=B:B&&typeof B==="object"&&(Z||=("realtime"in B),Object.assign(F,B))),O&&!Z&&(F.realtime=!0);let N=P9(this.graph.nodes,F),V=null;const C=(B)=>{const D=B.filter((R)=>!N.some((k)=>k.id===R.id)),L=N.filter((R)=>!B.some((k)=>k.id===R.id)),H=B.filter((R)=>{const k=N.find((v)=>v.id===R.id);return k&&!r2(J8(R.value),J8(k.value))}),P=(R,k)=>{const v=k==="removed"?null:R.value,M={id:R.id,value:v,edges:R.edges||[],timestamp:R.timestamp||null,action:k};O(M)};D.forEach((R)=>P(R,"added")),L.forEach((R)=>P(R,"removed")),H.forEach((R)=>P(R,"updated"))};if(O){if(N.forEach((B)=>{if(B.value)O({id:B.id,value:B.value,edges:B.edges,timestamp:B.timestamp,action:"initial"})}),F.realtime)V=(B)=>{const D=P9(B,F);if(!r2(J8(D),J8(N)))C(D),N=D},this.eventListeners.push(V)}return{results:N,...F.realtime&&O&&V&&{unsubscribe:()=>{const B=this.eventListeners.indexOf(V);B>-1&&this.eventListeners.splice(B,1)}}}}async remove(Y){await this.ready;const q=this.hybridClock.now(),F=this.graph.get(Y);if(!F)return console.error(`Node with ID '${Y}' not found.`);delete this.graph.nodes[Y],this.oplog.add({type:"remove",id:Y,timestamp:q}),Object.values(this.graph.nodes).forEach((O)=>O.edges=O.edges.filter((Z)=>Z!==Y)),await this.saveGraphToOPFS(),this.saveGlobalTimestamp(q),await this.sendData([{type:"remove",id:Y,value:F.value,timestamp:q}]),this.emit()}async clear(){await this.ready,this.graph.nodes={};try{await(await navigator.storage.getDirectory()).removeEntry(`${this.name}_graph.msgpack`)}catch({message:Y}){console.warn(`Error deleting _graph.msgpack: ${Y}`)}this.emit(),console.log("All data has been deleted.")}async link(Y,q){await this.ready;const F=this.hybridClock.now();if(!this.graph.nodes[Y]||!this.graph.nodes[q]){console.error(`One or both nodes (${Y}, ${q}) do not exist.`);return}this.graph.link(Y,q,F),this.oplog.add({type:"link",sourceId:Y,targetId:q,timestamp:F}),await this.saveGraphToOPFS(),this.saveGlobalTimestamp(F),await this.sendData([{type:"link",sourceId:Y,targetId:q,timestamp:F}]),this.emit()}async applyFullGraph(Y){try{console.log("Applying full graph from remote..."),this.graph.nodes={...Y.nodes},await this.saveGraphToOPFS()}catch({message:q}){console.error(`Error applying the full graph: ${q}`)}}async receiveChanges(Y){let q=!1,F=null;const O={upsert:(Z)=>{const N=this.graph.get(Z.id),V=a2(N,Z,this.hybridClock);if(V.resolved){if(this.graph.upsert(Z.id,V.value,V.timestamp),this.hybridClock.update(V.timestamp),this.oplog.add({type:"upsert",id:Z.id,timestamp:V.timestamp}),q=!0,!F||this.hybridClock.compare(V.timestamp,F)>0)F=V.timestamp}},remove:(Z)=>{const N=this.graph.get(Z.id);if(N&&this.hybridClock.compare(N.timestamp,Z.timestamp)<0){if(delete this.graph.nodes[Z.id],this.hybridClock.update(Z.timestamp),this.oplog.add({type:"remove",id:Z.id,timestamp:Z.timestamp}),q=!0,!F||this.hybridClock.compare(Z.timestamp,F)>0)F=Z.timestamp}},link:(Z)=>{const N=this.graph.get(Z.sourceId),V=this.graph.get(Z.targetId);if(N&&V&&this.hybridClock.compare(N.timestamp,Z.timestamp)<0){if(this.graph.link(Z.sourceId,Z.targetId,Z.timestamp),this.hybridClock.update(Z.timestamp),this.oplog.add({type:"link",sourceId:Z.sourceId,targetId:Z.targetId,timestamp:Z.timestamp}),q=!0,!F||this.hybridClock.compare(Z.timestamp,F)>0)F=Z.timestamp}},sync:async(Z)=>{const N=Z.timestamp;console.log("\uD83D\uDCEC [SYNC REQUEST RECEIVED] A peer is asking for changes since timestamp:",N);const V=this.oplog.getOldest();if(V&&N&&this.hybridClock.compare(N,V.timestamp)<0){console.error("\uD83D\uDCA5 [FALLBACK TRIGGERED] Peer is too far behind. Sending FULL graph state."),await this.sendData([{type:"syncReceive",graph:this.graph}]);return}const C=this.oplog.getDelta(N,this.hybridClock.compare);if(C.length>0){const B=C.map((L)=>{if(L.type==="upsert"){const H=this.graph.get(L.id);return{...L,value:H?H.value:null}}return L}),D=A8.deflate(J8(B));console.log("\uD83D\uDCE6 Delta compressed for transport."),console.log(`\uD83D\uDE80 [SENDING DELTA] Found ${C.length} new operations to send.`),await this.sendData([{type:"deltaSync",operations:D}])}else console.log("\u2705 [ALREADY SYNCED] Peer is up-to-date. Nothing to send.")},deltaSync:(Z)=>{console.log("\uD83D\uDEF0\uFE0F [DECOMPRESSING DELTA] Received compressed delta sync.");let N=Q7(A8.inflate(Z.operations));console.log(`\uD83D\uDEF0\uFE0F [DELTA SYNC RECEIVED] Applying ${N.length} operations from a peer.`);for(let V of N)O[V.type]?.(V)},syncReceive:async(Z)=>{if(console.log("\uD83D\uDCE6 [FULL SYNC RECEIVED] Overwriting local state with full graph from a peer."),Z.graph)await this.applyFullGraph(Z.graph),this.oplog.clear(),console.warn("\uD83D\uDD12 Oplog has been cleared due to full sync."),q=!0;else console.error("Full sync failed: received graph data is invalid.",Z.graph)}};for(let Z of Y)if(O[Z.type])await O[Z.type](Z);else console.warn(`\uD83E\uDD37\u200D\u2640\uFE0F [UNKNOWN MESSAGE TYPE] Received unhandled message type: "${Z.type}"`);if(F)console.log("\uD83D\uDCC8 [UPDATING GLOBAL TIMESTAMP] Advancing local knowledge to the latest received timestamp."),this.saveGlobalTimestamp(F);if(q)console.log("\uD83D\uDCBE [STATE CHANGED] Saving new state to OPFS and emitting update."),await this.saveGraphToOPFS(),this.emit()}}export{d7 as default};
|
|
11
|
+
*//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var z2=function(Y){const{a:q,b:F}=H6,O=y0(Y*Y),Z=y0(O*Y);return y0(Z+q*Y+F)},Z2=function(Y){if(!(Y instanceof o0))throw new TypeError("JacobianPoint expected")},v7=function(Y,q){const F=q.negate();return Y?F:q},$2=function(Y){return Number.parseInt(Y[0],16)>=8?"00"+Y:Y},q2=function(Y){if(Y.length<2||Y[0]!==2)throw new Error(`Invalid signature integer tag: ${V1(Y)}`);const q=Y[1],F=Y.subarray(2,q+2);if(!q||F.length!==q)throw new Error("Invalid signature integer: wrong length");if(F[0]===0&&F[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:b6(F),left:Y.subarray(q+2)}},tY=function(Y){if(Y.length<2||Y[0]!=48)throw new Error(`Invalid signature tag: ${V1(Y)}`);if(Y[1]!==Y.length-2)throw new Error("Invalid signature: incorrect length");const{data:q,left:F}=q2(Y.subarray(2)),{data:O,left:Z}=q2(F);if(Z.length)throw new Error(`Invalid signature: left bytes after parsing: ${V1(Z)}`);return{r:q,s:O}},h1=function(Y){return Y instanceof Uint8Array||ArrayBuffer.isView(Y)&&Y.constructor.name==="Uint8Array"},C2=function(Y){if(!h1(Y))throw new Error("Uint8Array expected")},_1=function(...Y){if(Y.every(C2),Y.length===1)return Y[0];const q=Y.reduce((O,Z)=>O+Z.length,0),F=new Uint8Array(q);for(let O=0,Z=0;O<Y.length;O++){const N=Y[O];F.set(N,Z),Z+=N.length}return F};function V1(Y){C2(Y);let q="";for(let F=0;F<Y.length;F++)q+=eY[Y[F]];return q}var j2=function(Y){if(Y>=Y8._0&&Y<=Y8._9)return Y-Y8._0;if(Y>=Y8.A&&Y<=Y8.F)return Y-(Y8.A-10);if(Y>=Y8.a&&Y<=Y8.f)return Y-(Y8.a-10);return};function C8(Y){if(typeof Y!=="string")throw new Error("hex string expected, got "+typeof Y);const q=Y.length,F=q/2;if(q%2)throw new Error("hex string expected, got unpadded hex of length "+q);const O=new Uint8Array(F);for(let Z=0,N=0;Z<F;Z++,N+=2){const V=j2(Y.charCodeAt(N)),C=j2(Y.charCodeAt(N+1));if(V===void 0||C===void 0){const B=Y[N]+Y[N+1];throw new Error('hex string expected, got non-hex character "'+B+'" at index '+N)}O[Z]=V*16+C}return O}var O8=function(Y){if(typeof Y!=="bigint")throw new Error("Expected bigint");if(!(u0<=Y&&Y<QV))throw new Error("Expected number 0 <= n < 2^256");return Y.toString(16).padStart(64,"0")},c1=function(Y){const q=C8(O8(Y));if(q.length!==32)throw new Error("Error: expected 32 bytes");return q},m1=function(Y){const q=Y.toString(16);return q.length&1?`0${q}`:q},E7=function(Y){if(typeof Y!=="string")throw new TypeError("hexToNumber: expected string, got "+typeof Y);return BigInt(`0x${Y}`)},b6=function(Y){return E7(V1(Y))},g8=function(Y){return h1(Y)?Uint8Array.from(Y):C8(Y)},H2=function(Y){if(typeof Y==="number"&&Number.isSafeInteger(Y)&&Y>0)return BigInt(Y);if(typeof Y==="bigint"&&l1(Y))return Y;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")},y0=function(Y,q=H6.P){const F=Y%q;return F>=u0?F:q+F},m6=function(Y,q){const{P:F}=H6;let O=Y;while(q-- >u0)O*=O,O%=F;return O},WV=function(Y){const{P:q}=H6,F=BigInt(6),O=BigInt(11),Z=BigInt(22),N=BigInt(23),V=BigInt(44),C=BigInt(88),B=Y*Y*Y%q,D=B*B*Y%q,L=m6(D,p1)*D%q,H=m6(L,p1)*D%q,P=m6(H,H8)*B%q,R=m6(P,O)*P%q,k=m6(R,Z)*R%q,v=m6(k,V)*k%q,M=m6(v,C)*v%q,w=m6(M,V)*k%q,x=m6(w,p1)*D%q,g=m6(x,N)*R%q,_=m6(g,F)*B%q,p=m6(_,H8);if(p*p%q!==Y)throw new Error("Cannot find square root");return p},g7=function(Y,q=H6.P){if(Y===u0||q<=u0)throw new Error(`invert: expected positive integers, got n=${Y} mod=${q}`);let F=y0(Y,q),O=q,Z=u0,N=j6,V=j6,C=u0;while(F!==u0){const D=O/F,L=O%F,H=Z-V*D,P=N-C*D;O=F,F=L,Z=V,N=C,V=H,C=P}if(O!==j6)throw new Error("invert: does not exist");return y0(Z,q)},GV=function(Y,q=H6.P){const F=new Array(Y.length),O=Y.reduce((N,V,C)=>{if(V===u0)return N;return F[C]=N,y0(N*V,q)},j6),Z=g7(O,q);return Y.reduceRight((N,V,C)=>{if(V===u0)return N;return F[C]=y0(N*F[C],q),y0(N*V,q)},Z),F},XV=function(Y){const q=Y.length*8-b1*8,F=b6(Y);return q>0?F>>BigInt(q):F},YV=function(Y,q=!1){const F=XV(Y);if(q)return F;const{n:O}=H6;return F>=O?F-O:F},l1=function(Y){return u0<Y&&Y<H6.n},S7=function(Y){return u0<Y&&Y<H6.P};var d1=function(Y){let q;if(typeof Y==="bigint")q=Y;else if(typeof Y==="number"&&Number.isSafeInteger(Y)&&Y>0)q=BigInt(Y);else if(typeof Y==="string"){if(Y.length!==2*b1)throw new Error("Expected 32 bytes of private key");q=E7(Y)}else if(h1(Y)){if(Y.length!==b1)throw new Error("Expected 32 bytes of private key");q=b6(Y)}else throw new TypeError("Expected valid private key");if(!l1(q))throw new Error("Expected private key: 0 < key < n");return q},VV=function(Y){if(Y instanceof Z6)return Y.assertValidity(),Y;else return Z6.fromHex(Y)},JV=function(Y){if(Y instanceof w8)return Y.assertValidity(),Y;try{return w8.fromDER(Y)}catch(q){return w8.fromCompact(Y)}};var w7=function(Y){return y0(b6(Y),H6.n)},UV=function(Y){return Z6.fromPrivateKey(Y).toRawX()};async function FV(Y,q,F){return new z9(Y,q,F).calc()}var KV=function(Y,q,F){return new z9(Y,q,F).calcSync()},O2=function(Y,q,F){const O=Y instanceof J1,Z=O?Y:J1.fromHex(Y);if(O)Z.assertValidity();return{...Z,m:g8(q),P:VV(F)}},D2=function(Y,q,F,O){const Z=Z6.BASE.multiplyAndAddUnsafe(q,d1(F),y0(-O,H6.n));if(!Z||!Z.hasEvenY()||Z.x!==Y)return!1;return!0};async function L2(Y,q,F){try{const{r:O,s:Z,m:N,P:V}=O2(Y,q,F),C=w7(await p6.taggedHash(j8.challenge,c1(O),V.toRawX(),N));return D2(O,V,Z,C)}catch(O){return!1}}var N2=function(Y,q,F){try{const{r:O,s:Z,m:N,P:V}=O2(Y,q,F),C=w7(p6.taggedHashSync(j8.challenge,c1(O),V.toRawX(),N));return D2(O,V,Z,C)}catch(O){if(O instanceof K9)throw O;return!1}};/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */var u0=BigInt(0),j6=BigInt(1),H8=BigInt(2),p1=BigInt(3),J2=BigInt(8),H6=Object.freeze({a:u0,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:j6,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),U2=(Y,q)=>(Y+q/H8)/q,M7={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(Y){const{n:q}=H6,F=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),O=-j6*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Z=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),N=F,V=BigInt("0x100000000000000000000000000000000"),C=U2(N*Y,q),B=U2(-O*Y,q);let D=y0(Y-C*F-B*Z,q),L=y0(-C*O-B*N,q);const H=D>V,P=L>V;if(H)D=q-D;if(P)L=q-L;if(D>V||L>V)throw new Error("splitScalarEndo: Endomorphism failed, k="+Y);return{k1neg:H,k1:D,k2neg:P,k2:L}}},X1=32,b1=32;var F2=X1+1,K2=2*X1+1;var A7=H6.a===u0;class K9 extends Error{constructor(Y){super(Y)}}class o0{constructor(Y,q,F){this.x=Y,this.y=q,this.z=F}static fromAffine(Y){if(!(Y instanceof Z6))throw new TypeError("JacobianPoint#fromAffine: expected Point");if(Y.equals(Z6.ZERO))return o0.ZERO;return new o0(Y.x,Y.y,j6)}static toAffineBatch(Y){const q=GV(Y.map((F)=>F.z));return Y.map((F,O)=>F.toAffine(q[O]))}static normalizeZ(Y){return o0.toAffineBatch(Y).map(o0.fromAffine)}equals(Y){Z2(Y);const{x:q,y:F,z:O}=this,{x:Z,y:N,z:V}=Y,C=y0(O*O),B=y0(V*V),D=y0(q*B),L=y0(Z*C),H=y0(y0(F*V)*B),P=y0(y0(N*O)*C);return D===L&&H===P}negate(){return new o0(this.x,y0(-this.y),this.z)}double(){const{x:Y,y:q,z:F}=this,O=y0(Y*Y),Z=y0(q*q),N=y0(Z*Z),V=Y+Z,C=y0(H8*(y0(V*V)-O-N)),B=y0(p1*O),D=y0(B*B),L=y0(D-H8*C),H=y0(B*(C-L)-J2*N),P=y0(H8*q*F);return new o0(L,H,P)}add(Y){Z2(Y);const{x:q,y:F,z:O}=this,{x:Z,y:N,z:V}=Y;if(Z===u0||N===u0)return this;if(q===u0||F===u0)return Y;const C=y0(O*O),B=y0(V*V),D=y0(q*B),L=y0(Z*C),H=y0(y0(F*V)*B),P=y0(y0(N*O)*C),R=y0(L-D),k=y0(P-H);if(R===u0)if(k===u0)return this.double();else return o0.ZERO;const v=y0(R*R),M=y0(R*v),w=y0(D*v),x=y0(k*k-M-H8*w),g=y0(k*(w-x)-H*M),_=y0(O*V*R);return new o0(x,g,_)}subtract(Y){return this.add(Y.negate())}multiplyUnsafe(Y){const q=o0.ZERO;if(typeof Y==="bigint"&&Y===u0)return q;let F=H2(Y);if(F===j6)return this;if(!A7){let L=q,H=this;while(F>u0){if(F&j6)L=L.add(H);H=H.double(),F>>=j6}return L}let{k1neg:O,k1:Z,k2neg:N,k2:V}=M7.splitScalar(F),C=q,B=q,D=this;while(Z>u0||V>u0){if(Z&j6)C=C.add(D);if(V&j6)B=B.add(D);D=D.double(),Z>>=j6,V>>=j6}if(O)C=C.negate();if(N)B=B.negate();return B=new o0(y0(B.x*M7.beta),B.y,B.z),C.add(B)}precomputeWindow(Y){const q=A7?128/Y+1:256/Y+1,F=[];let O=this,Z=O;for(let N=0;N<q;N++){Z=O,F.push(Z);for(let V=1;V<2**(Y-1);V++)Z=Z.add(O),F.push(Z);O=Z.double()}return F}wNAF(Y,q){if(!q&&this.equals(o0.BASE))q=Z6.BASE;const F=q&&q._WINDOW_SIZE||1;if(256%F)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let O=q&&F9.get(q);if(!O){if(O=this.precomputeWindow(F),q&&F!==1)O=o0.normalizeZ(O),F9.set(q,O)}let{ZERO:Z,BASE:N}=o0;const V=1+(A7?128/F:256/F),C=2**(F-1),B=BigInt(2**F-1),D=2**F,L=BigInt(F);for(let H=0;H<V;H++){const P=H*C;let R=Number(Y&B);if(Y>>=L,R>C)R-=D,Y+=j6;const k=P,v=P+Math.abs(R)-1,M=H%2!==0,w=R<0;if(R===0)N=N.add(v7(M,O[k]));else Z=Z.add(v7(w,O[v]))}return{p:Z,f:N}}multiply(Y,q){let F=H2(Y),O,Z;if(A7){const{k1neg:N,k1:V,k2neg:C,k2:B}=M7.splitScalar(F);let{p:D,f:L}=this.wNAF(V,q),{p:H,f:P}=this.wNAF(B,q);D=v7(N,D),H=v7(C,H),H=new o0(y0(H.x*M7.beta),H.y,H.z),O=D.add(H),Z=L.add(P)}else{const{p:N,f:V}=this.wNAF(F,q);O=N,Z=V}return o0.normalizeZ([O,Z])[0]}toAffine(Y){const{x:q,y:F,z:O}=this,Z=this.equals(o0.ZERO);if(Y==null)Y=Z?J2:g7(O);const N=Y,V=y0(N*N),C=y0(V*N),B=y0(q*V),D=y0(F*C),L=y0(O*N);if(Z)return Z6.ZERO;if(L!==j6)throw new Error("invZ was invalid");return new Z6(B,D)}}o0.BASE=new o0(H6.Gx,H6.Gy,j6);o0.ZERO=new o0(u0,j6,u0);var F9=new WeakMap;class Z6{constructor(Y,q){this.x=Y,this.y=q}_setWindowSize(Y){this._WINDOW_SIZE=Y,F9.delete(this)}hasEvenY(){return this.y%H8===u0}static fromCompressedHex(Y){const q=Y.length===32,F=b6(q?Y:Y.subarray(1));if(!S7(F))throw new Error("Point is not on curve");const O=z2(F);let Z=WV(O);const N=(Z&j6)===j6;if(q){if(N)Z=y0(-Z)}else if((Y[0]&1)===1!==N)Z=y0(-Z);const V=new Z6(F,Z);return V.assertValidity(),V}static fromUncompressedHex(Y){const q=b6(Y.subarray(1,X1+1)),F=b6(Y.subarray(X1+1,X1*2+1)),O=new Z6(q,F);return O.assertValidity(),O}static fromHex(Y){const q=g8(Y),F=q.length,O=q[0];if(F===X1)return this.fromCompressedHex(q);if(F===F2&&(O===2||O===3))return this.fromCompressedHex(q);if(F===K2&&O===4)return this.fromUncompressedHex(q);throw new Error(`Point.fromHex: received invalid point. Expected 32-${F2} compressed bytes or ${K2} uncompressed bytes, not ${F}`)}static fromPrivateKey(Y){return Z6.BASE.multiply(d1(Y))}static fromSignature(Y,q,F){const{r:O,s:Z}=JV(q);if(![0,1,2,3].includes(F))throw new Error("Cannot recover: invalid recovery bit");const N=YV(g8(Y)),{n:V}=H6,C=F===2||F===3?O+V:O,B=g7(C,V),D=y0(-N*B,V),L=y0(Z*B,V),H=F&1?"03":"02",P=Z6.fromHex(H+O8(C)),R=Z6.BASE.multiplyAndAddUnsafe(P,D,L);if(!R)throw new Error("Cannot recover signature: point at infinify");return R.assertValidity(),R}toRawBytes(Y=!1){return C8(this.toHex(Y))}toHex(Y=!1){const q=O8(this.x);if(Y)return`${this.hasEvenY()?"02":"03"}${q}`;else return`04${q}${O8(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const{x:q,y:F}=this;if(!S7(q)||!S7(F))throw new Error("Point is not on elliptic curve");const O=y0(F*F),Z=z2(q);if(y0(O-Z)!==u0)throw new Error("Point is not on elliptic curve")}equals(Y){return this.x===Y.x&&this.y===Y.y}negate(){return new Z6(this.x,y0(-this.y))}double(){return o0.fromAffine(this).double().toAffine()}add(Y){return o0.fromAffine(this).add(o0.fromAffine(Y)).toAffine()}subtract(Y){return this.add(Y.negate())}multiply(Y){return o0.fromAffine(this).multiply(Y,this).toAffine()}multiplyAndAddUnsafe(Y,q,F){const O=o0.fromAffine(this),Z=q===u0||q===j6||this!==Z6.BASE?O.multiplyUnsafe(q):O.multiply(q),N=o0.fromAffine(Y).multiplyUnsafe(F),V=Z.add(N);return V.equals(o0.ZERO)?void 0:V.toAffine()}}Z6.BASE=new Z6(H6.Gx,H6.Gy);Z6.ZERO=new Z6(u0,u0);class w8{constructor(Y,q){this.r=Y,this.s=q,this.assertValidity()}static fromCompact(Y){const q=h1(Y);if(typeof Y!=="string"&&!q)throw new TypeError("Signature.fromCompact: Expected string or Uint8Array");const O=q?V1(Y):Y;if(O.length!==128)throw new Error("Signature.fromCompact: Expected 64-byte hex");return new w8(E7(O.slice(0,64)),E7(O.slice(64,128)))}static fromDER(Y){const q=h1(Y);if(typeof Y!=="string"&&!q)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:F,s:O}=tY(q?Y:C8(Y));return new w8(F,O)}static fromHex(Y){return this.fromDER(Y)}assertValidity(){const{r:Y,s:q}=this;if(!l1(Y))throw new Error("Invalid Signature: r must be 0 < r < n");if(!l1(q))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const Y=H6.n>>j6;return this.s>Y}normalizeS(){return this.hasHighS()?new w8(this.r,y0(-this.s,H6.n)):this}toDERRawBytes(){return C8(this.toDERHex())}toDERHex(){const Y=$2(m1(this.s)),q=$2(m1(this.r)),F=Y.length/2,O=q.length/2,Z=m1(F),N=m1(O);return`30${m1(O+F+4)}02${N}${q}02${Z}${Y}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return C8(this.toCompactHex())}toCompactHex(){return O8(this.r)+O8(this.s)}}var eY=Array.from({length:256},(Y,q)=>q.toString(16).padStart(2,"0")),Y8={_0:48,_9:57,A:65,F:70,a:97,f:102},QV=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),Y1,U9;class J1{constructor(Y,q){this.r=Y,this.s=q,this.assertValidity()}static fromHex(Y){const q=g8(Y);if(q.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${q.length}`);const F=b6(q.subarray(0,32)),O=b6(q.subarray(32,64));return new J1(F,O)}assertValidity(){const{r:Y,s:q}=this;if(!S7(Y)||!l1(q))throw new Error("Invalid signature")}toHex(){return O8(this.r)+O8(this.s)}toRawBytes(){return C8(this.toHex())}}class z9{constructor(Y,q,F=p6.randomBytes()){if(Y==null)throw new TypeError(`sign: Expected valid message, not "${Y}"`);this.m=g8(Y);const{x:O,scalar:Z}=this.getScalar(d1(q));if(this.px=O,this.d=Z,this.rand=g8(F),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(Y){const q=Z6.fromPrivateKey(Y),F=q.hasEvenY()?Y:H6.n-Y;return{point:q,scalar:F,x:q.toRawX()}}initNonce(Y,q){return c1(Y^b6(q))}finalizeNonce(Y){const q=y0(b6(Y),H6.n);if(q===u0)throw new Error("sign: Creation of signature failed. k is zero");const{point:F,x:O,scalar:Z}=this.getScalar(q);return{R:F,rx:O,k:Z}}finalizeSig(Y,q,F,O){return new J1(Y.x,y0(q+F*O,H6.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:Y,d:q,px:F,rand:O}=this,Z=p6.taggedHash,N=this.initNonce(q,await Z(j8.aux,O)),{R:V,rx:C,k:B}=this.finalizeNonce(await Z(j8.nonce,N,F,Y)),D=w7(await Z(j8.challenge,C,F,Y)),L=this.finalizeSig(V,B,D,q);if(!await L2(L,Y,F))this.error();return L}calcSync(){const{m:Y,d:q,px:F,rand:O}=this,Z=p6.taggedHashSync,N=this.initNonce(q,Z(j8.aux,O)),{R:V,rx:C,k:B}=this.finalizeNonce(Z(j8.nonce,N,F,Y)),D=w7(Z(j8.challenge,C,F,Y)),L=this.finalizeSig(V,B,D,q);if(!N2(L,Y,F))this.error();return L}}var Z9={Signature:J1,getPublicKey:UV,sign:FV,verify:L2,signSync:KV,verifySync:N2};Z6.BASE._setWindowSize(8);var S6={node:J9,web:typeof self==="object"&&("crypto"in self)?self.crypto:void 0},j8={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},x7={},p6={bytesToHex:V1,hexToBytes:C8,concatBytes:_1,mod:y0,invert:g7,isValidPrivateKey(Y){try{return d1(Y),!0}catch(q){return!1}},_bigintTo32Bytes:c1,_normalizePrivateKey:d1,hashToPrivateKey:(Y)=>{Y=g8(Y);const q=b1+8;if(Y.length<q||Y.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const F=y0(b6(Y),H6.n-j6)+j6;return c1(F)},randomBytes:(Y=32)=>{if(S6.web)return S6.web.getRandomValues(new Uint8Array(Y));else if(S6.node){const{randomBytes:q}=S6.node;return Uint8Array.from(q(Y))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>p6.hashToPrivateKey(p6.randomBytes(b1+8)),precompute(Y=8,q=Z6.BASE){const F=q===Z6.BASE?q:new Z6(q.x,q.y);return F._setWindowSize(Y),F.multiply(p1),F},sha256:async(...Y)=>{if(S6.web){const q=await S6.web.subtle.digest("SHA-256",_1(...Y));return new Uint8Array(q)}else if(S6.node){const{createHash:q}=S6.node,F=q("sha256");return Y.forEach((O)=>F.update(O)),Uint8Array.from(F.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(Y,...q)=>{if(S6.web){const F=await S6.web.subtle.importKey("raw",Y,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),O=_1(...q),Z=await S6.web.subtle.sign("HMAC",F,O);return new Uint8Array(Z)}else if(S6.node){const{createHmac:F}=S6.node,O=F("sha256",Y);return q.forEach((Z)=>O.update(Z)),Uint8Array.from(O.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(Y,...q)=>{let F=x7[Y];if(F===void 0){const O=await p6.sha256(Uint8Array.from(Y,(Z)=>Z.charCodeAt(0)));F=_1(O,O),x7[Y]=F}return p6.sha256(F,...q)},taggedHashSync:(Y,...q)=>{if(typeof Y1!=="function")throw new K9("sha256Sync is undefined, you need to set it");let F=x7[Y];if(F===void 0){const O=Y1(Uint8Array.from(Y,(Z)=>Z.charCodeAt(0)));F=_1(O,O),x7[Y]=F}return Y1(F,...q)},_JacobianPoint:o0};Object.defineProperties(p6,{sha256Sync:{configurable:!1,get(){return Y1},set(Y){if(!Y1)Y1=Y}},hmacSha256Sync:{configurable:!1,get(){return U9},set(Y){if(!U9)U9=Y}}});var{floor:$9,random:zV,sin:ZV}=Math,y8="Trystero",D8=(Y,q)=>Array(Y).fill().map(q);var _7=(Y)=>D8(Y,()=>"0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"[$9(zV()*"0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz".length)]).join(""),a6=_7(20),n6=Promise.all.bind(Promise),P2=typeof window!=="undefined",{entries:m7,fromEntries:q9,keys:k2}=Object,V8=()=>{},c6=(Y)=>new Error(`Trystero: ${Y}`),$V=new TextEncoder,qV=new TextDecoder,r6=(Y)=>$V.encode(Y),U1=(Y)=>qV.decode(Y),p7=(Y)=>Y.reduce((q,F)=>q+F.toString(16).padStart(2,"0"),""),u1=(...Y)=>Y.join("@"),jV=(Y,q)=>{const F=[...Y],O=()=>{const N=ZV(q++)*1e4;return N-$9(N)};let Z=F.length;while(Z){const N=$9(O()*Z--);[F[Z],F[N]]=[F[N],F[Z]]}return F},B2=(Y,q,F,O)=>{return(Y.relayUrls||(O?jV(q,j9(Y.appId)):q)).slice(0,Y.relayUrls?Y.relayUrls.length:Y.relayRedundancy||F)},h6=JSON.stringify,_8=JSON.parse,j9=(Y,q=Number.MAX_SAFE_INTEGER)=>Y.split("").reduce((F,O)=>F+O.charCodeAt(0),0)%q;var y7={},R2=(Y,q)=>{const F={},O=()=>{const Z=new WebSocket(Y);Z.onclose=()=>{y7[Y]??=3333,setTimeout(O,y7[Y]),y7[Y]*=2},Z.onmessage=(N)=>q(N.data),F.socket=Z,F.url=Z.url,F.ready=new Promise((N)=>Z.onopen=()=>{N(F),y7[Y]=3333}),F.send=(N)=>{if(Z.readyState===1)Z.send(N)}};return O(),F},I2=(Y)=>()=>q9(m7(Y).map(([q,F])=>[q,F.socket]));var H9="AES-GCM",HV={},CV=(Y)=>btoa(String.fromCharCode.apply(null,new Uint8Array(Y))),OV=(Y)=>{const q=atob(Y);return new Uint8Array(q.length).map((F,O)=>q.charCodeAt(O)).buffer},f1=async(Y)=>HV[Y]||=Array.from(new Uint8Array(await crypto.subtle.digest("SHA-1",r6(Y)))).map((q)=>q.toString(36)).join(""),T2=async(Y,q,F)=>crypto.subtle.importKey("raw",await crypto.subtle.digest({name:"SHA-256"},r6(`${Y}:${q}:${F}`)),{name:H9},!1,["encrypt","decrypt"]),M2="$",A2=",",v2=async(Y,q)=>{const F=crypto.getRandomValues(new Uint8Array(16));return F.join(A2)+M2+CV(await crypto.subtle.encrypt({name:H9,iv:F},await Y,r6(q)))},x2=async(Y,q)=>{const[F,O]=q.split(M2);return U1(await crypto.subtle.decrypt({name:H9,iv:new Uint8Array(F.split(A2))},await Y,OV(O)))};var DV=5000,S2="icegatheringstatechange",E2="offer",LV="answer",C9=(Y,{rtcConfig:q,rtcPolyfill:F,turnConfig:O})=>{const Z=new(F||RTCPeerConnection)({iceServers:NV.concat(O||[]),...q}),N={};let V=!1,C=!1,B=null;const D=(H)=>{H.binaryType="arraybuffer",H.bufferedAmountLowThreshold=65535,H.onmessage=(P)=>N.data?.(P.data),H.onopen=()=>N.connect?.(),H.onclose=()=>N.close?.(),H.onerror=(P)=>N.error?.(P)},L=(H)=>Promise.race([new Promise((P)=>{const R=()=>{if(H.iceGatheringState==="complete")H.removeEventListener(S2,R),P()};H.addEventListener(S2,R),R()}),new Promise((P)=>setTimeout(P,DV))]).then(()=>({type:H.localDescription.type,sdp:H.localDescription.sdp.replace(/a=ice-options:trickle\s\n/g,"")}));if(Y)B=Z.createDataChannel("data"),D(B);else Z.ondatachannel=({channel:H})=>{B=H,D(H)};if(Z.onnegotiationneeded=async()=>{try{V=!0,await Z.setLocalDescription();const H=await L(Z);N.signal?.(H)}catch(H){N.error?.(H)}finally{V=!1}},Z.onconnectionstatechange=()=>{if(["disconnected","failed","closed"].includes(Z.connectionState))N.close?.()},Z.ontrack=(H)=>{N.track?.(H.track,H.streams[0]),N.stream?.(H.streams[0])},Z.onremovestream=(H)=>N.stream?.(H.stream),Y){if(!Z.canTrickleIceCandidates)Z.onnegotiationneeded()}return{created:Date.now(),connection:Z,get channel(){return B},get isDead(){return Z.connectionState==="closed"},async signal(H){if(B?.readyState==="open"&&!H.sdp?.includes("a=rtpmap"))return;try{if(H.type===E2){if(V||Z.signalingState!=="stable"&&!C){if(Y)return;await n6([Z.setLocalDescription({type:"rollback"}),Z.setRemoteDescription(H)])}else await Z.setRemoteDescription(H);await Z.setLocalDescription();const P=await L(Z);return N.signal?.(P),P}else if(H.type===LV){C=!0;try{await Z.setRemoteDescription(H)}finally{C=!1}}}catch(P){N.error?.(P)}},sendData:(H)=>B.send(H),destroy:()=>{B?.close(),Z.close(),V=!1,C=!1},setHandlers:(H)=>Object.assign(N,H),offerPromise:Y?new Promise((H)=>N.signal=(P)=>{if(P.type===E2)H(P)}):Promise.resolve(),addStream:(H)=>H.getTracks().forEach((P)=>Z.addTrack(P,H)),removeStream:(H)=>Z.getSenders().filter((P)=>H.getTracks().includes(P.track)).forEach((P)=>Z.removeTrack(P)),addTrack:(H,P)=>Z.addTrack(H,P),removeTrack:(H)=>{const P=Z.getSenders().find((R)=>R.track===H);if(P)Z.removeTrack(P)},replaceTrack:(H,P)=>{const R=Z.getSenders().find((k)=>k.track===H);if(R)return R.replaceTrack(P)}}},NV=[...D8(3,(Y,q)=>`stun:stun${q||""}.l.google.com:19302`),"stun:stun.cloudflare.com:3478"].map((Y)=>({urls:Y}));var PV=Object.getPrototypeOf(Uint8Array),h7=12,g2=0,c7=g2+h7,l7=c7+1,o1=l7+1,a1=o1+1,m8=16384-a1,b7=255,w2="bufferedamountlow",F1=(Y)=>"@_"+Y,y2=(Y,q,F)=>{const O={},Z={},N={},V={},C={},B={},D={},L={onPeerJoin:V8,onPeerLeave:V8,onPeerStream:V8,onPeerTrack:V8},H=(Q,G)=>(Q?Array.isArray(Q)?Q:[Q]:k2(O)).flatMap((J)=>{const X=O[J];if(!X)return console.warn(`${y8}: no peer with id ${J} found`),[];return G(J,X)}),P=(Q)=>{if(!O[Q])return;delete O[Q],delete V[Q],delete C[Q],L.onPeerLeave(Q),q(Q)},R=(Q)=>{if(Z[Q])return N[Q];if(!Q)throw c6("action type argument is required");const G=r6(Q);if(G.byteLength>h7)throw c6(`action type string "${Q}" (${G.byteLength}b) exceeds `+`byte limit (${h7}). Hint: choose a shorter name.`);const J=new Uint8Array(h7);J.set(G);let X=0;return Z[Q]={onComplete:V8,onProgress:V8,setOnComplete:(U)=>Z[Q]={...Z[Q],onComplete:U},setOnProgress:(U)=>Z[Q]={...Z[Q],onProgress:U},send:async(U,$,j,K)=>{if(j&&typeof j!=="object")throw c6("action meta argument must be an object");const W=typeof U;if(W==="undefined")throw c6("action data cannot be undefined");const z=W!=="string",A=U instanceof Blob,T=A||U instanceof ArrayBuffer||U instanceof PV;if(j&&!T)throw c6("action meta argument can only be used with binary data");const y=T?new Uint8Array(A?await U.arrayBuffer():U):r6(z?h6(U):U),r=j?r6(h6(j)):null,a=Math.ceil(y.byteLength/m8)+(j?1:0)||1,t=D8(a,(l,h)=>{const n=h===a-1,q0=j&&h===0,G0=new Uint8Array(a1+(q0?r.byteLength:n?y.byteLength-m8*(a-(j?2:1)):m8));return G0.set(J),G0.set([X],c7),G0.set([n|q0<<1|T<<2|z<<3],l7),G0.set([Math.round((h+1)/a*b7)],o1),G0.set(j?q0?r:y.subarray((h-1)*m8,h*m8):y.subarray(h*m8,(h+1)*m8),a1),G0});return X=X+1&b7,n6(H($,async(l,h)=>{const{channel:n}=h;let q0=0;while(q0<a){const G0=t[q0];if(n.bufferedAmount>n.bufferedAmountLowThreshold)await new Promise((F0)=>{const b=()=>{n.removeEventListener(w2,b),F0()};n.addEventListener(w2,b)});if(!O[l])break;h.sendData(G0),q0++,K?.(G0[o1]/b7,l,j)}}))}},N[Q]||=[Z[Q].send,Z[Q].setOnComplete,Z[Q].setOnProgress]},k=(Q,G)=>{const J=new Uint8Array(G),X=U1(J.subarray(g2,c7)).replaceAll("\0",""),[U]=J.subarray(c7,l7),[$]=J.subarray(l7,o1),[j]=J.subarray(o1,a1),K=J.subarray(a1),W=!!($&1),z=!!($&1<<1),A=!!($&1<<2),T=!!($&1<<3);if(!Z[X]){console.warn(`${y8}: received message with unregistered type (${X})`);return}V[Q]||={},V[Q][X]||={};const y=V[Q][X][U]||={chunks:[]};if(z)y.meta=_8(U1(K));else y.chunks.push(K);if(Z[X].onProgress(j/b7,Q,y.meta),!W)return;const r=new Uint8Array(y.chunks.reduce((a,t)=>a+t.byteLength,0));if(y.chunks.reduce((a,t)=>{return r.set(t,a),a+t.byteLength},0),delete V[Q][X][U],A)Z[X].onComplete(r,Q,y.meta);else{const a=U1(r);Z[X].onComplete(T?_8(a):a,Q)}},v=async()=>{await u(""),await new Promise((Q)=>setTimeout(Q,99)),m7(O).forEach(([Q,G])=>{G.destroy(),delete O[Q]}),F()},[M,w]=R(F1("ping")),[x,g]=R(F1("pong")),[_,p]=R(F1("signal")),[m,f]=R(F1("stream")),[s,Q0]=R(F1("track")),[u,K0]=R(F1("leave"));if(Y((Q,G)=>{if(O[G])return;O[G]=Q,Q.setHandlers({data:(J)=>k(G,J),stream:(J)=>{L.onPeerStream(J,G,B[G]),delete B[G]},track:(J,X)=>{L.onPeerTrack(J,X,G,D[G]),delete D[G]},signal:(J)=>_(J,G),close:()=>P(G),error:(J)=>{console.error(J),P(G)}}),L.onPeerJoin(G)}),w((Q,G)=>x("",G)),g((Q,G)=>{C[G]?.(),delete C[G]}),p((Q,G)=>O[G]?.signal(Q)),f((Q,G)=>B[G]=Q),Q0((Q,G)=>D[G]=Q),K0((Q,G)=>P(G)),P2)addEventListener("beforeunload",v);return{makeAction:R,leave:v,ping:async(Q)=>{if(!Q)throw c6("ping() must be called with target peer ID");const G=Date.now();return M("",Q),await new Promise((J)=>C[Q]=J),Date.now()-G},getPeers:()=>q9(m7(O).map(([Q,G])=>[Q,G.connection])),addStream:(Q,G,J)=>H(G,async(X,U)=>{if(J)await m(J,X);U.addStream(Q)}),removeStream:(Q,G)=>H(G,(J,X)=>X.removeStream(Q)),addTrack:(Q,G,J,X)=>H(J,async(U,$)=>{if(X)await s(X,U);$.addTrack(Q,G)}),removeTrack:(Q,G)=>H(G,(J,X)=>X.removeTrack(Q)),replaceTrack:(Q,G,J,X)=>H(J,async(U,$)=>{if(X)await s(X,U);$.replaceTrack(Q,G)}),onPeerJoin:(Q)=>L.onPeerJoin=Q,onPeerLeave:(Q)=>L.onPeerLeave=Q,onPeerStream:(Q)=>L.onPeerStream=Q,onPeerTrack:(Q)=>L.onPeerTrack=Q}};var kV=20,BV=5333,_2=57333,m2=({init:Y,subscribe:q,announce:F})=>{const O={};let Z=!1,N,V,C;return(B,D,L)=>{const{appId:H}=B;if(O[H]?.[D])return O[H][D];const P={},R={},k=u1(y8,H,D),v=f1(k),M=f1(u1(k,a6)),w=T2(B.password||"",H,D),x=(U)=>async($)=>({type:$.type,sdp:await U(w,$.sdp)}),g=x(x2),_=x(v2),p=()=>C9(!0,B),m=(U,$,j)=>{if(R[$]){if(R[$]!==U)U.destroy();return}R[$]=U,X(U,$),P[$]?.forEach((K,W)=>{if(W!==j)K.destroy()}),delete P[$]},f=(U,$)=>{if(R[$]===U)delete R[$]},s=(U,$)=>{if(R[U])return;const j=P[U]?.[$];if(j)delete P[U][$],j.destroy()},Q0=(U)=>{return V.push(...D8(U,p)),n6(V.splice(0,U).map(($)=>$.offerPromise.then(_).then((j)=>({peer:$,offer:j}))))},u=(U,$)=>L?.({error:`incorrect password (${B.password}) when decrypting ${$}`,appId:H,peerId:U,roomId:D}),K0=(U)=>async($,j,K)=>{const[W,z]=await n6([v,M]);if($!==W&&$!==z)return;const{peerId:A,offer:T,answer:y,peer:r}=typeof j==="string"?_8(j):j;if(A===a6||R[A])return;if(A&&!T&&!y){if(P[A]?.[U])return;const[[{peer:a,offer:t}],l]=await n6([Q0(1),f1(u1(k,A))]);P[A]||=[],P[A][U]=a,setTimeout(()=>s(A,U),Q[U]*0.9),a.setHandlers({connect:()=>m(a,A,U),close:()=>f(a,A)}),K(l,h6({peerId:a6,offer:t}))}else if(T){if(P[A]?.[U]&&a6>A)return;const t=C9(!1,B);t.setHandlers({connect:()=>m(t,A,U),close:()=>f(t,A)});let l;try{l=await g(T)}catch{u(A,"offer");return}if(t.isDead)return;const[h,n]=await n6([f1(u1(k,A)),t.signal(l)]);K(h,h6({peerId:a6,answer:await _(n)}))}else if(y){let a;try{a=await g(y)}catch(t){u(A,"answer");return}if(r)r.setHandlers({connect:()=>m(r,A,U),close:()=>f(r,A)}),r.signal(a);else{const t=P[A]?.[U];if(t&&!t.isDead)t.signal(a)}}};if(!B)throw c6("requires a config map as the first argument");if(!H&&!B.firebaseApp)throw c6("config map is missing appId field");if(!D)throw c6("roomId argument required");if(!Z){const U=Y(B);V=D8(kV,p),N=Array.isArray(U)?U:[U],Z=!0,C=setInterval(()=>V=V.filter(($)=>{const j=Date.now()-$.created<_2;if(!j)$.destroy();return j}),_2*1.03)}const Q=N.map(()=>BV),G=[],J=N.map(async(U,$)=>q(await U,await v,await M,K0($),Q0));n6([v,M]).then(([U,$])=>{const j=async(K,W)=>{const z=await F(K,U,$);if(typeof z==="number")Q[W]=z;G[W]=setTimeout(()=>j(K,W),Q[W])};J.forEach(async(K,W)=>{await K,j(await N[W],W)})});let X=V8;return O[H]||={},O[H][D]=y2((U)=>X=U,(U)=>delete R[U],()=>{delete O[H][D],G.forEach(clearTimeout),J.forEach(async(U)=>(await U)()),clearInterval(C)})}};var c2={},RV=5,l2="x",d2="EVENT",u2=p6.randomPrivateKey(),IV=p7(Z9.getPublicKey(u2)),O9={},n1={},TV={},f2=()=>Math.floor(Date.now()/1000),o2=(Y)=>TV[Y]??=j9(Y,1e4)+20000,p2=async(Y,q)=>{const F={kind:o2(Y),content:q,pubkey:IV,created_at:f2(),tags:[[l2,Y]]},O=p7(new Uint8Array(await crypto.subtle.digest("SHA-256",r6(h6([0,F.pubkey,F.created_at,F.kind,F.tags,F.content])))));return h6([d2,{...F,id:O,sig:p7(await Z9.sign(O,u2))}])},b2=(Y,q)=>{return O9[Y]=q,h6(["REQ",Y,{kinds:[o2(q)],since:f2(),["#"+l2]:[q]}])},h2=(Y)=>{return delete O9[Y],h6(["CLOSE",Y])},d7=m2({init:(Y)=>B2(Y,AV,RV,!0).map((q)=>{const F=R2(q,(O)=>{const[Z,N,V,C]=_8(O);if(Z!==d2){const B=`${y8}: relay failure from ${F.url} - `;if(Z==="NOTICE")console.warn(B+N);else if(Z==="OK"&&!V)console.warn(B+C);return}n1[N]?.(O9[N],V.content)});return c2[q]=F,F.ready}),subscribe:(Y,q,F,O)=>{const Z=_7(64),N=_7(64);return n1[Z]=n1[N]=(V,C)=>O(V,C,async(B,D)=>Y.send(await p2(B,D))),Y.send(b2(Z,q)),Y.send(b2(N,F)),()=>{Y.send(h2(Z)),Y.send(h2(N)),delete n1[Z],delete n1[N]}},announce:async(Y,q)=>Y.send(await p2(q,h6({peerId:a6})))}),MV=I2(c2),AV=["black.nostrcity.club","eu.purplerelay.com","ftp.halifax.rwth-aachen.de/nostr","nostr.cool110.xyz","nostr.data.haus","nostr.mom","nostr.oxtr.dev","nostr.sathoarder.com","nostr.vulpem.com","nostrelay.memory-art.xyz","playground.nostrcheck.me/relay","relay.agorist.space","relay.binaryrobot.com","relay.fountain.fm","relay.mostro.network","relay.nostraddress.com","relay.nostrdice.com","relay.nostromo.social","relay.oldenburg.cool","relay.snort.social","relay.verified-nostr.com","sendit.nosflare.com","yabu.me/v2"].map((Y)=>"wss://"+Y);var a2=(Y,q,F)=>{let O=q.timestamp;if(q.timestamp&&typeof q.timestamp.physical==="number"){const V=Date.now()+7200000;if(q.timestamp.physical>V)O={physical:V,logical:q.timestamp.logical}}if(!Y||!Y.timestamp)return{resolved:!0,value:q.value,timestamp:O};const Z=Y.timestamp;if(F.compare(Z,O)<0)return{resolved:!0,value:q.value,timestamp:O};return{resolved:!1}};class D9{constructor(Y,q=50){this.key=`gdb_oplog_${Y}`,this.maxSize=q,this.log=this._load()}_load(){try{const Y=localStorage.getItem(this.key);return Y?JSON.parse(Y):[]}catch(Y){return console.error("Failed to load oplog from localStorage:",Y),[]}}_save(){try{localStorage.setItem(this.key,JSON.stringify(this.log))}catch(Y){console.error("Failed to save oplog to localStorage:",Y)}}add(Y){if(this.log.push(Y),this.log.length>this.maxSize)this.log.shift();this._save()}getDelta(Y,q){if(!Y)return[...this.log];return this.log.filter((F)=>q(F.timestamp,Y)>0)}getOldest(){return this.log[0]}clear(){this.log=[],localStorage.removeItem(this.key)}}var vV=()=>{const Y=new Map,q=async()=>{try{const B=await navigator.storage.getDirectory(),L=await(await B.getFileHandle("~opfs-sync-test",{create:!0})).createSyncAccessHandle?.();return await L?.close(),await B.removeEntry("~opfs-sync-test"),!!L}catch{return!1}};let F="idb";const O=(async()=>{if(await q())F="sync";else try{const B=await navigator.storage.getDirectory(),L=await(await B.getFileHandle("~opfs-async-test",{create:!0})).createWritable?.();if(await L?.close(),await B.removeEntry("~opfs-async-test"),L)F="async";else F="idb"}catch{F="idb"}})(),Z=async(B,D)=>{if(!Y.has(B))Y.set(B,[]);const L=Y.get(B),H=L[L.length-1]||Promise.resolve();let P;const R=new Promise((k)=>P=k);L.push(R);try{return await H,await D()}finally{if(L.shift(),P(),L.length===0)Y.delete(B)}},N=(()=>{let B;const D=async()=>{if(!B)B=new Promise((L,H)=>{const P=indexedDB.open("opfs-fallback-db",1);P.onupgradeneeded=()=>P.result.createObjectStore("files"),P.onsuccess=()=>L(P.result),P.onerror=()=>H(P.error)});return B};return{getDB:D,get:async(L)=>{const H=await D();return new Promise((P,R)=>{const v=H.transaction("files","readonly").objectStore("files").get(L);v.onsuccess=()=>P(v.result||new Uint8Array),v.onerror=()=>R(v.error)})},set:async(L,H)=>{const P=await D();return new Promise((R,k)=>{const M=P.transaction("files","readwrite").objectStore("files").put(H,L);M.onsuccess=()=>R(),M.onerror=()=>k(M.error)})}}})(),V=async(B)=>{await O;try{if(F==="idb"){const R=await N.get(B);return{type:"loaded",name:B,data:R}}const L=await(await navigator.storage.getDirectory()).getFileHandle(B);if(F==="sync"){let R;try{R=await L.createSyncAccessHandle();const k=R.getSize(),v=new Uint8Array(k),M=R.read(v,{at:0});return{type:"loaded",name:B,data:v.slice(0,M)}}finally{R?.close()}}const H=await L.getFile(),P=new Uint8Array(await H.arrayBuffer());return{type:"loaded",name:B,data:P}}catch(D){const L=D.name==="NotFoundError"?"File not found":D.message||"Error reading file";return{type:"error",name:B,message:L}}},C=async(B,D)=>{if(await O,!(D instanceof Uint8Array))return{type:"error",name:B,message:"Content must be a Uint8Array"};return Z(B,async()=>{try{if(F==="idb")return await N.set(B,D),{type:"saved",name:B};const H=await(await navigator.storage.getDirectory()).getFileHandle(B,{create:!0});if(F==="sync"){let P;try{P=await H.createSyncAccessHandle(),P.truncate(0),P.write(D,{at:0}),P.flush()}finally{P?.close()}}else{let P;try{P=await H.createWritable(),await P.write(D)}finally{await P?.close()}}return{type:"saved",name:B}}catch(L){return{type:"error",name:B,message:L.message||"Error saving file"}}})};self.onmessage=async({data:B})=>{const{type:D,name:L,content:H}=B;await O;const P={load:()=>V(L),save:()=>C(L,H)};try{const R=P[D],k=R?await R():{type:"error",message:`Unrecognized action type: ${D}`};self.postMessage(k)}catch(R){console.error("Worker unexpected error:",R),self.postMessage({type:"error",name:L,message:R.message||"Unexpected worker error"})}}},n2=vV;var p8={$eq:(Y,q)=>Y===q,$ne:(Y,q)=>Y!==q,$gt:(Y,q)=>Y>q,$gte:(Y,q)=>Y>=q,$lt:(Y,q)=>Y<q,$lte:(Y,q)=>Y<=q,$in:(Y,q)=>Array.isArray(q)&&q.includes(Y),$between:(Y,[q,F])=>Y>=q&&Y<=F,$exists:(Y,q)=>q?Y!==void 0:Y===void 0,$text:{global:(Y,q)=>{const F=(Z)=>String(Z).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^\w\s]/g,""),O=F(q);return Object.values(Y).some((Z)=>{if(typeof Z==="object")return null.fieldSearch(Z,O);return F(Z).includes(O)})},field:(Y,q)=>{const F=(O)=>String(O).normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^\w\s]/g,"");return Array.isArray(Y)?Y.some((O)=>F(O).includes(F(q))):F(Y).includes(F(q))}},$like:(Y,q)=>{if(typeof Y!=="string"||typeof q!=="string")return!1;return new RegExp(`^${q.replace(/%/g,".*").replace(/_/g,".")}\$`,"i").test(Y)},$regex:(Y,q)=>typeof Y==="string"&&new RegExp(q.$regex||q,"i").test(Y),$and:(Y,q,F)=>q.every((O)=>{return F.createFilter(O)(Y)}),$or:(Y,q,F)=>q.some((O)=>{return F.createFilter(O)(Y)}),$not:(Y,q,F)=>{return!F.createFilter(q)(Y)}},L9=(Y,q)=>{const F=q.split(".");let O=Y;for(let Z of F)if(O&&typeof O==="object"&&(Z in O))O=O[Z];else return;return O},N9=(Y)=>{const q=(F)=>{return Object.entries(Y).every(([O,Z])=>{if(O.startsWith("$"))return p8[O](F,Z,{filterNode:q,createFilter:N9});const N=L9(F.value,O);if(typeof Z!=="object"||Z===null)return p8.$eq(N,Z);return Object.entries(Z).every(([V,C])=>{if(V==="$text")return p8.$text.field(N,C);if(V==="$between"&&C.every((B)=>B instanceof Date)){const B=new Date(N);return p8.$between(B,C)}return p8[V]?.(N,C,{filterNode:q,createFilter:N9})??!1})})};return q},P9=(Y,q)=>{const F=N9(q.query);let O=Object.values(Y).filter(F);if(q.field)O.sort((Z,N)=>{const V=L9(Z.value,q.field),C=L9(N.value,q.field),B=q.order==="asc"?1:-1;if(typeof V==="string"&&typeof C==="string")return V.localeCompare(C)*B;return((V??0)-(C??0))*B});if(q.$after){const Z=O.findIndex((N)=>N.id===q.$after);O=Z>=0?O.slice(Z+1):[]}if(q.$before){const Z=O.findIndex((N)=>N.id===q.$before);O=Z>=0?O.slice(0,Z):[]}return q.$limit?O.slice(0,q.$limit):O};class k9{constructor(){this.physical=Date.now(),this.logical=0}now(){const Y=Date.now();return this.physical=Math.max(this.physical,Y),this.logical++,{physical:this.physical,logical:this.logical}}update(Y){if(!Y||typeof Y.physical!=="number"||typeof Y.logical!=="number")return;this.physical=Math.max(this.physical,Y.physical),this.logical=Math.max(this.logical,Y.logical)+1}compare(Y,q){if(!Y&&!q)return 0;if(!Y)return-1;if(!q)return 1;if(Y.physical>q.physical)return 1;if(Y.physical<q.physical)return-1;if(Y.logical>q.logical)return 1;if(Y.logical<q.logical)return-1;return 0}}var r2=function(Y,q){return Y.length===q.length&&Y.every((F,O)=>F===q[O])};async function xV(){console.log("\u26A1 GenosDB: Empowering distributed graph databases with real-time synchronization and scalability. Learn more: https://github.com/estebanrfp/gdb \u26A1"),console.log(navigator?.storage?.getDirectory?"OPFS is enabled.":"OPFS is not available."),navigator?.storage?.getDirectory&&await navigator.storage.getDirectory()}if(Symbol.dispose===void 0)Object.defineProperty(Symbol,"dispose",{value:Symbol.for("Symbol.dispose")});class i2{constructor(){this.nodes={}}upsert(Y,q,F){this.nodes[Y]={id:Y,value:q,edges:[],timestamp:F}}get(Y){return this.nodes[Y]||null}link(Y,q,F){const O=this.nodes[Y],Z=this.nodes[q];if(O&&Z&&!O.edges.includes(q))O.edges.push(q),O.timestamp=F}getAllNodes(){return Object.values(this.nodes)}serialize(){return A8.deflate(J8(this.nodes))}deserialize(Y){this.nodes=Q7(A8.inflate(new Uint8Array(Y)))}}class u7{static _listenersInitialized=!1;constructor(Y,{password:q,securityManager:F=null,relayUrls:O=null}={}){this.oplog=new D9(Y,20),this.hybridClock=new k9,this.name=Y,this.password=q,this.globalTimestamp=null,this.graph=new i2,this.securityManager=F,this.eventListeners=[],this.operators=p8,this.initWorker(),this.ready=this.loadGraphFromOPFS(),this.loadGlobalTimestamp();const Z=`graph-sync-room-${this.name}`,N={appId:"1234",...this.password&&{password:this.password}};if(O)N.relayUrls=O;const V=d7(N,Z),[C,B]=V.makeAction("syncGraph");this.sendData=C;const D=d7(N,`app-sync-${this.name}`);if(this.room=D,!u7._listenersInitialized)u7._listenersInitialized=!0,window.addEventListener("online",async()=>{console.log("\u2705 Reconnected to the network."),this.sendData([{type:"sync",timestamp:this.globalTimestamp}])}),window.addEventListener("offline",async()=>{console.log("\u274C Disconnected from the network.")}),document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="visible")console.log("The tab is visible again."),this.sendData([{type:"sync",timestamp:this.globalTimestamp}]);else if(document.visibilityState==="hidden")console.log("The tab is no longer visible.")});xV(),V.onPeerJoin(async(L)=>{console.log("\u26A1 New pair connected:",L),this.sendData([{type:"sync",timestamp:this.globalTimestamp}])}),V.onPeerLeave((L)=>{console.log("\u26A1 Pair disconnected:",L)}),B(async(L)=>{if(this.securityManager&&typeof this.securityManager.verifyIncomingOperations==="function"){const{validatedOperations:H}=await this.securityManager.verifyIncomingOperations(L);if(H&&H.length>0)await this.receiveChanges(H)}else console.log("GDB: No SecurityManager configured or verifyIncomingOperations missing. Processing P2P data directly."),await this.receiveChanges(L),this.emit()}),this.channel=new BroadcastChannel(`graphdb_sync_${this.name}`),this.channel.onmessage=async(L)=>{if(L.data==="update")console.log("\uD83D\uDD04 Update received from another tab..."),await this.loadGraphFromOPFS(),this.loadGlobalTimestamp(),this.emit()}}loadGlobalTimestamp(){const Y=localStorage.getItem(`${this.name}_time`);this.globalTimestamp=Y?JSON.parse(Y):null}saveGlobalTimestamp(Y){this.globalTimestamp=Y,localStorage.setItem(`${this.name}_time`,JSON.stringify(Y))}initWorker(){try{const Y=URL.createObjectURL(new Blob([`(${n2.toString()})()`],{type:"application/javascript"}));this.worker=new Worker(Y),this.worker.addEventListener("message",({data:q})=>{console.log("Worker message:",`${q.name} ${q.type}`),URL.revokeObjectURL(Y)}),console.log("Worker initialized successfully.")}catch({message:Y}){console.error("Failed to initialize worker:",Y)}}getWorker(){return this.worker}emit(){this.eventListeners.forEach((Y)=>Y(this.graph.nodes))}compress(Y){return A8.deflate(Y)}decompress(Y){return A8.inflate(Y)}async getAllNodes(){return await this.ready,this.graph.getAllNodes()}async generateHash(){return crypto.randomUUID()}async hashValue(Y){const q=(new TextEncoder()).encode(Y),F=await crypto.subtle.digest("SHA-256",q);return Array.from(new Uint8Array(F)).map((O)=>O.toString(16).padStart(2,"0")).join("")}async loadGraphFromOPFS(){try{const q=await((F)=>new Promise((O,Z)=>{const N=async({data:V})=>{if(V.type==="loaded"&&V.name===F)this.worker.removeEventListener("message",N),O(new Uint8Array(V.data));else if(V.type==="error")this.worker.removeEventListener("message",N),Z(new Error(V.message||"Unknown error"))};this.worker.addEventListener("message",N),this.worker.postMessage({type:"load",name:F})}))(`${this.name}_graph.msgpack`).catch(()=>new Uint8Array);q.byteLength>0?this.graph.deserialize(q):console.warn("The file '_graph.msgpack' is empty or could not be loaded."),console.log(`Graph loaded from OPFS: [ ${this.graph.getAllNodes().length} nodes ]`)}catch({message:Y}){console.error("General error loading the graph from OPFS:",Y)}}async saveGraphToOPFS(){try{const Y=this.graph.serialize();return await((F,O)=>new Promise((Z,N)=>{const V=({data:C})=>{if(C.type==="saved"&&C.name===F)this.worker.removeEventListener("message",V),Z();else if(C.type==="error")this.worker.removeEventListener("message",V),N(new Error(C.message||"Save error"))};this.worker.addEventListener("message",V),this.worker.postMessage({type:"save",name:F,content:O})}))(`${this.name}_graph.msgpack`,Y),this.channel.postMessage("update"),!0}catch({message:Y}){throw console.error("Save error:",Y),new Error("Save failed")}}async put(Y,q){await this.ready;const F=this.hybridClock.now();return this.saveGlobalTimestamp(F),q??=await this.generateHash(),this.graph.upsert(q,Y,F),this.oplog.add({type:"upsert",id:q,timestamp:F}),await this.saveGraphToOPFS(),await this.sendData([{type:"upsert",id:q,value:Y,timestamp:F}]),this.emit(),q}async get(Y,q=null){if(await this.ready,typeof Y!=="string")return{result:null};const F=this.graph.get(Y);if(!F){if(q)q(null);return{result:null}}const O=(V)=>{if(!V)return null;const C=V.value!==null&&typeof V.value==="object"?{...V.value}:V.value;return{...V,value:C}};if(!q)return{result:O(F)};let Z=F.timestamp;q(O(F));const N=(V)=>{const C=V[Y];if(C){if(this.hybridClock.compare(C.timestamp,Z)>0)Z=C.timestamp,q(O(C))}else q(null),this.eventListeners.splice(this.eventListeners.indexOf(N),1)};return this.eventListeners.push(N),{result:O(F),unsubscribe:()=>{const V=this.eventListeners.indexOf(N);if(V>-1)this.eventListeners.splice(V,1)}}}async map(...Y){await this.ready;let F={...{realtime:!1,query:{},field:null,order:"asc",$limit:null,$after:null,$before:null}},O=null,Z=!1;Y.forEach((B)=>typeof B==="function"?O=B:B&&typeof B==="object"&&(Z||=("realtime"in B),Object.assign(F,B))),O&&!Z&&(F.realtime=!0);let N=P9(this.graph.nodes,F),V=null;const C=(B)=>{const D=B.filter((R)=>!N.some((k)=>k.id===R.id)),L=N.filter((R)=>!B.some((k)=>k.id===R.id)),H=B.filter((R)=>{const k=N.find((v)=>v.id===R.id);return k&&!r2(J8(R.value),J8(k.value))}),P=(R,k)=>{const v=k==="removed"?null:R.value,M={id:R.id,value:v,edges:R.edges||[],timestamp:R.timestamp||null,action:k};O(M)};D.forEach((R)=>P(R,"added")),L.forEach((R)=>P(R,"removed")),H.forEach((R)=>P(R,"updated"))};if(O){if(N.forEach((B)=>{if(B.value)O({id:B.id,value:B.value,edges:B.edges,timestamp:B.timestamp,action:"initial"})}),F.realtime)V=(B)=>{const D=P9(B,F);if(!r2(J8(D),J8(N)))C(D),N=D},this.eventListeners.push(V)}return{results:N,...F.realtime&&O&&V&&{unsubscribe:()=>{const B=this.eventListeners.indexOf(V);B>-1&&this.eventListeners.splice(B,1)}}}}async remove(Y){await this.ready;const q=this.hybridClock.now(),F=this.graph.get(Y);if(!F)return console.error(`Node with ID '${Y}' not found.`);delete this.graph.nodes[Y],this.oplog.add({type:"remove",id:Y,timestamp:q}),Object.values(this.graph.nodes).forEach((O)=>O.edges=O.edges.filter((Z)=>Z!==Y)),await this.saveGraphToOPFS(),this.saveGlobalTimestamp(q),await this.sendData([{type:"remove",id:Y,value:F.value,timestamp:q}]),this.emit()}async clear(){await this.ready,this.graph.nodes={};try{await(await navigator.storage.getDirectory()).removeEntry(`${this.name}_graph.msgpack`)}catch({message:Y}){console.warn(`Error deleting _graph.msgpack: ${Y}`)}this.emit(),console.log("All data has been deleted.")}async link(Y,q){await this.ready;const F=this.hybridClock.now();if(!this.graph.nodes[Y]||!this.graph.nodes[q]){console.error(`One or both nodes (${Y}, ${q}) do not exist.`);return}this.graph.link(Y,q,F),this.oplog.add({type:"link",sourceId:Y,targetId:q,timestamp:F}),await this.saveGraphToOPFS(),this.saveGlobalTimestamp(F),await this.sendData([{type:"link",sourceId:Y,targetId:q,timestamp:F}]),this.emit()}async applyFullGraph(Y){try{console.log("Applying full graph from remote..."),this.graph.nodes={...Y.nodes},await this.saveGraphToOPFS()}catch({message:q}){console.error(`Error applying the full graph: ${q}`)}}async receiveChanges(Y){let q=!1,F=null;const O={upsert:(Z)=>{const N=this.graph.get(Z.id),V=a2(N,Z,this.hybridClock);if(V.resolved){if(this.graph.upsert(Z.id,V.value,V.timestamp),this.hybridClock.update(V.timestamp),this.oplog.add({type:"upsert",id:Z.id,timestamp:V.timestamp}),q=!0,!F||this.hybridClock.compare(V.timestamp,F)>0)F=V.timestamp}},remove:(Z)=>{const N=this.graph.get(Z.id);if(N&&this.hybridClock.compare(N.timestamp,Z.timestamp)<0){if(delete this.graph.nodes[Z.id],this.hybridClock.update(Z.timestamp),this.oplog.add({type:"remove",id:Z.id,timestamp:Z.timestamp}),q=!0,!F||this.hybridClock.compare(Z.timestamp,F)>0)F=Z.timestamp}},link:(Z)=>{const N=this.graph.get(Z.sourceId),V=this.graph.get(Z.targetId);if(N&&V&&this.hybridClock.compare(N.timestamp,Z.timestamp)<0){if(this.graph.link(Z.sourceId,Z.targetId,Z.timestamp),this.hybridClock.update(Z.timestamp),this.oplog.add({type:"link",sourceId:Z.sourceId,targetId:Z.targetId,timestamp:Z.timestamp}),q=!0,!F||this.hybridClock.compare(Z.timestamp,F)>0)F=Z.timestamp}},sync:async(Z)=>{const N=Z.timestamp;console.log("\uD83D\uDCEC [SYNC REQUEST RECEIVED] A peer is asking for changes since timestamp:",N);const V=this.oplog.getOldest();if(V&&N&&this.hybridClock.compare(N,V.timestamp)<0){console.error("\uD83D\uDCA5 [FALLBACK TRIGGERED] Peer is too far behind. Sending FULL graph state."),await this.sendData([{type:"syncReceive",graph:this.graph}]);return}const C=this.oplog.getDelta(N,this.hybridClock.compare);if(C.length>0){const B=C.map((L)=>{if(L.type==="upsert"){const H=this.graph.get(L.id);return{...L,value:H?H.value:null}}return L}),D=A8.deflate(J8(B));console.log("\uD83D\uDCE6 Delta compressed for transport."),console.log(`\uD83D\uDE80 [SENDING DELTA] Found ${C.length} new operations to send.`),await this.sendData([{type:"deltaSync",operations:D}])}else console.log("\u2705 [ALREADY SYNCED] Peer is up-to-date. Nothing to send.")},deltaSync:(Z)=>{console.log("\uD83D\uDEF0\uFE0F [DECOMPRESSING DELTA] Received compressed delta sync.");let N=Q7(A8.inflate(Z.operations));console.log(`\uD83D\uDEF0\uFE0F [DELTA SYNC RECEIVED] Applying ${N.length} operations from a peer.`);for(let V of N)O[V.type]?.(V)},syncReceive:async(Z)=>{if(console.log("\uD83D\uDCE6 [FULL SYNC RECEIVED] Overwriting local state with full graph from a peer."),Z.graph)await this.applyFullGraph(Z.graph),this.oplog.clear(),console.warn("\uD83D\uDD12 Oplog has been cleared due to full sync."),q=!0;else console.error("Full sync failed: received graph data is invalid.",Z.graph)}};for(let Z of Y)if(O[Z.type])await O[Z.type](Z);else console.warn(`\uD83E\uDD37\u200D\u2640\uFE0F [UNKNOWN MESSAGE TYPE] Received unhandled message type: "${Z.type}"`);if(F)console.log("\uD83D\uDCC8 [UPDATING GLOBAL TIMESTAMP] Advancing local knowledge to the latest received timestamp."),this.saveGlobalTimestamp(F);if(q)console.log("\uD83D\uDCBE [STATE CHANGED] Saving new state to OPFS and emitting update."),await this.saveGraphToOPFS(),this.emit()}}export{u7 as default};
|