bods-data-extractor
Version:
Convert BODS UK dataset bus line data from XML to JSON
2 lines • 182 kB
JavaScript
var C1=Object.create;var{getPrototypeOf:T1,defineProperty:a2,getOwnPropertyNames:_0,getOwnPropertyDescriptor:N1}=Object,I0=Object.prototype.hasOwnProperty;var P1=($,Q,z)=>{z=$!=null?C1(T1($)):{};let J=Q||!$||!$.__esModule?a2(z,"default",{value:$,enumerable:!0}):z;for(let L of _0($))if(!I0.call(J,L))a2(J,L,{get:()=>$[L],enumerable:!0});return J},j0=new WeakMap,M0=($)=>{var Q=j0.get($),z;if(Q)return Q;if(Q=a2({},"__esModule",{value:!0}),$&&typeof $==="object"||typeof $==="function")_0($).map((J)=>!I0.call(Q,J)&&a2(Q,J,{get:()=>$[J],enumerable:!(z=N1($,J))||z.enumerable}));return j0.set($,Q),Q},x2=($,Q)=>()=>(Q||$((Q={exports:{}}).exports,Q),Q.exports);var F0=($,Q)=>{for(var z in Q)a2($,z,{get:Q[z],enumerable:!0,configurable:!0,set:(J)=>Q[z]=()=>J})};var L0=($,Q)=>()=>($&&(Q=$($=0)),Q);var A1=(($)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy($,{get:(Q,z)=>(typeof require!=="undefined"?require:Q)[z]}):$)(function($){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+$+'" is not supported')});var S0={};F0(S0,{default:()=>x0});var w1,r2,v1,E1,b1,k1,g1=($,Q)=>()=>($&&(Q=$($=0)),Q),F2=($,Q)=>()=>(Q||$((Q={exports:{}}).exports,Q),Q.exports),T0=($,Q)=>{for(var z in Q)r2($,z,{get:Q[z],enumerable:!0})},i2=($,Q,z,J)=>{if(Q&&typeof Q=="object"||typeof Q=="function")for(let L of E1(Q))!k1.call($,L)&&L!==z&&r2($,L,{get:()=>Q[L],enumerable:!(J=v1(Q,L))||J.enumerable});return $},N0=($,Q,z)=>(i2($,Q,"default"),z&&i2(z,Q,"default")),n2=($,Q,z)=>(z=$!=null?w1(b1($)):{},i2(Q||!$||!$.__esModule?r2(z,"default",{value:$,enumerable:!0}):z,$)),f2=($)=>i2(r2({},"__esModule",{value:!0}),$),x1,S1,S2,L2,b2,$0,P2,t2,C0,g2,P0,d2,h2,m2,y1,u2,V0,U0,O0,f1,q0,d1,h1,A0,e2,w0,m1,k2,v0,E0,W0,c1,b0,u1,k0,g0,x0;var y0=L0(()=>{w1=Object.create,r2=Object.defineProperty,v1=Object.getOwnPropertyDescriptor,E1=Object.getOwnPropertyNames,b1=Object.getPrototypeOf,k1=Object.prototype.hasOwnProperty,x1=F2(($)=>{$.byteLength=F,$.toByteArray=c,$.fromByteArray=s;var Q=[],z=[],J=typeof Uint8Array<"u"?Uint8Array:Array,L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(P=0,M=L.length;P<M;++P)Q[P]=L[P],z[L.charCodeAt(P)]=P;var P,M;z[45]=62,z[95]=63;function G(E){var b=E.length;if(b%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var d=E.indexOf("=");d===-1&&(d=b);var a=d===b?0:4-d%4;return[d,a]}function F(E){var b=G(E),d=b[0],a=b[1];return(d+a)*3/4-a}function N(E,b,d){return(b+d)*3/4-d}function c(E){var b,d=G(E),a=d[0],O=d[1],W=new J(N(E,a,O)),X=0,k=O>0?a-4:a,j;for(j=0;j<k;j+=4)b=z[E.charCodeAt(j)]<<18|z[E.charCodeAt(j+1)]<<12|z[E.charCodeAt(j+2)]<<6|z[E.charCodeAt(j+3)],W[X++]=b>>16&255,W[X++]=b>>8&255,W[X++]=b&255;return O===2&&(b=z[E.charCodeAt(j)]<<2|z[E.charCodeAt(j+1)]>>4,W[X++]=b&255),O===1&&(b=z[E.charCodeAt(j)]<<10|z[E.charCodeAt(j+1)]<<4|z[E.charCodeAt(j+2)]>>2,W[X++]=b>>8&255,W[X++]=b&255),W}function w(E){return Q[E>>18&63]+Q[E>>12&63]+Q[E>>6&63]+Q[E&63]}function h(E,b,d){for(var a,O=[],W=b;W<d;W+=3)a=(E[W]<<16&16711680)+(E[W+1]<<8&65280)+(E[W+2]&255),O.push(w(a));return O.join("")}function s(E){for(var b,d=E.length,a=d%3,O=[],W=16383,X=0,k=d-a;X<k;X+=W)O.push(h(E,X,X+W>k?k:X+W));return a===1?(b=E[d-1],O.push(Q[b>>2]+Q[b<<4&63]+"==")):a===2&&(b=(E[d-2]<<8)+E[d-1],O.push(Q[b>>10]+Q[b>>4&63]+Q[b<<2&63]+"=")),O.join("")}}),S1=F2(($)=>{$.read=function(Q,z,J,L,P){var M,G,F=P*8-L-1,N=(1<<F)-1,c=N>>1,w=-7,h=J?P-1:0,s=J?-1:1,E=Q[z+h];for(h+=s,M=E&(1<<-w)-1,E>>=-w,w+=F;w>0;M=M*256+Q[z+h],h+=s,w-=8);for(G=M&(1<<-w)-1,M>>=-w,w+=L;w>0;G=G*256+Q[z+h],h+=s,w-=8);if(M===0)M=1-c;else{if(M===N)return G?NaN:(E?-1:1)*(1/0);G=G+Math.pow(2,L),M=M-c}return(E?-1:1)*G*Math.pow(2,M-L)},$.write=function(Q,z,J,L,P,M){var G,F,N,c=M*8-P-1,w=(1<<c)-1,h=w>>1,s=P===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=L?0:M-1,b=L?1:-1,d=z<0||z===0&&1/z<0?1:0;for(z=Math.abs(z),isNaN(z)||z===1/0?(F=isNaN(z)?1:0,G=w):(G=Math.floor(Math.log(z)/Math.LN2),z*(N=Math.pow(2,-G))<1&&(G--,N*=2),G+h>=1?z+=s/N:z+=s*Math.pow(2,1-h),z*N>=2&&(G++,N/=2),G+h>=w?(F=0,G=w):G+h>=1?(F=(z*N-1)*Math.pow(2,P),G=G+h):(F=z*Math.pow(2,h-1)*Math.pow(2,P),G=0));P>=8;Q[J+E]=F&255,E+=b,F/=256,P-=8);for(G=G<<P|F,c+=P;c>0;Q[J+E]=G&255,E+=b,G/=256,c-=8);Q[J+E-b]|=d*128}}),S2=F2(($)=>{var Q=x1(),z=S1(),J=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$.Buffer=G,$.SlowBuffer=O,$.INSPECT_MAX_BYTES=50;var L=2147483647;$.kMaxLength=L,G.TYPED_ARRAY_SUPPORT=P(),!G.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 P(){try{let Z=new Uint8Array(1),K={foo:function(){return 42}};return Object.setPrototypeOf(K,Uint8Array.prototype),Object.setPrototypeOf(Z,K),Z.foo()===42}catch{return!1}}Object.defineProperty(G.prototype,"parent",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.buffer}}),Object.defineProperty(G.prototype,"offset",{enumerable:!0,get:function(){if(G.isBuffer(this))return this.byteOffset}});function M(Z){if(Z>L)throw new RangeError('The value "'+Z+'" is invalid for option "size"');let K=new Uint8Array(Z);return Object.setPrototypeOf(K,G.prototype),K}function G(Z,K,H){if(typeof Z=="number"){if(typeof K=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(Z)}return F(Z,K,H)}G.poolSize=8192;function F(Z,K,H){if(typeof Z=="string")return h(Z,K);if(ArrayBuffer.isView(Z))return E(Z);if(Z==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Z);if(B2(Z,ArrayBuffer)||Z&&B2(Z.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(B2(Z,SharedArrayBuffer)||Z&&B2(Z.buffer,SharedArrayBuffer)))return b(Z,K,H);if(typeof Z=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Y=Z.valueOf&&Z.valueOf();if(Y!=null&&Y!==Z)return G.from(Y,K,H);let U=d(Z);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Z[Symbol.toPrimitive]=="function")return G.from(Z[Symbol.toPrimitive]("string"),K,H);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Z)}G.from=function(Z,K,H){return F(Z,K,H)},Object.setPrototypeOf(G.prototype,Uint8Array.prototype),Object.setPrototypeOf(G,Uint8Array);function N(Z){if(typeof Z!="number")throw new TypeError('"size" argument must be of type number');if(Z<0)throw new RangeError('The value "'+Z+'" is invalid for option "size"')}function c(Z,K,H){return N(Z),Z<=0?M(Z):K!==void 0?typeof H=="string"?M(Z).fill(K,H):M(Z).fill(K):M(Z)}G.alloc=function(Z,K,H){return c(Z,K,H)};function w(Z){return N(Z),M(Z<0?0:a(Z)|0)}G.allocUnsafe=function(Z){return w(Z)},G.allocUnsafeSlow=function(Z){return w(Z)};function h(Z,K){if((typeof K!="string"||K==="")&&(K="utf8"),!G.isEncoding(K))throw new TypeError("Unknown encoding: "+K);let H=W(Z,K)|0,Y=M(H),U=Y.write(Z,K);return U!==H&&(Y=Y.slice(0,U)),Y}function s(Z){let K=Z.length<0?0:a(Z.length)|0,H=M(K);for(let Y=0;Y<K;Y+=1)H[Y]=Z[Y]&255;return H}function E(Z){if(B2(Z,Uint8Array)){let K=new Uint8Array(Z);return b(K.buffer,K.byteOffset,K.byteLength)}return s(Z)}function b(Z,K,H){if(K<0||Z.byteLength<K)throw new RangeError('"offset" is outside of buffer bounds');if(Z.byteLength<K+(H||0))throw new RangeError('"length" is outside of buffer bounds');let Y;return K===void 0&&H===void 0?Y=new Uint8Array(Z):H===void 0?Y=new Uint8Array(Z,K):Y=new Uint8Array(Z,K,H),Object.setPrototypeOf(Y,G.prototype),Y}function d(Z){if(G.isBuffer(Z)){let K=a(Z.length)|0,H=M(K);return H.length===0||Z.copy(H,0,0,K),H}if(Z.length!==void 0)return typeof Z.length!="number"||C2(Z.length)?M(0):s(Z);if(Z.type==="Buffer"&&Array.isArray(Z.data))return s(Z.data)}function a(Z){if(Z>=L)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+L.toString(16)+" bytes");return Z|0}function O(Z){return+Z!=Z&&(Z=0),G.alloc(+Z)}G.isBuffer=function(Z){return Z!=null&&Z._isBuffer===!0&&Z!==G.prototype},G.compare=function(Z,K){if(B2(Z,Uint8Array)&&(Z=G.from(Z,Z.offset,Z.byteLength)),B2(K,Uint8Array)&&(K=G.from(K,K.offset,K.byteLength)),!G.isBuffer(Z)||!G.isBuffer(K))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Z===K)return 0;let H=Z.length,Y=K.length;for(let U=0,B=Math.min(H,Y);U<B;++U)if(Z[U]!==K[U]){H=Z[U],Y=K[U];break}return H<Y?-1:Y<H?1:0},G.isEncoding=function(Z){switch(String(Z).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}},G.concat=function(Z,K){if(!Array.isArray(Z))throw new TypeError('"list" argument must be an Array of Buffers');if(Z.length===0)return G.alloc(0);let H;if(K===void 0)for(K=0,H=0;H<Z.length;++H)K+=Z[H].length;let Y=G.allocUnsafe(K),U=0;for(H=0;H<Z.length;++H){let B=Z[H];if(B2(B,Uint8Array))U+B.length>Y.length?(G.isBuffer(B)||(B=G.from(B)),B.copy(Y,U)):Uint8Array.prototype.set.call(Y,B,U);else if(G.isBuffer(B))B.copy(Y,U);else throw new TypeError('"list" argument must be an Array of Buffers');U+=B.length}return Y};function W(Z,K){if(G.isBuffer(Z))return Z.length;if(ArrayBuffer.isView(Z)||B2(Z,ArrayBuffer))return Z.byteLength;if(typeof Z!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Z);let H=Z.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&H===0)return 0;let U=!1;for(;;)switch(K){case"ascii":case"latin1":case"binary":return H;case"utf8":case"utf-8":return f(Z).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H*2;case"hex":return H>>>1;case"base64":return X2(Z).length;default:if(U)return Y?-1:f(Z).length;K=(""+K).toLowerCase(),U=!0}}G.byteLength=W;function X(Z,K,H){let Y=!1;if((K===void 0||K<0)&&(K=0),K>this.length||((H===void 0||H>this.length)&&(H=this.length),H<=0)||(H>>>=0,K>>>=0,H<=K))return"";for(Z||(Z="utf8");;)switch(Z){case"hex":return $2(this,K,H);case"utf8":case"utf-8":return n(this,K,H);case"ascii":return o(this,K,H);case"latin1":case"binary":return r(this,K,H);case"base64":return l(this,K,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p(this,K,H);default:if(Y)throw new TypeError("Unknown encoding: "+Z);Z=(Z+"").toLowerCase(),Y=!0}}G.prototype._isBuffer=!0;function k(Z,K,H){let Y=Z[K];Z[K]=Z[H],Z[H]=Y}G.prototype.swap16=function(){let Z=this.length;if(Z%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let K=0;K<Z;K+=2)k(this,K,K+1);return this},G.prototype.swap32=function(){let Z=this.length;if(Z%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let K=0;K<Z;K+=4)k(this,K,K+3),k(this,K+1,K+2);return this},G.prototype.swap64=function(){let Z=this.length;if(Z%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let K=0;K<Z;K+=8)k(this,K,K+7),k(this,K+1,K+6),k(this,K+2,K+5),k(this,K+3,K+4);return this},G.prototype.toString=function(){let Z=this.length;return Z===0?"":arguments.length===0?n(this,0,Z):X.apply(this,arguments)},G.prototype.toLocaleString=G.prototype.toString,G.prototype.equals=function(Z){if(!G.isBuffer(Z))throw new TypeError("Argument must be a Buffer");return this===Z?!0:G.compare(this,Z)===0},G.prototype.inspect=function(){let Z="",K=$.INSPECT_MAX_BYTES;return Z=this.toString("hex",0,K).replace(/(.{2})/g,"$1 ").trim(),this.length>K&&(Z+=" ... "),"<Buffer "+Z+">"},J&&(G.prototype[J]=G.prototype.inspect),G.prototype.compare=function(Z,K,H,Y,U){if(B2(Z,Uint8Array)&&(Z=G.from(Z,Z.offset,Z.byteLength)),!G.isBuffer(Z))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Z);if(K===void 0&&(K=0),H===void 0&&(H=Z?Z.length:0),Y===void 0&&(Y=0),U===void 0&&(U=this.length),K<0||H>Z.length||Y<0||U>this.length)throw new RangeError("out of range index");if(Y>=U&&K>=H)return 0;if(Y>=U)return-1;if(K>=H)return 1;if(K>>>=0,H>>>=0,Y>>>=0,U>>>=0,this===Z)return 0;let B=U-Y,v=H-K,Y2=Math.min(B,v),_2=this.slice(Y,U),U2=Z.slice(K,H);for(let V2=0;V2<Y2;++V2)if(_2[V2]!==U2[V2]){B=_2[V2],v=U2[V2];break}return B<v?-1:v<B?1:0};function j(Z,K,H,Y,U){if(Z.length===0)return-1;if(typeof H=="string"?(Y=H,H=0):H>2147483647?H=2147483647:H<-2147483648&&(H=-2147483648),H=+H,C2(H)&&(H=U?0:Z.length-1),H<0&&(H=Z.length+H),H>=Z.length){if(U)return-1;H=Z.length-1}else if(H<0)if(U)H=0;else return-1;if(typeof K=="string"&&(K=G.from(K,Y)),G.isBuffer(K))return K.length===0?-1:g(Z,K,H,Y,U);if(typeof K=="number")return K=K&255,typeof Uint8Array.prototype.indexOf=="function"?U?Uint8Array.prototype.indexOf.call(Z,K,H):Uint8Array.prototype.lastIndexOf.call(Z,K,H):g(Z,[K],H,Y,U);throw new TypeError("val must be string, number or Buffer")}function g(Z,K,H,Y,U){let B=1,v=Z.length,Y2=K.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(Z.length<2||K.length<2)return-1;B=2,v/=2,Y2/=2,H/=2}function _2(V2,R2){return B===1?V2[R2]:V2.readUInt16BE(R2*B)}let U2;if(U){let V2=-1;for(U2=H;U2<v;U2++)if(_2(Z,U2)===_2(K,V2===-1?0:U2-V2)){if(V2===-1&&(V2=U2),U2-V2+1===Y2)return V2*B}else V2!==-1&&(U2-=U2-V2),V2=-1}else for(H+Y2>v&&(H=v-Y2),U2=H;U2>=0;U2--){let V2=!0;for(let R2=0;R2<Y2;R2++)if(_2(Z,U2+R2)!==_2(K,R2)){V2=!1;break}if(V2)return U2}return-1}G.prototype.includes=function(Z,K,H){return this.indexOf(Z,K,H)!==-1},G.prototype.indexOf=function(Z,K,H){return j(this,Z,K,H,!0)},G.prototype.lastIndexOf=function(Z,K,H){return j(this,Z,K,H,!1)};function R(Z,K,H,Y){H=Number(H)||0;let U=Z.length-H;Y?(Y=Number(Y),Y>U&&(Y=U)):Y=U;let B=K.length;Y>B/2&&(Y=B/2);let v;for(v=0;v<Y;++v){let Y2=parseInt(K.substr(v*2,2),16);if(C2(Y2))return v;Z[H+v]=Y2}return v}function K2(Z,K,H,Y){return O2(f(K,Z.length-H),Z,H,Y)}function t(Z,K,H,Y){return O2(e(K),Z,H,Y)}function i(Z,K,H,Y){return O2(X2(K),Z,H,Y)}function D(Z,K,H,Y){return O2(H2(K,Z.length-H),Z,H,Y)}G.prototype.write=function(Z,K,H,Y){if(K===void 0)Y="utf8",H=this.length,K=0;else if(H===void 0&&typeof K=="string")Y=K,H=this.length,K=0;else if(isFinite(K))K=K>>>0,isFinite(H)?(H=H>>>0,Y===void 0&&(Y="utf8")):(Y=H,H=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let U=this.length-K;if((H===void 0||H>U)&&(H=U),Z.length>0&&(H<0||K<0)||K>this.length)throw new RangeError("Attempt to write outside buffer bounds");Y||(Y="utf8");let B=!1;for(;;)switch(Y){case"hex":return R(this,Z,K,H);case"utf8":case"utf-8":return K2(this,Z,K,H);case"ascii":case"latin1":case"binary":return t(this,Z,K,H);case"base64":return i(this,Z,K,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,Z,K,H);default:if(B)throw new TypeError("Unknown encoding: "+Y);Y=(""+Y).toLowerCase(),B=!0}},G.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function l(Z,K,H){return K===0&&H===Z.length?Q.fromByteArray(Z):Q.fromByteArray(Z.slice(K,H))}function n(Z,K,H){H=Math.min(Z.length,H);let Y=[],U=K;for(;U<H;){let B=Z[U],v=null,Y2=B>239?4:B>223?3:B>191?2:1;if(U+Y2<=H){let _2,U2,V2,R2;switch(Y2){case 1:B<128&&(v=B);break;case 2:_2=Z[U+1],(_2&192)===128&&(R2=(B&31)<<6|_2&63,R2>127&&(v=R2));break;case 3:_2=Z[U+1],U2=Z[U+2],(_2&192)===128&&(U2&192)===128&&(R2=(B&15)<<12|(_2&63)<<6|U2&63,R2>2047&&(R2<55296||R2>57343)&&(v=R2));break;case 4:_2=Z[U+1],U2=Z[U+2],V2=Z[U+3],(_2&192)===128&&(U2&192)===128&&(V2&192)===128&&(R2=(B&15)<<18|(_2&63)<<12|(U2&63)<<6|V2&63,R2>65535&&R2<1114112&&(v=R2))}}v===null?(v=65533,Y2=1):v>65535&&(v-=65536,Y.push(v>>>10&1023|55296),v=56320|v&1023),Y.push(v),U+=Y2}return S(Y)}var C=4096;function S(Z){let K=Z.length;if(K<=C)return String.fromCharCode.apply(String,Z);let H="",Y=0;for(;Y<K;)H+=String.fromCharCode.apply(String,Z.slice(Y,Y+=C));return H}function o(Z,K,H){let Y="";H=Math.min(Z.length,H);for(let U=K;U<H;++U)Y+=String.fromCharCode(Z[U]&127);return Y}function r(Z,K,H){let Y="";H=Math.min(Z.length,H);for(let U=K;U<H;++U)Y+=String.fromCharCode(Z[U]);return Y}function $2(Z,K,H){let Y=Z.length;(!K||K<0)&&(K=0),(!H||H<0||H>Y)&&(H=Y);let U="";for(let B=K;B<H;++B)U+=w2[Z[B]];return U}function p(Z,K,H){let Y=Z.slice(K,H),U="";for(let B=0;B<Y.length-1;B+=2)U+=String.fromCharCode(Y[B]+Y[B+1]*256);return U}G.prototype.slice=function(Z,K){let H=this.length;Z=~~Z,K=K===void 0?H:~~K,Z<0?(Z+=H,Z<0&&(Z=0)):Z>H&&(Z=H),K<0?(K+=H,K<0&&(K=0)):K>H&&(K=H),K<Z&&(K=Z);let Y=this.subarray(Z,K);return Object.setPrototypeOf(Y,G.prototype),Y};function u(Z,K,H){if(Z%1!==0||Z<0)throw new RangeError("offset is not uint");if(Z+K>H)throw new RangeError("Trying to access beyond buffer length")}G.prototype.readUintLE=G.prototype.readUIntLE=function(Z,K,H){Z=Z>>>0,K=K>>>0,H||u(Z,K,this.length);let Y=this[Z],U=1,B=0;for(;++B<K&&(U*=256);)Y+=this[Z+B]*U;return Y},G.prototype.readUintBE=G.prototype.readUIntBE=function(Z,K,H){Z=Z>>>0,K=K>>>0,H||u(Z,K,this.length);let Y=this[Z+--K],U=1;for(;K>0&&(U*=256);)Y+=this[Z+--K]*U;return Y},G.prototype.readUint8=G.prototype.readUInt8=function(Z,K){return Z=Z>>>0,K||u(Z,1,this.length),this[Z]},G.prototype.readUint16LE=G.prototype.readUInt16LE=function(Z,K){return Z=Z>>>0,K||u(Z,2,this.length),this[Z]|this[Z+1]<<8},G.prototype.readUint16BE=G.prototype.readUInt16BE=function(Z,K){return Z=Z>>>0,K||u(Z,2,this.length),this[Z]<<8|this[Z+1]},G.prototype.readUint32LE=G.prototype.readUInt32LE=function(Z,K){return Z=Z>>>0,K||u(Z,4,this.length),(this[Z]|this[Z+1]<<8|this[Z+2]<<16)+this[Z+3]*16777216},G.prototype.readUint32BE=G.prototype.readUInt32BE=function(Z,K){return Z=Z>>>0,K||u(Z,4,this.length),this[Z]*16777216+(this[Z+1]<<16|this[Z+2]<<8|this[Z+3])},G.prototype.readBigUInt64LE=M2(function(Z){Z=Z>>>0,W2(Z,"offset");let K=this[Z],H=this[Z+7];(K===void 0||H===void 0)&&x(Z,this.length-8);let Y=K+this[++Z]*256+this[++Z]*65536+this[++Z]*16777216,U=this[++Z]+this[++Z]*256+this[++Z]*65536+H*16777216;return BigInt(Y)+(BigInt(U)<<BigInt(32))}),G.prototype.readBigUInt64BE=M2(function(Z){Z=Z>>>0,W2(Z,"offset");let K=this[Z],H=this[Z+7];(K===void 0||H===void 0)&&x(Z,this.length-8);let Y=K*16777216+this[++Z]*65536+this[++Z]*256+this[++Z],U=this[++Z]*16777216+this[++Z]*65536+this[++Z]*256+H;return(BigInt(Y)<<BigInt(32))+BigInt(U)}),G.prototype.readIntLE=function(Z,K,H){Z=Z>>>0,K=K>>>0,H||u(Z,K,this.length);let Y=this[Z],U=1,B=0;for(;++B<K&&(U*=256);)Y+=this[Z+B]*U;return U*=128,Y>=U&&(Y-=Math.pow(2,8*K)),Y},G.prototype.readIntBE=function(Z,K,H){Z=Z>>>0,K=K>>>0,H||u(Z,K,this.length);let Y=K,U=1,B=this[Z+--Y];for(;Y>0&&(U*=256);)B+=this[Z+--Y]*U;return U*=128,B>=U&&(B-=Math.pow(2,8*K)),B},G.prototype.readInt8=function(Z,K){return Z=Z>>>0,K||u(Z,1,this.length),this[Z]&128?(255-this[Z]+1)*-1:this[Z]},G.prototype.readInt16LE=function(Z,K){Z=Z>>>0,K||u(Z,2,this.length);let H=this[Z]|this[Z+1]<<8;return H&32768?H|4294901760:H},G.prototype.readInt16BE=function(Z,K){Z=Z>>>0,K||u(Z,2,this.length);let H=this[Z+1]|this[Z]<<8;return H&32768?H|4294901760:H},G.prototype.readInt32LE=function(Z,K){return Z=Z>>>0,K||u(Z,4,this.length),this[Z]|this[Z+1]<<8|this[Z+2]<<16|this[Z+3]<<24},G.prototype.readInt32BE=function(Z,K){return Z=Z>>>0,K||u(Z,4,this.length),this[Z]<<24|this[Z+1]<<16|this[Z+2]<<8|this[Z+3]},G.prototype.readBigInt64LE=M2(function(Z){Z=Z>>>0,W2(Z,"offset");let K=this[Z],H=this[Z+7];(K===void 0||H===void 0)&&x(Z,this.length-8);let Y=this[Z+4]+this[Z+5]*256+this[Z+6]*65536+(H<<24);return(BigInt(Y)<<BigInt(32))+BigInt(K+this[++Z]*256+this[++Z]*65536+this[++Z]*16777216)}),G.prototype.readBigInt64BE=M2(function(Z){Z=Z>>>0,W2(Z,"offset");let K=this[Z],H=this[Z+7];(K===void 0||H===void 0)&&x(Z,this.length-8);let Y=(K<<24)+this[++Z]*65536+this[++Z]*256+this[++Z];return(BigInt(Y)<<BigInt(32))+BigInt(this[++Z]*16777216+this[++Z]*65536+this[++Z]*256+H)}),G.prototype.readFloatLE=function(Z,K){return Z=Z>>>0,K||u(Z,4,this.length),z.read(this,Z,!0,23,4)},G.prototype.readFloatBE=function(Z,K){return Z=Z>>>0,K||u(Z,4,this.length),z.read(this,Z,!1,23,4)},G.prototype.readDoubleLE=function(Z,K){return Z=Z>>>0,K||u(Z,8,this.length),z.read(this,Z,!0,52,8)},G.prototype.readDoubleBE=function(Z,K){return Z=Z>>>0,K||u(Z,8,this.length),z.read(this,Z,!1,52,8)};function A(Z,K,H,Y,U,B){if(!G.isBuffer(Z))throw new TypeError('"buffer" argument must be a Buffer instance');if(K>U||K<B)throw new RangeError('"value" argument is out of bounds');if(H+Y>Z.length)throw new RangeError("Index out of range")}G.prototype.writeUintLE=G.prototype.writeUIntLE=function(Z,K,H,Y){if(Z=+Z,K=K>>>0,H=H>>>0,!Y){let v=Math.pow(2,8*H)-1;A(this,Z,K,H,v,0)}let U=1,B=0;for(this[K]=Z&255;++B<H&&(U*=256);)this[K+B]=Z/U&255;return K+H},G.prototype.writeUintBE=G.prototype.writeUIntBE=function(Z,K,H,Y){if(Z=+Z,K=K>>>0,H=H>>>0,!Y){let v=Math.pow(2,8*H)-1;A(this,Z,K,H,v,0)}let U=H-1,B=1;for(this[K+U]=Z&255;--U>=0&&(B*=256);)this[K+U]=Z/B&255;return K+H},G.prototype.writeUint8=G.prototype.writeUInt8=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,1,255,0),this[K]=Z&255,K+1},G.prototype.writeUint16LE=G.prototype.writeUInt16LE=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,2,65535,0),this[K]=Z&255,this[K+1]=Z>>>8,K+2},G.prototype.writeUint16BE=G.prototype.writeUInt16BE=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,2,65535,0),this[K]=Z>>>8,this[K+1]=Z&255,K+2},G.prototype.writeUint32LE=G.prototype.writeUInt32LE=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,4,4294967295,0),this[K+3]=Z>>>24,this[K+2]=Z>>>16,this[K+1]=Z>>>8,this[K]=Z&255,K+4},G.prototype.writeUint32BE=G.prototype.writeUInt32BE=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,4,4294967295,0),this[K]=Z>>>24,this[K+1]=Z>>>16,this[K+2]=Z>>>8,this[K+3]=Z&255,K+4};function Z2(Z,K,H,Y,U){G2(K,Y,U,Z,H,7);let B=Number(K&BigInt(4294967295));Z[H++]=B,B=B>>8,Z[H++]=B,B=B>>8,Z[H++]=B,B=B>>8,Z[H++]=B;let v=Number(K>>BigInt(32)&BigInt(4294967295));return Z[H++]=v,v=v>>8,Z[H++]=v,v=v>>8,Z[H++]=v,v=v>>8,Z[H++]=v,H}function Q2(Z,K,H,Y,U){G2(K,Y,U,Z,H,7);let B=Number(K&BigInt(4294967295));Z[H+7]=B,B=B>>8,Z[H+6]=B,B=B>>8,Z[H+5]=B,B=B>>8,Z[H+4]=B;let v=Number(K>>BigInt(32)&BigInt(4294967295));return Z[H+3]=v,v=v>>8,Z[H+2]=v,v=v>>8,Z[H+1]=v,v=v>>8,Z[H]=v,H+8}G.prototype.writeBigUInt64LE=M2(function(Z,K=0){return Z2(this,Z,K,BigInt(0),BigInt("0xffffffffffffffff"))}),G.prototype.writeBigUInt64BE=M2(function(Z,K=0){return Q2(this,Z,K,BigInt(0),BigInt("0xffffffffffffffff"))}),G.prototype.writeIntLE=function(Z,K,H,Y){if(Z=+Z,K=K>>>0,!Y){let Y2=Math.pow(2,8*H-1);A(this,Z,K,H,Y2-1,-Y2)}let U=0,B=1,v=0;for(this[K]=Z&255;++U<H&&(B*=256);)Z<0&&v===0&&this[K+U-1]!==0&&(v=1),this[K+U]=(Z/B>>0)-v&255;return K+H},G.prototype.writeIntBE=function(Z,K,H,Y){if(Z=+Z,K=K>>>0,!Y){let Y2=Math.pow(2,8*H-1);A(this,Z,K,H,Y2-1,-Y2)}let U=H-1,B=1,v=0;for(this[K+U]=Z&255;--U>=0&&(B*=256);)Z<0&&v===0&&this[K+U+1]!==0&&(v=1),this[K+U]=(Z/B>>0)-v&255;return K+H},G.prototype.writeInt8=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,1,127,-128),Z<0&&(Z=255+Z+1),this[K]=Z&255,K+1},G.prototype.writeInt16LE=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,2,32767,-32768),this[K]=Z&255,this[K+1]=Z>>>8,K+2},G.prototype.writeInt16BE=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,2,32767,-32768),this[K]=Z>>>8,this[K+1]=Z&255,K+2},G.prototype.writeInt32LE=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,4,2147483647,-2147483648),this[K]=Z&255,this[K+1]=Z>>>8,this[K+2]=Z>>>16,this[K+3]=Z>>>24,K+4},G.prototype.writeInt32BE=function(Z,K,H){return Z=+Z,K=K>>>0,H||A(this,Z,K,4,2147483647,-2147483648),Z<0&&(Z=4294967295+Z+1),this[K]=Z>>>24,this[K+1]=Z>>>16,this[K+2]=Z>>>8,this[K+3]=Z&255,K+4},G.prototype.writeBigInt64LE=M2(function(Z,K=0){return Z2(this,Z,K,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),G.prototype.writeBigInt64BE=M2(function(Z,K=0){return Q2(this,Z,K,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function D2(Z,K,H,Y,U,B){if(H+Y>Z.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("Index out of range")}function q(Z,K,H,Y,U){return K=+K,H=H>>>0,U||D2(Z,K,H,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000),z.write(Z,K,H,Y,23,4),H+4}G.prototype.writeFloatLE=function(Z,K,H){return q(this,Z,K,!0,H)},G.prototype.writeFloatBE=function(Z,K,H){return q(this,Z,K,!1,H)};function V(Z,K,H,Y,U){return K=+K,H=H>>>0,U||D2(Z,K,H,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),z.write(Z,K,H,Y,52,8),H+8}G.prototype.writeDoubleLE=function(Z,K,H){return V(this,Z,K,!0,H)},G.prototype.writeDoubleBE=function(Z,K,H){return V(this,Z,K,!1,H)},G.prototype.copy=function(Z,K,H,Y){if(!G.isBuffer(Z))throw new TypeError("argument should be a Buffer");if(H||(H=0),!Y&&Y!==0&&(Y=this.length),K>=Z.length&&(K=Z.length),K||(K=0),Y>0&&Y<H&&(Y=H),Y===H||Z.length===0||this.length===0)return 0;if(K<0)throw new RangeError("targetStart out of bounds");if(H<0||H>=this.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("sourceEnd out of bounds");Y>this.length&&(Y=this.length),Z.length-K<Y-H&&(Y=Z.length-K+H);let U=Y-H;return this===Z&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(K,H,Y):Uint8Array.prototype.set.call(Z,this.subarray(H,Y),K),U},G.prototype.fill=function(Z,K,H,Y){if(typeof Z=="string"){if(typeof K=="string"?(Y=K,K=0,H=this.length):typeof H=="string"&&(Y=H,H=this.length),Y!==void 0&&typeof Y!="string")throw new TypeError("encoding must be a string");if(typeof Y=="string"&&!G.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);if(Z.length===1){let B=Z.charCodeAt(0);(Y==="utf8"&&B<128||Y==="latin1")&&(Z=B)}}else typeof Z=="number"?Z=Z&255:typeof Z=="boolean"&&(Z=Number(Z));if(K<0||this.length<K||this.length<H)throw new RangeError("Out of range index");if(H<=K)return this;K=K>>>0,H=H===void 0?this.length:H>>>0,Z||(Z=0);let U;if(typeof Z=="number")for(U=K;U<H;++U)this[U]=Z;else{let B=G.isBuffer(Z)?Z:G.from(Z,Y),v=B.length;if(v===0)throw new TypeError('The value "'+Z+'" is invalid for argument "value"');for(U=0;U<H-K;++U)this[U+K]=B[U%v]}return this};var y={};function T(Z,K,H){y[Z]=class extends H{constructor(){super(),Object.defineProperty(this,"message",{value:K.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Z}]`,this.stack,delete this.name}get code(){return Z}set code(Y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Y,writable:!0})}toString(){return`${this.name} [${Z}]: ${this.message}`}}}T("ERR_BUFFER_OUT_OF_BOUNDS",function(Z){return Z?`${Z} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),T("ERR_INVALID_ARG_TYPE",function(Z,K){return`The "${Z}" argument must be of type number. Received type ${typeof K}`},TypeError),T("ERR_OUT_OF_RANGE",function(Z,K,H){let Y=`The value of "${Z}" is out of range.`,U=H;return Number.isInteger(H)&&Math.abs(H)>4294967296?U=z2(String(H)):typeof H=="bigint"&&(U=String(H),(H>BigInt(2)**BigInt(32)||H<-(BigInt(2)**BigInt(32)))&&(U=z2(U)),U+="n"),Y+=` It must be ${K}. Received ${U}`,Y},RangeError);function z2(Z){let K="",H=Z.length,Y=Z[0]==="-"?1:0;for(;H>=Y+4;H-=3)K=`_${Z.slice(H-3,H)}${K}`;return`${Z.slice(0,H)}${K}`}function q2(Z,K,H){W2(K,"offset"),(Z[K]===void 0||Z[K+H]===void 0)&&x(K,Z.length-(H+1))}function G2(Z,K,H,Y,U,B){if(Z>H||Z<K){let v=typeof K=="bigint"?"n":"",Y2;throw B>3?K===0||K===BigInt(0)?Y2=`>= 0${v} and < 2${v} ** ${(B+1)*8}${v}`:Y2=`>= -(2${v} ** ${(B+1)*8-1}${v}) and < 2 ** ${(B+1)*8-1}${v}`:Y2=`>= ${K}${v} and <= ${H}${v}`,new y.ERR_OUT_OF_RANGE("value",Y2,Z)}q2(Y,U,B)}function W2(Z,K){if(typeof Z!="number")throw new y.ERR_INVALID_ARG_TYPE(K,"number",Z)}function x(Z,K,H){throw Math.floor(Z)!==Z?(W2(Z,H),new y.ERR_OUT_OF_RANGE(H||"offset","an integer",Z)):K<0?new y.ERR_BUFFER_OUT_OF_BOUNDS:new y.ERR_OUT_OF_RANGE(H||"offset",`>= ${H?1:0} and <= ${K}`,Z)}var _=/[^+/0-9A-Za-z-_]/g;function I(Z){if(Z=Z.split("=")[0],Z=Z.trim().replace(_,""),Z.length<2)return"";for(;Z.length%4!==0;)Z=Z+"=";return Z}function f(Z,K){K=K||1/0;let H,Y=Z.length,U=null,B=[];for(let v=0;v<Y;++v){if(H=Z.charCodeAt(v),H>55295&&H<57344){if(!U){if(H>56319){(K-=3)>-1&&B.push(239,191,189);continue}else if(v+1===Y){(K-=3)>-1&&B.push(239,191,189);continue}U=H;continue}if(H<56320){(K-=3)>-1&&B.push(239,191,189),U=H;continue}H=(U-55296<<10|H-56320)+65536}else U&&(K-=3)>-1&&B.push(239,191,189);if(U=null,H<128){if((K-=1)<0)break;B.push(H)}else if(H<2048){if((K-=2)<0)break;B.push(H>>6|192,H&63|128)}else if(H<65536){if((K-=3)<0)break;B.push(H>>12|224,H>>6&63|128,H&63|128)}else if(H<1114112){if((K-=4)<0)break;B.push(H>>18|240,H>>12&63|128,H>>6&63|128,H&63|128)}else throw new Error("Invalid code point")}return B}function e(Z){let K=[];for(let H=0;H<Z.length;++H)K.push(Z.charCodeAt(H)&255);return K}function H2(Z,K){let H,Y,U,B=[];for(let v=0;v<Z.length&&!((K-=2)<0);++v)H=Z.charCodeAt(v),Y=H>>8,U=H%256,B.push(U),B.push(Y);return B}function X2(Z){return Q.toByteArray(I(Z))}function O2(Z,K,H,Y){let U;for(U=0;U<Y&&!(U+H>=K.length||U>=Z.length);++U)K[U+H]=Z[U];return U}function B2(Z,K){return Z instanceof K||Z!=null&&Z.constructor!=null&&Z.constructor.name!=null&&Z.constructor.name===K.name}function C2(Z){return Z!==Z}var w2=function(){let Z="0123456789abcdef",K=new Array(256);for(let H=0;H<16;++H){let Y=H*16;for(let U=0;U<16;++U)K[Y+U]=Z[H]+Z[U]}return K}();function M2(Z){return typeof BigInt>"u"?c2:Z}function c2(){throw new Error("BigInt not supported")}}),L2=F2(($,Q)=>{Q.exports={ArrayIsArray(z){return Array.isArray(z)},ArrayPrototypeIncludes(z,J){return z.includes(J)},ArrayPrototypeIndexOf(z,J){return z.indexOf(J)},ArrayPrototypeJoin(z,J){return z.join(J)},ArrayPrototypeMap(z,J){return z.map(J)},ArrayPrototypePop(z,J){return z.pop(J)},ArrayPrototypePush(z,J){return z.push(J)},ArrayPrototypeSlice(z,J,L){return z.slice(J,L)},Error,FunctionPrototypeCall(z,J,...L){return z.call(J,...L)},FunctionPrototypeSymbolHasInstance(z,J){return Function.prototype[Symbol.hasInstance].call(z,J)},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(z,J){return Object.defineProperties(z,J)},ObjectDefineProperty(z,J,L){return Object.defineProperty(z,J,L)},ObjectGetOwnPropertyDescriptor(z,J){return Object.getOwnPropertyDescriptor(z,J)},ObjectKeys(z){return Object.keys(z)},ObjectSetPrototypeOf(z,J){return Object.setPrototypeOf(z,J)},Promise,PromisePrototypeCatch(z,J){return z.catch(J)},PromisePrototypeThen(z,J,L){return z.then(J,L)},PromiseReject(z){return Promise.reject(z)},ReflectApply:Reflect.apply,RegExpPrototypeTest(z,J){return z.test(J)},SafeSet:Set,String,StringPrototypeSlice(z,J,L){return z.slice(J,L)},StringPrototypeToLowerCase(z){return z.toLowerCase()},StringPrototypeToUpperCase(z){return z.toUpperCase()},StringPrototypeTrim(z){return z.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(z,J,L){return z.set(J,L)},Uint8Array}}),b2=F2(($,Q)=>{var z=S2(),J=Object.getPrototypeOf(async function(){}).constructor,L=globalThis.Blob||z.Blob,P=typeof L<"u"?function(G){return G instanceof L}:function(G){return!1},M=class extends Error{constructor(G){if(!Array.isArray(G))throw new TypeError(`Expected input to be an Array, got ${typeof G}`);let F="";for(let N=0;N<G.length;N++)F+=` ${G[N].stack}
`;super(F),this.name="AggregateError",this.errors=G}};Q.exports={AggregateError:M,kEmptyObject:Object.freeze({}),once(G){let F=!1;return function(...N){F||(F=!0,G.apply(this,N))}},createDeferredPromise:function(){let G,F;return{promise:new Promise((N,c)=>{G=N,F=c}),resolve:G,reject:F}},promisify(G){return new Promise((F,N)=>{G((c,...w)=>c?N(c):F(...w))})},debuglog(){return function(){}},format(G,...F){return G.replace(/%([sdifj])/g,function(...[N,c]){let w=F.shift();return c==="f"?w.toFixed(6):c==="j"?JSON.stringify(w):c==="s"&&typeof w=="object"?`${w.constructor!==Object?w.constructor.name:""} {}`.trim():w.toString()})},inspect(G){switch(typeof G){case"string":if(G.includes("'"))if(G.includes('"')){if(!G.includes("`")&&!G.includes("${"))return`\`${G}\``}else return`"${G}"`;return`'${G}'`;case"number":return isNaN(G)?"NaN":Object.is(G,-0)?String(G):G;case"bigint":return`${String(G)}n`;case"boolean":case"undefined":return String(G);case"object":return"{}"}},types:{isAsyncFunction(G){return G instanceof J},isArrayBufferView(G){return ArrayBuffer.isView(G)}},isBlob:P},Q.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),$0=F2(($,Q)=>{var{AbortController:z,AbortSignal:J}=typeof self<"u"?self:typeof window<"u"?window:void 0;Q.exports=z,Q.exports.AbortSignal=J,Q.exports.default=z}),P2=F2(($,Q)=>{var{format:z,inspect:J,AggregateError:L}=b2(),P=globalThis.AggregateError||L,M=Symbol("kIsNodeError"),G=["string","function","number","object","Function","Object","boolean","bigint","symbol"],F=/^([A-Z][a-z0-9]*)+$/,N="__node_internal_",c={};function w(O,W){if(!O)throw new c.ERR_INTERNAL_ASSERTION(W)}function h(O){let W="",X=O.length,k=O[0]==="-"?1:0;for(;X>=k+4;X-=3)W=`_${O.slice(X-3,X)}${W}`;return`${O.slice(0,X)}${W}`}function s(O,W,X){if(typeof W=="function")return w(W.length<=X.length,`Code: ${O}; The provided arguments length (${X.length}) does not match the required ones (${W.length}).`),W(...X);let k=(W.match(/%[dfijoOs]/g)||[]).length;return w(k===X.length,`Code: ${O}; The provided arguments length (${X.length}) does not match the required ones (${k}).`),X.length===0?W:z(W,...X)}function E(O,W,X){X||(X=Error);class k extends X{constructor(...j){super(s(O,W,j))}toString(){return`${this.name} [${O}]: ${this.message}`}}Object.defineProperties(k.prototype,{name:{value:X.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${O}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),k.prototype.code=O,k.prototype[M]=!0,c[O]=k}function b(O){let W=N+O.name;return Object.defineProperty(O,"name",{value:W}),O}function d(O,W){if(O&&W&&O!==W){if(Array.isArray(W.errors))return W.errors.push(O),W;let X=new P([W,O],W.message);return X.code=W.code,X}return O||W}var a=class extends Error{constructor(O="The operation was aborted",W=void 0){if(W!==void 0&&typeof W!="object")throw new c.ERR_INVALID_ARG_TYPE("options","Object",W);super(O,W),this.code="ABORT_ERR",this.name="AbortError"}};E("ERR_ASSERTION","%s",Error),E("ERR_INVALID_ARG_TYPE",(O,W,X)=>{w(typeof O=="string","'name' must be a string"),Array.isArray(W)||(W=[W]);let k="The ";O.endsWith(" argument")?k+=`${O} `:k+=`"${O}" ${O.includes(".")?"property":"argument"} `,k+="must be ";let j=[],g=[],R=[];for(let t of W)w(typeof t=="string","All expected entries have to be of type string"),G.includes(t)?j.push(t.toLowerCase()):F.test(t)?g.push(t):(w(t!=="object",'The value "object" should be written as "Object"'),R.push(t));if(g.length>0){let t=j.indexOf("object");t!==-1&&(j.splice(j,t,1),g.push("Object"))}if(j.length>0){switch(j.length){case 1:k+=`of type ${j[0]}`;break;case 2:k+=`one of type ${j[0]} or ${j[1]}`;break;default:{let t=j.pop();k+=`one of type ${j.join(", ")}, or ${t}`}}(g.length>0||R.length>0)&&(k+=" or ")}if(g.length>0){switch(g.length){case 1:k+=`an instance of ${g[0]}`;break;case 2:k+=`an instance of ${g[0]} or ${g[1]}`;break;default:{let t=g.pop();k+=`an instance of ${g.join(", ")}, or ${t}`}}R.length>0&&(k+=" or ")}switch(R.length){case 0:break;case 1:R[0].toLowerCase()!==R[0]&&(k+="an "),k+=`${R[0]}`;break;case 2:k+=`one of ${R[0]} or ${R[1]}`;break;default:{let t=R.pop();k+=`one of ${R.join(", ")}, or ${t}`}}if(X==null)k+=`. Received ${X}`;else if(typeof X=="function"&&X.name)k+=`. Received function ${X.name}`;else if(typeof X=="object"){var K2;(K2=X.constructor)!==null&&K2!==void 0&&K2.name?k+=`. Received an instance of ${X.constructor.name}`:k+=`. Received ${J(X,{depth:-1})}`}else{let t=J(X,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),k+=`. Received type ${typeof X} (${t})`}return k},TypeError),E("ERR_INVALID_ARG_VALUE",(O,W,X="is invalid")=>{let k=J(W);return k.length>128&&(k=k.slice(0,128)+"..."),`The ${O.includes(".")?"property":"argument"} '${O}' ${X}. Received ${k}`},TypeError),E("ERR_INVALID_RETURN_VALUE",(O,W,X)=>{var k;let j=X!=null&&(k=X.constructor)!==null&&k!==void 0&&k.name?`instance of ${X.constructor.name}`:`type ${typeof X}`;return`Expected ${O} to be returned from the "${W}" function but got ${j}.`},TypeError),E("ERR_MISSING_ARGS",(...O)=>{w(O.length>0,"At least one arg needs to be specified");let W,X=O.length;switch(O=(Array.isArray(O)?O:[O]).map((k)=>`"${k}"`).join(" or "),X){case 1:W+=`The ${O[0]} argument`;break;case 2:W+=`The ${O[0]} and ${O[1]} arguments`;break;default:{let k=O.pop();W+=`The ${O.join(", ")}, and ${k} arguments`}break}return`${W} must be specified`},TypeError),E("ERR_OUT_OF_RANGE",(O,W,X)=>{w(W,'Missing "range" argument');let k;return Number.isInteger(X)&&Math.abs(X)>4294967296?k=h(String(X)):typeof X=="bigint"?(k=String(X),(X>2n**32n||X<-(2n**32n))&&(k=h(k)),k+="n"):k=J(X),`The value of "${O}" is out of range. It must be ${W}. Received ${k}`},RangeError),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),E("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),E("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),E("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),E("ERR_STREAM_WRITE_AFTER_END","write after end",Error),E("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Q.exports={AbortError:a,aggregateTwoErrors:b(d),hideStackFrames:b,codes:c}}),t2=F2(($,Q)=>{var{ArrayIsArray:z,ArrayPrototypeIncludes:J,ArrayPrototypeJoin:L,ArrayPrototypeMap:P,NumberIsInteger:M,NumberIsNaN:G,NumberMAX_SAFE_INTEGER:F,NumberMIN_SAFE_INTEGER:N,NumberParseInt:c,ObjectPrototypeHasOwnProperty:w,RegExpPrototypeExec:h,String:s,StringPrototypeToUpperCase:E,StringPrototypeTrim:b}=L2(),{hideStackFrames:d,codes:{ERR_SOCKET_BAD_PORT:a,ERR_INVALID_ARG_TYPE:O,ERR_INVALID_ARG_VALUE:W,ERR_OUT_OF_RANGE:X,ERR_UNKNOWN_SIGNAL:k}}=P2(),{normalizeEncoding:j}=b2(),{isAsyncFunction:g,isArrayBufferView:R}=b2().types,K2={};function t(x){return x===(x|0)}function i(x){return x===x>>>0}var D=/^[0-7]+$/,l="must be a 32-bit unsigned integer or an octal string";function n(x,_,I){if(typeof x>"u"&&(x=I),typeof x=="string"){if(h(D,x)===null)throw new W(_,x,l);x=c(x,8)}return o(x,_),x}var C=d((x,_,I=N,f=F)=>{if(typeof x!="number")throw new O(_,"number",x);if(!M(x))throw new X(_,"an integer",x);if(x<I||x>f)throw new X(_,`>= ${I} && <= ${f}`,x)}),S=d((x,_,I=-2147483648,f=2147483647)=>{if(typeof x!="number")throw new O(_,"number",x);if(!M(x))throw new X(_,"an integer",x);if(x<I||x>f)throw new X(_,`>= ${I} && <= ${f}`,x)}),o=d((x,_,I=!1)=>{if(typeof x!="number")throw new O(_,"number",x);if(!M(x))throw new X(_,"an integer",x);let f=I?1:0,e=4294967295;if(x<f||x>e)throw new X(_,`>= ${f} && <= ${e}`,x)});function r(x,_){if(typeof x!="string")throw new O(_,"string",x)}function $2(x,_,I=void 0,f){if(typeof x!="number")throw new O(_,"number",x);if(I!=null&&x<I||f!=null&&x>f||(I!=null||f!=null)&&G(x))throw new X(_,`${I!=null?`>= ${I}`:""}${I!=null&&f!=null?" && ":""}${f!=null?`<= ${f}`:""}`,x)}var p=d((x,_,I)=>{if(!J(I,x)){let f=L(P(I,(H2)=>typeof H2=="string"?`'${H2}'`:s(H2)),", "),e="must be one of: "+f;throw new W(_,x,e)}});function u(x,_){if(typeof x!="boolean")throw new O(_,"boolean",x)}function A(x,_,I){return x==null||!w(x,_)?I:x[_]}var Z2=d((x,_,I=null)=>{let f=A(I,"allowArray",!1),e=A(I,"allowFunction",!1);if(!A(I,"nullable",!1)&&x===null||!f&&z(x)||typeof x!="object"&&(!e||typeof x!="function"))throw new O(_,"Object",x)}),Q2=d((x,_,I=0)=>{if(!z(x))throw new O(_,"Array",x);if(x.length<I){let f=`must be longer than ${I}`;throw new W(_,x,f)}});function D2(x,_="signal"){if(r(x,_),K2[x]===void 0)throw K2[E(x)]!==void 0?new k(x+" (signals must use all capital letters)"):new k(x)}var q=d((x,_="buffer")=>{if(!R(x))throw new O(_,["Buffer","TypedArray","DataView"],x)});function V(x,_){let I=j(_),f=x.length;if(I==="hex"&&f%2!==0)throw new W("encoding",_,`is invalid for data of length ${f}`)}function y(x,_="Port",I=!0){if(typeof x!="number"&&typeof x!="string"||typeof x=="string"&&b(x).length===0||+x!==+x>>>0||x>65535||x===0&&!I)throw new a(_,x,I);return x|0}var T=d((x,_)=>{if(x!==void 0&&(x===null||typeof x!="object"||!("aborted"in x)))throw new O(_,"AbortSignal",x)}),z2=d((x,_)=>{if(typeof x!="function")throw new O(_,"Function",x)}),q2=d((x,_)=>{if(typeof x!="function"||g(x))throw new O(_,"Function",x)}),G2=d((x,_)=>{if(x!==void 0)throw new O(_,"undefined",x)});function W2(x,_,I){if(!J(I,x))throw new O(_,`('${L(I,"|")}')`,x)}Q.exports={isInt32:t,isUint32:i,parseFileMode:n,validateArray:Q2,validateBoolean:u,validateBuffer:q,validateEncoding:V,validateFunction:z2,validateInt32:S,validateInteger:C,validateNumber:$2,validateObject:Z2,validateOneOf:p,validatePlainFunction:q2,validatePort:y,validateSignalName:D2,validateString:r,validateUint32:o,validateUndefined:G2,validateUnion:W2,validateAbortSignal:T}}),C0=F2(($,Q)=>{var z=Q.exports={},J,L;function P(){throw new Error("setTimeout has not been defined")}function M(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?J=setTimeout:J=P}catch{J=P}try{typeof clearTimeout=="function"?L=clearTimeout:L=M}catch{L=M}})();function G(a){if(J===setTimeout)return setTimeout(a,0);if((J===P||!J)&&setTimeout)return J=setTimeout,setTimeout(a,0);try{return J(a,0)}catch{try{return J.call(null,a,0)}catch{return J.call(this,a,0)}}}function F(a){if(L===clearTimeout)return clearTimeout(a);if((L===M||!L)&&clearTimeout)return L=clearTimeout,clearTimeout(a);try{return L(a)}catch{try{return L.call(null,a)}catch{return L.call(this,a)}}}var N=[],c=!1,w,h=-1;function s(){!c||!w||(c=!1,w.length?N=w.concat(N):h=-1,N.length&&E())}function E(){if(!c){var a=G(s);c=!0;for(var O=N.length;O;){for(w=N,N=[];++h<O;)w&&w[h].run();h=-1,O=N.length}w=null,c=!1,F(a)}}z.nextTick=function(a){var O=new Array(arguments.length-1);if(arguments.length>1)for(var W=1;W<arguments.length;W++)O[W-1]=arguments[W];N.push(new b(a,O)),N.length===1&&!c&&G(E)};function b(a,O){this.fun=a,this.array=O}b.prototype.run=function(){this.fun.apply(null,this.array)},z.title="browser",z.browser=!0,z.env={},z.argv=[],z.version="",z.versions={};function d(){}z.on=d,z.addListener=d,z.once=d,z.off=d,z.removeListener=d,z.removeAllListeners=d,z.emit=d,z.prependListener=d,z.prependOnceListener=d,z.listeners=function(a){return[]},z.binding=function(a){throw new Error("process.binding is not supported")},z.cwd=function(){return"/"},z.chdir=function(a){throw new Error("process.chdir is not supported")},z.umask=function(){return 0}}),g2={};T0(g2,{default:()=>P0});d2=g1(()=>{N0(g2,n2(C0())),P0=n2(C0())}),h2=F2(($,Q)=>{var{Symbol:z,SymbolAsyncIterator:J,SymbolIterator:L}=L2(),P=z("kDestroyed"),M=z("kIsErrored"),G=z("kIsReadable"),F=z("kIsDisturbed");function N(C,S=!1){var o;return!!(C&&typeof C.pipe=="function"&&typeof C.on=="function"&&(!S||typeof C.pause=="function"&&typeof C.resume=="function")&&(!C._writableState||((o=C._readableState)===null||o===void 0?void 0:o.readable)!==!1)&&(!C._writableState||C._readableState))}function c(C){var S;return!!(C&&typeof C.write=="function"&&typeof C.on=="function"&&(!C._readableState||((S=C._writableState)===null||S===void 0?void 0:S.writable)!==!1))}function w(C){return!!(C&&typeof C.pipe=="function"&&C._readableState&&typeof C.on=="function"&&typeof C.write=="function")}function h(C){return C&&(C._readableState||C._writableState||typeof C.write=="function"&&typeof C.on=="function"||typeof C.pipe=="function"&&typeof C.on=="function")}function s(C,S){return C==null?!1:S===!0?typeof C[J]=="function":S===!1?typeof C[L]=="function":typeof C[J]=="function"||typeof C[L]=="function"}function E(C){if(!h(C))return null;let{_writableState:S,_readableState:o}=C,r=S||o;return!!(C.destroyed||C[P]||r!=null&&r.destroyed)}function b(C){if(!c(C))return null;if(C.writableEnded===!0)return!0;let S=C._writableState;return S!=null&&S.errored?!1:typeof S?.ended!="boolean"?null:S.ended}function d(C,S){if(!c(C))return null;if(C.writableFinished===!0)return!0;let o=C._writableState;return o!=null&&o.errored?!1:typeof o?.finished!="boolean"?null:!!(o.finished||S===!1&&o.ended===!0&&o.length===0)}function a(C){if(!N(C))return null;if(C.readableEnded===!0)return!0;let S=C._readableState;return!S||S.errored?!1:typeof S?.ended!="boolean"?null:S.ended}function O(C,S){if(!N(C))return null;let o=C._readableState;return o!=null&&o.errored?!1:typeof o?.endEmitted!="boolean"?null:!!(o.endEmitted||S===!1&&o.ended===!0&&o.length===0)}function W(C){return C&&C[G]!=null?C[G]:typeof C?.readable!="boolean"?null:E(C)?!1:N(C)&&C.readable&&!O(C)}function X(C){return typeof C?.writable!="boolean"?null:E(C)?!1:c(C)&&C.writable&&!b(C)}function k(C,S){return h(C)?E(C)?!0:!(S?.readable!==!1&&W(C)||S?.writable!==!1&&X(C)):null}function j(C){var S,o;return h(C)?C.writableErrored?C.writableErrored:(S=(o=C._writableState)===null||o===void 0?void 0:o.errored)!==null&&S!==void 0?S:null:null}function g(C){var S,o;return h(C)?C.readableErrored?C.readableErrored:(S=(o=C._readableState)===null||o===void 0?void 0:o.errored)!==null&&S!==void 0?S:null:null}function R(C){if(!h(C))return null;if(typeof C.closed=="boolean")return C.closed;let{_writableState:S,_readableState:o}=C;return typeof S?.closed=="boolean"||typeof o?.closed=="boolean"?S?.closed||o?.closed:typeof C._closed=="boolean"&&K2(C)?C._closed:null}function K2(C){return typeof C._closed=="boolean"&&typeof C._defaultKeepAlive=="boolean"&&typeof C._removedConnection=="boolean"&&typeof C._removedContLen=="boolean"}function t(C){return typeof C._sent100=="boolean"&&K2(C)}function i(C){var S;return typeof C._consuming=="boolean"&&typeof C._dumped=="boolean"&&((S=C.req)===null||S===void 0?void 0:S.upgradeOrConnect)===void 0}function D(C){if(!h(C))return null;let{_writableState:S,_readableState:o}=C,r=S||o;return!r&&t(C)||!!(r&&r.autoDestroy&&r.emitClose&&r.closed===!1)}function l(C){var S;return!!(C&&((S=C[F])!==null&&S!==void 0?S:C.readableDidRead||C.readableAborted))}function n(C){var S,o,r,$2,p,u,A,Z2,Q2,D2;return!!(C&&((S=(o=(r=($2=(p=(u=C[M])!==null&&u!==void 0?u:C.readableErrored)!==null&&p!==void 0?p:C.writableErrored)!==null&&$2!==void 0?$2:(A=C._readableState)===null||A===void 0?void 0:A.errorEmitted)!==null&&r!==void 0?r:(Z2=C._writableState)===null||Z2===void 0?void 0:Z2.errorEmitted)!==null&&o!==void 0?o:(Q2=C._readableState)===null||Q2===void 0?void 0:Q2.errored)!==null&&S!==void 0?S:(D2=C._writableState)===null||D2===void 0?void 0:D2.errored))}Q.exports={kDestroyed:P,isDisturbed:l,kIsDisturbed:F,isErrored:n,kIsErrored:M,isReadable:W,kIsReadable:G,isClosed:R,isDestroyed:E,isDuplexNodeStream:w,isFinished:k,isIterable:s,isReadableNodeStream:N,isReadableEnded:a,isReadableFinished:O,isReadableErrored:g,isNodeStream:h,isWritable:X,isWritableNodeStream:c,isWritableEnded:b,isWritableFinished:d,isWritableErrored:j,isServerRequest:i,isServerResponse:t,willEmitClose:D}}),m2=F2(($,Q)=>{var z=(d2(),f2(g2)),{AbortError:J,codes:L}=P2(),{ERR_INVALID_ARG_TYPE:P,ERR_STREAM_PREMATURE_CLOSE:M}=L,{kEmptyObject:G,once:F}=b2(),{validateAbortSignal:N,validateFunction:c,validateObject:w}=t2(),{Promise:h}=L2(),{isClosed:s,isReadable:E,isReadableNodeStream:b,isReadableFinished:d,isReadableErrored:a,isWritable:O,isWritableNodeStream:W,isWritableFinished:X,isWritableErrored:k,isNodeStream:j,willEmitClose:g}=h2();function R(D){return D.setHeader&&typeof D.abort=="function"}var K2=()=>{};function t(D,l,n){var C,S;arguments.length===2?(n=l,l=G):l==null?l=G:w(l,"options"),c(n,"callback"),N(l.signal,"options.signal"),n=F(n);let o=(C=l.readable)!==null&&C!==void 0?C:b(D),r=(S=l.writable)!==null&&S!==void 0?S:W(D);if(!j(D))throw new P("stream","Stream",D);let{_writableState:$2,_readableState:p}=D,u=()=>{D.writable||Q2()},A=g(D)&&b(D)===o&&W(D)===r,Z2=X(D,!1),Q2=()=>{Z2=!0,D.destroyed&&(A=!1),!(A&&(!D.readable||o))&&(!o||D2)&&n.call(D)},D2=d(D,!1),q=()=>{D2=!0,D.destroyed&&(A=!1),!(A&&(!D.writable||r))&&(!r||Z2)&&n.call(D)},V=(G2)=>{n.call(D,G2)},y=s(D),T=()=>{y=!0;let G2=k(D)||a(D);if(G2&&typeof G2!="boolean")return n.call(D,G2);if(o&&!D2&&b(D,!0)&&!d(D,!1))return n.call(D,new M);if(r&&!Z2&&!X(D,!1))return n.call(D,new M);n.call(D)},z2=()=>{D.req.on("finish",Q2)};R(D)?(D.on("complete",Q2),A||D.on("abort",T),D.req?z2():D.on("request",z2)):r&&!$2&&(D.on("end",u),D.on("close",u)),!A&&typeof D.aborted=="boolean"&&D.on("aborted",T),D.on("end",q),D.on("finish",Q2),l.error!==!1&&D.on("error",V),D.on("close",T),y?z.nextTick(T):$2!=null&&$2.errorEmitted||p!=null&&p.errorEmitted?A||z.nextTick(T):(!o&&(!A||E(D))&&(Z2||O(D)===!1)||!r&&(!A||O(D))&&(D2||E(D)===!1)||p&&D.req&&D.aborted)&&z.nextTick(T);let q2=()=>{n=K2,D.removeListener("aborted",T),D.removeListener("complete",Q2),D.removeListener("abort",T),D.r